Less LESS is More
Did I mention that I’m in love with simplicity? Oh, it seems that I have.
I won’t go into why simple is great again, this time I’ll just say that I’m also in love with speed. What can I say, I have a lot of love in me.
I want my computer to load fast, have a blazing internet connection, my browser should popup quickly and websites should appear like magic without me waiting. That’s just the way I roll.
On the development side, I always like things to be super fast. Coding in a dynamic type language is faster. Coding a scripting language is faster because there’s no need to compile it first. Downsides aside, it’s fast.
Let’s talk about Web Development
HTML and CSS coding is fast. Write markup, reload a page and see the HTML and CSS. Browsers will also let you play with the DOM and CSS until you’re satisfied and then you can save it.
JavaScript coding is fast. You can use the browser’s built in REPL to prototype and explore your code. You don’t have to compile anything, just reload the page and it’s running.
Wait! Let’s go back and have a look at something “You don’t have to compile anything”. Is that really true? It used to be true, but now we’re asked to compile (or “transpile”, is that even a word?!) from CoffeeScript, Babel.js, Facebook React and others.
I don’t like it. It’s not in the flow. I have to write watchers to covert to JavaScript. Setting up grunt or gulp processes to look after me. This might sound like a great idea, but at some point an app becomes big and you’ll feel it interfering with your flow. Next will get to the point where people want to include a pre-compiled headers file for JS projects.
The ideal would be to just code. Without extra steps. The open web allows this. Could React be written without the need to transpile? Yes, but the default is to add that step.
Oh, and that’s just JavaScript. It’s also CSS, with LESS/SASS/SCSS and HTML with HAML (this one’s my least favorite transformer).
A few points to make this blog post easy to read
I always prefer coding pure HTML/CSS/JS.
It’s simpler.
It’s faster.
It’s easier to collaborate since everyone knows it.
It’s more debug-able (no need for source maps in browsers).
A lot of people do not agree with me.
And that’s fine.
I use LESS at work.
What do you think? Drop a line on twitter: @ketacode
Tal Bereznitskey