Inspirated

 
 

June 16, 2010

Tacking running performance with Nokia Sports Tracker

Filed under: Blog — krkhan @ 10:37 pm

I had previously never carried a GPS device while going on a jog. It never appeared to be worth the hassle. A few days back my N72’s battery drained while I was heading for the track so I carried my E71 around for the music. Apart from the tunes, it gave me some pretty interesting statistics for my workout. Today I decided to do some laps while exploiting the GPS and see how it turns out — did I love the experience.

The Sports Tracker application uses Nokia’s Ovi Maps which unfortunately doesn’t provide support for Pakistan right now. This meant I couldn’t see satellite images while I was running which didn’t bother me much as it would’ve been utterly inconvenient to do so anyway. To “plot” my running track on a real map, I exported a KML file which can be viewed here. The map also shows fastest, slowest, lowest and highest points through info buttons:

Map of June 16, 2010 Workout

The Sports Tracker application itself had informative statistics such as calories burned (roughly estimated from my weight and height):

Sports Tracker June 16, 2010 Workout Screenshot #1

And of course, no statistical data can ever be complete without graphs:

Sports Tracker June 16, 2010 Workout Screenshot #2

Sports Tracker June 16, 2010 Workout Screenshot #3

Sports Tracker June 16, 2010 Workout Screenshot #4

Apart from the heart-break that I had after knowing that the track I’ve considered all my life to be 2.5 km long (as indicated on the boards in the park) actually spans 2.35 km, I’m quite pleased with the experiment’s result and may after all carry Sports Tracker in my next jogs.

Tags: , , , , ,

June 4, 2010

How NOT to copy MBR with the dd command

Filed under: Blog — krkhan @ 8:39 pm

Yesterday I needed to copy the MBR of a drive over another. Googling a little I found the following command in various tutorials:

-bash-$ dd if=/dev/sda of=/dev/sdb bs=512 count=1

Where /dev/sda and /dev/sda were the original and target hard disks respectively. The command did complete its work in a snap but it also made me learn a thing about MBR structures the hard way: Only 446 bytes of the MBR contain boot code, the next 64 contain the partition table!

The implications of the lesson being, if partition tables of both hard disks differ — which unfortunately was the case with me — the partition table of the target hard-disk will be overwritten. The correct way would therefore be:

-bash-$ dd if=/dev/sda of=/dev/sdb bs=446 count=1

In case you did mess up the table, I recommend TestDisk for recovering your partitions.

Tags: , , , , , ,

May 21, 2010

The obsession with closed-source

Filed under: Blog — krkhan @ 7:46 pm

A few days back, my university held a series of seminars on SharePoint. A friend of mine cornered me and kept convincing me vigorously that SharePoint is the single-most communicative advancement in the history of mankind since verbal correspondence.

As a student, I have never used any of the ECMS stacks. I do however know people who have used everything from Lotus to Nuxeo. The thing I did notice in all ECMS installations was that ECMS itself aren’t “black-box” products. That is, they’re platforms which allow their functional scopes to be extended via custom development. Most of these people have at one point or other hired services for training or development of their ECMS solutions. This friend had in fact, hired a third-party SharePoint developer just a few days back for his start-up company. All of these observations lead me to one question: If you’re going to spend money for customizing products distributed via the retail paradigm, why not invest in the open-source paradigm instead?

Bruce Perens summarizes the open-source approach in his paper The Emerging Economic Paradigm of Open Source:

Thus, to make your business more desirable to customers, you should spend more on differentiating software that makes your business more desirable, and less on software that doesn’t differentiate your business. Open Source is the key to spending less on non-differentiators, by distributing cost and risk that was formerly your company’s alone across multiple collaborating companies.

An open-source ECMS solution like Alfresco would not only save the owners a great deal of dough, it would also make the process of customization easier. Similarly, the organizations would not have to put up with insane licensing terms such as buying full Office licenses for each user even if he uses only the web-based app on a non-Windoze OS. However, my question was answered instantly when I mentioned Alfresco to the friend. Instead of inquiring further about the open-source alternative, the question was:

“What exactly does this Open-Source company do?”

Tags: ,

May 20, 2010

Facebook in Pakistan — in a nut-shell

Filed under: Blog — krkhan @ 3:32 am

It’s on everybody’s tongues in my country and I’ve been inquired about my geek opinion throughout the day. Notwithstanding eon-long rants about it, I’ll just quote this piece of gold from the geek authority itself, xkcd:

xkcd: Duty Calls

Tags: , ,

April 27, 2010

Finally there — Google Summer of Code 2010

Filed under: Blog — krkhan @ 1:02 am

GSoC 2010 Logo

Fate has a curious sense of humor. After having 8 of my proposals rejected in past 3 years for Google Summer of Code, I had 2 of them selected in the same year. In GSoC terminology, I became a “duplicate” student. Now, the standard practice for such cases is that the administrators of both organizations interested in the student get together in a “deduplication” meeting and resolve the conflict. However, Maria Randazzo (the program administrator from the Ubuntu organization) was kind enough to ask my preference regarding the project I’d like to work upon.

This put me in a rather uneasy position as mentors from both organizations (Bryce Harrington from Ubuntu & Alexey Khoroshilov from The Linux Foundation) had been really helpful during the application process. In the end however, I chose Ubuntu since its proposal focused on Arsenal and Python which I found relatively more familiar than Alien and Perl. I had also already collaborated with Bryce for some Arsenal patches before so it was easier for me to get up-to-speed with the Ubuntu proposal.

The proposal itself is in fact publicly viewable at this link. Summarizing my feelings, I’ve never looked forward to a summer as much as this one.

“If a June night could talk, it would probably boast it invented romance code.” —Bern Williams

Tags: , , , , , , , , ,

April 1, 2010

71 days of E71: Top 10 3rd party applications

Filed under: Blog — krkhan @ 2:05 pm

While I would have sold my clothes, PS2 as well as my soul to get my hands on a N900, I couldn’t strike a practical deal and in the end had to settle for E71. Now, while E71 does not ooze sex by running a full-fledged Linux distro it still does a pretty good job of running Symbian. The specs are fun, the keypad is great and the build quality is nothing but ergonomic love.

After completing 71 days of tinkering with the new phone, I have settled on the choice of apps which would become an integral part of my digital life. I’m listing the top ten here, but the arrangement is in no way meant to be indicative as an absolute index of application quality. These are just the ones that I found useful.

10. ScreenSnap — Honorary Mention

It would be a bit unfair to not list the very application that powers the visual aspects of this post. So here we are with the self-referential snap:

ScreenSnap Screenshot

9. SmsOne — Hassle-Free Flash SMS

“Flash” texts — the ones which always instantly show up on the recipient’s cell and are not saved in the inbox unless specifically made to — have always been a speciality of applications with poor interfaces as well as poorer integration with the rest of the phone. SmsOne, on the other hand, has a simple interface with excellent phonebook integration for making the job as simple as possible.

SmsOne Screenshot

8. Mobipocket MobiReader — eBooks Made Fun

Reading a large PDF file on your E71 is indeed possible, but it takes away any fun whatsoever by forcing you to deal with redundant scrolling and weird font sizes. MobiReader combined with the desktop software Calibre is the ultimate eBook reading experience on Symbian phones.

MobiReader Screenshot

7. Gravity — Pulling Tweets Consistently

The one word for summarizing Gravity would be: slick. Of all the Twitter applications for Symbian — and there are quite a lot — Gravity is the most organized, reliable and pretty-looking competitor around.

Gravity Screenshot

6. PuTTY — That Insane Power in Your Hands

I’m lying down in my bedroom and I want to play this song on the speakers in my drawing room. I’m in my university and I want to start this download on my laptop which is unfortunately back at home. I’m in another city and I want to see the contents of this file which is in my home PC.

I can. Because I have that command-line access at my fingertips:

SmsOne Screenshot

5. mIRGGI — IRC Never Dies

Open-source — being the distributive collaboration that it is — depends heavily on mailing lists and IRC channels for communication. For the latter, mIRGGI works flawlessly. In fact, you can even do fancy stuff like using different network connections for different channels.

mIRGGI Screenshot

4. Python — “It’s …”

For all the comparisons made over the years between Perl and line-noise, Symbian C++ easily beats both by a mile. Which is why your choices are rather limited if you want to program for Nokia phones while preserving your sanity at the same time. Your best bet is to go for Maemo. Unfortunately, that ain’t exactly an affordable option for everyone. The other way is to use PyS60 rely on that programming language which makes every other alternative pine for the fjords.

PyS60 Screenshot

3. MSDict Viewer — Dictionaries which Help

A dictionary is one of the least useful things you can carry around. Even with one of them installed on your phone, they rarely get used. Similarly, the pronunciation guides used in those dictionaries are cryptic symbols at best. Add the ability of audio pronunciations and you suddenly have a lovely app referring which almost becomes an addiction.

MSDict Viewer Screenshot

2. Google Maps — Never Lose Yourself

For people who’re not especially good with directions, there couldn’t have ever been a better solution:

Google Maps Screenshot

1. Opera Mobile — Synonym for Excellence

Even if this list is tailored more to my requirement, get some hundred people to make similar ones and Opera will be the topper in majority of the rankings. Opera bridges that gap between mobile browsing and real browsing and is one of those applications which epitomize how software should be engineered.

Opera Mobile Screenshot

Tags: , , , , , , , , , , , , , , , ,

March 3, 2010

The Defense

Filed under: Blog — krkhan @ 10:08 pm

Continuing the process of presenting my proposal for the graduation project, I was required to do a presentation. Now, I have never really liked PowerPoint and for more reasons than it being a product of Microsoft (I was never really into OpenOffice.org Impress either).

In fact, I have never liked doing presentations in the first place. My preferred means of communicating an idea is through written material or face-to-face discussions. Anyhow, seeing as I had to do a formal presentation, I turned towards the solution that would provide some additional attraction for me: LaTeX Beamer.

After fiddling around with my .tex for a few hours, I was able to create something which looked [*] far more professional, sexier and informative than anything I had ever created using traditional presentation software:

ittc-defense-presentation.pdf
Presentation Screenshot

To view the presentation you have to open it in “Slide Show” mode of your favorite PDF reader. What totally blew me away was the ease with which I could create lovely bibliographic references, mathematical equations and little fun things like navigational bar on top of every page. Perhaps it’s got to do something with the mindset of a programmer, but I certainly became more productive with Beamer within a couple of hours than I had been throughout my experience with PowerPoint/Impress.

[*] Whether they were professional, sexy or informative is a totally different matter and has very little to do with either LaTeX or Beamer.

Tags: , , ,

March 2, 2010

GoDaddy/WordPress ninoplas Base64 virus and the fix

Filed under: Blog — krkhan @ 7:40 pm

Update: The virus seems to have affected only GoDaddy websites, hence the change in title.

Few hours ago I opened my website and noticed some rather strange Javascript hanging around the bottom. After some inspection, it became evident that every page on my blog was trying to load an IFrame to some place called ninoplas.com. Turns out, I wasn’t alone and there are other users as well who are affected by this. Judging by the fact that different blogs were attacked at the same time, this was in all probability the result of a security hole in some plugin or the core itself.

The virus acted by adding a piece of encrypted code on the first line of all PHP files on the server. It’s rather unsettling to consider the extend of damage that could have been caused with the write access to those files. Still, the damage could be rectified by simply deleting those lines. I wrote a tiny script for doing this job which cleans the ninoplas virus from all the PHP files in the current directory:

clean-ninoplas.sh

Warning: While this script has worked for me, I am in no way providing any guarantee for how it behaves on other blogs. Backup your blog as well as database before executing this script.
You have been warned.

Using the fix is a simple matter of:

-bash-$ cd wordpress
-bash-$ wget https://inspirated.com/uploads/clean-ninoplas.sh
-bash-$ sh clean-ninoplas.sh

And don’t forget to backup everything again after cleaning up. The security hole — if there is one — has still not been tracked and if it’s in the core or some plugin which you’re still using, the virus might not be so benevolent next time.

Tags: , , , , , , ,

February 16, 2010

“Houston, Tranquility Base here. The Proposal has landed.”

Filed under: Blog — krkhan @ 10:51 pm

Baffling all reason known to mankind, I have somehow entered my final year of engineering — that is, after earning every conceivable grade on my transcript. As is the custom, I was supposed to work on a graduation project and the first step included presenting a proposal and defending it. Brainstorming sessions for a project idea left me with classical stuff such as HAL-9000 or the Nebuchadnezzar hovercraft. At which point I decided that I simply wasn’t creative enough to come up with an idea on my own and asked around for help. After a few days of frantic Googling and inept socializing with senior academia members, I finally found something which at least managed to sound horrible: an Intrusion Tolerant Threshold Cryptographic System.

The proposal can be found at this link. If the contents seem a bit sparse to you, reread the title as “A Not-At-All Fault Tolerant Attempt at Getting to Grips with LaTeX and BibTeX. Although, I’m not entirely sure my attempts at doing something with latex were more successful than Geroge’s.

“And you wanted to be my latex salesman.” — Jerry Seinfeld

Tags: ,

November 15, 2009

code.inspirated.com

Filed under: Blog — krkhan @ 8:48 pm

While blogging over the years, a good deal of posts containing useful code came up and then disappeared under that “Next Page” link. While I have no issues with regular posts moving down the stack, I did strongly feel that the ones containing code should be cataloged separately in some place. Similarly, when new version of a program from earlier posts was released, it also created a mess in the previous post chain for that program as I had to update all of them to the latest link.

The solution was pretty simple. Instead of using the main blog’s pages, I created a mini-site at code.inspirated.com where I intend to manage the bits and pieces of programming spread on Inspirated. So far, I like the results of using the rather nifty software CMS Made Simple. As a matter of fact, if you have ever tried deciding between available CMS solutions and have succeeded in less than an hour, I salute you. The number of CMS projects out there far exceeds the number of Linux distributions that have ever been created. And that says a lot.

Tags: , ,
« Previous PageNext Page »