Stop using captchas that can be broken with two lines of code

The de-facto bot prevention technique sprawls everywhere on the web but I am surprised how people overestimate the difficulty of breaking a captcha. Here are some of them which I encountered.

image image image

It won’t take rocket science to convert them to text. In fact, the only two free tools needed for this purpose are: tesseract and Imagemagick

convert captcha.jpg -threshold 5% a.jpg

Adjust the threshold value to get a binary image with no noise.

tesseract -l eng a.jpg text

This will create a “text.txt” file with the captcha text in it. 

I ran a test on effectiveness of these commands and the success rate was nearly 9 / 10, clearly implying how weak or better say, made-from-scratch captcha implementations are as good as having none at all. 


Making earphone presses useful with PyAudio and VLC HTTP API

Note: I am not an audio expert or even close to one. This post may pose amateur attempts to do something very trivial. Link to the Github repository.

Ever had one of those moments, when you are super excited to accomplish a challenge, having put something useful on the table, only to realize it is not even close to the greatness you imagined; to be bitter, futile? This weekend I build something to detect earphone button presses and control VLC media player with it but it was not so useful afterall.

Earphone Presses


(Link to original image)

I own a pair of Samsung earphones and was intrigued how the buttons used to switch / pause tracks in smartphones work. I plugged in the pieces in my combo jack, used audacity, pressed a button and the result was:


Read More


"Yes, we have a dull life and we don’t care"

This post talks about obsessive creatures and their habits about what they like. I am using a pseudonym, Mr. S to describe a real movie fanatic I met online.

I met Mr. S  through a social network. Mr. S is nothing in his life except being a movie freak. His movie career began as a student and it has been an on-going seven years long spree since then. In this, Mr. S has downloaded over 5TB of movies, still preserved in his 3 external hard disks. From Russian, Spanish, French, Silent, Finnish, he has seen it all. After watching about 5000+ movies, Mr. S is so well versed that it is impossible to name any director or actor or movie whose name he hasn’t heard.

Read More


Reading MP3 ID3 tags in native PHP

This week, I went crazy about file formats, I tried to understand specifications of many popular formats like MP3, FLV, PDF. Its amazing to see that no matter how complex these technologies are or which complex algorithm they use to store media efficiently, at the lower level it is just a clever arrangement of bits that makes sense and with a bit of experimentation and hacking around MP3 format (a Hex Editor is a invaluable tool  in this), I was able to read them in PHP without using any extension. The source has been GitHubbed here

Binary File Reader

The native method for reading a binary file  is unpack(). The problem with it was that it can’t handle variable length chunks, and I found it tough to understand the format of packing codes. Unluckily, I realized it quite late (damn!), that I can create the reader more efficiently by using unpack() function in the reader (ah maybe later). The gist can be found here.

Read More


Why you should absolutely never freelance on freelancing sites

Back in the days, I used to be the crazy money minded programmer writing kLOCs of crap with no code quality concern, for the projects I often found on freelancing sites. Recently, there has been a lot of fuss on Freelancer.com, oDesk and likes which seem to be quite popular among employers looking for cheap third world country coders to get their whatever project done but honestly, if you think about programming as a craft, never log in to them. Why?

Cheap employer thinking: such people have pretty bad idea about what programming is. They want to get best work done and pay like pennies and the sad part is people are always ready to have the lowest bid on it, albeit, it is funny sometimes. I remember a web scraping project I had in which the employer was constantly pestering to add more and more features which was annoying to do at the price I was paid.

Read More



Would you agree with this observation by Marrisa Mayer?

Find more insightful quotes like these on our Pinterest Page


Nicely put, its fun digging through all layers of abstraction to understand how it works.

Reblogged from

If we are having a browser war, Firefox will certainly lose it.

I have been a Firefox fan boy right from the beginning. Being an early adopter since its first version, I have avoided even to seriously try out any other browser like an ideal blind fan boy but today, I made a permanent switch to chrome after, like, 5 years. 

Another Browser war?

Through I hadn’t seen the first but this Chrome vs Firefox seems certainly to be one.

Mozilla Shooting for Download World Record With Firefox 3

Read More


Sublime Text’s Multiple Selection: the ultimate time saver!

Weeks after dumping an excellent IDE and choosing Sublime Text as my choice for programming, I was delighted, how time saving it can be in case of very monotonous editing. Keeping aside all great plug-ins which make it highly extensible and awesome for everything, the default features aren’t less exciting as well.

The one feature that makes me go “Wow!” is its multiple selection which saves me the time of getting a RegEx right.

Let me guide you through an example. I had something like this,


Read More


Overclocking may freeze your phone

Well, it had been months after I had rooted my android (HTC Desire HD) that a peculiar problem arose- freezing. Freezing made everything unusable including power button and the only way to recover was to remove the battery.

Initially the freezing was rare and I ignored it but quite lately the problem became a real pain in the a**. You can imagine the frustration with phone freezing a dozen times in a day and occurring every time you browse, play a game or read a message or in short, randomly.

I read about how some apps may be the reason of this and removed all my recent apps but that proved to be in vain. Though I hate to go through cumbersome tasks such as factory reset, I did it anyway and the problem disappeared. Looping this cycle four time, I gave up and was ready to throw my phone away because no solution on any forum made sense.

Lately, when I was playing with CPU frequencies, it froze my phone and bingo! I realized the problem. Basically, I had been a over-clocker from start but lately, had switched to “performance” governor and pushed it to 1.8Ghz which increased my freezing frequency.

So guys, if you are overclockers, please make sure to know your phone’s limits before pushing them to insane frequencies.