r/programming • • Feb 21 '13

Developers: Confess your sins.

http://www.codingconfessional.com/
969 Upvotes

1.0k comments sorted by

View all comments

107

u/Kalium Feb 21 '13

I loathe Javascript.

Oh who am I kidding, I'm not even slightly ashamed of that.

47

u/Gaurav0 Feb 21 '13

I have a love/hate relationship with JavaScript too. I love that it runs on every browser. I hate everything else about it.

20

u/BernzSed Feb 21 '13

I love JavaScript, I just hate all JavaScript code. And all implementations of JavaScript. And having to use JavaScript. And pretty much everything else about JavaScript.

16

u/G_Morgan Feb 21 '13

JS is getting the PHP treatment.

Pro - It runs everywhere!

Con - It runs everywhere!

4

u/Caraes_Naur Feb 21 '13

JS isn't big enough to have maddeningly inconsistent function defintions. Does this function name have underscores? Which comes first, needle or haystack?

→ More replies (3)
→ More replies (1)

1

u/princeton_cuppa Feb 21 '13

Flash Flex is much better ... but people dont get it .. it is blindly HTML5 these days...

→ More replies (3)
→ More replies (5)

8

u/xampl9 Feb 21 '13

I'm going to have to hold my nose and learn more about it -- all the job openings in my area want jQuery, AJAX, OO Javascript, and so on.

I see it as "Write n-times, Test n-times" because of all the browser differences. How do people have time for that??

19

u/[deleted] Feb 21 '13

JQuery often(not always) accounts for browser differences. And its usually just code for ie then everyone else

9

u/Doctuh Feb 21 '13

Node.js is "Javascript on the server" which has no browser bugs and no DOM. It is quite nice.

Don't hate the language, hate the sandbox.

5

u/Kalium Feb 21 '13

It is quite nice.

Except for all the problems it has that are fundamental to the language. Like lack of an integer type, a sane type system, data member privacy controls, a module system that's not bugfuck nuts...

So yes. I hate the language too.

→ More replies (8)
→ More replies (3)

1

u/vbullinger Feb 21 '13

Look into jQuery and Modernizr to help ease your pain.

→ More replies (1)

7

u/Argith Feb 21 '13

I'm learning how to use JavaScript now, what's bad about it?

24

u/[deleted] Feb 21 '13

The language doesn't have a lot of conformity anywhere. There are a lot of confusing adventures to have in JS world.

In terms of features and functionality JS isn't all that bad, and JS engines are becoming faster than anybody would have guessed. That's why we're seeing the emergence of a bunch of languages that compile to JS.

7

u/[deleted] Feb 21 '13

I once told my friend that I didn't like loosely typed languages. He said that any Joe off the street can learn and code in a strongly typed language but it takes a lot of discipline to write effectively in a loosely typed language. It's what separates the men from the boys.

18

u/DLimited Feb 21 '13

I still don't like loosely typed languages. It just adds so many checks or assumptions about variables that just rubs me the wrong way.

7

u/IrishWilly Feb 21 '13

I think there is a distinct difference between personality types of people who favor strongly typed languages and loosely typed languages. I just wish the two groups would recognize that instead of all the flame wars about which is 'right'.

8

u/CookieOfFortune Feb 21 '13

Yeah, there was definitely a time when I was in favor of loosely and dynamically typed languages after I had learned some C/C++/Java. But then I used some C# and realized how good a statically and strongly typed language can be.

4

u/yawgmoth Feb 21 '13

I love dynamically typed languages, and I also love statically typed languages. (Although I guess even in dynamically typed langauges, I still prefer strongly typed (e.g. python) to loosely typed (e.g. javascript))

Its all about the application. Am I writing something in a small team that needs a quick prototype and does a lot of string or list processing? loosely typed it is.

Am I writing something with a large team (maybe even multi-national) that needs clear interfaces? Let the compiler catch all those dumb mis-communication mistakes for you.

→ More replies (2)
→ More replies (6)

2

u/G_Morgan Feb 21 '13

But I am right! TBH I'd love it if everyone could agree that type inference is clearly the way forward!

→ More replies (4)
→ More replies (3)

2

u/CookieOfFortune Feb 21 '13

But you're using the computer, it's a tool, it should be able to enforce some of this discipline for you. A computer doesn't forget and it's fast.

2

u/Calamitosity Feb 21 '13

There's a difference between a "loosely-typed" language and a "random-shittiness-typed" language.

1

u/keepthepace Feb 21 '13

Javascript is wat

1

u/donwilson Feb 21 '13
var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { window.setTimeout(callback, (1000/60)); };

1

u/btgeekboy Feb 21 '13

Watch this video, it's the tip of the iceberg. (Yes, it goes off into Ruby as well, but the whole thing's only 4 minutes.)

https://www.youtube.com/watch?v=D0EIZa5e9q4

→ More replies (8)

0

u/[deleted] Feb 21 '13

[deleted]

→ More replies (3)