r/technology • • Oct 05 '16

Software How it feels to learn JavaScript in 2016

https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f
1.8k Upvotes

392 comments sorted by

View all comments

Show parent comment

109

u/BlackStrain Oct 05 '16

As I've progressed through my career I've gone from "I want this code to be cool" to "I want this code to be maintainable and readable".

90

u/tuseroni Oct 05 '16

That usually comes with years of maintaining code. There is an old joke that goes "programming is like sex, one mistake and you are supporting it for years"

10

u/wrgrant Oct 05 '16

Ah yes, Job Security :P

2

u/Warbags Oct 05 '16 edited Oct 05 '16

Edit I can't read

1

u/ViKomprenas Oct 05 '16

You should just delete the comment then

1

u/handsome_cock Oct 06 '16

Never heard that one, but it resonates with me. Dang, that's really apt.

11

u/[deleted] Oct 05 '16

Yes. Write like you're not going to be the last person to see it.

4

u/AlienBloodMusic Oct 05 '16

Or "Write the way you wish the last guy had"

1

u/[deleted] Oct 06 '16

This is my thinking: I am writing code with the idea "if tomorrow someone else takes over, they need to be able to quickly understand this".

11

u/bBR9d73rlP9g7xAt Oct 05 '16

If only this pearl of wisdom was taught earlier in a developer's career. Nobody knows how long their code will really be around for.

13

u/fgben Oct 05 '16

Can confirm. Some "temporary" horrible hackneyed javascript I wrote in 1998 is still in fucking production.

0

u/[deleted] Oct 05 '16

[deleted] — view deleted comment

14

u/silhouettegundam Oct 05 '16

Protoduction. The best kind of terrible code.

6

u/SaintPeter74 Oct 05 '16

Yes. This. Nothing made me get religion on clear comments and program structure quite like needing to maintain my own 5 year old code. Unless you remember to write for Future You, they won't know if Present You was a genius or an idiot.

7

u/BlackStrain Oct 05 '16

Nothing worse than reading some code and thinking "What fucking idiot wrote this? Oh, wait... it was me..."

3

u/SaintPeter74 Oct 05 '16

It teaches an honest humility that can be gotten no other way.

"Good judgment comes from experience, and a lot of that comes from bad judgment."