After several years of programming in various languages for several different platforms there are several things I’ve come to realize about programming. I’ve broken it down into 3 separate topics, each with their own discussion. Each discussion will be added over the next few days.

The heart of any program is the algorithm that actually performs a task at hand. There are often plenty of auxiliary functions that typically must also occur in a program, but what makes each and every piece of software unique is how these functions are tied together to perform a task. Often the algorithm is the piece of code that requires the most debugging, the most attention to detail, and most importantly, a new and often creative idea. Auxiliary functions frequently are written by a third party, or in the case of many high level languages, may actually be features of the language itself. In PHP, as an example, there are functions available to query a database, write HTTP headers to a browser, read data from a web page or sort an array. All of these functions typically require no more than a line or two of code for them to perform a lot of work more or less automatically.

Let’s apply these functions to a basic model of the Google search engine. Things start off with a web crawler, an auxiliary function that gets a web page. The crawler then finds links on the page, opens them and continues on indefinitely.

The crawler feeds its data to Google’s algorithm called Page Rank. This is the core of their process. It counts up the number of links to a given page, and what context the page is linked to. Note that there are no pre-defined functions to handle this task, thus it is the main algorithm because it contains the new and creative idea mentioned above.

Next we move back to some auxiliary functions. The data that is generated by Page Rank is then stored in a database, another built in function in many programming languages. Then, when a user does a search, the database is queried and returns a response that contains pages that match the user’s input. Finally, this data is then sent to the user’s web browser, all of which can be handled by various functions that are already built into a programming language.

Please understand that this is a very simplified analysis of Google, and it was intentionally designed to show how an algorithm is a small part of an overall program, but is what makes every program unique.

Downloading videos from Youtube is easier than ever. Simply change youtube.com in the title bar to pwnyoutube.com when you’ve viewing a video. It will bring you to a page with the option to download either the standard quality or the high quality video. Just click one of the links to start downloading.

Here’s how the last digit of the final score of all 42 super bowls breaks down. Great for figuring out just how likely you are to win that squares pool at the office. Duplicate scores have been omitted, i.e. 4-2 and 2-4 do not appear on this list since statistically they’re the same thing.

Final
Score
Percent Occurances
0-0    
0-1 2% 1
0-2 2% 1
0-3 2% 1
0-4    
0-5 5% 2
0-6 5% 2
0-7 7% 3
0-8    
0-9 5% 2
1-1    
1-2    
1-3    
1-4 5% 2
1-5 5% 2
1-6 2% 1
1-7 2% 1
1-8 2% 1
1-9 2% 1
2-2    
2-3    
2-4 2% 1
2-5    
2-6    
2-7 2% 1
2-8    
2-9 2% 1
3-3    
3-4 5% 2
3-5    
3-6 5% 2
3-7 2% 1
3-8    
3-9    
4-4    
4-5    
4-6    
4-7 12% 5
4-8    
4-9 2% 1
5-5    
5-6    
5-7    
5-8    
5-9    
6-6 2% 1
6-7 2% 1
6-8 2% 1
6-9 2% 1
7-7 5% 2
7-8    
7-9 2% 1
8-8    
8-9 2% 1
9-9    

If you haven’t heard yet some scammers are harvesting passwords on Twitter through direct messages. You’ll get a direct message from someone you follow (whose account has already been compromised) that asks you to click a link, for one of many ever changing reasons. When you click the link, you’re taken to a page that looks like the twitter login page, but it is not at twitter.com. Unknowingly, many people enter their user name and password here at which point the hacker now has access to your account to send more direct messages.

Here’s where things get scary. A crafty hacker could also potentially break into your Facebook page, blog, or email. Once they have your user name and password, the can get your email address from your account details on Twitter. Then, they can head over to GMail, Hotmail or whoever you’re using and try logging in using the same password you use for Twitter. Unfortunately, there’s a good chance that this will work since studies have shown that many people use the same password for everything. So how do they get into your blog? If you’ve linked to your blog in the Web entry on your twitter account, the hacker now knows where your blog is, and they’ve got a relatively good password to try on it too. The same goes for Facebook, and anything else that you’ve ever linked to from Twitter, perhaps a Digg page or a MySpace page.

This is all speculation, but if you’re using the same passwords for more than one online service, be sure to change all of them if you’ve been affected by this attack.

The M@’s Picks section of this site has some of my favorite tips, applications and web sites that I use every day. I’ve keeping an eye on my computer usage recently and will be updating it with my favorite windows and windows mobile tips over the next few weeks. Be sure to check it out now, too, since there’s a lot of good stuff archived in there.