I Was Wrong About JavaScript and Responsive Design

Earlier this year I wrote a blog post about JavaScript and why I thought it was doomed; I also wrote a blog post about responsive design and why I thought it was a waste of time.

To be fair, I didn’t completely bash either technology, but I also didn’t have very many kind words to say about JavaScript or responsive design either.

It turns out that shortly after writing those articles, I found myself, ironically, working much more with JavaScript and having to use websites from my mobile device that were not created with responsive design techniques.

I consider myself to be pretty open-minded, especially when it comes to technology, but in both of these cases, I was being a bit narrow-minded and I think it is important to be willing to admit when you are wrong.

Man made a mistake

First let’s talk about JavaScript

Dear JavaScript, I’m sorry I said that you were ugly and that you would die soon.  I realize that you might not be the most attractive programming language ever created, but like troll dolls or the furby, you have a special kind of beauty that I’ve since learned to appreciate.  And, as for predicting your death, well, it does seem that you are still in the prime of your life, and while everything eventually dies, even programming languages, it isn’t nice to remind people of their mortality.  So, for both of those offenses, I am truly sorry.

On a more serious note, it seems that pretty soon after writing up that article I ended up creating several Pluralsight courses in which I was doing quite a bit of JavaScript development.

By doing this, I actually discovered that the ubiquity of JavaScript was actually very valuable and that it wasn’t as hard as I imagined to create fairly complex JavaScript based applications.

Let me explain a bit further.

After having created several applications using several different platforms and technologies with JavaScript, it became clear to me that the language itself was very flexible and JavaScript’s ability to easily treat data like code, through the use of JSON, was very useful.

At first, when I was just creating web applications with JavaScript, using it as a scripting language to do UI automation, this flexibility seemed to get in the way and make things more complicated than I liked.  I still think that JavaScript can be quite messy in a traditional web application that posts back to the server.

But, when I started using JavaScript to create Chrome plugins, and develop Single Page Applications, this flexibility became extremely useful, because I could basically create exactly what I wanted without a bunch of ceremony around it.  I started to see JavaScript as something I could use to build a more specific API that was specific to the problem domain I was solving.  I also saw that in many cases, for example Meteor, someone else was already doing this for me and I could just follow the conventions they laid out.

I still think there are some things about JavaScript that need to be improved.  But, overall, I have learned to stick to the good parts as much as possible. More importantly, I have learned that knowing the core concepts of JavaScript and programming with JavaScript has allowed me to build a good base which I can bring to many different platforms and environments.  Even though different programming environments may define their own conventions for using JavaScript to create an application or extend one, it is relatively easy to adapt to those conventions once you are familiar with some of the core parts of JavaScript that carryover everywhere.

I also have grown to like the prototypical nature of JavaScript and other prototypical languages like Lua.  I’ve always been a big fan of statically typed languages, and I still am, but I can also now appreciate some of the patterns that only a prototypical language allows which can really allow you to do quite a bit with just a little code.

Onto responsive design

I actually had a very enlightening conversation with a gentleman on Twitter, who really helped me take a second look at responsive design and why it was more useful than I thought.

One of the biggest ways that he shifted my thinking about responsive design was by helping me to realize that it isn’t just PC, mobile phone, tablet, but that there were all kinds of forms factors and kinds of devices that a web page should look good and function well on today.

Stacked old faulty mobile phones

It also seems that right after I had written that article that I ended up having to use my phone for doing web based things much more than I had before then.  I quickly became frustrated with websites that did not implement some kind of responsive design and found myself smiling when I happened upon a website that was mobile friendly and altered the UI to make it much easier to use on a phone.

When I thought about it more, it turned out that I was responding instinctively to the fad of responsive design, but not realizing the actual value that was there.  I probably have a tendency to backlash hard against technology trends that seem to be fads or trendy.  Sometimes, I do get a bit overzealous in doing so and don’t realize that even though many people are ignorantly worshipping some new technology or trend, there are many others who are wearing the latest techno-fashion, because it really is good and useful.

By the way, I found this book, to be a good resource for learning about responsive web design, if you are looking to get a bit more understanding of it.

I still don’t think it is healthy or smart to jump all into responsive design without a good reason for doing so or having a good understanding of the value it will bring.  (Responsive design is not for everyone.)  But, I do think responsive design is a good solution and should be implemented in many more cases than what I had originally thought.  I can see a large amount of value in making an existing site responsive, because it can attract more business and make it easier for existing customers to give you money or use your product.

I even find myself wishing that my website was more responsive.  This blog has a default mobile theme, but I am wondering how much mobile traffic I am losing out on, or how many opportunities to convert that traffic to customers to one of my products I am also missing out on, because I am not presenting the information on this blog in the best way I can for a smaller device.

A good lesson

It turns out being wrong about these two technologies was a good lesson for me, because it helped me realize that even though I like to think that I have eliminated most of my technology biases, there are still plenty that exist.

One of the key things that I’ve always said about this blog is that I am not going to stop from saying something because I am not 100% sure of what I am saying.  What I mean by this is that I will give my view to the best of my knowledge, but that view is subject to revision.  There really is no need to hold onto a viewpoint that is wrong, once you realize it is wrong and it is ok to be wrong sometimes.  We all have to be willing to grow and learn along our journey.  If we want to be able to improve, we have to be willing to allow ourselves to be wrong and to be ok with that.

There are so many posts that I have written for this blog that I wouldn’t agree with 100% today and that is because my knowledge and experience is changing.  I really wouldn’t want it any other way.  If I agree 100% with what I wrote about last year or the year before, I would be 100% the same person I was back then, so I wouldn’t be growing and improving.  I’d rather be wrong sometimes and grow than think I am right all the time and stagnate.

Want to know the best way to increase your salary or hourly rate?
Sign up here to enroll in my FREE 3 Week Email Course: "How to Build a Blog That Boosts Your Career" and I'll show you how.

  • Rama Krushnudu Vadela

    i think you forgetted to mention the book name of responsiv design.

    • jsonmez

      Thanks, fixed

      • Patrice Gahide

        No, it isn’t. Or is it? Am I missing something?

        • jsonmez

          Ok, should be fixed now. I am not sure why it didn’t update the link the first time.

  • Pingback: Dew Drop – December 10, 2013 (#1680) | Morning Dew()

  • Bonyfus Martin

    This is really good. There are people who argue for the sake of proving they are right. I knew you are not one of them. So when you are adding your javascript course in pluralsight? :)

    • jsonmez

      Thanks. I’ve actually got a few courses already that use JavaScript. But, I haven’t done a full JavaScript course yet.

  • Aaron

    As a JS newbie, overwhelmed by the cryptic nature of JS, I first felt validation reading your previous post about why the language is doomed; now I feel some relief in reading this update. Knowing that I’ll have to make my peace with JS, it’s good to know it has its positive sides.

    • jasonm23github

      Our OP was just coming to the realisation, of JS being everywhere. That doesn’t mean it’s a good language, it’s not, it just means you must know it, or you’ll be the one who’s doomed.nnnMeanwhile we can and should hope / work towards something better.nnnAs a stopgap, the numerous transpilers offer a lot of options. (CoffeeScript, PureScript, TypeScript, ClojureScript … etc. etc.) These can all be source mapped, so dev tools debugging with your original source is an option, that works well.nnnBut like I say, if you don’t know raw JS, you are still adrift. You will not* get professional Web Dev work without knowing JS inside out. nnn(* unless you really luck out.)

  • Daniel W Roth

    Excellent, again! One of the things that has kept me from seriously starting a blog is fear of being wrong. I find myself being wrong so often, why put it out there for every one to see? ;) No more delay–you’ll be my inspiration for getting it done.

    • jsonmez

      Awesome, give me the link when you get it up.
      The fear of being wrong is a very common one that prevents developers from creating a blog. I hear it quite a bit. It is just something you have to get over. We are all wrong a good portion of the time. I even find that I don’t always agree with what I wrote the previous week. But, that is what makes us human and it really is how we grow. I have much more respect for a person who is wrong and puts themselves out there than someone who avoids appearances of being wrong at all costs– I’ve found most people do as well.
      Glad you are doing it, excited to see what you write.

  • billtheamerican

    John… I just saw a for each in javascript. You were right. It is a very horrible language. Keep up the good work.

  • Macuser1010010

    Yes, I really love to learn how to use one web page twice. I allways love when a RWD website has disabled the zoom-pinch functionality. I love when touch fuctions like copy’n paste makes the javascriptfilled webpage to jump around in the browser… I love when RWD developers say that the reason is “they do it wrong!”.

  • johnsmartypants

    Nah.. you were absolutely right about it the first time.. It’s an ancient language from 1999 that has ruined the internet and progress due to it’s horrific ways. It’s so bad that you have a gazillion libraries that are trying to fix the fundamental problems with it and that steamrolls into a another pile of shit where you have no idea when you get code from someone what frameworks and libraries they will be using.

    On top of that let’s not even talk about code extendibility, working with javascript in teams and complete lack of coding standard. It’s a wild wild west out there.

    The only thing that’s left to try to make Javascript actually work ok (saying how Javascript is good for mobile stuff is ridiculous) is to try to constantly put bags and bags of money into making browser JS engines like V8, SpiderMonkey and others on mobile like Nitro trying to make it not suck, but this is an equivalent of putting perfume on a turd. After all is said and done, it still smells like a turd.

    I suggest to people to stop wasting time with Javascript out of complacency and start doing real programming with real world languages that are proven and are being used for native application development as that’s what the future holds. Not responsive sites, not web sites or calling it fancy names like “web apps”.. The web is dying because it’s ancient using a 1999 scripting language to write interactivity and functionality while relying on a retarded DOM even though again we have a ton of frameworks like Backbone, Angular and others who are trying to solve this very issue that just make things worse by introducing a bunch of new frameworks for people to learn just to deal with crap technology.

    Web was revolutionary in 2000s, the world and technology is moving on and the web and everything that was used before JS/CSS/HTML is ancient and will never be able to keep up with the progress.

    Again, your initial opinion was correct. Javascript is going to eventually die. The reason why it will still be a while is because there’s a ton of stuff that depends on it so we are all stuck with this ridiculous scripting language and all the time sucking, resource wasting affairs we have to put up with it.

    The faster we move on and use something else the better it will be for everyone instead of trying to save and “improve” something that was never meant to be what everyone wants it to be.

    • Gaius

      I wonder what happens here when “Meteor” (one of a million ‘frameworks’) is abandoned?

  • William Hoblitzell

    My 2 cents: You had it right the first time. JS is an ugly duckling. It is not designed for server-side programming. JS’s notion of “objects” is an absolute joke. Node.js, years later, has now proven to be just one more in a long-line of flavor of the month script kiddie stacks.

  • persistentdeveloper

    Hi John,
    I just want to ask your opinion about AngularJS framework whether you are using it or have been attracted with it as Google made it.
    Thanks for your opinion in advance.

    • jsonmez

      I’m a fan on AngularJS. I haven’t used it all that much, but I like the design.

  • Charles

    Yeah JS is amazing WHEN YOU ARE THE ONE BUILDING IT….try inheriting a complex JS project built by purely web developers on contract with no understanding of OOP…..everything is implicitly coupled to where I am at the point where I’d walk out of the job if I had the money to do it.nnTakes me 2 minutes to implement telerik’s ASP .NET Rad Scheduler, get it loaded up with data, and have it running and integrated into our site.nnTaken me 5 hours and counting just trying to navigate the spider web that is our front end JS to implement their kendo HTML 5 JS version, because someone decided our web service caller needed to be tightly coupled with god knows what instead of stand alone and/or taking objects/parameters.nnHtml, css, JS are an archaic monstrosity that needs to be deleted and rebuilt from the ground up using proper OOP. Its no different than c++.nnIts not even good for mobile development, Pit PhoneGap vs Native code on Android and Native code always demonstrates high performance.nnIts the comcast of the web development world, except its free. Its simply too embedded to get rid of.nMaybe I am spoiled, I grew up on Java and C#…but then again, I rarely see anyone who wants to go back to doing things like managing memory in c++.n

  • humpity

    It’s not javascript. It’s the way it is used. Like this site, about 50 other references to scripts of other sites is bogging down my cpu. (WSJ is another horrendous site).nn ‘Responsive Design’ is just another excuse and exploit by academics for what is really just common sense.