Super Mario in JavaScript!

I was just reading this post on Arcade games and nostalgia on Coding Horror when I just came across this amazing implementation of the classic Super Mario game in JavaScript at nihilogic!! Everthing about the game is in JavaScript including the sound version which is supposedly base64 encoded! And to top it all, it is written in only 14KB of code! An amazing feat indeed.

Everything about the game is in JavaScript with no images or audio files used as quoted above. I tried my hand in it and the game was pretty decent enough, but the point here is not the game, but the fact that you can do so much using just a little JavaScript!

Check out the post here and the games with audio, without audio, with audio(2x size) and without audio(2x size).

But when it comes to Standards, Sorry Mario, but our Princess is in another castle!

Standards. Standards. Burp.

I have been implementing some Web Services on WebSphere DataPower and it is almost a breeze in most cases, with the majority of the development time spent in coding the XSLs for transformation and the rest configuring and setting up appropriate error handling mechanisms. Even the binary to XML, XML to binary transformations can be simplified using tools such as WebSphere Transformation Extender or Contivo’s Analyst. All of these just leave you in a state of disjoint harmony, you absolutely like the fact that life’s made easy for you, while at the same time cringe on knowing that if you had done it by yourself, you would have learnt two(or a million) more new things today! We shall take that up for some other day, coming to standards now.

Standards and Web Browsers will definitely be remembered for a long long time to come. I was just reading this entry on Joel Spolsky’s blog on how the developers of IE8 are mulling over strict standards settings or to allow for default IE7 style behaviour which is not that strict when it comes to standards.

If you are a web developer, you must admit that we are all sick of trying to write code to make sites look as close as possible to being similar on all browsers. And with IE being IE(barring the recent move towards ‘standards’ mode), a lot of different hacks needed to be put in place just to get the same look and feel. Let alone JavaScript hacks. Now, with pages numbering in billions all over the Internet, when people go strict all of a sudden when it comes to standards, it really will get a good beating! Sites working previously might not even display! Whew! And as Joel rightly puts it in his post, developers are also to blame for coding code without giving any forethought if their code would actually be standards compliant or not(including me). I have done a lot of CSS and JavaScript coding over the past few months, but each time, barring for a few tests, I really do not do much to see if the code is really standards compliant. Partly since the applications that I built were not for public use and the target audience was well covered in terms of configuration since all of the apps were internal and mostly because I am sick of it. I have had enough searching Google for each and every hack to make a part of the page work as intended in IE, Firefox and Opera.

The list of hacks can become endless, but if you really want to have the cake and eat it too, well.. Never mind. We can probably wait for the next version of HTML, and probably start coding, ‘strictly’ adhering to standards, with the version tag telling all about it, just as all the others put forth, but ultimately, the major responsibility lies with the developer who is coding the pages in the first place, like you me and yeah all of us.

Multi-level humbug

I am really getting mighty irritated with these multi-level marketing guys, the type where you are supposed to make millions without working your ass off. I had this friend from high-school, and we were good friends and then I lost all contact from him for a few years. Then, all of a sudden, I met him in Bangalore and found that he stayed very close to where I was staying(though I moved away from there a month ago). It so happened that there were a few other friends living nearby, all former school/college mates and we used to team up for dinner every night. I got to know that this guy was involved in some kind of multi-level business as they call it, which involves getting new people into your network and you get a payout from the parent concern for every guy who joins your network. I have asked these guys how will they earn money “as people are added to the tree”, but they insist that after just a few months, money will flow in like anything(guess their training involved deception).

I always had a feeling that this kind of business was BS and never thought of earning money just by getting people into the net. This business model will work(for the parent company at best) and a little for the guys who go around pleading for friends and family to join this network. But after a while, or even early on, you figure out that not many people are buying it and you end up with no one to sell your ‘stuff’ to. This ends up spoiling friendships and relationships amongst the seller and the buyer since most of the time, they should be well-known to each other and you just cant sell to any stranger on the road.

I really felt bad when this guy called me up and tried to get me into his ‘network’. He kept saying on his own that he did not want me to join and only wanted me to attend one of these meetings that they conduct everyday and that I could make thousands in days. He also said that of his 30K investment, he had ‘recovered’ 15K or so. And that he was making money fast..

I felt haggled when he kept explaining it when I was not interested upto the point when I politely hung up the call and that was the last I heard of him. Our friendship had turned sour just because he tried to push something onto me which I did not like and this is the major reason why I hate this multilevel crap.

Now my girl calls me to tell that her colleague had started doing something on similar lines and just casually started explaining this to her. She was wise enough to know what it had in store and jokingly asked him to share his millions if ever she was in need. Here comes another one.

I just have one question for such people, if ever you had a decent day job, would you ever try getting more people onto your ‘network’ after you have recovered the amount you had initially invested? 

Work hard and come up in life, money can be earned anytime, but friendships soured over such things as petty as money will take a beating for a long time and may never come to its previous state.

How to live a Happy Married Life!

Via Email.

 A couple were celebrating their golden wedding anniversary. Their domestic peace had long been the talk of the town.

“What a peaceful & loving couple”.. A local newspaper reporter was inquiring as to the secret of their long and happy marriage.

“Well, it dates back to our honeymoon,” explained the man. “We visited the Grand Canyon and took a trip down to the bottom on the canyon by horse. We hadn’t gone too far when my wife’s horse stumbled. My wife quietly said, ‘that’s once’.

“We proceeded a little further and the horse stumbled again. Once more my wife quietly said, ‘That’s twice.’

“We hadn’t gone a half-mile when the horse stumbled the third time. My wife quietly removed a revolver from her purse and shot the horse dead.

“I started an angry protest over her treatment of the horse, while I was shouting; she looked at me, and quietly said, ‘That’s once’.

“And we lived happily ever after!”

🙂

Army admits to stray bullet

Following my last post about the stray bullet that hit Niharika Jeena, I took today’s newspaper, again turned to page 3 and found an article informing that the Army had admitted that there were firing sessions that were going on around that time at the military camp.

The army had denied this fact earlier! An army official had told the Times of India that a DSC(Defence Security Corps) unit was engaged in firing practice around that time. The bullets were the same, and the bullet had apparently travelled 4 kilometers before hitting her! I couldn’t find an online version of that article, looks like it hasn’t been uploaded or something, but you can take a look at the e-paper provided by the Times of India.

Now that they have confirmed it, it remains to be seen whether they take the necessary steps to prevent bullets from going all over the city.

Dude where’s my Kevlar?!!

I woke up this morning, it was a normal day, opened my door and picked up the newspaper! Read the headlines hmmm… Turned to page 3 and wtf?!

Stray bullet injures techie

I was intrigued and continued reading! Apparently a lady by name Niharika Jeena, an employee with Cognizant Technologies was returning home when something hit her. This happened at the Ejipura Signal, next to the Intermediate Ring Road, Bangalore, holy crap!! Thats the route I have been taking every working day for more than a year now!! Apparently it hit her in her abdomen and then she was taken to the hospital by some wise passer-by in an autorickshaw. She is said to be out of danger now, thank god!

But now I am paranoid about taking that exact route and was almost bracing myself for impact on the way home! The cause for this unfortunate incident is suspected to be the Iblur Military Camp which is in the vicinity where routinely firing practice takes place. Apparently a bullet could have ricocheted and taken a different direction to the road, though the army vehemently denies that the bullet could have come from one of its weapons, saying that firing was stopped at 2:oo PM that day and this incident happened at night around 7:15 PM.

Getting fired at your job is one thing. Getting fired on your way back from your job is a totally different thing! I hope they investigate and find the root cause for this, or if nothing is taken up, I guess all of us using that route should add a kevlar helmet and a kevlar jacket to our ebay wish lists and hope we dont get fired at either end!

Whatever can go wrong, will go wrong

Most of you must know about Murphy’s Law, which states that if something will go wrong, it will go wrong no matter what!! The same thing happened to me, We had developed something which was part of a series of items that were to be deployed. Everything was working to a T…

But when the D-Day arrived and when we had an ‘important’ audience.. the first item that we had developed just refused to work and do its function!! Rats!! I am still trying to figure out what went wrong! Most probably it isn’t something big and will resolve by itself tomorrow, or a small trace will identify the problem!!

But in the end, Murphy seems to always have his day!!

Gmail Paper – he he he!

Check out Google‘s idea of an April Fool’s Joke. The home page proclaimed the launch of Gmail Paper – a new feature of Gmail, Gmail Paper, which supposedly allows users to print their email and have it sent to them, for free!! Well, I fell for it and I was left wondering how these guys are going to afford such services!! They also lied that they would be printing ads on the reverse of every email that was printed and that would offset their printing and shipping costs!

 Get fooled here. 🙂

At your service

I started for work today morning, just like any other day and sat astride my bike. I pressed the electric starter but the engine just did not jump to life as it would in normal circumstances do. I tried kick starting it to get the same result but to no avail.

Then deciding to troubleshoot, I checked if the petrol flow was open, then I checked if there was any petrol in my tank and then when I saw my spark plug, I found out the reason for my bike not budging to start.

It was removed from its spot! There was no way that it would have come off during the course of my journey the previous day as I had parked my bike at 1:00 AM alongwith my friend the previous day.

There were some onlookers who were watching my antics. And one of them said that some idiotic element should have done this and I agreed, Then I started my bike after fixing my spark plug and started towards office and after riding for some distance, I wanted to make some move and tried to look if there was anyone close behind me on my rear-view mirror and to my surprise!! I found one of the rear view mirrors missing!!

Crazy punks!