SKHeap; A quick MaxHeap and HeapSort implementation

Heap is an interesting data structure. It is a binary tree, that keeps the maximum (in case of MaxHeap) element at the root, thus providing access to it in O(1) i.e. constant time. You can pop the root element in O(lgN) time, and insert new elements into the heap in O(lgN) time as well. Initial buildup of the heap takes linear time. You can sort a sequence of elements using heap, by first building the heap out of all the elements, and then retrieve the elements back. Since initial build up is linear time, each retrieval of the maximum element is O(lgN) time, and you do N such retrievals, the resulting sorting algorithm is of O(NlgN) complexity and called HeapSort.

It is fun to implement these well known data structures and algorithms. So while I was bored and free for half an hour, I quickly wrote a basic implementation of a Heap and HeapSort in Objective-C and pushed it to Github. Check it out and let me know if you like it or find any issues with it.

A Step A Day; iPhone app

Ever since I heard about “don’t break the chain” method of productivity, as made famous by Jerry Seinfeld, I fell in love with it due to its simple yet effective motivational push mechanism. In order to make the process easier and more accessible, I decided to create an iPhone app around it. I am calling it “A Step A Day”. The app does nothing more then letting you mark your day as productive in a calendar against a specific goal. I added few additional features such as notifications to let you¬†leverage your smart phone’s capabilities.

A Step A Day iPhone App

SyntaxHighlighter Plus WordPress Plugin Indentation Problems

This blog is primarily a programmer’s blog about programming. So you will see lots of code snippets in most of my posts. To properly handle the indentation, syntax highlighting, line numbering and other such issues with code snippets in a post, I needed a reliable wordpress plugin. I tried a few different ones, and finally decided on SyntaxHighlighter Plus. It is easy to use (with one problem that I am going to discuss), and the final result is very nice looking, as you can see in my posts.
Continue reading

Making Facetime work on iPhone using unsupported carrier without MiTime

Apple introduced a new tool called Facetime during the launch of iPhone 4, that lets users of iOS and MacOS devices to have video chat in real time with their friends, with a pretty good image resolution. Skype recently also brought video chat facility to their mobile application. But in places where you have good wifi connectivity, and know that the person you want to call also has a Facetime supporting device, you would always want to go with Facetime, due to its better image quality, compared to Skype’s more compressed video.

But there is this one weird thing about Facetime. While on the iPod Touch, and Macbooks, you can use it instantly where ever you have access to wifi, it is not the same with iPhone. You will have to activate the service in order to use it on your iPhone. From what I’ve gathered, this activation process sends across couple of SMS messages to some Apple servers, after which, if it went well, you’ll be able to use Facetime on your iPhone.
Continue reading

Killer Feature of Google Chrome; UI For Closing Tabs

You can throw any amount of browser speed benchmarks at me, show me how your browser has a lesser memory footprint, and/or reduced cpu load, but you won’t convince me to switch my browser from Google Chrome to something else. Well, not right away. That is, until Chrome does something terribly wrong, or other browsers pick up on some of the UI gems that Chrome has, or at least one of them. Read on…
Continue reading

Mouse Issues on Mac OS X

No other laptop manufacturer has got their trackpad as awesomely right as Apple. Their new line of multitouch enabled gestures based trackpads on Macbooks and Macbook pros, and release of Magic Trackpad for desktops is an awesome traditional mouse replacement.

I have always despised trackpads on any other laptop I’ve ever used. They are very basic, small, with left/right mouse buttons just not placed in a way to be easy on your palm position. You have to actually adjust your hand when shifting between cursor movement, and clicking. Their sensitivity level is also hard to adjust, and the whole moving your finger on top of it experience just isn’t fun. In one word, they are just plain “ugly”.¬†But all of these problems go away with Apple’s trackpad. The trackpad itself is a button, so you don’t need to adjust your hand during movement/clicking. And the overall multitouch gestures experience is on a whole new level.
Continue reading