Category Archives: HTML5

Home Page in Html5 and knowing a lot about your code style

www.panghal.comSo, by the time you read this the home­page would have been host­ed. Right now it’s just four sta­t­ic web pages and all of it has been done in html5. This new ‘draft’ stan­dard has intro­duces a slew of new JavaScript APIs and it has become increas­ing­ly impor­tant to know and bet­ter under­stand effi­cient javascript cod­ing prac­tices.
Any­ways, the lit­tle project was start­ed just because I want­ed to dirty my hands with Html5 and it has been worth the lit­tle effort that I put in. I learned a lot.
If there are two ver­sions of the home page host­ed then it means I have not been lazy in mak­ing use of the new­er and more b’ful tem­plate. As you might have guessed, at the time of writ­ing this post I have not yet made use of the new tem­plate. Its just four html pages. How much effort could it be!
So, with­out any fur­ther delay. Here’s what I learned -

  • There was a lot of code stitch­ing from google and else­where. And it’s not so much of a bad thing if you learn from it — which I did!
  • Don’t look at my javascript. I mean I’ve cod­ed so bad­ly. I don’t even code so bad­ly at my workplace…lol. I used a lot of glob­al vari­ables even though I could have min­i­mized their usage a lot. There’s been rep­e­ti­tion of code espe­cial­ly with state­ments like document.getElementById(). It’s sim­ply because I did not fol­low any design con­straints — which is a very bad thing, by the way. There were some more incon­sis­ten­cies in my code.
  • Although, I did not do so good I also did not do very bad. I used the new html5 markup, played around with video and audio ele­ments, made a White­board using can­vas and local­Stor­age, got to know a lot more brows­er spe­cif­ic stuff, learned about audio video codecs, con­tain­er for­mats, the impor­tance of MIME types, and lots more. I also got to know a lot about CSS and stuff.
  • I have set a sol­id base for a good javascript know how. I already know what all I can do in my code if I set out to imple­ment stuff like inner functions(scope chain­ing and stuff) or take advan­tage of pro­to­types.
  • It’s extreme­ly impor­tant to code in your free time and it’s also impor­tant to look at the code of oth­er pro­gram­mers. This is how you can know where you actu­al­ly stand.
  • I learned that it becomes a blot on your char­ac­ter if you con­tin­ue to repeat the pat­tern of start­ing projects and not fin­ish­ing them. I had been fol­low­ing this pat­tern for the past few years. No more. All that rage is com­ing out in code
  • Music is extreme­ly impor­tant to code. Food is option­al.
  • The more you code, the more you real­ize about your insignif­i­cance. It keeps you way too hum­ble and down to earth.
  • With the intro­duc­tion of html5 and it’s ram­pant usage these days, javascript has become the ubiq­ui­tous lan­guage of the client side and with its intro­duc­tion to serv­er side pro­gram­ming (node.js), I think it’s going to be the lan­guage of the year.
  • It’s not so easy to write catchy eng­lish at 3 am.
  • There are a lot of small js apps I want to build and inte­grate them with the home­page but it’s impor­tant to ship code min­i­mal code first!

I also want­ed to use Git and a lot more had to be done but I have to wrap up this month with a few more things I have in mind.

So how did you like the home­page? It’s not much. It did­n’t had to be. It was just a sim­ple learn­ing exer­cise for html5 but when there were four pages to show I sim­ply host­ed them. And in the process I learned a lot about myself, my cod­ing styles, life in