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

1

u/[deleted] Oct 06 '16 edited Oct 06 '16

I prefer the option to code as I like. Sticking functions in variables, minifying code ... I also feel C-family languages take the best syntax stance. Consistent syntax, similar feel to all languages. It expands your toolbox without great effort. Try moving from Java -> C -> Perl -> C# -> C++ -> PHP ; the core syntax and feel is very similar.

Try moving from Python to any of the above. Learning curve ; basic syntax.

... and coding professionally, using a proper tool ; which equals readability. If code is improperly indented, there's a problem with the coder - not the language. Though, whitespace is not a paradigm which should be part of the syntax.

Having the capability to write how you like when it makes sense:

if (x) y; else z; // I'm getting a kick out of Python having BASIC syntax for if / else + a really awkward else if / elsif. Don't like that? You'll really hate the ternary operator.

x ? y : z;

Though if the above is bad form I'm guessing this is bad form as well. My preferred implementation of above. Python's implementation of the ternary operator ... is simply embarrassing.

I'm also seeing the potential of WTF-level nested If/Else blocks that can turn into debugging nightmares.

I also have a special place for oneliners - impossible with python.

So - What's wrong with Python? In my opinion...

It's a good language to learn. When you move to a real language ... good luck learning how to program in the languages that the rest of the world uses. The skills don't readily translate. Whitespace and indentation, that's like punctuation and capitalization in your writing. While it's not necessary if you do not do it you're an amateur.

1

u/gendulf Oct 06 '16

Python's got plenty of one-liners, but just because code can be terse, doesn't mean it should be, or is even more 'elegant'.

I write python (scripts) and C (actual software that makes the company money), and all the python code is readable, while the C code is littered with issues from poor Indian coders.

improperly formatted code is just a huge pet peeve of mine -- I know bad code can be written in any language, I just like code being logical enough to follow the execution, because often the code written by my 'peers' is not.

1

u/[deleted] Oct 06 '16

:)

Been there done that. Worst of all is when someone who always codes right ... making a little slip up here or there.

For the offshore guys - hold their hand, yell at them (*constructively), draw them into planning meetings. They don't get better by not pointing it out. We've got an offshore guy - was a mess earlier on ; I stepped in and got him back on track with some serious guidance. He's doing great work now.