Favorite Blogs

Like I promised, I’m finally sitting down to write a new post! This one surprisingly enough is about some of the blogs that I frequent almost daily, and some that I check almost every hour or two (cause really, where would the writers be if I didn’t read their blogs right?). Most of these are technology related since I have no other real interests to speak of (sad, I know…). Well, below is the list of some of my favorite blogs along with a brief description of each.

Coding Horror:

One of my favorite blogs. Written by Jeff Atwood, one of the guy behind the amazing Stack Overflow Q&A site and all the other Stack Exchange group of sites. His blog isn’t focused on anything in specific, just his own personal views. I have read blog posts on topics from Sound Cards to how YouTube is fighting piracy.

All of his posts are extremely well written, and always in a simple enough language that people like me (read dumb!) can understand. His writings are always a pleasure to read, a great way to pass time, and all the while you get to learn a lot of new things that you otherwise wouldn’t have even heard about (I mean, the guy wrote a post about keyboards!. I normally don’t go near such posts even with a 10 foot spear, but somehow, I liked this one. Crazy huh!).

All in all, this is one blog I definitely recommend reading when you have some free time on your hands. Read the rest of this entry »

I’m Back (Again)

I’m starting to remind my self of the boy who cried Wolf! I’ve already posted in December that I was back and would start blogging again about all the work I’d done in 2010, but as I’ve realized time and time again, I’m not good with commitments. (Incidentally, my ranking on oDesk also shows that, almost everyone I’ve worked with has given me a 4/3 star rating in the deadline category. Every other category is almost always 4-5, usually 5). So, this time around, I’m not going to give you any definite timeline about when I’m going to be writing my next post. However, I’d like to say one thing to all the poor readers of this blog:

SORRY!

When I started writing this post, I had no idea what it was going to be about, I just wanted to post something. I can’t actually do a detailed post on anything, since I’m sitting at the office and don’t have access to my laptop, which contains all of my data. However, what I do have is a list of topics that I’d like to write about, whenever I get the time. That is what I’ll be presenting in this post.

Most of the articles will be programming related, though some might be otherwise, and most will be related in someway to the projects that I’ve done over the last year while freelancing on oDesk. Given below is the list of articles that I’d like to do about my programming projects:

  • Using Perl to parse data from websites that require Cookie based login
  • Implementing a custom Google Map to include maps from USGS (United States Geological Survey) and Open Cycle Maps
  • Implementing a side bar that stays in view as the user scrolls the page (using jQuery)
  • Writing a jQuery plugin to implement Live Search (similar to Google Instant)
  • Positioning divs near markers in Google Maps to show info on the place (sort of like Yelp search results)
  • Importing Blog Posts from both WordPress and Blogger blogs using Perl
  • Using Perl with ImageMagick to label images on the fly

And here is a list of articles not completely related to programming:

  • Some blogs that I frequently read
  • How I started freelancing (and why I’m not great at it!)
  • Manipulating PDF files using pdftk

Hopefully, I’ll be able to get to these soon.

And now, a bit about what I’ve been doing since the last post. I’ve finally gotten a job! I’m currently working as a Network Support Engineer in Nayatel/Micronet in Islamabad, which is an Internet Service Provider. When applying for the job, I had images of working with routers, troubleshooting complex routing problems, etc… Alas, reality is a bitch. It turns out I’m a glorified Call Center Agent. My job is to help customers get connected to the internet. Still, there are some upsides to the job. It’s a strict 8 hour shift, so I don’t have to worry about going home late, etc… Also, it turns out my networking knowledge wasn’t as great as I thought, so this is a great place to learn about the basics. In the 3 months that I’ve worked here, I’ve cleared up more concepts about basic networking that I had in the 21 years before. Which is great, because networking is hard, and going further requires a solid foundation.

I also plan to attain CCNA and CCNP certifications by the end of this year, which hopefully will allow me to get a better job. And, I’m also working on two freelancing projects, which is about all I have time for between my job and my procrastination!

Hopefully, I’ll be able to write something worthwhile soon. Wish me luck!

btw: If there is any topic from amongst this list that you’d like me to write first, do let me know via comments.

I’m Back!

I realize that it’s been a long time since I posted any thing here, and I’m sorry to my HUGE list of readers (I’m guessing I’m the only one right now, but perception is everything! :P ). It’s been a hectic year! Now that’s a phase not often heard on blogs. Usually, it’s either been a hectic day or a week in some cases, but hey! Be Different!!!

I have been visiting the blog often since my last post (May if I’m not wrong) with the intention of positing something, but I’m always either too tired or too busy. A lot has happened these last few months. I completed my Electrical Engineering degree and am now a certified, educated, unemployed electrical engineer! The unemployed part came as quite a shock, considering I was under the impression that multinational firms would be fighting over me the moment I got out!!! :P I graduated just a month ago on 12th November, 2010. YAY!!!

Another thing that’s worth mentioning is that I’ve finally started freelancing for real. No more doing it as just a hobby in my free time. Since the time I got free of my education, I’ve been working a couple of hours almost every day, and let me tell you, it’s not the piece of cake I had in mind. It takes a hell of a lot of commitment and hard work to get ahead in this field. I’ve worked on some really interesting projects, ranging from Perl CGI scripts utilizing ImageMagick to Google Maps Integration with Search Results.

As you can probably see, it’s been a busy year, and I’ve got a LONG list of posts that I’ve got planned for you. So just wait a bit longer while I get my thoughts in order. I’m hoping to write atleast one post per week, but considering how good I am at keeping deadlines, the average might be around one post per 2 weeks or so. Anyways, this was just to make sure the world new that I wasn’t dead yet, and see you soon!

PTA: The Pigeon Theory

cat-ready-for-surprise-attack

I guess many of you have heard about the recent controversy surrounding the ‘Draw Muhammad (P.B.U.H) Day’. Talk about holocaust and the whole world weeps. Insult our Beloved Prophet (P.B.U.H) and the world says ‘Free Speech’.

But that’s not why I’m writing this. My post is purely about the technical aspects. Apparently, PTA has blocked both Facebook and the many sites that promote this despicable event. And apparently for some reason, the powers that be also thought it necessary to block the Wikipedia entry for ‘Holocaust’.

Many of us in Pakistan have heard the story of a group of pigeons being attacked by a cat. The pigeons close their eyes thinking that if they don’t see the cat, the cat doesn’t see them either. The moral of the story is probably that ignoring problems doesn’t make them go away. But some people have apparently taken the story quite literally. I mean, blocking access to the sites from Pakistan isn’t going to make it go away, nor is it going to hurt Facebook that much either. All it will do is to weaken the credibility of Pakistan even more as a state run by fanatics (and quite the tech savvy stupid fanatics at that). The site is still online, I know because I used a proxy to access it. The Holocaust page is still there, I know because I just visited it using Googles cache.

All in all, the situation reminded me of the Cat & Pigeon story quite literally. Some guys from Pakistan have taken the initiative to take the site down using a Distributed Denial of Service attack by asking people to continuously ping the offending sites. For the interested, their site is located at: http://lemonbits.net/. They even made a small Windows Batch program that people can download that will relentlessly ping the offending sites, and at first I think it worked. But the PTA block effectively put a stop to that. All it does now is to flood the PTA monitoring server with requests for the page, and the PTA server has to handle all the millions of requests that generate from Pakistan for the sites in question.

In the end, all I’d like to say is that this definitely isn’t the way to handle such situations. We have tried this in the past many times, and almost never achieved anything (although we were able to take down Orkut once if I remember correctly, but even that was an unintentional by product of our block caused by DNS). In my opinion, the best way to handle this situation is by making an official complaint on the behalf of Pakistan. We are an important country, after all, we fight for the Americans against Taliban. We have a lot of leverage, we just don’t use it because that would mean that our politicians would have to get off their asses and move around.

And if that doesn’t work, LET LOOSE SOME HACKING. We’re pretty good at that, after all, according to recorded computer history, it was a Pakistani who created the first computer virus!!!

 

NEW INFO: This has gone too far. Now PTA has blocked YouTube :( . I wonder what’s next, GOOGLE????

Tags: , , ,

YouTube Downloader: The Demise

Finally, I’ve found a better alternative. Although still available at the time that I wrote my own version of the YouTube Downloader, I recently tried using it and found that YouTube had made some changes in the way YouTube videos are served from their servers. That practically made my own downloader pretty much useless, so I went in search for an alternative. And I found youtube-dl, a Python program that can be used to download videos off YouTube via the command line. Exactly what I wanted when I created my own YouTube downloader, except that youtube-dl is WAY better. I mean, the list of features is pretty darn impressive:

  • Automatic detection of playlists via the URL you give it. Download of complete playlist
  • Templates for easy naming of each downloaded file. For instance, you could name each downloaded file according to the title of the video
  • Export of the links of the videos instead of downloading
  • Built-in intelligent downloader with interrupted download resuming capability

So, I have finally given up on my own project and shifted to using youtube-dl. If you wish to download it, get it from:

http://bitbucket.org/rg3/youtube-dl/src/tip/youtube-dl

Instructions for using it can be found on the youtube-dl wiki. All in all, it’s a VERY impressive piece of work and I suggest you use it for all your YouTube video downloading needs.

Tags: , , , ,

7 Years with Open Source Software: Part 1

Ubuntu 10.04 came out about a week ago, and it got me thinking about my personal journey with Open Source software. So I decided to write about how I got into open source, how I watched it grow, and how I use it now, with a list of some of my favorite open source software. I also include some of my wishes for open source software, and some of the problems I have encountered with it.

Please note, I started this article with fair warning that this is going to be purely about MY experiences with open source. I know that many of the problems I point out wouldn’t have been encountered by most of you, and many of my assumptions will be false, and I may make wrong conclusions. Many of the shortcomings of open source I talk about here may just be due to my own stupidity, so please, before you tell me to RTFM (read the freaking manual) or start yelling at me about how everything I have written is crap, please remember, I’m just writing about my OWN experiences. Yours may be different.

If you like this article, please do comment. Also be sure to point out if you find any mistakes, I’m the first one to admit I’m not perfect.

gnome1  

gnome3

Gnome 1 (1999) Gnome 3 (To be released September 2010)
I’m amazed when I see how far Open Source Software has come.

The Start:

Well, I don’t remember exactly, but I was introduced to Open Source software around 2003. It wasn’t so much as an introduction to open source than a review of Linux that got me interested. That year, one of the issues of the monthly I.T. magazine Spider did a small piece on Linux, how it was better than Windows due to it’s extreme customizability and security. At that time, I was nearing completion of my O’ Levels and had just completed my course project for the Computer Sciences course. During the 5 months that I took developing it (another story worth repeating some other time), I had to reinstall Windows (I think XP was the prevalent version at that time) at least 4 times, partly because of virus infections (I didn’t have the sense to use anti-virus back then, as I had a rather old Pentium 3 and anti-virus made it crawl to a halt) and partly due to Windows becoming too sluggish to use due to the plethora of software I usually installed after every reinstall. I guess we all know the result of mixing Windows with real world computing:

So there I was, having just read about the stability of Linux. Add to that the fond memories I had of reinstalling Windows over and over again, I was practically jumping with the excitement on having found an alternative.

Read the rest of this entry »

Tags: , , , , , , , ,

rename: Linux Batch Renaming Utility

Imagine this scenario: You just got back from a picnic, and you have hundreds of photos of the trip in your digital camera. You want to copy those photos to you Pictures folder, but now you run into a small inconvenience. All the photos from you camera are name something like Image_0001.jpg, Image_0002.jpg and so on for all of the hundreds of beautiful moments that you captured, and that ticks you. You want to name you photos according to the occasion, say something like Picnic_2010_Img_01.jpg, and you don’t want to go through the unimaginable pain of having to rename all those photos by hand. So, what do you do?

To give you a head start, here’s what you would write on the console to rename those files:

rename -v 's/^Image_(\d*)\.jpg$/Picnic_2010_Img_$1.jpg/' *.jpg

As you read along this tutorial, I will explain each part of this command, so that by the end of it, you will be able to modify it for your own needs.

Meet rename, a small Perl script/program available with most Linux Distros (including Debian, Ubuntu and Fedora). This small program can help a lot when you want to batch rename files. You might already have used similar programs in Windows or even Linux, and most of those programs would have had user interfaces with pretty pictures and buttons for you to click and all. They may even have wizards to help you specify exactly which files you wish to rename, but if you’re anything like me, you’d rather use something that gives you full control over how your files get renamed without going through the hassle of setting loads of options before you can start, and you’d want to do that quickly. That is how I came across rename, and ever since I learned about it, I’ve been using it for batch renaming, ditching all those other high end graphical programs, simply because rename is a LOT faster to use in most situations.

First, a warning for the weak hearted. If doing things by typing away at the console isn’t your thing, I suggest you stop reading, because rename is a console utility. It doesn’t have any graphical interface, nor any wizards to help you along the way. It simply does what you tell it to. That of course means that you have to spend some time learning it before actually use it. But, believe me, any time spent learning about the incredible power of rename is time well spent, and in the long run, you end up saving loads of time simply by skipping all the unnecessary configuration that you have to go through when using other batch renaming programs.

Now, rename is simply a Perl script, and like most Perl programs that do text processing tasks (which renaming is, since you’re just replacing some text which happens to be the name of a file), rename uses Perl regular expressions (regex) to do it’s magic. According to the man entry for rename:

“rename” renames the filenames supplied according to the rule specified as the first argument. The perlexpr argument is a Perl expression which is expected to modify the $_ string in Perl for at least some of the filenames specified.

What this says is that you give rename a list of files and a rule (written using Perl regex) to apply to the names of those files. rename applies the rule to each of the file name, and if the rule ends up changing the name, rename simply renames (no pun intended) the file. That may sound complicated, but trust me, once you know the basics, it becomes really simple.

Read the rest of this entry »

Tags: , , , ,

Wateen Auto Login (the death)

Apparently, most of the traffic on my blog comes from people searching for a Wateen auto login program, which is kind of sad in some ways as I actually wanted this to be a blog about my programming activities.

But anyways, I just have to tell all of you that I have left Wateen for PTCL EVO for quite some time now, and I am not going to maintain my Auto Login program (not that it was in any way maintained before :P ). However, for those of you poor souls that are still stuck with Wateen, I’m going to suggest an alternative for the Auto Login program.

  1. Leave Wateen!!! Seriously, all I got were headaches from their service. No connection for hours, and when it did connect, I got speeds of around 10KB/s…. Yeah, that right, TEN KILOBYTES PER SECOND!!!! EVO actually rocks a lot more, and without me having to call the helpline every other day.
  2. If you’re still here, you apparently haven’t left Wateen yet, and still need an auto connector. Before I created my own, I did search around a bit for something that I could use. I only created my own because my needs were very specific (to automatically start/stop my bit torrent downloads according to the status of my Wateen connection and that too on my laptop only). I have come across an application that would be perfect for most people out there:

Wateen WiMax Keep Alive

Its built in Java, and so should run on almost any Operating System (Windows XP/Vista/7, Ubuntu, MacOS). Also, the interface is quite simple to use, so it should fulfill the need of most people needing an auto connector. To use it, simply download the zip file (if you’re lazy, a direct link to the zip is here), unzip it in a empty folder, and just run “Wateen WiMax.jar”. Once the application window is shown, go to File->Preferences and fill in your username and password details. Then click the OK button and you’re all set to go. As long as the program is running, you Wateen connection will connect automatically every time it gets disconnected. And if you set the program to start automatically, it will also connect your connection when the computer starts up.

Hopefully, this will be useful to someone out there.

Long Time, No See!!!

I admit, it’s been a REALLY long time since I last made a post about anything. And boy do I have a lot to discuss. The most important thing I guess would be that I finally got my own domain name AND hosting!!!! YAY for me… :P

It really pays off to have your own hosting and domain. The domain part is good cause I can now get my site listed on google according to my own preferences (by using the googles webmaster tools), have better visitor records (using google analytics), and just have a lot more fun than I could with a free domain. The hosting part is the best, I can use custom themes with wordpress (something that I really wanted at www.wordpress.com), install my own plugins, have ftp access to my blog, and a hell of a lot more that I actually don’t even know how to describe…

If the above sounded like the rants of a madman, rest assured, it is. I’M VERY EXCITED TO HAVE MY OWN DOMAIN NAME!!!!!

Read the rest of this entry »

FunMaza Downloader Revised

Finally settled on a first design draft for the FunMaza Downloader program that I have been going on about for some time. For anyone interested in it, the draft is available on PasteBin here.