On Our Radar This Week: Does JavaScript Suck?

By Paul Wilkins
We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now

Animating CSS and making it last.

Spinner - red circle to green square to blue triangle
Alex caught our attention this week with a challenge to recreate this GIF image using just HTML and CSS, where a green square morphs to a blue triangle and then to a red circle. It’s quite the challenge, which has me tempted to use Marka for beautiful icon transformations.

We’re also seeing that CSS can be used to achieve a beautiful front cover of The Hobbit bending open and closed, with access to the CodePen code to see how it’s done.

Much of the above is achieved using strange tricks and techniques. If instead you want your CSS code to endure without needing to be updated, here’s how you can write long-lasting style sheets for rapidly changing, long-lived projects.

Why JavaScript sucks, and how to make it better

Some controversial information about JavaScript arrived on our doorstep today, asking why does JavaScript suck? The article provides good details about issues with its presentation, quirks within the language, and a whole range of annoyances that are important to be aware of. Such problems are vital to know so you can try to steer away from them when developing your own code.

A nice talk took place this month at the Sud Web Conference with JavaScript coding tips, featuring an analysis of GitHub commits to know which conventions are popular, before moving on to style-guide recommendations found in the meta code style guide. Whichever styles you prefer to work with, when working with other people it’s vital to have agreement on a consistent coding style to prevent issues later on.

Taking things further, John Resig has an interesting series on learning advanced JavaScript where you can code live on the page and try out different ways to achieve things. We’ve also been reminded this week about a definitive source of the best JavaScript libraries, frameworks, and plugins.

Hyperlapse videos

Microsoft have also announced an algorithm for first-person Hyperlapse videos that takes the footage and stabilises it to the point where even when played back at ten times the speed, it’s a smooth presentation that’s easy and enjoyable to view. It’ll be great to see what people come up with.

That’s it from us this week, thanks for joining us.

Which links caught your attention? How did you manage Alex’s coding challenge, and do you agree JavaScript sucks? We would love to hear your thoughts.

We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now
  • Tatsh

    I see JS as a necessary evil for now. 90% of the time I can get away with coding in CoffeeScript so I do. As a result, I generally view JS as a target (like one would see an OS as a target in a build system), not really a language. Too verbose, too much conflict on how to do the most basic things “The Right Way”(TM), perfectionist egotism all around for those who ‘love’ it and consider themselves experts (who then ignore all naysayers). Sorry, not interested.

    Unfortunately all the browsers *only* support JS (except for IE with VB in compatibility mode) to a decent level and getting them to support anything else would be a very long battle. I do not know what language I would want supported if I could choose one more, but I know I would generally want a a slightly stronger typed language (but not crazy) at minimum, with indents instead of brackets.

    • James Hibbard

      I think a lot of people view JavaScript as a language to compile into (as this list illustrates) for a variety of reasons.

      Personally, I quite like writing JavaScript, but If I could choose a language to replace it in the browser, I’d opt for Ruby (owing to its lovely syntax and the fact that it was designed from the ground up to be object-oriented).

      Unfortunately, the nearest I’ll come to this is Opal.

    • peec2

      Try ecma6 standard with a transpiler instead of garbage toys like coffeescript. Coffeescript is only waste of time, you will be much better of learning a real language

  • matt

    No, JavaScript was doing fine this week.

  • Kelderic

    I just steer clear of JS for the most part and use jQuery. It’s slightly more overhead, but it’s so much easier.

  • Nice post. I can see “Compile-into-javascript” being an option… that said, with the rate browsers are developed these days (Even IE), having a JavaScript 2 or similar that fixed a lot of the problems (Especially JS’s horrible object model) would be a better solution. It would only take a year or so given current browser development speeds to introduce an updated version of the language.

    • Manius

      A “JS2”, if that means a 100% complete redo of the language designed from the ground up with ZERO consideration for how it works today… that would be fine as long as it isn’t named something as fucking stupid as JavaScript 2. Seriously, is there zero creativity left in the development world? It’s past time to completely cut the damn cord from that defective bastard child of the 90’s.

  • Manius

    “Does JavaScript Suck?”
    If you really don’t know that the obvious answer to that is YES by now, you’re too fucking dumb to help. How to make an outdated scripting language designed in the 90’s better? Replace that shit, that’s how.

    • peec2

      You gave me cringes through my spine. Go read about ecma 6 and… functional programming. Just because you dont understand JS doesnt mean it sucks.