Wednesday, December 24, 2008

An accidental trip to erode

I am blogging from Hotel Le Jardin. This hotel is amazing and has free Wi-Fi. The breakfast was one of the best I had. How I got here is a topic of another blog post. It was a completely unplanned travel. More on this later. If you are anywhere around this area, Hotel Le Jardin is definitely the place to stay.


View Larger Map

Free WiFi Rocks. :-)

Tuesday, November 18, 2008

HTML Helper Mode and Indentation

This is my third post for the day. I blogged about this and this earlier today. Writing smaller pieces regularly works much better than waiting for the big post. Commenters, do let me know if you like this style better.

I am really irritated with the html-helper-mode's indentation. It flattens the code rather than indenting it. I missed my tidy command from yesteryears when I did not use emacs. But I am coding on emacs now. I do not have to miss anything from within emacs. So, I added a tidy-html function to format the html as properly indented XHTML.



And I absolutely love Gist. It has solved all the quirks involved with posting code on a blog.

Meetings and Boredom continue

I am sitting on yet another boring meeting and have written a script to write it to a PDF. Its not a pretty one but I got it done in 30 mins. That has to count for something. You would need ReportLab and PIL for this.



Beautiful Soup and ReportLab rock.

Meetings and Boredom

I am sitting in a really boring meeting. I was browsing reddit and found a very interesting dilbert script. I am a huge fan of Dilbert and wanted to download Dilbert strips for offline viewing. I know its not entirely ethical but what the hell. I wrote a small python screen scraper to do that. This requires you to download Beautiful Soup. If I am too bored, I will write a script to compose it as a PDF.

Thursday, October 09, 2008

Hello Clojure


; HelloClojure.clj
(import '(javax.swing JFrame JLabel)
(doto (JFrame.)
(add (JLabel. "Hello Clojure!"))
(setTitle "Clojure!")
(pack) (show))


I have a strong feeling that the lisp is all set to make a comeback in the enterprise. Check out Clojure.

Dedicated to all the souls plagued with the horrors of sane concurrency.

Sunday, October 05, 2008

Sunday, September 28, 2008

PMP?.. me?... you must be kidding

I was reading my dilbert strips, when I noticed the ad below.





Seriously! Do they really think that people who enjoy dilbert would like taking a PMP certification exam to become a (better) project manager? People, who know me, know that I have a low opinion of certifications. What they probably do not know is that I have a even lower opinion of these kits that provide improbable percentage of "Unconditional test pass guarantee". I followed the ad and was greeted with the following error.




I did a little more digging to find out about it. They have dropped 50% chance of you passing and the guarantee is no more unconditional. The comments below have "brain dump" screaming all over it.

There is really not much to project management. You have to manage priorities of the stake holders. You have scope, time and cost as your constraints. But what they dont tell you is that you cannot treat people like replacable cogs. The stuff that they teach you in PMP is a bunch of processes and the PMP certification exam is a test of memory. Having a PMP certification does not mean jack about your project management skills. In fact, I would be wary of a person who claims that PMP helped become a project manager. It is not that I have absolute distrust in certifications... oh wait .. I do. They can be cheated very easily. I know of a dozen MCSEs, MCPs (not male chauvinistic pigs), PMPs who do not have a clue of the stuff they have got certified in.

I don't know why organizations pushing for PMP certifications for their employees. I am sure there is some sick demented reason why they are doing so.

  • Hire people with common sense. (This would only work if you have common sense.)

  • Promote your developers with a good aptitude towards management to management.

  • Don't recruit B-School grads who haven't written a line of code straight off the school to do project management

  • And for heaven's sake don't assume that people with PMP certifications are knowledgeable in project management. They have only made PMI wealthier.



If you want your project managers to be better project managers, ask them to read "The Mythical Man Month". That book is quite relevant even in today's context.

Thursday, August 28, 2008

Thursday, July 03, 2008

Open letter to Programeter

Mark from Programeter had left the following comment on my earlier post on Programeter. I started typing out my response as a comment but it was turning out to be too long. So I decided to make it another post in itself.

I am from Programeter - hope I will survive the criticts after mentioning that ;).

There are so many questions in the post and comments, so I can't aswer all of those in just one reply. So if I missed yours, go here and post them.

But some comments are here:
* I am not sure I understand why all programmers so afraid of being measured. Would you imagine all salesmen quiting the company because of introduction of CRM? Good programmers should not be afraid of any indicator.
* Yes, I agree "stupid" managers can get it wrong. But stupid managers will get it wrong with or without Programeter.
* Lots of comments, about cheating the system. Go and try to cheat it ;) if you cheat at least 3 of our indicators during one reporting period - Programeter will quit measuring your company as a bonus ;)

if you have more questions, let me know!


Hi Mark,

First off, thanks for opening up this discussion. This has done a lot to increase my trust in you. What would really salvage the reputation of Programeter from this situation, is to point Programeter on an Open Source codebase (e.g., subversion) and provide the reports online for the world to see. If they do make sense, we would be more than happy to embrace it and even suggest changes to it.

We (Programmers) are not afraid of being measured. We are insulted by the notion that the decisions on those measures could potentially be taken by some management folks who have absolutely no idea of what programming is about. This tool is dangerous in the hands of bad management.

Bad management already refers to programmers as resources as if they are interchangeable cogs in a system. The marketing material on your site does nothing to change this. We have had several epic fails in our industry because of clueless management. The last thing we need is another earnest effort by smart developers to fuel this trend.

Also, there are other ways in which individuals who code add value to an organization. Interacting with people, making teams gel, sharing knowledge on corporate wikis/discussion boards, having passionate coffee corner chats to keep the spirit of the team and so on. None of these are on source control. People's contribution cannot be measured but it is essential for an organization to judge the value added by an individual to an organization. Not all of these judgments can be based on objectivity and measurable facts. Programeter can only suggest facts about one of the facets of an individual's contribution. Suggesting an interpretation of it should be best left to the manager and not by the tool. There has been a lot of discussion about kLOCs. Is more better or is less better. There are other softer issues like security, performance or just an annoying API bug that had to be worked around. You can only present the facts. You cannot draw conclusions without knowing the whole. And those facts are not on source control. I am not dissing the tool. As a nerd I love statistics. I love generating insight on raw data. I would however take caution in interpreting the reports and weigh other facts before making a decision.

The bottom line is.
Code Checked into Source Control != Value Generated

The marketing material on your site is completely laughable. If anything, it only damages the credibility of your product. It would be bought by wrong companies and will be used to make wrong decisions. I am sure that this would not help the sales of your software in the long run. Reconsider your selling approach and come up with proof that your tool works. If you can do both, I wish you all the success for this tool.

Regards,
Vagmi
(An individual contributor to a big Software company)

Disclaimer: All of these opinions are mine and do not represent the views of my employer.

Wednesday, July 02, 2008

The dumbest idea ever

I just came across this product called Programeter. There are only two possible market segments for this product.

  • Managers who have no friggin' clue of what programming is

  • PLAIN DUMB FUCKING IDOTS.


Now that I have got your attention, lets move on. This is what is displayed as their sales pitch. Look at the first item on the list.



  • Companies have merged and you need to decide what 15% of programmers to let go?

  • Your consultancy firm needs an estimation report of your client's programmers next week?

  • Need to double check your team leader reports by actual data?

  • You are a newly assigned project leader and NEED to know what's going on in your team?




Most companies should already know this. Any productivity measurement for a programmer can be cheated. If you have made a mistake in your recruitment, its already too late. There is no way around it. So stop recruiting people by the truckload. Look for good people with all round skills. Learning a new language or a technology platform is not difficult for a good engineer. Unfortunately, the entire Indian HR recruiting industry does a little more than keyword match to select potential candidates. Every HR Manager working in a software company must read "Smart and Gets things done".

If you already have the wrong people on board long enough, you are doomed. And one way of knowing that you have a wrong person long enough is to ask your middle management on their views of using Programeter. If they give a glowing recommendation of the product, fire them.

Monday, June 02, 2008

For all you PPT-Phobes and PPT-Philes

A hilarious rendering of the common mistakes while (ab)using Powerpoint. Sadly, I have been abused by very many of those and there are still a lot more to come.



I am a PPT-phobe. Don't get your PPT near me. I am allergic to PPTs.

Friday, May 16, 2008

Inflation

For people worrying about inflation in India, we can at least reconcile to the fact that things are not this bad.

Thursday, May 08, 2008

Life, Travel and Marriage

I was reading this blog about things to do when you are laid off. Although there is is no imminent threat to my job, this is a reality that everybody in the IT industry faces at least once in their career. Even otherwise, taking some time off to travel isn't a bad idea. I was reading this article through the section on the lame reasons why one might not want to travel and I found this.


But I'm married with a family and a house...

Ok, you win. You're screwed, but that's the life you chose for yourself so you're going to have to live it. ...


Ouch!! Thats a pretty hard statement but I digress. I don't mind traveling on a once in a life time trip with my wife even if both of us have to resign to take the time off for six months. I am confident that the IT industry would not change so drastically as to render me unemployable. So when are you guys planning your vacation?

Friday, May 02, 2008

A funny song on the MVC paradigm

I came across this really funny song on Youtube about MVC paradigm. Enjoy.

Wednesday, April 30, 2008

Need for a business language

As many of my readers already know, I work for SAP. It is my personal belief that SAP R/3 is so successful only because of its ABAP system. The language provides the right level of abstraction and has appropriate tooling to build business applications. I learned ABAP only a year before (while I have been with SAP for over 3 years now). I was amazed by the speed and agility with which you could create a database driven application and expose your business logic to the outside world in minutes.

The language, as any old language, has its idiosyncracies. But the way it handles database interactions with transparent and internal tables and "Open SQL" is really cool. I haven't programmed in the OO version of ABAP yet. But at initial glance it seems to have been corrupted by the idea of OO from C++ and Java. No one could have put it more adequately than Alan Kay himself.


I invented the term Object-Oriented, and I can tell you I did not have C++ in mind. -- Alan Kay


As we move on to the new decade, we are in need of a language that is closer to the business roots. A language that can be molded to best describe the problems in the business domain. As a hacker, the language that immediately comes to my mind is Lisp. Unfortunately, Lisp is not taught in schools as much it should be taught.

In an excellent essay by the folks from AdaCore, they express their concerns about using Java as the first language that is taught to programmers.


It is our view that Computer Science (CS) education is neglecting basic skills, in particular in the areas of programming and formal methods. We consider that the general adoption of Java as a first programming language is in part responsible for this decline. We examine briefly the set of programming skills that should be part of every software professional’s repertoire.


Further in the essay they insist on why Lisp still matters. (Emphasis mine.)


Why Lisp Matters

Every programmer must be comfortable with functional programming and with the important notion of referential transparency. Even though most programmers find imperative programming more intuitive, they must recognize that in many contexts that a functional, stateless style is clear, natural, easy to understand, and efficient to boot.

An additional benefit of the practice of Lisp is that the program is written in what amounts to abstract syntax, namely the internal representation that most compilers use between parsing and code generation. Knowing Lisp is thus an excellent preparation for any software work that involves language processing.

Finally, Lisp (at least in its lean Scheme incarnation) is amenable to a very compact self-definition. Seeing a complete Lisp interpreter written in Lisp is an intellectual revelation that all computer scientists should experience.


Page 13 of this book(PDF) by John McCarthy is literally the source of intellectual revelation.

Eric Raymond's essay was one of the reasons that I started learning Lisp. He has the following opinion on Lisp.


LISP is worth learning for a different reason — the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot.


I strongly suspect that the source of the "profound enlightenment experience" lies somewhere in understanding the code in Page 13 of the book.

I do not insist that the new business language has to be lisp. But lisp is the only language that satisfies such criteria. Problem domains keep changing and the by far the only language that is agile enough and malleable to fit the problem domain is lisp. Note that I am not saying that we would have to use Scheme, Common Lisp or Arc. I am just saying that we need a language similar to these. It could as well be a lisp written on top of any of these lisps, CLR or JVM. What matters here is the language - a formal notion to express our ideas. The compiler, VM and the platform are implementation details. Paul Graham explains this nicely in a rather long essay titled "The Hundred-Year Language".

But you might argue that Java and C++ are established languages. People are creating enterprise software with Java and C++. Why should we change? But look at the enterprise software carefully. Most of what took man years to implement in Java/C++ could have been achieved with much less effort using Lisp. Or if the system was well designed using the popular knowledge of design patterns that has evolved in the community, you would have created half of the abstractions present in lisp anyway. This is called the Greenspun's Tenth Rule of Programming. Although it explicitly states C or Fortran, I believe that it holds good for languages like Java too.


"Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp."

- Philip Greenspun


Even the co-auther of the Java language spec, Guy Steele, accepts that Java is no match for the features in Lisp.


And you're right: we were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp. Aren't you happy? -- Guy Steele


Why are we still targeting Java as the language of choice to build business applications? The cool kids have already moved to Ruby. But wait, I heard Matz said something about lisp.


Some may say Ruby is a bad rip-off of Lisp or Smalltalk, and I admit that. But it is nicer to ordinary people. - Matz


Its time to revive the 50 year old language and start to rediscover the language used by our previous generation.





As Kernighan and Ritchie once suggested -


The only way to learn a new programming language is by writing programs in it. - K&R


Keep coding. You know I am (in Lisp).

Friday, April 11, 2008

AppEngine and the MicroISV

Amazon pioneered the effort of providing computing and storage resources as a services like S3, EC2, SimpleDB, SQS and so on. There were rumors that Google would come up with something like this but boy did they surprise everyone. Instead of exposing individual services they have now exposed a coherent framework to build applications on Google scale infrastructure.Google AppEngine used in conjunction with Google Apps for your domain is a brand new market for microISVs to target. They could develop enterprise applications on Google scale hardware and have it integrate with the rest of Google's application suite. Google already had provided Sites and Page Creator. These were at best very weak for an organization's web presence. With Google's AppEngine small and medium scale organizations can look at Google AppEngine as a serious option for their enterprise IT system.

Google Apps for your domain, for those who were living under a rock, provides GMail, GTalk and collaborative office suite for free or for a small fee. Imagine the tons of money that you save on licenses if you had to use Windows servers for your domain and email. Even if you had chosen Linux, the costs of administration and anti spam filtering and the hardware for the servers simply do not exist with Google Apps for your domain. It was almost good for enterprises but not good enough. They still had to worry about their ERP, CRM and other enterprise TLA systems. Salesforce was an option but something was still off with it. That's for a different post.

Google, with its new AppEngine offering, has opened the floodgates of various applications that can be hosted on Google scale infrastructure with pay as you use model for application resources. This is just as Nicholas Carr from the IT doesn't matter fame suggested. Google is commoditizing the computing resources. This is a disruptive innovation which would change the dynamics of how applications are created. It wouldn’t be long for Google to provide a repository of applications that you could just deploy with a click on your domain. Currently Google AppEngine allows you to write applications in Python. They have very clean APIs for integrated User authentication, mail integration, ability to build mashups using the URL Fetch API and store data on Google's BigTable. Google has said that it would add support for other languages. But who needs other languages when you have Python. :-)

Google's offering levels the playing field for ISVs looking to build web-based enterprise products. So, stop reading and start coding. You know I am.

Wednesday, March 12, 2008

The Spam Song

A really funny song about spam.

Eva Moon: Cash from Nigeria

Monday, March 10, 2008

Override cross domain policy for local files

I have been working with Flex for the past couple of weeks to build a quick UI Dashboard for our application. We were running this application from the local file system. For some reason it did not work on my machine alone due to the cross domain policy. I then later figured that it was because I was using Firefox and all the others were using IE.

I fixed it then by adding my built file as a trusted swf. See here for more information. The documentation does not say anything about Linux. But you can do the same for Linux as well. You would need to add a similar text file in the following directory.

~/.macromedia/Flash_Player/#Security/FlashPlayerTrust


This is very useful for quick prototyping. You need to work with a proxy after that or better yet make some sense of the web services on your server side.

Have fun. Keep coding.

Monday, February 25, 2008

Hallo Garmisch-Partenkirchen

We (Me, Balaji, Vikas and Atri) had a nice one day trip to Garmisch-Partenkirchen to see the beautiful German Alps. You can find some of the pictures we took here.



We took a nice scenic route via Austria into Garmisch. The map is not the exact route we took but pretty close.


View Larger Map

Bis Spaeter. Auf Wiedersehen.

Thursday, January 31, 2008

Why should we learn Scheme?

I have been mulling over learning lisp seriously and using it for real projects. But I never could motivate myself enough to write something worthwhile in Common Lisp or Scheme. But after looking at Arc, I am impressed. The current version of Arc is written in Scheme. I have been a strong python advocate. But after looking at Arc, I am impressed. Not so much with Arc itself but with Scheme. I was browsing through Arc's code and found that it was surprisingly readable.

I am now determined to learn Scheme and contribute to Arc. Maybe, somebody would write a Arc -> Metal compiler but I like the fact that Arc has first been written in Scheme. It is sort of like PyPy or Rubinius. But I guess it is a natural thing to do in the Scheme world. I have two more books on my reading list. I have already started with Teach yourself Scheme in Fixnum days and I plan to grok SICP as well.

Keep coding. You know I am. :-)

Hello Arc

There has been quite some ruckus on the blogosphere about Arc. I have just downloaded it and finished reading through the tutorial. I like it. I am sure that features like Unicode will get added. However, I would like to see the standard library. How can I do FFI? Database interfaces? May be they are already there but I still don't see them yet. In the meanwhile, here is an interesting snipped of Arc for everybody who is pondering about Life, Universe and Everything.

arc> (reduce + (cons 6 (map [* 4 _] (keep odd '(1 2 3 4 5)))))
42

Keep coding.