Skip to content

Skip Lists (a.k.a. Balanced Trees are overrated)

Programming computers is fascinating.

A couple of days ago I was introduced to a new data structure I did not know before. It’s called a skip list. It’s a sorted linked list, where the nodes are linked at different levels, forming increasingly sparse chains, each of which skips more nodes, and therefore is faster to traverse, allowing search algorithms to hop over parts of the list when searching. That’s why they’re called skip lists.

The concept was shown to me during a job interview. They briefly introduced me to the concept of skip lists using an image. It is said that an image is worth a thousand words, and in this case the assertion holds:

Continued…

Categories: Programming, Whatever.

Tags: , , , ,

Steve, we have a problem!

One of the coolest features of Apple’s iDevices, specially the iPad, is the ability to recognize the orientation of the device and adjust the rotation of image on screen accordingly. But what happens if we take the iPad to the International Space Station?

Well some guys did something very similar. They took an iPad for a ride in a Zero-G parabolic flight, similar to the well-known NASA’s Vomit Comet. Can you guess what happened to the iPad? Surprise!

Maybe not as serious as the problem that Jim Lovell and his crewmates had on Apollo 13, but a problem indeed. I was really not surprised at all, since I expected no more, but it’s nice to see that someone actually gave it a try.

Categories: Whatever.

Tags: , ,

Opera 11 brings tab stacks and some improvements

Opera invented tabs and many other innovations that other most successful browsers have adopted over the years. In fact Opera is the browser that has lead more innovative features than any other browser. And yet somehow this browser –my favorite one till Google Chrome appeared– has never been considered a major one except in some niche markets.

Personally I always considered it the best browser ever, although with great grief I had to hand over that title to Chrome, which has everything really worth taking from Opera, plus several improvements that were hard to ignore. It was the first browser able to claim being nearly as fast as the Norwegian big O, plus sandboxing, well-achieved extensions framework, uncluttered interface and a great attention to detail from its designers.

But I didn’t throw away Opera for this. Today I took a glimpse of what’s expected for their upcoming 11th edition, and I have to say I was impressed but not surprised at all: I expected no less from the best browser vendor in the world.

Opera 11 beta brings up several improvements over past versions. Keeping up with the competition is the least they could, and they seem to be doing really well in terms of features: better HTML5 support, smaller installer, better performance, safer browsing, secure and informative address field, private navigation mode, and a great new overdue addition which I haven’t yet explored in its entirety: extensions. Continued…

Categories: Internet, Software.

Tags: , , ,

Taking notes the simple way

Recently I’ve been playing around with a few note-taking applications, specially with support for mobile devices such as my iPhone and a simple way to keep notes in sync with my laptop or desktop computers.

I was most recently getting along with PlainText, a note-taking iPhone app that stores your notes in a folder in your Dropbox account. It’s a very simple yet powerful concept, specially for those of us who already use Dropbox. Instead of having yet another syncing environment for notes, they already take advantage of the Dropbox user base out there.

The interface is simple and visually appealing, yet out of the ordinary. The notes are always in sync between the iPhone and the computers thanks to Dropbox, and I can get to organize my notes into folders. No more nasty notes from the default iPhone notes app getting into my mail (whoever thought that notes were related to mail is insane). Continued…

Categories: Software.

Tags: , , ,

The most hilarious moment on The Big Bang Theory

You gotta love Jim Parsons on this scene. For me it’s the funniest scene on the whole series so far. It makes me laugh every time I see it. I hope you enjoy it too.

Update: Unfortunately the Youtube video above is not embeddable, so it cannot be played within this site :-( Simply click on it to be given the option to open it on Youtube instead.

Categories: Whatever.

Tags: , , , ,

A new way to manage your passwords

In this ever increasing digital world with lots of useful services on the Internet, keeping track of your passwords is a daunting task. Many people end up using one or two passwords for everything, or are otherwise constantly resetting their passwords via email.

Luckily there are lots of different choices of password managers, softwares that will help you keep a secure database of all this information, sometimes even in a way that they help you collect your passwords as you use them in your browser, autofill login forms, and even generate new random passwords for you.

This is all great, but I am not convinced. Random passwords generated and filled into forms, all done by a software tool? I end up not really knowing my passwords. What if the tool ever fails, or its database gets corrupted? What if my hard drive melts and after the fix I get a clean install with no passwords database? I also do not like the idea of passwords being stored digitally, not even encrypted.

So I ended up with a small password managing system that I designed myself. With it you can still use a conventional password manager, but in a slightly different way. Continued…

Categories: Software, Whatever.

Tags: ,

Five reasons to love Objective-C

Objective-C was always a distant name for me, a blur memory from lists of languages read somewhere. I recall having a very subtle curiosity for the name. It’s like saying two things in one. First, it’s like adding objectivity to C, but also the objective word gives a hint that objects and Object-Oriented Programming are somehow involved. It’s a nice and insightful word play with the pun intended.

Objective-C provides most of the benefits of C++, plus some more benefits that C++ does not provide at all. And I am not talking only about Simula vs. Smalltalk philosophical differences here, but about stuff that C++ could have actually had without breaking its Simula-like philosophy. Some of the features/reasons I will enumerate below fall under this category. Continued…

Categories: Programming.

Tags: , ,

Import your iPhone address book into the iPhone simulator

When you are developing an iPhone application that works with the system-wide address book, it’s sometimes useful to have already some entries to play with when testing the app. Suppose then that you are testing in the simulator, which comes with no contacts at all. You cannot sync your simulator with iTunes, and the simulator is not integrated into your Mac Address Book, so you have to start creating some contacts manually.

Well, not exactly. If you have a real device (and you should anyway, if you are developing for the platform) and this device has lots of contacts in it, then you can copy the internal address book files into the simulator’s file system in your Mac. I actually got the tip from this blog post after searching on Google a little bit, but it did not worked for me exactly that way. I’ll let you know why. Continued…

Categories: Programming, Software.

Tags: , ,

Selectively print link URLs in your wordpress blog

Today I was trying to improve the print-view styles of this blog. This is useful not only to actually print on paper, but also when you print to PDF to keep a digital copy of the content.

So besides the obvious hiding of sections not relevant on a printed media, like the sidebar, comments form, etc., I started to look at what other improvements could be made for a printed version of a web page. I readily searched for and turned to an article I recall having read some time ago in A List Apart about exactly this matter: Going to Print.

Following the article’s suggestions I started customizing margins, backgrounds, font type and size, etc. Then I stumbled upon a very tricky issue they mention: what to do with links? They are clearly of no direct use in printed media since users can’t click on a paper, but on the other hand it’s a pity that the extra information conveyed in a link (namely the referenced URL) gets lost. Continued…

Categories: Internet, Software, Web programming.

Easily arrange your windows with ShiftIt

Yesterday I learned via TheAppleBlog about a nifty little software called Divvy, which allows you to quickly arrange and position windows in your Mac desktop with a menu and configurable shortcuts. The application sits away in the menu bar and you can click on it or invoke via a global shortcut key. You can then tell it to re-position the frontmost window according to what you specify in a grid-like representation of the screen.

Since I don’t have $14 to spare on this app, and I also do not really think it’s worth it, I went on to find some alternative softwares for this. This wonderful website alternativeto.net allows you to look for software applications on certain platforms and find out about some other softwares that could serve as alternatives or equivalents, either in the same platform but free, or perhaps because you are looking for an alternative to switch or use in another platform.

In this case I wanted to find an alternative to Divvy also for the Mac, but free as in beer. I didn’t really care that much if it was open source, although it would be a plus. Thankfully I found ShiftIt, wich is not only free and open source, but also even better than Divvy in my opinion. Continued…

Categories: Software.

Tags: , , ,