Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I think it is more likely that you do not recognize your own flaws. It takes a real genius to be able to learn the little things about C++ in a week or two.

A language is not just the syntax of the language itself, it's also the code style, the convention, the best practise, the language specific stuff, the API of the libraries available, the best way of doing things with libraries.

If you use python to write simple number crunching console applications, then switch to ruby, that is an easy switch.

But if you're writing a Web application using Python and Django and you switch to writing DirectSound using C++, and you tell me you can do this in a week, then you are a genius.

The syntax of languages are trivial, but that's like saying you can discover the colors used in a painting. That's the easy part. The difficult part is knowing how it works. Let me list a few examples of technologies that I think differ strongly from each other that make it difficult to switch

- MFC with C++

- Django with Python

- DirectShow with C++

- VHDL

- ASM

- Javascript with JQuery

- CSS with HTML

- Helix Framework with C++

- Quicktime API with C++

- OpenGL with .NET

- LISP

Have you ever had to switch between things on that level? Or are you talking more of a python to ruby switch?



I've done apps in Java/Swing, Java/Netbeans, Java/JSF, PHP4/MySQL/PEAR, Python/(web.py|Pylons|Django), Flash/MTASC, JavaScript/JQuery, raw JavaScript, and Haskell/Happy/Alex, plus several others where I don't feel I really learned the technology in-depth.

I agree with your general point though. It takes me about 6 months to feel proficient in a language. It's not just the syntax - it's the idioms, packaging infrastructure, unit testing tools, code organization principles, code conventions, etc.


To go one step further, to be at an "advanced level" in a language also means to be idiomatic in it.

I have a hard time believing that's achievable in a "couple of weeks", regardless of the level of someone's "genius".

(Also, just because something compiles doesn't mean you're good at it.)


when programming, if you keep your mind on the structures and on the problems themselves instead of on the language, you'll naturally reach points where you will demand that the language do X. sometimes the language will be able to, and it will seem "advanced." sometimes the language won't be able and you'll sob quietly for a moment because you have to implement it in another less elegant way

but if you worry about the details of the language, it will prematurely affect the structures that you create. in this mode it's harder to write "advanced" things because you are respecting the language too much, and are more confined to its syntax/semantics

if you stay above/outside the language, you will naturally pull it up


Well, you prove the point. You are incapable of seeing your own weaknesses in a language.

One can write every language the same way, but that's not programming. You can't learn python and then write C the python way. You can't write Python as you would Java.

Syntactically, it's possible, but that's a different language you are using then.

Don't confuse syntax or knowing when to use particular constructs with knowing a language. Call me slow, but it took me 3 years before I felt confident that I really knew most of C++. I know when to use Boost, when to use STD, What AtlArray is, how to write an IDL file, what extern 'C' does, what an stdcall is, how my variables are layed on my stack, what Gui toolkits are available, how Borland C++ makes properties appear in C++ classes, when one should use an int64, etc.

It takes time to learn that stuff, but to be really good at a language, you need to know it.

We're like doctors, you don't need to apply your knowledge all the time, but when you need it, you need to be aware of what exists and where to look it up.

If they ask me - write a webserver under Windows, I need to instantly be able to think of 3-4 libraries I could use for the low level stuff, and then decide which is best. All that takes time.

The syntax is nothing. A language is a whole lot more than that. You can't stay above a language. You need to delve into the language, you need to have a feeling for the language, you need to feel inside you how to express things in a particular programming language.

When you describe a problem to me, I can see the C++ structure in my minds eye. I can mentally walk through the code, see where I would use templates, where I would use an interface class, where I would subclass and so on.

I can't do the same with python, because even though I know the syntax, I've not used it long enough to get an extreme feel for the language. And the python folks like to reduce stuff down to short lines, and that's something you don't do in C++.

Learning a programming language is learning a new way to think. Not a new way to string sentences together.


> If they ask me - write a webserver under Windows...I can't do the same with python

I'd use BaseHTTPServer. Batteries included and all that. ;-)


note the word "prematurely." of course you have to follow the rules of the language, but being inside the box of the language from beginning to end will limit your creations


I'm not sure if you're being serious here or not... It's tough to tell on the interwebs... But I'll play devil's advocate and pretend that you aren't joking.

Writing Java in Lisp doesn't mean you've mastered Lisp. There is a difference between understanding the logic and creating the implementation in the best way possible, given the language.

As a very simplistic example, C and Python have two different ways to iterate. You could write a loop in Python in a C-like way, but there are much better ways to do it (list comprehensions).

On the flip side, just because C doesn't have list comprehensions doesn't mean it's less powerful as a language. It just does things in a different way. Knowing those sorts of things is why being idiomatic in a language is part of mastering it.


yes, and there is the implicit APL way of iterating. the point is to recognize that they are all instances of the same thing

i'm not talking about java. i'm talking about structures -- problems, their domains, and the machinations that can be used to solve them, independent of any language or implementation


my final project for electronics engineering required a large assembly program. that was incredibly discipline-demanding. though nothing countless macros and subroutines couldn't solve. also met VHDL in that major

all the web things, CSS HTML, JS, PHP etc. XML things like XSLT and XQuery (both of which btw are strict functional languages), etc. both JVM and .NET runtimes. API's can be their own sorts of languages. matlab, mathematica and so on

funnily, i grew up on Java. but everything changed once i met languages with first-class functions

my current favorite languages are Lua and Arc. if Arc had a solid implementation i would use it a lot


Assembler is one of the easiest languages to learn, the difficulty lies in understanding your machine.


Hah! Spoken like someone that has never had the pleasure of coding assembler for the %*$!#@@ ST20


Hmm, should that not have terminated at the $?


the difficulty with a large assembly project is that you have to write a lot of well-named and well-designed macros and subroutines and otherwise create your own modularizations, otherwise it will be completely unmanageable. the main difficulty in my case though was having to interface to multiple devices, one of which was designed to be networkable (ie pain in the ass protocol,) something with which the language didn't help


That's where you fail. The first thing we learnt about assembler was this - write in assembler, do not invent your own language and write in that language. If you do so, nobody will be able to read your program but you.

It sounds like you went and implemented your DSL on top of assembler, which is really bad practise.


i love you too


I'm nice like that :) Don't worry, pg doesn't like me too, you're in good company ;)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: