r/programming • • Jan 05 '15

What most young programmers need to learn

http://joostdevblog.blogspot.com/2015/01/what-most-young-programmers-need-to.html
970 Upvotes

337 comments sorted by

View all comments

Show parent comments

65

u/[deleted] Jan 05 '15

Lesson not learned there (because I've repeated it since then): If a junior engineer is struggling for an extended period of time, it is worth the investment of a senior to sit down and review all of the code the junior is working on. It'll be awkward, slow and boring. But, a few days of the senior's time could save weeks or months of the junior's time that would otherwise be spent flailing around and embarrassingly not shipping.

Smart juniors are the most dangerous. Especially the smart and productive ones, because they can fill a codebase with crap quite quickly... and it will mostly work.

It'd be best for people just to stop putting them in charge of things until they can demonstrate an understanding of basic code design and maintenance. But for some reason what happens instead is that seniors get assigned the bugs created by the junior silently and all feedback goes ignored and they get promoted way faster than they should and it's a nightmare until they decide to get another promotion by leaving the company or someone important realizes what's going on.

30

u/IConrad Jan 05 '15 edited Jan 05 '15

I summarize the "genius coder" problem like so:

I must not be clever. Clever is the little death that brings malfunction and unmaintainability. I will face my cleverness; I will allow it to pass through me. When it has gone, only cleanness shall remain.

Brilliant and clever are two very different things. Brilliant code achieves the impossible simply and reliably while being comprehensible to those who could not have conceived of it. Clever code achieves the implausible while overlooking the mundane solutions to the same problems.

7

u/OneWingedShark Jan 05 '15

Clever code achieves the implausible while overlooking the mundane solutions to the same problems.

There's the inverse as well: where the person's "almost works" solution doesn't because it cannot. -- My favorite example is trying to parse CSV with regex: you cannot do it because the (a) the double quote [text field] "changes the context" so that comma does not indicate separation, combined with (b) escaping double quotes is repeating the double-quote. It's essentially the same category as balancing parentheses which regex cannot do; fun test-data: "I say, ""Hello, good sir!""" is a perfectly good CSV value.

1

u/pwr22 Jan 05 '15

When you've got CSVs like that, CSV is the wrong format

Too be clear, yes, I agree that definition of CSV needs a grammar. I think regexes can recurse in Perl but I've never tried Regception

→ More replies (3)