Limiting your CPU and Memory Usage

Yesterday I wrote about how to use a very simple timing context manager to measure how much time your python code/functions take. There might be times when you want to restrict how long your code executes. Python’s resource module in the standard library gives you an easy way to do that and more.

Here is a simple program which shows you how it is done:

Continue Reading »

Timing your Python Code

There are many times when you would want to see how much time your program takes to execute. The easiest way to do it on a unix system is to use the time command before running the program.

Continue Reading »

Facebook Privacy Permissions Hoax

If you had a facebook account, you would have seen at least 1 friend who had posted something like this sometime in the past 2 days.

Continue Reading »

Tracking your Productivity

Some smart guy once said “What isn’t measured doesn’t get improved.” As I grow older, I seem to understand this a lot. If you want to fix a piece of code which is slow as hell, first start with measuring how slow it is really running. It is easy to hypothesize that it is slow because it is written in an interpretted language or it leaks memory and the garbage collector doesn’t work properly or various other reasons.

Continue Reading »

Social Media Marketing for Physical Products

Today I was in the mood for some ice cream and got a stick of one popular/expensive brand. After I finished it I found this on the stick.

Continue Reading »

d command in oh my zsh

I use zsh as my primary shell and have Oh My Zsh which has lot of helpful plugins, themes and functions which make using the terminal easy. One neat command/alias I found out was when I typed d by mistake.

Continue Reading »

Average

I started blogging back in 2004 on LiveJournal (it was Medium of those days, if you kids don’t know). I didn’t have any audience in mind when I wrote on my personal blog – it was literally a log of my personal thoughts. It allowed me to write about anything. An year later I started writing about free and open source software and that was when I was writing for an audience.

Continue Reading »

How NOT to send a bank account statement to the customer

I have a few bank accounts and there is this particular local bank called City Union Bank, that is more than hundred years old. I received an email from that bank which has a list of different new features that they have added for the benefit of the customers, using latest technology that they could get their hands on – like self service branches, mobile banking using android apps, missed call balance enquiry, and many more.

Continue Reading »

Tackle Technical Debt with Time Bombs

Technical Debt is a term that most developers have heard of. Even if you haven’t heard of the term, I am pretty sure you would have done something in your programming career that is a technical debt. Technical Debt is a metaphor referring to the eventual consequences of poor system design, software architecture or software development within a codebase. In most cases, it is that quick and dirty hack your manager asked to put in just so that he could deliver it to the client.

Continue Reading »

Programmer productivity vs Salary

Disclaimer: Persons/organisations mentioned in this story are based on real-life. Any resemblance to persons/organizations living/dead is intentional. Imagine you run a startup called _Super Duper Software Inc_ and you have a decent dev team. You now need to hire programmers and you see two fresh off the college programmers applying. First programmer (fake named Aarthi) who knows nothing more than a “hello world” program that she wrote in C in the second year of her college.

Continue Reading »