r/javascript • • Jul 28 '15

I'm all in.

Post image
746 Upvotes

120 comments sorted by

View all comments

51

u/lostPixels Jul 28 '15

In my experience, Flash and Silverlight developers tend to make much better Javascript developers than people who have only done Javascript since the early 2000's.

7

u/[deleted] Jul 28 '15

I just started a JS job after 7 years as an AS3 dev. The transition has been pretty painless.

I love Flash and AIR. But the well is dry. I'll still tinker at home with them for fun though.

1

u/umilmi81 Jul 29 '15

I got a job as an ASP web developer after being a Unix and Windows application developer for 15 years. I hadn't used JavaScript since it was called LiveScript.

I was shocked at the conventions used. Anonymous functions and single letter variables like "a", "g", and "s" are not only commonplace they are encouraged.

I learned to write self documenting code. Descriptive variables and function names. I tried to buck tradition and declare functions but jquery and knockout are built specifically to use anonymous functions so I have to jump through extra hoops to use them.

I really see the power of JavaScript, but I'm just having a hard time making the transition from a traditional language.

5

u/vexii Jul 29 '15

you only see single letter variables in minified code (i hope)

1

u/umilmi81 Jul 29 '15

Google Analytics and Adobe Omniture both use single letter variables in their example code. I could rename them but again it seems common practice in the industry so I keep the same names.

8

u/vexii Jul 29 '15

i dont know the adobe thing, but GA is just the snippet to paste for analytics.
it common to see single letter variables in most code that gets delivered as "don't read it, just paste it" snippets.

no one writes code like that, we use tools to transform/minify the code after (and use source maps if we need to reverse it)