February 2, 2014 (second half)

So after I posted that I had a dash of productivity. I discovered that Chrome Canary was not crashing anymore so I continued to do my project.

I have a lot of uneasiness seeing others’ code styles and their arguments all have good points. My code style by the way really just derives from Microsoft’s: 4 spaces for indentation, starting brace along with the block starter, and avoid putting comments on the same line as code if possible—put them before the code. Also, put spaces between operators, it makes the code look cleaner. 🙂 But don’t put spaces around function parentheses, and around their children, this is to mimic math.

First off, the tabs vs. spaces debate. I have read posts on why one is preferred over the other yesterday. A pro-spaces post argues that when tabs are used in places other than indentation, things can get messy with different tab widths. My argument is that people shouldn’t really put things like comments on the far right. Put comments before code. Some people like to realign things like key-value pair values or CSS values, this is just for aesthetics really and is not required, but it does make editing multiple ‘values’ a lot easier. My argument is that for realignment, use spaces altogether.

A pro-tabs post argues that it should really be the user’s choice when it comes to tab-width, aiming to be flexible over people’s preference on tab widths. Of course the post overlooked the above arguments, but the post’s points are also strong. But my faith is not shaken. 🙂

I’ve also read a bit about CoffeeScript. I would want to try to use it sometime, but definitely not on my current project. CoffeeScript would end some of my frustrations with Javascript, though.

Mostly, I just don’t want to use CoffeeScript as much as I wouldn’t TypeScript or Dart. The reason is simple though: they’re not web standards. Not everybody sees them, not everybody understands them. And by everybody I also mean every user agent in general. Chrome might implement Dart, hell, does IE support VBScript? But only your old fellow Javascript is supported in almost every web browser on the world. There’s a reason old and even young fellas love the old stuff, it’s the same reason C++ still exists. But we’ll all have to move on some day as technology advances. But it’s not yet the time. Or maybe it is. It’s both. It’s a gradual evolution. P.S. Fuck Java. Fuck PHP.

And I have also read that semicolons are optional in Javascript. Yes. They are. I’ve seen code, but I just ignored them at the back of my mind. But Javascript is in fact that. There are just a few quirks, but the fact remains. As before, my faith (yet) is not shaken, as is with my IDE. (But I will. And I have to when I start coding in CoffeeScript. Hehe!)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s