Archive for category Javascript

This name calling thing

Well, I am a web developer for some long long time and web has changed a lot. A good change is Microsoft is almost out of web. No servers that are known to me run Windows and Internet explorer is dead for good (except few bloody large corporations). This blog is not about that it about another stuff.

There is this name calling thing in web technology which these marketing guys used / use to get more money from client. Long long ago we used a technique where the entire page need not get refreshed, but only part of it does. For this we need to write about 300 lines of code (which fortunately can be reused). Then people started calling it Ajax, and webpages having ajax costs a lot. Now Ajax can be written in 5 lines of code if you wish, thanks to jQuery and all other blah blah Javascript stuff.

Long before the term called “smart phones” was coined, we developers designed pages that can be seen even in mobile devices. This thing is now called responsive design and is promoted as a big thing. I really don’t understand what the fuss is about. When it was difficult to do, none promoted it, when it becomes easy, people give it a name and if they can do the most difficult stuff they project themselves as a big thing.

And there is another thing now called the cloud. Which essentially is cheating. Since we have a computer that have tetrabytes of memory, but memory on our handhelds is only gigabytes, but we are now in a age where tons of data can be streamed to us and we need real time stuff (thats the socio illusionary status society has created). If we have one data or update in one device we need that to be updated in another device too, this called for centralized server to sync things, and thats its. With virtualization we can have banks of computers say in USA, Europe, Australia and configure it in such a way that even if one fails other will take over. This thing too has been done for a long time. Now they call it the Cloud.

What the  &^#!@$$#@$#

, , , , , , , , ,

Leave a comment

Mozilla Persona must catch up

Mozilla Logo

Mozilla is one company that really respects the freedom of internet users. While its browser rival Google Chrome ttys to track users and recommend advertisements and search results that suits them, Mozilla’s firefox tries to respect ones privacy if one wishes to be so.

For long we have this single sin on, that is each website needs to authenticate  user, and it has to make user under go painful task of creating an login account. This process is eased by stuff like openId, Google, Facebook and Twitter’s sine  sign on process. But Google and Facebook track a lot of ones behavior since their business is based on advertisement revenues, which depend on these websites knowing what exactly the user wants, and hence tracking is inevitable and your privacy i compromised.

Mozilla is a non profit company that runs on ones donations and it has put up  a single sign on framework called persona https://developer.mozilla.org/en-US/docs/Mozilla/Persona . Persona does not track a person, compromise ones security  and possibly won’t collaborate with NSA.

So try using it in your website. Any gem for it anyone? It would be nice to to have a compact gem to us it in ones web applications. hopefully it catches up and leads.

, , , ,

Leave a comment

Javascript Learning Trail

Though I hate Javascript for all its imperfectness, lie English which is imperfect but has become an international language, javascript is fast becoming the language of the web. Weather you are a PHP, Perl, Python, Ruby or whatever developer, you need to learn Javascript. This blog explains how to go about learning it.

Learn the basics

First know what javascript is. Goto a website like http://www.w3schools.com/js/ and try practisig Javascript. If you are a good programmer this will suffice, else get this book ‘Eloquent Javascript’ from here http://eloquentjavascript.net/ , read it, and make sure you practice it.

Learn Object Oriented Javascript

Object oriented programming is one of the best invention man has made. Read a book like ‘Pro Javascript Design Patterns‘ , to know how to create reusable code. as long as you are designing small applications, things are okay. But serious web apps need something professional and object oriented so that you can accomplish more by typing less.

Many programmers who are using functional programming simply don’t understand the goodness of object oriented programming(OOP). Please don’t feel lazy to learn OOP, if you fail to learn it, you simply cannot go up the professional ladder above a certain level. Realize that Earth is not flat.

Learn jQuery

jQuery is a wonderful DOM manipulation library written atop Javascript which will reduce lines of code you need to type to develop an application. Its has simply become an unofficial extension of Javascript. So if you are asping to become a good front end developer for web, jQuery is must. You can ger a good book on jQuery like Beginning jQuery to read.

Learn Coffeescript

There are lot of typos that you can make in Javascript, and what if i can say that you can reduce 100 lines of Javascript to 700 lines. Or by just typing 700 lines you can create 1000 lines of Javascript. Coffeescript helps you to achieve that. Learn it by by going here, if you have learned Javascript well, coffee script will be jiffy. Learn coffee script from here http://coffeescript.org/

Well, that’s it. I can just say what is the learning path. If you ask me how to deal with your stupid client or demanding girl friend, look out for some other blog 🙂

Leave a comment

A Catalog of Javascript Libraries

A Catalog of Javascript Libraries

Leave a comment

Opal brings joy of Ruby to Javascript

Lets agree, Javascript sucks. Its simply not elegant as ruby. This has made many companies hire a Javascript developer and a Rails programmer to complete their web projects. This Javascript is a pain for any Ruby developer, it has clunky syntax, its not evil however. Another complication is that all browser will only execute Javascript and no other good languages like Python, Ruby, Perl or some other good stuff. that sucks, but thats how the world works.

There have been many developments to shield developers from Javascript. Google has now developed a language called Dart which gets compiled to js, Rails in the past implemented Rails Javascript (rjs) and now we have coffeescript. But could anything come close to  Ruby? I don’t think so!

I was  just having the idea why can’t we have a ruby script getting compiled into Javascript, in fact I wished to shield  Rails developer from  CSS too (though I donno how that could be done, and my laziness would have ensure it would stay as an concept). just imagine, you are a rails developer, why you need to know any other language than Ruby to develop webapps? Just knowing Ruby alone to create an web app would put tremendous productivity to  Ruby programmer.

Thankfully some one has come up with this stuff called opal, which is nothing but Ruby to js compiler. So  its party time. I wish Opal gets wide acceptance among Rails dev’s like haml, so that this project even if not integrated into rails officially, will grow and flourish.

So, please try opal and see how it works.

Leave a comment

17 JavaScript tools for the HTML5 generation

17 JavaScript tools for the HTML5 generation

A good list of Javascript Libraries

Leave a comment

Node Speed Vs Rails Elegance

Just yesterday read an article written by a friend of mine who is practicing Ruby on Rails. He seems to like Nodejs, the new Javascript stuff that can be used to write server side code too. What he claimed was startling, he claimed Node can run upto 500 times faster than Python! WOOOOOOOOOOW!!!! up that may be true. But I will stick with Rails and these are my reasons.

1. Node is like Javascript, which is Javascript. If we can write programs with coffeescript, that can run on Node platform, then OK. I might be tempted to change.

2. Ruby is a elegant programming language, and Rails is built with Ruby. I can ask my client for 2 days of developing some thing,I can develop that stuff for 2 hours and still get away in the review meeting if I use Rails. With Node?

3. Code with Node is difficult to write as compared with Rails. Hence there could be mistakes which I need to sit and debug. With Rails, because we use convention over configuration approach, I almost exactly know what code is where. that a great thing. There is very little commenting stuff needed.

4. Rails framework has been extremely adaptive. Why can’t we develop a plugin so that we can run Nodejs stuff in Rails?? C has ways to embed assembly language in it, we now have Extjs to execute javascript from our Ruby program, why not a plugin or gem to do the Node stuff?

The author claims that Rails engineers are hired to squeeze 1 or 2 more cycle efficiency from their Rails app. If Node code can be got into Rails, one can identify bottlenecks and replace the piece of code with Nodejs stuff! That will solve huge problems.

Nodejs may be impressive and better performing. But I bet on elegance and easy-stuff for humans to use will win eventually. MRI and Ruby will improve and will be faster and faster in years to come. At the same time processor speeds are increasing. So lets see how node fares then.

4 Comments