The yield (return) usage
The yield keyword is a C# 2.0 feature. It’s been a long time that C# 3.0 is in the market, so much so C# 4.0 is looming over the horizon. Yet so many C# developers are not aware of its usage. Even I was not 100% clear, until I read (long back) this post from Joshua. Obviously, it’s a must read for anyone who can’t explain the usage of yield return.
The meaning of life
I don’t know why, but looks like I like to read obituaries. Don’t get me wrong – I don’t like people to die, but the ruthless hand of time has snatched away many a beloveds from so many of us and will continue to do so irrespective of what we want / feel. It’s definitely a loss when anyone dies, but there are some, who, for some reason, leave a lasting impression on so many more. Maybe because they are intelligent, or have some other talent, or could be some other trait.
The first obituary I liked was covered in this post of mine. The other one which I read today and liked is about Erik Naggum, and this too contains pearls of wisdom. From whatever little I’ve read about him, it seems he was an extremely intelligent guy who was a Lisp programmer. [ Just a side note: I am also slowly getting convinced that Lisp might be the best computer language designed yet. I am using might because I've just started down the Lisp path and that too, not with Lisp itself, but with one of its variants, Clojure ]
If you too would like to read Erik’s take on the meaning of life, read this. Just wow. May he RIP.
The art of programming
Ok, so you are into software like me and chances are that you are good at one of the mainstream OO languages like Java, C# or C++. And obviously, you love your platform and the language, so much so that you are a fanatic or atleast a fan.
If you want a real good food for your brain, read The Nature of Lisp by Slava. I haven’t digested all of it, but I am shaken. For the past few days, I was unsure of which new language-paradigm to learn – Ruby-dynamic, or F#, Erlang – functional. Based on this article, I feel that I should go for Clojure – precisely because I found the concepts mentioned in the article amazing, and the fact that Clojure is a Lisp dialect, and its dynamic and functional, and last but not the least, it runs on JVM.
Should I say the history repeats itself? I used to be a wannabe Java programmer, who got a life saving .Net / C# drug
which, unfortunately is losing its effect, after 5+ years; not the language, but the platform, for sure.
The power of failure
You sure must be thinking that recession has had a profound effect on me and I am out of my mind, so how about this -
“Human beings are the only creatures who are allowed to fail. If an ant fails, it’s dead. But we’re allowed to learn from our mistakes and from our failures. And that’s how I learn, by falling flat on my face and picking myself up and starting all over again. If I’m not free to fail, I will never start another book, I’ll never start a new thing.”
These are the words of Madeleine L’Engle, the author of A Wrinkle in Time. I took these from a book I am reading these days called Creativity by Mihaly Csikszentmihalyi. I’ll write a review of this book as and when time permits; needless to say it’s an eye-opener as was his earlier book called Flow.
Our society (the whole system, the education system) puts an undue emphasis on success stories and no-one chronicles (worthwhile) failures – not even media, whose only survival strategy is based on all things -ve
. Sometimes, even our families are a culprit. So we fall prey to this whole ’success’ sutra and with age, fail (and forget and become loathe) to take any risk – why? For the risk of failure. Yet, many successes are based on previous failures.
So go and fail
but don’t fail at the same thing again and again, or maybe even that is acceptable. I am not sure on this last one
An easy life doesn’t teach us anything
There are innumerable such beautiful quotes by Richard Bach -
“An easy life doesn’t teach us anything. In the end it’s learning that matters – what we’ve learned and how we’ve grown.”
“We design our lives through the power of choices.”
“We are each given a block of marble when we begin a lifetime, and the tools to shape it into a sculpture.”
If you want to hear one person’s travails of quitting a comfortable, well-paying job, selling his house and living on savings (even when he was married and had a daughter) and trying to do something on his own, then look no further. That person is Damien Katz, creator of CouchDB and this is his story, in his own words.
As is evident by his talk, his prime reason for doing all this was not money – but an ardent desire to work on some cool stuff, and an equally strong urge to experience life, minus the expected stuff i.e. the routine job, the same endless loops created by consumerist mindset etc.
There are a couple of important points to take away from his talk -
1) Sometimes, we don’t necessarily have to have a clear picture in mind, of what we want to do, if we are trying to create something new – Damien didn’t even know at the time of quitting as to what he wanted to do, but later as he started working, the pieces of jigsaw started getting into places (gradually).
2) Money and fame are not the most important things in life – however much the modern society tells us otherwise, the reality is something else.
3) He will complete what He has begun – it’s true, at least for Damien.
4) We have to have an interesting story of our LIFE (listen to Damien).
So what’s your life-story?
The Satyam fiasco
Well, for the benefit of my friends, who aren’t from Indian sub-continent, and / or who aren’t familiar with one of the Indian languages, the word “Satya” in Hindi (and some other Indian languages too) means “Truth”
so it seems the founder, B Ramalinga Raju, forgot to append a leading “A” in the name of the company
[ btw, "Asatya" means "False" in Hindi ].
I still vividly remember him (Raju) standing by his Mercedes in one of the popular magazines in IT (maybe Dataquest) a few years back. It was definitely awe-inspiring to someone fresh out of college and starting his career. Hardly did anyone (or me) imagine that this guy (or a “former” CEO of one of the biggest Indian IT companies) would stoop to such levels.
Co-incidentally, but not surprisingly at all, he hails from a community which is already notorious (in India and amongst Indians in US) for doing all kinds of stuff (read cheating) in the IT industry. Hyderabad city, where Satyam’s headquarters are located, also boasts of making (fake) industry certifications like MCSD, Java Sun certification etc. salable. The Times of India, in today’s edition (dated 13 Jan, 2009) carries a report of how Raju duped the APIDC (Andhra Pradesh Industrial Development Corporation) of Rs. 52 Lakh, 25 years ago.
I know of at least one person who would be happier than me after reading all this – my dear friend, Hari Raghava Bhargava; because of the profligacy we’ve seen in the Indian IT industry, and also because we’ve seen in how many different ways, a perfectly good project could be screwed. What more proof is needed than the fact that most of the managers in such Indian IT service providers are either non-technical (came from some other industry, though very rare), or off-technical (a DB guy managing Java or C# projects, very common) or obsolete technically (a PB guy managing, some OO projects, again very common) and they are the ones who are actually drawing fat salaries as compared to the programmers, or the guys who actually get the things done.
Also, what more can one expect from an industry which stands on only one pillar – cost (or to be more precise, lower cost)? Most of the time, I hear people (Project Managers) talking about any project in terms of revenues (x-million dollar contract) or cost (x man-days; which was y man-days lower than what the z company could quote for).
Well, if you think I am talking BS, then please be informed that I’ve worked with one such big (amongst the top-five Indian software service provider) firm for a little more than 3 years. I once asked my BUH (Business Unit head) that why do you accept such ridiculous time lines (doing a project in x/3 man-days, when reasonably, it should take x man-days)? His terse reply – “So what do you want to say? I should lose business to some other Indian company”?
And I perfectly understand his position. But the sad part is that the US companies, who actually own that piece of software, are ready to accept such code, because, again all they care about is BUDGET!!! So the lowest bidder wins
Would the guy accepting the proposal of lowest bidder, take the same decision, if he were building his own house?
And once an Indian company gets the project (on such terms), it resorts to all kinds of mis-doings like “ghost-billings” – i.e. billing for a person when he is actually not working on that project. And believe me or not (I don’t care), but I’ve seen it with my own eyes. Yes, I may not be able to prove it, but talk to any Indian (with the condition that his identity won’t be disclosed) if this happens in their own company? You’ll be surprised or shocked, but mostly both
I think I should stop this rant, because it is more than evident now, that capitalism (practiced in its extreme) also has its own pitfalls. Need I point you to scores of American companies (like Merrill Lynch, GM etc.) or whole industries (investment banking, auto)
? US has a true competitor here, India is not far behind…
Of course, what happened (Satyam) is really bad for Indian software industry, but if things don’t improve, like -
1) hiring technically solid people and paying them a lot more than the other average guys
2) dismantling the BS pay-brackets i.e. for x-y years of experience, Rs. a-b salary range, or Programmer Rs. a-b Lakhs, Senior Programmer Rs. c-d Lakhs, where obviously, a < b < c < d and so on…
3) taking proactive steps for corporate governance like zero tolerance (kicking a guy out, if he indulges in any malpractices) and setting up email ids where any employee can anonymously post occurrences of such malpractices
4) taking pride in delivering projects on some other scale than merely, cost and revenue
5) useless yearly reviews, which state that performances of members of every project has to fit the bell curve (exceptionally good or bad performances rare, and average performances common), which is true, but what is also true (and conveniently but purposefully overlooked) is that a programmer doing a good job on a fresh development project is better than a programmer doing an exceptional job on a maintenance project
the day is not far off when this sunrise industry (for India) may be doomed for an early sunset.
I sincerely wish that I may be proven wrong.
The future
I am sure you must’ve read that you just can’t wait for the future to happen to you, but you need to create it. To be frank, I don’t take this statement at its face value, but feel that there definitely is some element of truth to it.
I worked in different software companies in India – some were typical service providers, and one of them was a product-based company, where, of course, I enjoyed my stay of 3 and a half years. Do I need to tell you that I won’t like to comment much on the remaining 4 years
although it was a mixed bag, as most of the life is.
Then I came to US in search of the elusive $$$
and good work. But guess what, here also, the fight to get both the good work and the money continues. It’s much easier to get only one of them as compared to getting both together. So I’ve started feeling lately, that the solution to my woes could be to start on my own.
Of course, I am fully aware that I haven’t graduated from any ivy-league institution, and I am far from a geek, and I am also taking into account the interesting relationship between work and money as highlighted in Seth Godin’s post (see my previous post for the link). But since I am an optimist, I would like to remember the twist in Seth’s post.
Also, articles such as Start Now: 6 Reasons Why This Economy Is Good For Startups are a great help to keep me motivated toward that lofty goal. I would like to read this daily morning (again, from the above link) -
“If you don’t start, you’re doomed to a life of trudging through jobs, depending on someone else for salary and bonuses and health care and retirement, a life’s work without ownership or upside.
You’re better than that. That’s why you’re reading this blog.
So go for it.”
Think about it. Have you created something of value in your life so far? Or would you like to create ‘the future’ for you, or atleast create something of value and leave a legacy?
Well, I would love to do so. Hence, if you feel the same, we could join hands.
Wish you A Happy and Prosperous New Year
An interesting article on work and money
Seth Godin has a very interesting post on the relationship between work and money – Maybe you can’t make money doing what you love. And the best part is in the twist at the end. A must read.
How the tastes / habits change
Circa 2003, I was stuck in a never-ending maintenance (read DEAD) project in good old VB6, and although I had posted my resume on many job sites, obviously there weren’t any takers. While my Java brethren were happily landing plum offers. Enter .Net and my saviour C# – as soon as I came to know about this platform and language, I realized here’s my chance to enter into the mainstream world of OO languages and I chose C# over VB.Net because of my liking to Java, my familiarity with the syntax of C family of languages , as well as the stigma
attached to the VB6 developers as not serious ones.
After some initial struggle, I got into a new company and a new project in .Net with C# using VS 2000. One of my close friends, Dhawal Mehta, at the very same time was working on another project in .Net using VS 2000 but in VB.Net. Sometimes we used to have discussions as to which language was better. No marks for guessing who was supporting which. I obviously, vehemently opposed VB.Net and favored C#, so Dhawal gave me a concrete example – in those days, if you declared a delegate and tried to call it asynchronously, the VS didn’t give you any intellisense in C# for the BeginInvoke or EndInvoke methods, but it used to show the intellisense for VB.Net so I told him, that it’s the IDE problem and not a language problem.
So he asked me once, why do I hate VB.Net so much. I told him plainly, that it is too ‘verbose‘. He reluctantly agreed to it. After some time, he had to work in .Net using VS 2000, but this time he had to use C#
And boy, he was hooked to it and got my point of view – VB.Net is definitely verbose he said.
Circa 2008 – I’ve been happily working on the .Net platform using C# as the language. I am reading Ayende’s book on DSLs in Boo and of course Boo is a great language. It has many advanced fundas like open compiler pipeline, which I am not thorough with yet, but have a look at the pic. below -

Don’t you think even C# has a lot of noise in the form of line ending “;”, curly-braces etc. There are so many other features which make even C# look verbose in comparison to Boo. e.g. you might have seen some coding guideline (for C#) that even if there is a single line statement in the if condition, you must enclose it in { }? The oft quoted reason is that tomorrow somebody else should not accidentally put a line of code, which becomes a part of the if statement. However, Boo works on indentation – just indent the statements after “if” and they form the “if” part of the if-condition. Plain and simple. No noise. And no need for coding guideline that I mentioned above.
Definitely, it takes some time to get used to it, but just work on it for some time, and I am sure you’ll get addicted.
If you like what you’ve read then please read the Ceremony vs. Essence part of this post, and this one from Neal Ford. And just think, an important concept like design patterns (some of them) is ceremony for some folks
Similarly, this post states that Strategy pattern exists because there is no place for a function in an OO language outside of a class!!! Starting to make sense to me plus the fact that MapReduce kind of things can’t be done with plain OO.
I know the example I’ve given is too simplistic, but essentially, I’ve started feeling that I am working with a high ceremony language. Looks like it’s definitely time for me to start exploring the dynamic or functional territories.
An open letter to the authors / publishers of tech. books
This post is a rant, but first the thanks-giving. My thanks are due to Pearson Education for publishing Agile Principles, Patterns, and Practices in C#, Design Patterns in C#, Applying UML and patterns and other such great books. My thanks are due to Manning Publications too for printing Hibernate in Action and their other books in low-cost editions. I’ve definitely learnt a lot from these books and these are highly recommended if you wish to take your craft to the next level.
My thanks are also due to the respective authors – Robert Martin, the late Steven Metsker, Craig Larman, and Christian Bauer and Gavin King for their books’ availability in low-cost editions. Although sometimes, these books might be coming out a good 2-3 years after the first appearance of their counterparts (US editions), still the mere availability of low-cost editions ensures that Indians and guys in other countries can purchase those books.
But what is a low-cost edition book? If you are one of those who’s wondering this, then here it is -> a low-cost edition of a book is valid for sale in countries like India, Bangladesh, Pakistan and other neighboring countries, and is generally a paperback edition. So if a book costs say, 50 USD (which is roughly more than 2000 INR, considering an exchange rate of 40 INR for a USD), the low-cost edition would be available for, say, 500 – 600 INR, which obviously is quite affordable.
So now for the rant part – I am not sure which of these books are printed and who decides to print them in their low-cost avatars. I am just hoping that the author might have a say in this. If that is the case, then I am really appalled at the apathy of those Indian authors whose books are not available as low-cost editions too. None of the Martin Fowler series of books (written by many of the ThoughtWorkers) are available in low-cost editions, despite ThoughtWorks having offices in 2 or 3 locations in India – how shocking and insulting?
I am sure that none of the authors are naive enough to think that a soft copy of their books is not available as download from one or the other websites. So why don’t they make sure that their books are available as low-cost editions too? Yes, I can buy such books through my company, but I would like a personal copy too, and shelling out 500 INR is not a big decision for me (or most of us). C’mon guys, already so many people here (in US) are pissed off because of the low quality of the work from some of the Indian offshoring companies. So why don’t you give us the resources, give us the books which we can afford and then point fingers at us.
Consider this scenario – if a publisher prints 500 copies of a book, which is sold for, say, 500 INR, the expenditure is 250,000 INR, which is hardly 6250 USD. Even if you add a couple thousands of USD of other costs, I doubt 8K or 10K is a big spending for any publisher. Given the scene of IT / software in India, I am sure atleast half of these books should get sold. Does it seem like a bad bet? I don’t think so.
So here is a request to all those authors, whose books are still not available in low-cost editions, and to those authors whose books are about to hit the market – like Ayende Rahien (for his upcoming book, Building Domain Specific Languages in Boo) and Jeremy Miller who’s considering writing a book on Presentation Patterns – please make sure your books are available in low-cost editions, and I make sure to you that you have a lot of audience (and possibly fans) in these far-off countries, and you’ll definitely sell a good number of copies there.
The request is also to various publishers. The low-cost editions ensure that many people outside US can (and will) buy your books, and if the low-cost edition debuts the same day as the US edition, my friends back in India get timely information.
Am I asking for too much?