4 ms·
Here's a (partial) translation of the author's post on Habra Habr. ----- I didn't want to take part in this week's trend on Habra: "We can write everything in
by pash 13y ago
Here's a (partial) translation of the author's post on Habra Habr.
-----
I didn't want to take part in this week's trend on Habra: "We can write everything in 30 lines of code!" I didn't have the time to spare.
But theaqua's post [0] about writing a "Hello, World" in a single line of pure JavaScript inspired me to beat that record. I had already written a game using JavaScript, HTML, and CSS, and here it is now with a grand total of zero lines of code.
After reading theaqua's post, I couldn't sleep. I was agonized by insomnia, so I gathered myself and sat down to re-write the game. Mindful that I had to use exactly zero lines of JavaScript, I was very scared. Writing a program in 1000 lines or more is no problem. But writing zero lines of code ... that's insane. It turns your brain inside out. It changes the way you look at the web. You realize that, before, you didn't do things right.
For those of you who don't like to wait, here's a demo [1].
It's not a fake. It's a full game. Details after the cut.
...
I've been programming for a long time. And it was for just that reason that I believed that I could manage a complex task like taking a game that was originally written using JS and re-writing it with zero lines of code.
Before this project I looked down on HTML programmers†. But now I realize that they'll soon rule the world. You'll remember how there was a time when JS programmers weren't taken seriously. Do you remember those dark ages? But now take a look ... JavaScript is not just a trend. It's everywhere. In the browser, on the server, running on microcontrollers and mobile OSes. You can write operating systems in it, and games. ... And now, HTML programming is quietly creeping up
on it.
One of these days writing zero lines of JS will be the norm. JS will fall out of fashion in the same way Flash did. Why write JavaScript if it's slower than an HTML program written by an HTML programmer with the aid of CSS?
Repository: https://github.com/i0z/nojsgame https://github.com/i0z/nojsgame
-----
† — The comment thread is dominated by responses to this one: "'HTML programmer'—are you serious? :)"
0. http://habrahabr.ru/post/202736/ http://habrahabr.ru/post/202736/
1. http://jsfiddle.net/0dmin/9dQx3/embedded/result/ http://jsfiddle.net/0dmin/9dQx3/embedded/result/
- trentmb 13y agoOff topic, sorry, but Russian (and many others) to English translations sound so emotional and dramatic and captivating and inspiring. To the point I want to learn Russian!
- paxcoder 13y agoI have a hard time understanding how someone so familiar with HTML can claim that "HTML programming" is creeping up on JavaScript. Perhaps it has to do with lack of computer science education (more specifically not understanding Truing completeness)? Perhaps you don't need it to write games?
- golergka 13y agoIt's a joke. This phrase, and the whole post as well.