I came across this piece by Joel, where he says ”It’s harder to read code than to write it”.
PERFECT. Atleast my programming experience matches with what he says. On the other hand, I do not interpret it as ’so just stop reading code and do something else’. If you have to do real programming, you have to spend time ’understanding’ already written code.
Now, the deeper reasons for why it could be hard to read code could be:
Here I have found my detective utilities (here , here) very handy. It eliminates the futility of reading code as it helps me ’understand’ code relevant to the feature I am working upon as it provides:
With the information provided by detective, I can explain the code in business terms to someone else while pointing to function names. Thats it. I have learnt the lesson the hard way.
So if Joel says ”Its harder to read code than to write it.”, we now have a corallary:
”Never read code without contextual information.”
I have 3 Seagate GoFlex drives as described below.
My Macbook Pro has one Firwire 800 port, one Firewire 400 port, 2 USB 2.0 ports. But as you can see above, the Seagate portable 1 TB drive comes with a USB 3.0 interface. I can as well connect it to a USB 2.0 port but that would be a sheer waste. Further despite all permutations and combinations, I can at the most end up with only one free USB 2.0 port. But I also have an express card slot and I can easily add two USB 3.0 ports using an express card such as this one by Sonnet. Finally I decided to go with the following configuration.
I ordered the Sonnet express card through SYW and when it arrived I installed the driver as per the instructions, restarted my Mac, connected the two USB 3.0 drives, but the drives were not recognized. The LEDs on the two drives were blinking. A bit of investigation showed me that the express card would need an external power supply if the power drawn by the USB device(s) is more than what the card can provide. This was also verifed when I looked at the key features on the overview page of the Sonnet Express card.
I then connected an external +5V 3.5mm power supply and bingo the drives were up and running. So if you have such an express card and have connected devices that do not seem to work, check out the power requirements. With this setup not only do I get higher speeds for my external drives, but I also have freed up 2 USB 2.0 ports on the laptop. Very useful.
I have discovered that I used to over estimate the value that books bring to the table, whenever I have tried to learn a new skill or a new tool.
I think that could be beacause in reality I would learn something new to not just learn it, but to apply it somewhere. Such (valid) applications of any skill or tool are potentially infinite. As no book can cover all potential applications or usage of a skill or a tool, I would come unstuck when applying the knowledge gained. With experience, I have now changed my method of using books.
The first part I use a book for is to gain a conceptual understanding of the skill or the tool and for such an understanding, I have found it is unnecessary to deep dive  into the book working my way systematically through it. 
The second and most important part is I then choose to work upon an application of the skill or tool I have selected to learn, while using a book as one of the tools in the process. By doing that I am more focused on producing things which is what matters finally as opposed to the false expectations and satisfaction gained by working through a book.
I now treat a book as an aid, a tool, a mentor, a navigator that I refer to when I am stuck instead of the earlier feeling of being stuck despite having worked through a book.
The only care I have to take in this process is to pick a good useful application to work upon, which is possible if I am willing to think through it enough and then there is this.
The other minor advantage I have gained by following this process is that I do not suffer from the pressure of having to complete a book cover to cover. In fact, I now do not even have to care if I will ever complete the book, as long as it provides me value as a tool.
To cite just one example, recently I wanted to learn about algorithms and data structures. So instead of working my way through books; I picked up this book, and understood the concepts. Just the first 2 chapters sufficed. Next I chose to actually find applications where algorithms are important part of the solution. I chose to work on those applications, while using the books as a tool. Not only did this process work, but it also taught me how to actually use algorithms in the real world instead of working on some descoped abstract problems in a textbook.
Overall, I have repeated this process more than once and I have found it to be more productive in learning a skill or a tool than just working through a book. And I plan to stick to it as of now.
 A purely systemtatic theoretical perusal could be useful, but I fail to realize what is the point of theory if it does not lead to something useful? May be I am missing something here!
 Anyways, just reading through books is useless.
For the images on this website that appear within a post, I wanted to ensure that the image fits within the post’s container div otherwise it looks kind of ugly. I tried the following CSS rule but it did not work for Firefox. (I do not even test on IE!)
Now even if this worked for all images, however I have varied image sources where I do not have a direct control over the image type and image size, the two variables that I want to control. I prefer that images be of PNG format with the width scaled to 500 px. That would work best for my website layout. However it is cumbersome and boring to convert each image by opening it in some image processing software like ColorSync or Preview, changing its type and scaling it to the desired dimensions.
For such tasks, automator comes to the rescue. It will be great if I have two options in the context menu that allow me to:
Creating an automator service
Please watch my screencast below to understand how to use Automator to create a service.
To summarize, open Automator, choose ’Change type of Picture’ action in the Library, add it to the Service while allowing a copy of the image to be created and choosing some destination folder. You can now see the context menu option 'Scale for my website'. Similary you can create an automator service to scale your image while choosing the action ’Scale Images’ from the Library.
This was neatly done with Automator and it appears to be a very useful utility.
However the Automator app does not provide any mechanism to delete a service. In order to delete a service, just navigate to Library/Services in your home folder. Now just select the service that you do not want and Trash it.
I am a programmer by profession. For around a year now, I have had the privilege of working from home. Yes, its a privilege, which I think you can avail of only when you have built a niche programming skill set.
I have worked long enough in a cubicle to be able to compare working from home to that in a cubicle. Before I actually worked as I do now if you had asked me, I would have easily mentioned the following advantages of working from home.
I had not done anything special before embarking upon working from home and it suddenly dawned upon me that I was completely shielded from unnecessary distractions of a cubicled workplace. If you have worked in a cubicle, I need not cite examples of such distractions; but for the sake of some enthusiastic programmer out there; I will cite a few. Uncalled for meetings, false alarm driven panic and inconsequential interventions which is labeled as ’behavior of a team man’, supplementary work such as ’trainings [both conducting and attending], the stupid HR parties, the list is endless :-).
While working from home, I observed and noted carefully that all my communications were centered only around my work and responsibilities. All other distractions just faded into thin air. And I realized that I was actually not working from home, but working in solitude. Solitude enables productivity, uncluttered thinking and the result is intrinsic joy.
So what are you waiting for? Go find your solitude for work.
’One works without thinking how to work.’ - Jasper Johns
Being a software programmer, most of my work is centered around implementing ideas. The other day, I realized about my work pattern that I am not really productive if I work for more than 4 to 6 hours each day. Why? I figured that whenever I work for 4 to 6 hours of a total of 8-9 hours, I spend the rest of my time reviewing my work. These reviews have always been very useful to guide me become better at my craft.
For example, I recently identified a very important area of improvement in the context of my work, which led to the tracer utility.
What I have also observed is that if I do not restrict myself to such time limits, I am productive only in a spike but the consistency is absent. My brain (whatever I have of it) just stops working and I am transformed into a dumb robot. And thus the realization of my consistent productivity number of 4 to 6 hours per day.
What is the gist of all this for me? I think it is the essence of thoughtful balanced work. If most of my work is based around implementing ideas, and if thoughts produce ideas, but if I am not thinking, then it is bound to be thoughtless work! Anyway, what is the point of doing thoughtless work?
Recently I upgraded my Macbook pro with the following:
The following could be the usual suspects I thought, one of the upgrades and the fact that for my work, I would be running a host of softwares preciesly the reason for which I had increased RAM in the first place.
After some, what else, googling, I figured that many people had experienced heating problems after upgrading to snow leopard. Come to think of it, Snow Leopard should have made the laptop a lot cooler or probably the Snow Leopard could not acclimitize to the new environment!
The Chill Pill Solution
If you are suffering from the same problem, the following steps could as well help you. They did help me.
sudo rm -r /Library/StartupItems/FanControlDaemon
Now even with all the softwares such as Virtual Box, 2+ heavy Java processes, Flash Builder; I have the operating tempearature around 65. With normal web browsing usage, the temperatures touch around 50. The problem per se is not the operating temperature, but if your laptop runs at high temperature constantly and finally crashes, which did happen to me more than once, that forced me to find a fix.
Finally, take Activity Montior’s help to keep a tab on CPU usage.
Yesterday, it was Gandhi Jayanti.
Today, a day later, I had cleaned my iSkins and placed them for drying on a newspaper. Here is the visual.
Well, what’s so special about it? It seemed to me as if Gandhi is saying ”Despite all the technical advancements, retain your simplicity.”
Please refer to the word rectangle problem on this page
This is similar to a board game like Queens and Kinghts or Sudoku. Let us then define the rules of the board game called ’word rectangle’. They can be stated as:
The better way to think of this problem is that while typically board games give you the size of the board, here we are supposed to find the size of the board. As such our search tree should contain the following:
Please refer to the Tour the T problem on this page.
This is an instance of the Traveling Salesman Problem. We can model the entire subway as a weighted graph G=(V,E) where V is a station and E is an edge that connects two stations and w is the weight of the edge that represents the travel time between the two stations.
I am a polyglot software engineer specializing in shipping iOS and 3d scientific visualization applications.