Stop telling me how to code!

Some days, someone absolutely hates prototypes in JavaScript - other days somebody tells me I should NEVER use ==, only ===

Well… Stop telling me how to code!!!

I’ve been coding (at least typing code), since I was 4-5 years old… (I’m a bit more than that now…)!
I know what the happens, if I choose to use if(myInt == 0)!!! Do you?!?!

Most hated (by some) features of languages are there for a reason… By design!

Start learning the language, before you skip to the next language, that you are also going to utterly hate, for some weird reason or another!

 Languages has purpose

Languages, is in most cases, designed to fulfil a purpose as a tool, for solving some particular problems - sometimes all problems…
The creators often did a shit load of thinking, before they sat down a started typing…
If you ignore that, you are probably never going to learn a language well enough, to actually produce anything of simplicity, speed and maintainability, that actually resembles a software product…

I am not saying, that it is not possible to develop an iPhone app in Go… Just that you chose the fucking tape, when you needed a drill!

You might be able to make a hole in a wall with a pencil, but you better know the qualities of that pencil and the wall extremely well!

 I love trying out new language

But I read about the reasoning, thoughts and ideas before I start coding!
And I keep reading as long as I am learning the language - which will be for at least 1 or 2 years!!

It’s not that I am not able to sit down with a new well documented language and start coding something, which can actually be used within a couple of weeks or months… I will just have to rewrite it, once I am done with it!

When I have been coding for some time, I start realising where strengths, weaknesses and quirks exists in the language and I can start writing horribly simple code like:

if(!someVar) {
  // Here I can assume, there is nothing useful in someVar
}

instead of this mess:

if(typeof someVar === 'undefined' || someVar === null || someVar === 0 || someVar === false) {
  // Here I can assume, there is nothing useful in someVar
}

When you know your language and environment, you can start taking shortcuts, because you know what works and what will happen, when you do x, y or z…

You can then start to do stuff like this:

// In node.js
[1,2].forEach(function(index, value) {
  console.log(index + ': ' + value);
});
if(['abc', 'xyz'].indexOf(someVar) !== -1) {
  // Do something
}

Which would result in (fatal) errors in Internet Explorers with crutches and wheelchairs, but helps you while in node.js.

 What I am trying to say is…

Share you experiences - help others to not hit the pitfalls you did…
But stop pretending (or worse: thinking) you are the new JS guru, which must educate the entire breed of developers, lest we fail and write code so gruesome, that it has not been seen so, for pairs and pairs of years!..

Most languages (at least the most misunderstood) has existed for so long, that it has been refined again and again - and gurus are to be found in elder homes (almost)…

So stop… Think… Read… Understand… Try… Repeat!

Then you might one day become a sorcerer of the source… Instead of just stepping in the sauce…

Can we get back to coding now?


Discuss @ HN

 
32
Kudos
 
32
Kudos

Now read this

The Internet Of Talking Things

What if everything could interact and learn from other things?.. How would the world look … If your phone could talk to the lights, the lights could talk to your TV, the TV could talk to your vacuum cleaner… etc?.. The Internet of... Continue →