Archive for the ‘Programming’ Category

The beginning of end for OO?

March 22, 2011 Leave a comment

Is it the beginning of end for OO – OO programming out of CMU CS introductory curriculum.

Well, I don’t know but after learning some lisp programming, I think other languages have far too incidental complexities – the cancer of semi-colon 😉 specifying types etc. that makes the syntax ugly and is of no help in coding. On the other hand, Lisp is beautiful, it is symmetry and simplicity combined and it would’ve done me a ton of good, if I had learnt Lisp after learning C. So at least for me it is a step in right direction and I hope other Indian schools / universities take notice.

Categories: Programming


March 14, 2011 2 comments

How about an almost 7:1 productivity gain? Well, maybe you might not call it productivity, but then what if you had to write 7 times less code? In rebuilding Racket’s graphic layer 200,000 lines of C++ code was replaced by 30,000 lines of Racket (Scheme) code 🙂 In revenge of the nerds Paul Graham mentions that Lisp is way more powerful than other languages. So, are you working with one of the productive languages or a blub 😉

Categories: Programming

Thank You, Microsoft.

January 6, 2011 2 comments

Dear MS,

You were THE most important ingredient of my professional life and career since April, 1998. After quitting sales in frustration because of lack of decent paying jobs coming my way (courtesy an MBA from a nondescript college), I started preparing for CDAC on my friends’ computer, which, if I am not wrong, had a pirated Windows 95 on it (as was the norm in India, back then – even now the situation might have changed slightly). Thankfully I cleared the entrance and completed the whirlwind 6 months course, in which, I just got an overview of so many things (RDBMS, VC++, VB, Java, C++ etc.) that I was good at nothing. Not to mention, the whole curriculum was completed on machines with Windows loaded on them. Finally I landed a job (in March 1999) where I was supposed to write code in VB6 (and VS 6). Unsurprisingly, I was CRUDifying (writing UI for entering data, with some logic) some business process and the UI was a desktop application (RICH clients) 😉

For the next 3 – 3 1/2 years, I was doing the same thing (though in the meantime, I got the dream chance of going to The Land of Opportunities, twice on a business visa). But by then Java had arisen and was giving you a run for your money (for programming language use and programmer mindshare) – and I was suffering the same fate at the hands of recruiters – by mid to end of 2002, there were hardly any jobs for VB6 – first because of the Java onslaught and second because you came out with .Net and C#. Not just that, but in the interviews, I, and presumably, most VB6 programmers, were being asked questions about internals of COM and I knew hardly more than IUnknown and IDispatch – not my fault, I was not a VC++ programmer so how am I supposed to know the internals (when VB6 shields me from them)? To add insult to injury, VB6 programmers like me didn’t command any respect from other (high profile – Java, C++) programmers – oh VB, it’s not even an OO language – no inheritance…

Enough was enough for me. In the past, I had tried a lot (in vain) to get into a Java project, but couldn’t. Thankfully I got a chance to get interviewed for a .Net project, and by that time, I had read something about .Net and C# and obviously I didn’t want to do anything with the words V B so I bought a C# book, divorced the company which was forcing me to remain married to V B, studied .Net and C# by myself and landed a job in C# (using VS 2000) – writing, once again, RICH clients 🙂 However, this application was getting stock market data from Reuters servers and we were just displaying it nicely – but it was a refreshing change for me – no RDBMS wow – and then I wrote another small application where the front end was Excel which was fetching data using a C# DLL…cooooolll…

But all this while I worked for software service provider companies, where managers and most colleagues derived some super-strange pleasure (unknown to me) by working overtime, and expecting everyone else to follow the norm. I was getting thoroughly frustrated with software as a career and used to wonder what should I do next and how many companies will I have to change – but then I got an opportunity to work in the offshore unit of a product based company and I happily worked for more than 3 – 3 1/2 years in this company – writing, guess what, RICH clients 🙂 first in VS 2003 and then in VS 2005 (using C#, all the time). I wrote a couple interesting applications – a code generator which used to generate PL/SQL code for SQL Server, Sybase and Oracle (but the client was not ready to use NHibernate ;-)) and compiling a code using C# code and generating an assembly and loading it at runtime…

I was also fortunate to work with a team in Miami who used, Castle IoC for their product, but unfortunately we were the only team in our offshore company using these exotic non-MS frameworks for REAL PROJECTS / PRODUCTS – so we couldn’t even ask for any help from our colleagues – and sadly, the project wound up, and with it, most of my chances to find any more meaningful work in that company.

Time for a change!!! I was again in The Land of Opportunities (by virtue of getting an H1 in the lottery) and was in for many of the shocks which only an H1 can give you 😉 – first I worked on a website (yay…thin client, no RICH clients) using Asp.Net, but I wasn’t allowed to use anything which did not come from you (so no open source frameworks), then I worked at a place where at first they allowed me to use anything I considered useful (so I used NH, and Spring.Net for IoC) but later on when they found it hard to find programmers to replace me (because I had to be with the family) they became of the view that even they should only use stuff made by you…so no open source stuff from that point on…

Then I got a chance to work on the next-gen web services framework from you – WCF (Windows Clumsy-cation Foundation) – in which, it was easy to write a few methods which could be invoked over the web – and everything else was complicated, error prone, configuration hell and hard to test. And writing RESTful services was like trying to hold your left ear with your right hand, from the back of your head (sorry I don’t know a fitting phrase) – it is like taking a lots of pain to find a good name for your child (the web method) only to call it GET later (because HTTP calls it Get) 😉

In the same company, I had the fortune of looking at the code for a heavily visited (in a EU country) e-commerce site where – on a single ASPX page, one can find using statements from configuration, to data and to what-not. I also had the good fortune of seeing an assembly where 90% of the classes had more then 90% of the methods – STATIC… 🙂

My final project on H1 was my best so far (because of many reasons) – a very good PM, a very good techie team lead, very good colleagues whom I worked with personally (not in an onsite-offshore setup) which is crucial – I used messaging for the first time (MassTransit), Resharper for the first time (and without Resharper, VS is only half as good, and you won’t believe it until you use it), Moq for the first time (for Mock testing), but here too, the application was, guess what, a RICH client, written in WPF – I didn’t know WPF when I joined the project and now also I know bare minimum of it (and for a change, for the first time in my life, there was a team of talented UI designers who built the UI for us and we were supposed to just fill in the details – read binding).

Now WPF is really powerful for building great looking UIs but it is so vast and has such a steep learning curve that I used to start yawning 5 mins. after I opened any WPF book to read, and in a true MS fashion, applications written in WPF are hard to test – there is no way to see your changes (to the UI)  without actually running the application.

So after working on so many RICH clients, I am finally bored of all things RICH. I am even bored of all things UI. And also –

1) I learnt NUnit but then you gave us MSUnit?
2) I learnt NHibernate but then you gave us (ObjectSpaces, no sorry) Linq to Sql and now EF?
3) I learnt Castle Monorail (which learnt from RoR) but now you give us Asp.Net MVC or MVC.Net?
4) LINQ is cool but functional languages (like LISP) are ultimate.
5) I hate companies who only use stuff which comes exclusively from you and nothing else.
6) Not to mention, I hated your monopolistic ways – bundling IE free with Windows to destroy Netscape, stopping work on future versions of IE, until Firefox scared the shit out of you, your super agreements with laptop sellers who only sell Windows pre-installed (%$#@)…
7) I don’t want to use any pirated OS, IDE or a database (and why should I pay for lesser quality, when a better quality is available for free).

So you see, I accomplished much and earned satisfactorily, because of you, but I am tired of using second hand stuff, and just like I love some of the open source frameworks, it’s time to show some respect to open source and embrace it fully – so even though I paid Windows tax (when I recently bought a new laptop with Win7 home premium installed on it), I uninstalled it and installed Ubuntu 10.10 with fearful heart (yes, it’s difficult to get rid of the old habits). There are some small issues with Ubuntu but that’s fine. I also have Emacs and Lisp installed on it, and finally I hope to move on to Clojure (and JVM).

So thanks for this long association and good luck to you and me on this new year.

New year, new commitments, new ways….AMEN.

Good luck (take care and be watchful),
Another .Net defector.

Categories: Programming

So what will you do by going back to India?

September 3, 2010 2 comments

I’ve been asked this question several times, when I talk to people here (in US). Which is a very valid question – you can do a lot of things here which are not even possible in India (even to this date), even the school education is good here, contrary to what I heard when I was in India. Plus, if one has to work on enterprise-y projects (Java, C# etc.) why not earn in USD rather than in INR?

And to be frank, I didn’t know the answer to it (some time back) so I just used to say – I don’t know. However, the answer(s) have appeared to me over the past year or so –

1) I wouldn’t want to work for any of the outsourcing majors (HXL, TXS, CXS etc.) 😉
2) I would not like to work on Windows (so obviously no C# or .Net), I don’t even want to use Windows (for anything, least of all software development, hence my next machine is going to be a Linux)
3) I definitely want to work on another platform now (be it Linux or Android)
4) I definitely don’t want to write desktop or web applications (no matter using Java, RoR or Asp.Net MVC)

So by now it’s amply clear that no big company is fit for me. On top of that I have a location constraint – I can only work in Pune. So where does that leave me?

1) Work for one of the start-ups – Paisa, Infinitely Beta or Hover (the first two use Clojure, the last one uses Erlang)
2) Start my own start-up 🙂
3) Heavy self learning
4) Do nothing (not a real option)

Out of the above three (since #4 is not a real option), #1 is not possible at this moment (or anytime soon) because I know neither Clojure, nor Erlang and #2 is not easy – one has to be smart enough to create something new or of value to others, and again, at this moment this looks less likely.

Hence, the only option left for me is #3 🙂 Yes, that’s what I can do and that’s what I’ll do. I am planning to take a sabbatical and I seriously plan to learn Clojure (and or Lisp) and maybe Haskell. I also have come to know of lots of good books which I’ll try to master – SICP, On Lisp etc.

I also realized that many of my peers in US, who work as consultants, typically get a month or two off (not as a rule, but most likely) between different assignments / projects during which they can learn a new skill / language. But in India, most of us work as full time employees and we hardly get quality or enough time off to learn such things (which is a big disadvantage). Also a consultant can take six months off (for example) and then start consulting again – it’s quite common here, so why can’t one do the same in India? (No one chooses to do it is a different matter altogether). I also heard (or read some) stories about how a person in US is in a particular field, but goes to a totally different field (for some short period of time, say farming) and then comes back to his original field, and used to fantasize about such opportunities – so that time is soon about to come.

And I’ve been working for almost 11 years now without taking a long break – except a short one (3 months), when I left the VB6 rut to start learning C# (and .Net) and finally get some good projects, money and respect (professionally). So this time I’ll have to take a bigger break, because the target is lofty, and I have to unlearn a lot of things (Windows, Visual Studio, C#, Subversion, RDBMS etc.) and learn a whole lot of new stuff (Linux, Emacs, Clojure, Git, one of the No SQLs).

So India, here I come (in the next 5-6 months, hopefully) 🙂

Categories: General, Programming

Internet OS

May 12, 2010 Leave a comment

If you are a software developer, you must have used one of the OSes on the desktop / laptop on which you do your everyday development. And even if you’ve done web development, chances are that all the data you were working on was owned by the company you were doing the development for.

But times have changed and there is a wealth of data available on the internet, much of it for free. So are you aware of the internet OS? No? How about Google, Amazon, Facebook? 🙂

Go read this and this.

Categories: Programming

Are you committed, or just involved?

A few days back, I had downloaded a Scrum Guide from InfoQ. Yesterday, while going through it, I came across this beautiful piece – here’s straight from the book –

The Scrum Team consists of the ScrumMaster, the Product Owner, and the Team. Scrum Team members are called “pigs.” Everyone else is a “chicken.” Chickens cannot tell “pigs” how to do their work. Chickens and pigs come from the story –

“A chicken and a pig are together when the chicken says, “Let’s start a restaurant!”

The pig thinks it over and says, “What would we call this restaurant?”

The chicken says, “Ham n’ Eggs!”

The pig says, “No thanks, I’d be committed, but you’d only be involved!”

So are you a pig or a chicken (not just in your job, but in whatever you do)?  😉

Homoiconic – or code is data and data is code

If you are in software and if you haven’t heard this term before, chances are that you don’t know LISP, or you just have a cursory knowledge of this “mother of all computer languages”. Surely, I’ll prove why LISP is THE MOTHER OF ALL LANGUAGES –

Let’s take a look at the evolution of C# (and the features that were introduced in it at certain times or that are being introduced in it even now) –

Feature C# version Year of introduction
Predicates 2.0 2005
Closures 3.0 2008
Lambda Expressions 3.0 2008
Linq 3.0 2008
Lambda Statements 4.0 2010

And when did Lisp originate? As per Wikipedia – 1958 🙂 And in Lisp (or Clojure), everything is an s-expression, so any piece of code can be turned into data (or code as data)

Most certainly, if I show that C# borrows heavily from Lisp, doesn’t mean that every other language does; but C#, as a language (which was originally a Java clone) has come far ahead of Java, and I am sure Lisp is the super set of the most current mainstream languages (I’d love to be proven wrong).

So wouldn’t you like to drink directly from the (free) source (instead of a paid derivative) 😉 But this post is not meant to be a war on which language is better right, so let’s move on…

The term homo-iconicity, means that code can be represented as data without having to resort to a different syntax (homo = same; iconic = appearance) –

So in Lisp (or Clojure) it is: (list 'GetPathsOfAllFiles folder file-filter)) [notice the tick "'" mark]

And in C#:  Func<int, int> twiceD = x => x * 2;
Expression<Func<int, int>> twiceE = x => x * 2;

The whole point is that when you use an Expression<> in C# code, that particular piece of code instead of being directly compiled in byte code and getting executed normally gets compiled into AST (abstract syntax tree) form, the advantage being that we can extract any information out of this AST.

This “extract any information” forms the basis of whole DSL magic using statically-typed languages like C#. This is the very same technique I used to achieve this –

For a deep dive into this whole homo-iconic fun, and other great C# stuff – please refer to the excellent blog post by Bart De Smet –

So if Clojure becomes a hit in the .Net world (less likely), then I would love to work on it, else looks like I’ll have to move to JVM as a platform (of course with Clojure) 🙂

Categories: Programming