Cool-Stuff


If you ever needed a reason to enforce clean code – here it is, right out of MIT and researched to the hilt. The video is extremely interesting from a behavioral standpoint and extremely educative. As highly recommended as the famous Steve Jobs video.

I can vouch for what is being said because i have seen this happening many times in development. The implied up shoot  ?

Clean code bases beget new code which is cleaner or clean enough. Dirty code bases attract more code which is at least just as dirty or usually even more so.

Having been a full-time C++ programmer for all of the past ten years, I recently had the unique opportunity of seriously studying Java almost 10-15 years after it started becoming popular. In the meantime I’m also playing with Python on a personal note. This affords me a unique perspective, of having seen the past and at the same time looking at two new languages with a fresh eye.

C++ vs Java in 2009 = Assembly vs C++ during the 1980’s

The impressions or the vibes that i get in this new learning process is eerily similar to the same doubts and choices i felt / read about during the initial stages of my education, while playing around with assembly, C++ and Visual Basic.

Needs assembly

Needs assembly or C

Assembly was THE choice if speed and memory choices was paramount and nothing else mattered but it was damn hard to use.  All the old timers claimed you had to know assembly to understand whats happening on the system and that C++ was only for productivity improvements. They lamented about how new minds never learned / worked seriously with assembly and hence where at a disadvantage when it came to figuring out what really happened inside the box.

However at the time (1980) C++ was fast catching up, even embedded systems where moving to C++(maybe without using the templates feature).  Java currently is in the same state that C++ used to be in 1980 wrt assembly and there are many who clamour for C or C++ to be taught in universities rather than Java for the sake of better understanding.

How can  Java be as fast as C++?

It is not. However the hardware that is around now is vastly superior to 1980 and 1990 hardware, which made Java seem slow THEN, in the same way C++ seemed slow in all those small devices compared to raw assembly or binary code. Our current crop of laptops are more powerful than the servers used during the time when Java was beginning to get popular. This improvement in hardware makes the difference in speed highly immaterial for all practical purposes, because human beings cannot make out the difference all that much between 500  and 50 microseconds.

Fast forward to 2010

Is as fast as a 1999 computer and runs Java

Is as fast as as 1999 computer and runs Java

C++ is what you require if you need pure speed like in the critical loops or core libraries. You could substitute the word Assembly instead of C++, in the previous line, had this post been written 15 years back.

But Java is more useful from a business point of view for application development due to increased productivity and more features.  It is therefore no coincidence then that embedded devices like mobile phones (and even dog collars, according to Java books) are now running Java. In fact the last Nokia mobile phone that i bought was guided by the factor that it had a data port using which i could upload custom Java program onto it.

Java vs Python = C++ vs Visual Basic

When C++ used to be THE top language around, and assembly was gradually being kicked to the ground, there was something else in periphery, which was Visual Basic and all other RAD languages, which basically gave you forms based development and automatic memory management.

Internal IT or back office apps need not be cool

Internal IT or back office apps need not be cool

However they were nowhere as fast as C++ and hence where relegated to internal IT applications, which never needed to be as slick as professional, cool looking  applications and could be developed fast enough.

Fast development is very critical when it comes to small shops with less resources or IT departments on a shoe string budget. Many business applications certainly fit the bill and where developed on Visual Basic. It is exactly the same situation now with Python when comparing it to Java.

Python in 2009 = Visual Basic in 1990

Developing using Python does definitely seem like a breeze with not much hassles around object orientedness or strict rules around exception declaration or big infrastructures. Is Python as comprehensive as Java, with as many no of apis as Java has ? Probably not, although it is fast catching up in popularity, like Java before it, caught with C++ and  that is saying a lot. There is no denying the fact that Python and Ruby would soon have many programmers who are trained in it by choice.

Will run Python as fast as Java

Will run Python as fast as Java

I have not compared the performance of Java vs Python. But i assumed Python could be slower from what i have heard on the web. Please do correct me if iam wrong on the above aspect.

If the economy keeps growing like it did in the last ten years, we would soon have quad core or even eight core desktops a common place and would not have to worry about Python’s performance compared to Java. I just hope folks don’t introduce messy co-orporate stuff and make it verbose and bulky as Java before it.

3  cheers for easy coding !!!

Read this instead for a longer and historic explanation.

Be mystified no longer. Web 2.0 is not a new version of the internet or a new technology or a new standard of the web.

It stands for changes in the way new internet applications are being build. These are

Interactivity.

Clock-Ad

Clock-Ad - animated gif

The current crop of web applications are now way more cooler and more interactive than it was possible using HTML programming. What powers this ? Faster computers, Faster Internet, Faster & Smarter Javascript Engines and Cool Libraries to do these tasks.

ps : Why does Javascript matter? B Cause that’s what runs inside the pages you download from the internet and makes stuff happen inside them. It powers the internet’s display side programming.

Unfortunately I cant add any JavaScript samples to demonstrate interactivity and hence that animated picture on top to convey the idea.

Sharing

You can now access data from e-bay and match it with Craiglist advertisement and build a new application out of this combination, which shows its results on Google Maps.  You could perform a similar mix and match (aka MASHUP) using data from MANY other web apps that choses to exposes its data or tech on the internet.

Google maps based app

Google maps based app

Social Networking

Think about all the sites like Orkut,Facebook, Linked-In and of-course, of  all the blogs on the net.  This  represents an un-unprecedented level of personal and social information on the net. Most of these sites expose their API’s too. So that you could perhaps pull in your friends from Orkut into your Outlook, IP Phone or even vice-versa.

So what?

So its a possibility for a next wave of cool uses, like the original dot com which produced the ebay and amazon and all those useful sites which nearly everyone use. Like all waves this too will be hyped to be way more than what it really is – a new form of collaborative and more user friendly internet applications.

Heck, even my new project (that’s right – i got moved from my previous project to a new one) sports a web 2.0 tag and my manager is uttering the magic word every now and then to try and spot an oppurtunity to start a new initiative around it. 🙂

but too lazy to read all the white papers?

Read a small story of this in action, from none other than Joel Spolsky trying it out on their product.

How do you know the type and version of the major hardware components you have in your PC / laptop? Thats easy, run PC Wizard and hope their database is up to date enough for your purposes. (Note that this tool does other cool stuff too like running Benchmarks, getting all sorts of other system related information)

 pc-wizard1

I had the same dire necessity today, having junked the default Vista installation in a laptop, without checking the hardware, drivers and other requirements.  I had been told all the required CD’s are available and when i checked, (after re-install i have to admit), the CD that was referred to turned out to be a rescue CD.  The laptop manual did not care to list even the basic facts about which LAN / sound card it carried. (An acer 4620 if you are wondering)

Isnt Rescue CD enough ?

In the olden days, buying hardware gave you bits and pieces of drivers and other software in multiple CD’s and this was what i had in mind when i asked if the CD’s where available. But nowadays, machines come with a pre-installed OS partition, containing a valid image with everything pre-installed. So, all that you need in case things go wrong, is a single rescue CD to copy  this image onto your hard disk and get a brand new validated and optimized image running.

Whats wrong with Rescue CD’s ?

Rescue CD’s are an excellent solution, in most casual user cases. I remember originally encountering this concept in a Solaris server. I came away impressed with the solution. However in case of personal computers (or latpops) i feel someone ought to have thought of the possibility that a different OS or power user initiated custom installation might be required, in which case this partition idea becomes nothing but a waste of space. After all we are talking about hardware bought for personal use here and its a good idea not to restrict the owners conceptual freedom in trying to use it for whatever purposes they see fit.

The olden days

The olden days of individual driver CD’s, ensured that I had a valid driver for my hardware for all the OS’es i required. This was because the individual driver CD would come with drivers required for all the different version of OSes it supported (windows 3.1/95/98/Me/2k etc). This also meant that the different components of my machine was tested for the different OSes i required and it was easy to know which ones had the support by looking at the driver CD.  In fact i remember favouring devices that shipped with Linux drivers since i wanted to use Linux on my PC. However with the new fangled image idea, i’m not sure if my new box would run another OS or not.

I wish the hardware folks are listening and copied a folder of all required drivers and hardware documentation, into the image itself, which i can then copy out for my new OS, before trashing the old stuff. That way, i would have the best of both worlds, unless of-course i deleted the orignal rescue image partition too, which goes to show that a hard copy CD image of the rescue partition, with all the different OS driver folders in it of-course, would still be of some use.

Happy installations !!

Collaboration might be a weasel word, but i suddenly found how powerful a tool it  can be, by using Google Docs.

Of course Google Docs has been around for some time, but i found out about them anew when i searched an alternative for the paid services of 37Signal‘s BaseCamp software. I was not looking for BaseCamp either, but i stumbled into them through the blog posts they had made about building software and they do have many good blog posts for sure.

The blog was good, which made me interested in checking out what they build, which taught me all about how there are mature solutions that allow multiple distributed people to work on the same thing. It kind of proves how blogs can get you new customers.

If you are into new products, concepts or even existing tools to do the same, it proves how essential blogs and podcasts can be in getting your name across to the early adaptors !!!

Happy Blogging !!

This is the blog of a white computer guy who has married a black lady from South Africa.The culture differences he observes are funny to read and gives a perspective of life in South Africa.

The pod-casts are quite interesting too, giving more information, political and economical included, of the country. Kind-of makes me wish i had some ways to record more of what i heard and saw, when i travelled about in India myself.


Next Page »