Online ads and memory leaks

repair-water-leaks1For some reason that still eludes me, after all these years, browsers, no matter which, suffer from terrible memory leaks. I have a feeling that it has to do with plug-in’s in general and Adobe’s Flash in particular. Just open a browser, any browser, load your favorite web site and go eat lunch.

When you return, start your favorite task manager and take a close look at memory usage.

Those very creative, animated, and incredibly-annoying ads with telepathic powers that know not just what web sites you visited last night but what products you looked at as you were johnesing for material gratification, will eat your computer alive, for lack of better terms, and today, fed-up with this crap, I decided to take matters into my own hands – and it was gratifying to see all those pesky ads disappear as if by magic on every page as I reloaded it. But the most amazing thing was to watch the graph for cpu-usage go quiet and the one for memory consumption go down to acceptable levels. So much, that I wondered why the hell I didn’t do this before. Maybe I do like ads, after all, but don’t take me wrong, I don’t mind one bit living an online life that’s uninterrupted by commercials.

The best part is that reaching this non-consumerist nirvana required absolutely no new software or plug-in’s. All it took was a file. A simple text file: hosts.txt (or plain “hosts” if you use a Mac or any of a gazillion Linux incarnations).

The hosts file is like a little black book of addresses. Whenever you enter a url in a browser (i.e., your computer looks at the hosts file to see if the IP address corresponding to that URL is there. If it is, your browser starts communicating with the web server at that IP address. If it isn’t, it asks your router or your Internet Service Provider’s DNS server for it. Do you see where I’m heading with this?

Wouldn’t it be great if your host contained entries for all the servers that push those ads on you, but instead of having them point at their correct IP addresses have them point at dead-ends?

Dream no more. There is a hosts file out there that does exactly this. You can download it from This hosts file contains entries for over 10,000 servers.

I won’t go into the details on how to do it, but all you need to do is download the above file and append its contents to your system’s current hosts file (in Mac and Linux, the file’s in the /etc directory and in Windows, it’s kept in the c:\windows\system32\drivers\etc folder).

If you want to see the magic as it happens, open a few browser windows and have them point to web sites that you know to display ads, then modify your hosts files as explained above, and now go back to your browser windows, hit the refresh button, and weep.

The following links describe ways in which your hosts file can be updated automagically, if you don’t feel like doing it by hand:
– For Windows:
– For Mac/Linux:

Happy blocking!!!!!!


[edit]: It’s been two hours since the change and after purposely-crashing chrome, so it would reload all the pages I had open (about 40 tabs altogether) EVERYTHING is running much more smoothly than before.


Gartner just killed Blackberry


I have a bone to pick with Gartner. I’ve had it since the year 2000, when they predicted, like they’re doing now, that a product I used was dead.

You see, I don’t know much about this company except that CEOs pay attention when Gartner speaks, and with that, predictions very easily become self-fulfilling prophecies.

In 1996, just like they’re doing now, Gartner predicted the death of Microsoft’s Visual Foxpro and since then until Redmond finally put it out of its misery, it was, for a lack of a better word, a miserable time for those of us who had the fortune of working with it. A fortune, because it was a very mature product; it was a reliable (something I’d be hard-pressed to say about most Microsoft products) and, most-importantly, lightning-fast database management system. It was a self-contained development environment, much like visual studio, but if a client needed a program that required a database back-end, you didn’t have to look elsewhere (i.e. SQL Server) and, in addition to being able to use its own database engine, it could connect to anything client-server out there. In addition, it was object-oriented and it really honored the term (coined back then) “Rapid Application Development.”

But Gartner said it was dead, and from that point on, clients started shunning anything Visual FoxPro, even though its abilities were proven well beyond any reasonable doubt (the logistics of transporting troops and equipment back and forth to Iraq during Desert Storm was handled by a system developed in Foxpro for the most part). Business owners were afraid they’d look bad when they told their friends that their companies use tools developed with VFP, and CEOs, of course, didn’t want to be the laughing stock of other CEOs.

But this blog entry is not about VFP (as much as I like it and still use it when I need to extract data from large databases QUICKLY or for writing rogue apps here and there, also quickly) as much as it is about the Gartner Group. By predicting an event and being as credible as they somehow managed to become, it’s impossible to really separate the prediction from the event. It’s probably a social example of the Observer Effect, in which observing a phenomenon has the effect of changing the phenomenon itself.

Now that it’s out in the open, I won’t even bother saying that Blackberry’s not dead. R.I.M. might as well change its name to R.I.P., for all it matters. As I write this, CIOs and Office Managers around the country are scrambling to replace all their blackberrys with other phones because Gartner said that the Blackberry is dead and their bosses and CEOs heed Gartner’s advice.

It would’ve been nicer if the folk at Gartner kept their predictions to themselves, but it’s impossible to ask for discretion from someone that’s in the “predictions business.” Now, if someone could just predict Gartner’s death…

%d bloggers like this: