Saturday, February 4, 2012

Topics in Knowledge Management

Over the past few years, I have been struggling to keep up with a number of large and small subjects, such as, AI, programming languages, etc. There are multiple good information sources for these topics available nowadays -- my favorite is short lecture videos since it is fun and fast way to get an overview of topics and to learn new topics. My second favorite is online Q&A forums. But then there are also many excellent short and long articles available.

Remembering and recalling good information and sources about particular topics within the subjects had become very challenging. Further, one wants to quickly retrieve one's thoughts one had before on the topic. This seems to be adequately facilitated using the following strategy:

  • Maintain a set of notes -- one on each topic of your interest. Using a 2- or 3- column layout is useful like in cheatsheets. 
  • When you read something, put it in the notes along with a link/reference to the source. 
  • Use a facilitating tool like latex or if you prefer, doc, to be able to write mathematical formulae or other other items without struggling. 
The strategy may appear trivial or simple, but the above strategy is essentially saying that there are no "shortcuts" in knowledge management. Previously I had used mind maps, blogging, etc., but none of these seem to work well. They put unneeded constraints on the writing style and retrieval, such as having to link topics in mindmaps, and a temporal order in case of blogging. I have been using the above strategy for a few months now, and it has worked quite well. 

Sunday, January 29, 2012

LinkedIn blurts, "All your contact are belong to us"

Recently LinkedIn listed some folks who I met only once or twice in real life under "People You May Know". How could they manage to know so much about me?

My initial hypothesis was that my email provider sold my contacts to LinkedIn. But an internet search revealed that people using both Outlook and GMail were also complaining about this problem. It is unlikely that multiple email providers would have sold their contacts to LinkedIn.

After a little while of thinking, I figured there are several ways in which LinkedIn could know about me:
  • If I (or my frequent IP address) searched for a person X on a search engine and saw X's profile on LinkedIn, and X (or her frequent IP address) saw my profile on LinkedIn similarly -- this indicates that we both know each other. 
  • If my frequent IP address is same as X's IP address (but is not a "popular" IP address, e.g., of a university) -- this indicates we were at the same location. 
  • If X has imported her contacts list and I am a part of it.
It is an interesting puzzle to find even more ways in which LinkedIn can connect people. I am sure there are. 

In practice, it is possible that they could have made a list of features such as the above. Then they would have run a machine learning algorithm on the historical data --- they've got the training set(!). That is, one year ago, what were the feature values, and then who connected with whom; this later is the training set. They do not need to solve the above puzzle manually. 

Though LinkedIn has chosen to surprise us, one understands that they do have a lot of false positives, i.e., people that I do not know are shown in the list as well. 

This short analysis shows that the other guys, our search engine guys and our social network guys, for example, can know a real lot more about us than we realize. Even if we delete our online accounts, we would be as anonymous as "no internet" only if we change our IP address (or use an anonymizer like Tor), never contact our (old) friends (including our relatives) again, and may be, live like an another personality. If we have our photos online, probably we need to never show our faces on the internet. All this will make the internet almost useless for us. 

But probably we have already given up hope. 

However, is it wise for LinkedIn to perform a "deep search" to spit out their recommendations for us? They do not seem to be concerned about people getting scared and deleting their accounts. Indeed, nobody seems to care about anonymity anymore.

Thursday, January 19, 2012

A First (Bitter) Taste of C++0x

I am not sure how many C++ programmers are looking forward to C++0x. Considering the fact that several of the new features are oriented towards making programming in C++ "more fun" than it already is (sarcasm intended), the conventional wisdom says that good programmers should welcome the next version of C++0x with open arms.

It might be premature to welcome C++0x with open arms. I got a bitter taste recently when a class in my program which worked fine before on gcc started needing a move constructor  to function correctly when using the C++0x std::map (needless to mention the resulting crash was difficult to find and fix). That is, the move constructor is not needed (and won't even compile) if C++0x is not available. In turn this means that, the story that C++0x is "fully backward compatible" is true in theory but sometimes not in practice.

An experienced C++ programmer knows that there are no perfect (or, should I say unabused?) rules in C++. The idiom "you pay for only what you use" is another good-to-talk-about idiom that does not hold in reality. In reality, a programmer that doesn't want to use certain languages features might find it difficult or impossible to avoid such features. For example, one might want to use the concurrent programming-related libraries in C++0x without needing to use the other features such as std::move and std::forward. This seems to be too much to ask.

Another common case when a programmer is forced to use the language features that he or she does not want to, is when he or she wants to use a library that uses the unwanted feature. Often "wrapping" such a library to hide the unwanted features is impossible.

Some programmers say, "Only a madman uses all the features of C++". This is true to a large extent, given one has to read about 10-12 books to gain a medium level of expertise in the language (and now with C++0x we can safely add 3-4 more books). So, on the one hand, one can't be free from using all the existing features, and on the other hand, you become a mad man having to keep all these features in mind. Truly an adventurous land (probably you already saw a take on a map here), happy for those who have the time for the adventure.

Saturday, January 7, 2012

Many More Online Lectures

Earlier I blogged about free, online graduate level courses being offered by universities. On these lines, there is a plethora of course video lectures provided by top Indian universities (link) and US universities (e.g., link). We are seeing an explosion of the available and easily available knowledge, but still clearly it is just scratching the surface of possibilities enabled by the state-of-the-art technologies in the evolution of (higher) education.

Footnotes:

  • An inordinately large amount of focus in Indian higher education seems to be placed on the sciences and technologies, and very little on the humanities. This is reflected in the set of lectures as well.
  • There are multiple playlists of US university courses as there are many public and private US universities offering online course videos. This can be contrasted with one central playlist of Indian university courses offered by Ministry of Human Resource Development. There are still very few top-level private universities in India.

Sunday, December 25, 2011

Changing the Door Lock / DIY

This post is not a series of instructions for changing the door lock but some related discussions.

My door lock has worn out. I must change it before I move out from my house. Today I spent quite a bit of time trying to understand and learn how to change the door lock.

Unluckily, the "manual" of the door lock didn't make any sense (it may have been lost in translation from Chinese), and the online videos certainly helped but they focused not on the lock model I have and the problem I was trying to solve.

It was difficult for a non-genius to do it, but finally I am quite comfortable with "changing a door lock". The only equipment needed is a screw driver. I do not have the time to explain the process in writing, but here is a link

I believe they should standardize the figures used in the documentations across brands and devices. For example, "action A" first when the "scene looks like this". Then "action B" when the "scene looks like this", and so on. In any case, nobody can enforce good explanations.

This episode is just another step in trying to be self-sufficient in terms of common household activities. Consulting plumbers, locksmiths and electricians (and yes, let's not forget, doctors) is a painful effort (particularly in my country of stay) and best avoided for common simple problems. For this, of course, one has to try to learn the subjects and try to avoid calling the consultants for the same ailment twice.

A primary reason for this situation is that such "short-lived" consultants do not have any strong economic motivation for being "good" to the principal (see, for example, this paper).

Given this situation, the best alternative for principals, it seems, is that they should be open to understand and verify, and yes, gaining knowledge is an important aspect. Much of such knowledge is available online for free. Particularly about medicine, it makes double sense to know more, not only because medical costs turn out to be huge when they do, and that it is very personal to know about our own body, but also because we can aim towards the invaluable goal of prolonging our lifetimes this way.

Monday, December 5, 2011

A New Wave in Higher Education?

This year Stanford Univ had online free classes on AI and Machine Learning. Next year is exciting with many more online free courses.

Saturday, November 26, 2011

Instructive Programming Language Talk

Probably the most entertaining talk related to programming languages I have listened to, in this case Javascript mostly. The speaker is Douglas Crockford and has a (equally) nice website.

Sunday, October 9, 2011

Web2py, Bottle, Python, C++, etc.

I have started to use Python a lot for programming in the last few months. I have used C++ and Java extensively too before, but I now favor programming in Python.

Simplicity

Python has a simple and neat syntax, follows "Explicit is better than Implicit", has functional language constructs such as yield and lambda, other constructs like [f(x) for x in myList] that allow to write concise and easily understandable code.

Single .py files are python modules (directories are modules too) and it is usual to have many functions and classes within one module -- this is a huge win over the usual Java practice of putting only one class in one file. Indeed I can write an entire package worth of Java code within one .py file. Functions within functions, i.e., local functions are quite useful to reduce the complexity due to the number of functions in the module scope.

As a result of this degree of simplicity, I code using Python in a simple text editor such as vim, and do not have to load huge (but cool nevertheless) IDEs like Eclipse. I can run ctags that allows me to jump across to class and function definitions directly.

Nose, unit tests and doctests greatly simplify quality control of Python code. In the best spirit of literate programming, doctests serve both as documentation and simple tests. To make a nose-style test, I just need to write a function starting with "test" prefix.

Entering from the world of Java and C++, I was earlier making many more classes while using Python. Later, I found that just using functions was even simpler. Now, for many of the "data classes", I just instead use a dict containing tuples or arrays as values. It is easy to save the dict into a file using a single function call dumps using the Json module, or just use Pickle.

Python Code is not Compiled 

Since Python code is not compiled, there is a higher dependence on tests for catching problems -- such as -- wrong function being called after some code was refactored. Therefore, having tests and a running test-suite is more or less required. The Pyflakes tool allows to find unused imports and "undefined functions". PEP8 is widely used by python developers as a coding standard and a tool supports it. See this discussion, for example.

Web Frameworks

Recently I used Bottle Web Framework for an application, and I am pretty happy about having selected it, till now. The reason I selected a micro-framework such as Bottle, rather than likes of Web2py or Django is that I did not need to have an elaborate database usage, neither much client-side/javascript views, as the server communicated (only) with our iPhone app that handled all the formatting. I used the simple sqlite3 database interface.

Another framework that looks quite exciting is Web2py. It has a long list of "goodies" that are difficult to find elsewhere (For those who know Web2py, I am referring to DAL, CRUD, HTML Helpers, and including Python code in HTML, to name a few). These goodies are supported by a clean adherence to the popular MVC pattern. (There are very few popular good things, and when this happens we should consider ourselves fortunate. Disclaimer: I have not made a detailed analysis of the alternatives to MVC.)


Personal Bias

There are not many languages that I have liked long from the day I started using that language. C and Perl do not belong there, for the same reason "bash" does not. The reason -- without going into too much details -- is that it is easy to make mistakes in these languages, to the point it gets frustrating. I like C++ -- but probably since I started using it quite early -- in school, and I learnt it before I could dislike it. But C++ certainly is easier for me to use than C, for any large projects.

C++ is a huge, complex language that should be used only where Python cannot.

Efficiency Issues in Future

Multicore computer architecture is a primary aspect of the future of computing. Probably at least 20% of the programmers will be writing parallel programs at a point of time. It is difficult to get parallel programs correct as well as high-performance -- and this is where functional programming shines. Hand-wavingly speaking and to cut a long story short, in pure functional programming languages, there are no side-effects of function calls, such as "modifying the state of an object". Therefore, it is easier to reason about such functions. More on this in a subsequent blog entry.

C++ has made a huge turn with C++0x towards supporting and simplifying constructs useful in functional programming and parallel programming, and programming in general. C++ allows the programmer to get the most bang for the buck when performance is primary. 

Python is stuck with GIL -- Global Interpreter Lock -- that allows only one thread to run at a time. Instead, Python, like Erlang, depends on (the heavier but safer approach of) multiple processes to exploit multicore parallelism via the Multiprocessing library -- this is explained well in this tutorial. But there is also Stackless Python, which looks like an interesting approach (in line with task-based approach implemented by the fabulous Intel TBB C++ Library for Multicore). 

Then there is LLVM for C++ and PyPy for Python. LLVM currently performs Profile-Guided Optimization while PyPy performs Just-in-Time (JIT) Compilation (LLVM may implement JIT later). In the long run, these modern approaches are likely to outperform the static compilation approaches.

Saturday, October 8, 2011

When Will They Stop Taking Our Hearts?

I mean the music at
Radio Paradise 

Warning: addictive radio

Monday, August 22, 2011

One of the Weirdest C++ String Gotchas

I was doing wstringstream os; os << L'' << "Hello"; (note: there is no space between the quote marks after L) and then printing the buffer of os. My output was empty. This is because of a bug in Visual Studio. By the way, another frequently-occurring gotcha when trying to extract the buffer from a stringstream object is discussed here






Sunday, August 21, 2011

Review: Out of the Tar Pit by Ben Moseley and Peter Marks

Though this paper is not included in this list of "10 papers every software architect should read", I found the paper a really good read. The paper would definitely be included in my own such top-10 list. The authors distinguish between the essential complexity of a software, and the accidental complexity (i.e. non-essential complexity). The authors then argue how software could be implemented in the ideal world and that most of the complexity in the real-world software is accidental. Functional programming and imperative programming paradigms are discussed w.r.t. their contribution to complexity. The benefits of separation of State and Control are discussed. Finally the paper develops a "Functional Relational Programming" paradigm for application programming.

Tuesday, October 26, 2010

Manzil -- Goal

lekar hum thode se khwab
nikal pade anjani raah
baante humne kitne sapne
begane bhi ho gaye apne
hur mushkil par dhun banayi
andhiyon mein gungunayi
raakh mein bhi aag lagai
amavas mein bhi ek lau jalayi
manzil
tere liye nahi chalta hoon main
manzil
chalne ke liye chalta hoon main
manzil
musafir bahut honge teri raahon mein
par koi mujhsa na hoga teri raahon mein
manzil, manzil, manzil
- Closing song at Jay Hind

(Translated by me)
With a few dreams
We started on the untrodden
We shared our aspirations
And our foes became friends
Each pain became a melody
And we sung them with tears
We made light from ruins
Lit a flame in the moonless night
Goal,
I do not walk for you
Goal,
I walk to walk
Goal,
Many would have seeked your path
But you will be amazed to meet me
Goal, goal, goal.
- Closing song at Jay Hind

Saturday, September 25, 2010

Why I am a Zombie on Facebook

The topic of the current discussion is not new and never will be in the future. But having read "Six Reasons Why I'm Not On Facebook", I consider this an important article. In most part I agree with all the points the author makes, but I do not consider the repercussions as severe as the author makes them to be. For example, I do not think it is impossible to "change yourself" once you have built an image on Facebook. Yes, but likely the existing image makes the change harder. This is particularly true when people around you take a "written behavior" more seriously than an "oral behavior"; or they have difficulty understanding what parts of you personality are likely subjects of large changes and which are not.

Besides I have other reasons against Facebook: I believe it is not in your best interests to share your personal information like personal photos with "your friends" or "friends of friends" online especially when some of these "friends" you have never met in real life. It is as bad when your friends upload your photo and/or tag you, particularly as it is a matter of courtesy to feel bad to ask your friend to undo this.

But what pisses me off most is that nowadays when I create an account on a new "web application", they suggest me to add my friends automatically. That is, they know about my friends even before I tell them. I do not like to be one-upped by the smart-ass web apps. I do not know whether Facebook, LinkedIn or Google is responsible for sharing my data. I do not have the time to track this down, and I do not want this problem at all in the first place.

Another factor is that Facebook can get addictive for more than one reason. The first is games and applications, the second is the "browsing experience" through your friend profiles, and the third is a false sense of accomplishment or a feeling of "living a good life" by performing online actions that are visible to others on Facebook and to which the others respond. I heard somebody said some years before, that "Everyone will be in a hall of fame for fifteen minutes in the digital age" or something like that, but I do not believe so. Fame, by definition, is not a 15-min thing.

I am not saying that the activities described in the last paragraph are not "good" or are "unethical" (this would require additional thinking and argumentation), but I am saying they might be unworthy of your time. They might be distracting from your "real purpose"; unless "what you really want to do" coincides with having a temporary fun. For example, although playing a lot of games on Facebook might improve your mental faculties, probably a program with the intent to improve your mental faculties would go farther. If you consider the games "fun", I would gently suggest to also explore other deeper avenues of fun like reading Shakespeare, or trying to write a good comedy. But also as a matter of argument, games is not what Facebook is for. Games happen to be here due to the popularity of games on the social network. There are other places on the net also where you can play as good games -- the only extra thing you get here is that you can compare your score with your friends' score.

Now if there is so much wrong with Facebook, why am I on Facebook at all? I am trying to have all the benefits and none of the undesirables. Some of my friends have come to believe that all of their friends are on Facebook and the best way to contact them, for example, for an event is via Facebook. If I do not have a Facebook account, I will be out of reach. Second, Facebook is an another way of marketing your product or company.

But if you want to have a real conversation with me, its best to meet on a coffee, still! Otherwise better lets have a Voice Chat (it only costs you and me time; it is not worth doing if its not worth your time) or talk on phone. Please do not send me "Wall messages" (because I would rather talk to you alone than announcing our conversation to everybody) or messages (because I do not have the Facebook page open in my browser all the time) -- I better like an email as I check my email frequently. I don't think my preferences are going to change -- although I say this with a sense of doubt since nobody can predict the far future.

See also:
http://www.thenewatlantis.com/publications/hiding-behind-the-screen#

Sunday, July 4, 2010

The Right Thing to Do

In the previous post, I alluded to justiceharvard.org. This site contains videos of lectures on the topic of Moral Reasoning. Prof Michael Sandel takes us into the philosophy of justice and morality.

Due to the captivating nature of the topics, I've gone through all the videos, except the last which was unavailable. I do not have time to write about the topics but I am committed to work keeping in mind what I have learnt from these lectures. I will write on these topics within the coming months.

Wednesday, June 30, 2010

Forget the Rules!

Bernard Shaw made a rather obvious but not-so-popular comment: "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man."

The quote is controversial. First, some would say that progress is not a goal of humanity; even though most of them would not have been able to live to the age they are currently in if not for the progress. Second, some would say that if progress is desirable then what he calls as "unreasonable man" is actually reasonable and what he calls the "reasonable man" is unreasonable.

People hate change. Human systems hate change even more. But change is the only constant. A bad change like a world war is hated more than a good change like a new technological invention, but even good changes are not exactly loved by all. For example, people before the computer generation may not like computers and Internet as it affects and alters their lifestyle as well. Now whether computer is "good" or "bad" is a matter of perception of the individual. Now that throws some light on the unpopularity of the "unreasonable man".

To truly understand this, now tell me whether genetic engineered food is progress or not? Why do some people prefer organic food? Google dealt a severe blow on American newspapers and they were forced to evolve -- did we like that or not?

Do we understand the psychology of the parents whose child died due to neglect while they were too involved with taking care of their virtual baby? They are calling for inventions that seek to simplify child rearing to as much as mouse clicks. Don't talk to me about loneliness in the age of Ironmen.

All human systems are temporary and constantly evolving.

Some people with a restricted view of the times we have readily become "forces of conformism". For example, there is one person at my work place who would remind us of laws and rules as a warning, even though we never had to make a choice to break any rule. This guy's testosterone level is a function of how many people he reminds the rules about. No use of even trying to spend time telling him that rules and laws are made by humans, and therefore essentially imperfect. Indeed for humans nothing is perfect, except for figments of the mind like Mathematics.

If you think you are a good citizen, remember that at one time good citizens in some countries would kill or make slaves of other humans without fear of prosecution. If you believe you are moral, you must have to agree that you are not completely moral. Probably there is no such thing because morals are choices that humans have to make in certain contexts. But to what degree are you moral? Are you merely the rules and conventions? To test yourself, you might like to visit justiceharvard.org. Perhaps also importantly, how intelligent are you about your morals? To rephrase that, on what basis do you justify your morals?

Wednesday, June 16, 2010

Book: Defensive Design for the Web by 37 Signals

It can be frustrating to read a book that discusses in detail about what makes common sense -- in this case in GUI design. For example, error messages should be prominent. At the same time, it is surprising that how many companies goof up their websites with such common sense mistakes. This book explores many such GUI mistakes that many websites make. The book thus serves as a useful checklist -- indeed there is a summary at the back of the book about all the principles discussed within the book.

Another good thing about the book is the uniform layout, which means there is atleast one figure on every page. Humans love figures and examples, true.

> A more detailed review of Defensive Design

Monday, May 31, 2010

Book: Ambient Findability by Peter Morville

This book is about an half-an-hour read for a busy person. The cover page says "What We Find Changes Who We Become"; and this is what the book is about. Enjoyable and informative.

This is one of those books that affects your subconscious, not your conscious, and the more time you spend with it, the more you understand the book. (Compare this with a book on mathematics, where at least some time must be spent on every chapter to understand it at all).

Sunday, May 16, 2010

Book: Portrait of the Artist As a Young Man by James Joyce

I have pleasant memories of having read my-favorite book "Portrait of the Artist As a Young Man". I have to read the book again some time, but in this blog post I reproduce an extract, which is the description of the hell:
Now let us try for a moment to realize, as far as we can, the nature of that abode of the damned which the justice of an offended God has called into existence for the eternal punishment of sinners. Hell is a strait and dark and foul-smelling prison, an abode of demons and lost souls, filled with fire and smoke ...
The horror of this strait and dark prison is increased by its awful stench. All the filth of the world, all the offal and scum of the world, we are told, shall run there as to a vast reeking sewer when the terrible conflagration of the last day has purged the world ...
But this stench is not, horrible though it is, the greatest physical torment to which the damned are subjected. The torment of fire is the greatest torment to which the tyrant has ever subjected his fellow creatures. Place your finger for a moment in the flame of a candle and you will feel the pain of fire ...
Our earthly fire again, no matter how fierce or widespread it may be, is always of a limited extent; but the lake of fire in hell is boundless, shoreless and bottomless. It is on record that the devil himself, when asked the question by a certain soldier, was obliged to confess that if a whole mountain were thrown into the burning ocean of hell it would be burned up In an instant like a piece of wax ...
Consider finally that the torment of this infernal prison is increased by the company of the damned themselves. Evil company on earth is so noxious that the plants, as if by instinct, withdraw from the company of whatsoever is deadly or hurtful to them. In hell all laws are overturned - there is no thought of family or country, of ties, of relationships. The damned howl and scream at one another, their torture and rage intensified by the presence of beings tortured and raging like themselves. All sense of humanity is forgotten ...
Last and crowning torture of all the tortures of that awful place is the eternity of hell. Eternity! O, dread and dire word. Eternity! What mind of man can understand it? And remember, it is an eternity of pain. Even though the pains of hell were not so terrible as they are, yet they would become infinite, as they are destined to last for ever. But while they are everlasting they are at the same time, as you know, intolerably intense, unbearably extensive. To bear even the sting of an insect for all eternity would be a dreadful torment. What must it be, then, to bear the manifold tortures of hell for ever? For ever! For all eternity! Not for a year or for an age but for ever. Try to imagine the awful meaning of this. You have often seen the sand on the seashore. How fine are its tiny grains! And how many of those tiny little grains go to make up the small handful which a child grasps in its play. Now imagine a mountain of that sand, a million miles high, reaching from the earth to the farthest heavens, and a million miles broad, extending to remotest space, and a million miles in thickness; and imagine such an enormous mass of countless particles of sand multiplied as often as there are leaves in the forest, drops of water in the mighty ocean, feathers on birds, scales on fish, hairs on animals, atoms in the vast expanse of the air: and imagine that at the end of every million years a little bird came to that mountain and carried away in its beak a tiny grain of that sand. How many millions upon millions of centuries would pass before that bird had carried away even a square foot of that mountain, how many eons upon eons of ages before it had carried away all? Yet at the end of that immense stretch of time not even one instant of eternity could be said to have ended. At the end of all those billions and trillions of years eternity would have scarcely begun. And if that mountain rose again after it had been all carried away, and if the bird came again and carried it all away again grain by grain, and if it so rose and sank as many times as there are stars in the sky, atoms in the air, drops of water in the sea, leaves on the trees, feathers upon birds, scales upon fish, hairs upon animals, at the end of all those innumerable risings and sinkings of that immeasurably vast mountain not one single instant of eternity could be said to have ended; even then, at the end of such a period, after that eon of time the mere thought of which makes our very brain reel dizzily, eternity would scarcely have begun ...
A Reading List

Monday, March 29, 2010

A Developer's Diary: The Kind of Developers I Know

  • Language Lovers versus Language Haters: Developers who hate language X (X = java, C++, C, C#, perl, python, lisp, etc).  It is a secret that I hate 2 of the above languages too. I think there is little reason for their existence (a hint: would you use roman numerals for maths calculations today?). I will not digress to language wars though. I believe most if not all languages have their own universe, and most if not all of them have a pretty sight. I believe a developer who loves all the languages is the Zen Master. I am trying to reach there, but not quite there yet. Needless to say, for each of the languages above I know a developer who hates that language and another who loves it.
  • Readers versus Thinkers versus Writers: Developers who have given up having to read so much versus developers who never tried to read so much. I know a developer who likes to read only novels, another who cannot read at all. I know another read-all know-all developer. I know another who doesn't know a lot, but thinks and imagines a lot. I know of very very few developers who can write well.
  • Masters of Time versus Slaves of Time: Developers who come to office and go home on time versus who come quite late (in the afternoon usually) and nobody know when they leave the office. Some developers usually finish on time and others are overly optimistic, always. I belong to the optimistic category and I hate that.
  • On the Web versus In Office Only: Some of the developers like to write on the net, a lot more like to browse a lot and talk with friends on the net. But there are a few who (still) do not read or write much on the net. I know one who never is on any IM. Some of these "In Office Only" are real masters of time and highly productive within their niche. Yes, I know most researchers (but not all) also belong to the 'In Office Only" category. They would rather work on publishing the paper that solves P=NP than having to comment on the kind of researchers they know. 
  • Struggling Developer versus Bring-It-On Developer. The struggling developer is not satisfied with the work he is assigned to do. In most cases, the struggling developer has the nature of not saying "No" to his boss. Often the struggling developer does not even know what he wants. Bring-it-on developer is focused with the result -- he is of the professional kind who can go through all sorts of boring, tedious as well as interesting phases to come out on the top. He does not care what crap he is working on, as long as the goals looks fruitful. 
  • Careless versus Careful. If there is a single virtue of a developer, it is attention to detail. In interviews, I often want to let go the candidates who cannot read the question right. About 90% of the candidates belong to the careless category (likely a reflection on the primitive state of education and in particular the education of software engineering), but that's a topic of another post. 

Thursday, March 18, 2010

The Times they are-a Changing

I do not receive many comments on my blogs. But now-a-days I receive more spam comments on my blog than the non-spam ones. The spam comments are in Mandarin and English. I guess the reason for this language preference of my spammers is my location at Singapore.

It seems the spammers do the hard work of manually verifying the Capcha image served by Blogger or they might have in hand a Capcha-reading software. I believe it is more likely the first one -- someone from Asia or Africa manually doing the spamming. Spamming is probably providing them with more money than they can make via farming or local jobs. At least they are fortunate enough to be able to use the computer.

Sad but true.

I cannot help but worry about this state of affairs where the disparity between haves and have-nots is continually increasing. Every moment. Science makes money and money makes science. This is the modern way that money attracts money and disparity attracts disparity. Money can buy you productivity and cure for your illnesses, and you make money by engineering with the science, or managing the engineers or hedging and arbitrage. You and I have got busier, is it not so?

Some people have the idea that it is sufficient from the ethical point of view to work one's own work completely and will full focus, make your own money and spend it on yourself. There is no "need" of any give-and-take from the society.

The argument of some of these people is simple: not everybody is born equal. Q.E.D. They do not need to proceed to consider the thought any further.

Some people rationalize the above with an argument of the trickle-down effect -- their work and money will eventually (rather soon) reach the have-nots. The scientific innovation reduces prices. They seem to believe that trickle-down effect is a law of nature. The innovation reduces prices only when the innovated product has become a commodity. And this takes time, a lot of time. In case of highly technical products, this commoditization may be impossible due to continued monopoly of one or two companies. Further, while this reduction in prices is necessary, it is not sufficient for catering to the have-nots market. It must be complemented with education, marketing and customization. If there is no explicit provision for that market, nobody sells to that market and nobody from that market can buy. So the trickle-down effect may be true but "eventually" is too late. 

Some people also have a notion that they are "too good", and "the others" would not be "as good as them" even if provided an adequate opportunity. And then they get into the debate of nature-versus-nurture trying to find what is true and what is false.

An alternative way of looking at the truth is to hallucinate with the thought that you are already close to the goal. Even if you've not got there, you're going to be there soon and there is no looking back. There is no giving up with the thought that it is impossible. I understand that entrepreneurs use this hallucination to a great effect in building their companies. The most important part in this is the goal -- for me the goal is the haves of today are befriended with the have-nots [1]. I do not want to put my money on the definition of friendship.

I would be lying if I were to tell you how important this goal is for me. The point I want to make is that I think I have got the alignment right. There is a good reason for every bad thing like spam.

[1] Ideally there would be no have-nots, no pun intended. Probably a better paraphrase is: the have-nots are assimilated into haves. But this assimilation is a quite risky business when it gains force. Forcefulness is not the ideal path to progress.

Friday, March 12, 2010

A Developer's Diary

this is first in a series of developer's diary i will write

Ideally a developer's diary will contain only source code. But in the real world, the source code is written primarily for people and incidentally for the machine. And there is a non-trivial amount of writing in English [1] involved. The main reasons for this English writing are:
  • The code is written in a "computer language" such as C++, which may not be very familiar to the novice developers. 
  • Alas, the machine does not "understand" the code. It is unable to explain the design to the new developers.
  • To be able to design the software before writing the code, it is necessary to disambiguate the involved concepts and communicate with the customers and other stakeholders. Visual languages such as UML help in these tasks.
In the developer's diary, therefore, English too has a place. But without figures and code, it will be a useless diary [2].

[1] English or some other language, but inadequate translation technologies have meant English is the dominant language for computer programming. 
[2] In Alice in Wonderland, Alice wonders "What is the use of a book, without pictures or conversations?". Surely there is much left to learn from the children.

Saturday, January 23, 2010

Stuckness


I do not read much of non-fiction for a few years now. Even then I like to complain that I have found very little writing/teaching on Stuckness -- the kind of thing that happens when you are trying to fix some technical problem with your laptop, or your mobile, or while debugging a very buggy program. Recently a key of mine got stuck in a lock, and no amount of force or coercion will pull the key out. I spent quite a bit of time with it, without any favorable result. This was like a thesis in Stuckness for me.

In my view Stuckness is a major productivity roadblock and therefore a very important discussion. A good stuckness-dealer can solve the thing within a minute, which somebody else would take a day or might fail. Stuckness is often the point where people give up or even cultivate a fear.

Sorry, not read much about this, except in the book "The Zen and the Art of Motorcycle Maintenance". What the Zen Book says about Stuckness is worth quoting (although I believe the whole book is):
With the expansion of the knowledge, I would guess, would come a reevaluation of what the screw really is. If you concentrate on it, think about it, stay stuck on it for a long enough time, I would guess that in time you will come to see that the screw is less and less an object typical of a class and more an object unique in itself. Then with more concentration you will begin to see the screw as not even an object at all but as a collection of functions. Your stuckness is gradually eliminating patterns of traditional reason.

Here the author is talking of stuckness as the perseverance in pursuit of quality. However I want to talk about something else: What do you do when you are stuck? I imagine some people would be better general-stuckness-solvers, who can deal well with many sorts of stuckness situations. What would make such people?

There is always a lack of knowledge involved in such a stuckness, for example in case of trying to repair some fault with the laptop. You can only see the problem from the outside, you do not know the inside. Sometimes, the lack of knowledge is augmented with a lack of understanding. In trying to repair a buggy program with an imperfect class model, it is too difficult to visualize the correct behavior (if there is one).

In a situation of such lack of knowledge, one tends to try one thing after another. For the stuck key, I tried to coerce the key out by several means: I tried to pull in force, push and pull, quite push and pull, push up and then pull, sudden movement upwards to free up the key from the levers, etc, but none of them worked.

During programming, I have the software in my hands, and I don't like to "try out" things without forming a hypothesis and then testing it. I have often observed programmers, particularly the novice, try out the same choice again and again, as if the heavenly stars will align the next time they try to enable a positive solution. This is a wasteful effort.

I try to follow the hypothesis-testing process for any kind of stuckness. It is my (ocassionally verified) conviction that the hypothesis that you consider unlikely is indeed unlikely. So better try to invent the hypothesis that you not yet invented, and upon the invention of this hypothesis you will have a natural feeling that this hypothesis is highly likely. You are a detective, and the case you are solving has is quite simple. Go figure!

Thinking along these terms, Stuckness is no longer a dreaded jail, but a puzzle worth your time, as the experience will arm you to deal with the next same situation. Some domain knowledge always helps.

Disclaimer: My key is still stuck in the lock.

My Other Blogs/Links

I write at the following other blogs (not that you'd care?):



Apart from this, I like to write a lot in my job and projects.

Ideally my writing would be divided among these blogs as listed in the decreasing order of my interest. However that's the ideal situation.

Moreover here is some stuff that I read and liked (on google reader) and more stuff I read and liked (on delicious).

We're living in an information age -- I'd rather like to call it a "thought age" but that would not be quite thoughtful of me. I'd love to hear about the stuff you like; contact me.

Saturday, January 2, 2010

My New Year Resolutions

The new year resolutions need to be in line with the current state of the world -- and the current state is that we are floating in a sea of information and high connectivity. By information, I mean all the best blog posts from the world (or is someone blogging from outer space?) and twitter updates. For most of us, also add the stacks of papers and books. By connectivity, I mean social networks, emails and the other communication media.

At the same time, it does not make sense to try to change the whole world on 1st January. So I have a target of a series of small changes. This is a meta-level list, not going into the boring specifics.

Boosting My(our?) Productivity Through Cooperation: Gone are the days when a linear increase in productivity was good enough. When humans come together, expect the exponential (or the doubly exponential when humans come together and are creative). It is my understanding that the open-source is a case of such tremendous productivity. I hope to work on interesting projects with other people -- each person probably doing the small part he does the best.



Trying to Reduce My Work Hours: At the current state, work is not really work for me -- I like what I do (2 years back I liked 25% of my work, now I like 85% of it). But I would like to guise my work even more into my lifestyle. One example is telecommuting. I would like to be in different geographical locations (such as with my family in India) and be able to work. Although I do not believe in a 4-hour work week (mostly because I tend not to distinguish between work and non-work), calling it that makes it interesting.

Gadgetry: I need to get a cool phone soon, so that I can fulfill my desires for occasional photography (cameraphone), checking twitter, music and personal management (calendar etc).

But most of all, I want to continue with my current projects with constant vigor.

PS: It would be interesting to write a book.

Sunday, December 27, 2009

The No-Why Person

The no-why person take almost everything as they are. This person has never thought of rationalizing his thoughts. For the same reason, this person is always right. This person's every use of "because" ends with "I tell you so".

This person has to be authoritative as otherwise the structure of his dream-castle will crumble by a single why-stone. This person makes for a difficult boss and most likely an easy subordinate. This person has clearly defined rules and is able to save time by not considering the validity of rules at all. This person may become a specialist but this person has never changed anything much.

But when the world changes, it never fails to surprise and disgust this person. This person is ever opposed to changes, as a change is too difficult to question (much more than a simple why).

The no-why person has forgotten the no-why person's childhood or is ashamed of it.

The no-why person is the opposite of Socrates. The no-why person is a coward or a liar or a hallucinator or a busy person.