New Computer

With the release of Intel’s second generation “Core” processor line I felt that it was the perfect time to build something that will last for 5-6 years like my last computer did.

Here’s what I got:

Processor: Intel Core i7 2600K Quad Core Unlocked Processor
Motherboard: ASUS P8P67 Pro Motherboard
Case: Corsair Graphite Series 600T Mid-Tower Case
Video Card: Diamond Radeon HD 6970 880MHZ 2GB 5.5GHZ GDDR5 2XDVI HDMI 2XMINI Display Port PCI-E Video Card
Power Supply: Corsair Professional Series Gold AX750 CMPSU-750AX 750W ATX Fully Modular 80PLUS Gold Power Supply
RAM: Corsair CMZ8GX3M2A1600C9 Vengeance 8GB 2X4GB DDR3-1600 CL9-9-9-24 Dual Channel Memory Kit
HD1: OCZ Vertex 2 Extended Sandforce 120GB 2.5IN SATA2 Solid State Disk
HD2: Western Digital WD20EARS Caviar Green 2TB SATA2 3GBPS 64MB

The machine is incredibly fast to say least. I haven’t over-clocked it yet as I didn’t get any additional cooling.

One of the first things I did was load up Crysis, a title known for requiring a machine with considerable processing power, with all of the settings set to max and the game looked amazing. I also ran the Final Fantasy XIV benchmark and got some pretty impressive scores. It’s really unfortunate that SSDs cost so much as the 120GB SSD drive I have is almost full. Good thing Windows 7 supports symbolic links :) .

Passwords

Passwords are a part of our every day lives and once again they’ve come up in the media. Not too long ago Gawker Media informed that public that their user databases had been compromised exposing the passwords of roughly 1.3 million commenters. Soon afterward, various news outlets started talking about analysis of the passwords and criticizing the large number of weak passwords found in the data.

I think such talk is rather foolish – there is definitely a place for weak passwords in our everyday lives.

In a perfect world, every system you ever use would allow you to enter a password consisting of any character you like and be of any length. The human brain would have database style memory retrieval with the precision accuracy it would take that would allow you to instantly use a unique password for every system.

In reality, the human brain can’t possibly be expected to remember a unique password for each and every service that requires a password. To remedy this applications that keep track of your passwords have popped up. I do not think that such programs are a good idea for a couple of reasons. First and foremost, by using such applications it becomes imperative that the database used by the respective program is extremely well safeguarded and that the master password or key file used to gain access to the password store is guarded with one’s life. It follows that should an unscrupulous individual gain access to your password store there’s great potential for some serious damage. Another problem with password stores is that it becomes imperative that one always has access to a computer that has a copy of the program being used as the store in order to look up their passwords.

Personally, I prefer being able to derive my own passwords. This way I can access them anywhere I happen to be, there’s no program to safeguard and there’s no worry that someone will gain access to all of my passwords. In order to create a derivable password I start with a phrase or sentence that I can easily remember. For example, take the following sentence:

I, Michael Tozzo, am happy 365 days a year!

Taking the first letter of each word of the above sentence and leaving the numbers and punctuation in place yields the string “I,MT,ah365day!” which makes for an excellent password as it contains a mix of upper and lowercase letters, numbers and punctuation characters. You can easily customize a password like this by injecting something related to the site it’s being used on. For example, if I want to use the previous password on “facebook.com” I can make the first, third and fifth letters the first 3 letters of the site. This would make my password “fIa,cMT,ah365day!”. I use this method to come up with some really secure passwords that I use for my banking, my web hosting and other important things. I only use one or two key phrases for my passwords so I would have not been impressed if I lost one of them to a website where I merely go to post comments. I actually did have a relatively easy to guess password compromised by the Gawker Media fiasco as I have a commenter account on Kotaku. Did I scramble to change my passwords across multiple websites? Nope. Was I worried that anything of real importance was vulnerable? Nope.

An application like KeePass has a place for some people though, mainly those that need to keep track of many many passwords as part of their profession. Rarely does a person that needs access to a multitude of user names and passwords find themselves away from a computer so access is not an issue. It’s also not easy remembering another person’s password as it won’t have any meaning to you since you have no control over it.

The last thing I want to touch upon are issues related to the other side of passwords – how they are handled by the services that accept them. One of my biggest pet peeves when it comes to passwords are restrictions on the length of the password and viable characters in my password. If I want to use a password that’s 20 characters long or that contains something other than letters and numbers I should be able to without issue. Not only do I have to make exceptions to my own personal derivation rules, I’m forced to use a less secure password. A password consisting of only letters and numbers can be broken very quickly using brute force methods (trying every combination of letters and numbers). My other pet peeve relates to sites that allow an unlimited number of attempts at entering a password. Even Twitter had a breach related to the gaping security hole that the ability to carry out an unlimited number of password entry attempts provides. Your online banking site of choice will always lock you out after a certain number of failed attempts for this very reason.

Well, that’s all I have to say about passwords. I hope you learned something. :)

Say Hello to Skynet

While IBM’s Watson probably won’t launch any nuclear weapons any time soon, the video of Watson in action on Jeopardy over on engadget.com (boo to engadget.com for not allowing any embedding!) is almost chilling to watch.

I found the way Watson would use some of the phrases and lines that regular human players on Jeopardy use disturbingly creepy. For example, it used common Jeopardy phrases for starting, finishing and staying within categories. This was just a “teaser” for the match, the real matches will air between February 14 to 16th.

curl function

My plan for 2011 is to mix in more programming related posts. I figure the best place to start is a powerful PHP function that I wrote that uses curl and has helped me many many times.

function grab($url, $postparams = '', $cookiefilepath = '', $referer = '')
{
  sleep(2);

  $postheaders = array();

  $url_parts = parse_url($url);

  $postheaders[] = 'Host: ' . $url_parts['host'];
  $postheaders[] = 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; ' .
    'rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9';
  $postheaders[] = 'Accept: text/xml,application/xml,application/xhtml+xml,text/' .
    'html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5';
  $postheaders[] = 'Accept-Language: en-us,en;q=0.5';
  $postheaders[] = 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7';
  $postheaders[] = 'Keep-Alive: 300';
  $postheaders[] = 'Connection: keep-alive';

  if($referer != '')
  {
    $postheaders[] = "Referer: $referer";
  }

  if($postparams != '')
  {
    $postheaders[] = 'Content-Type: application/x-www-form-urlencoded';
    $postheaders[] = "Content-length: " . strlen($postparams);
  }

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_HTTP_VERSION, 'CURL_HTTP_VERSION_1_1');
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
  curl_setopt($ch, CURLOPT_HTTPHEADER, $postheaders);  // $headers

  if($postparams != '')
  {
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postparams);
  }

  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  curl_setopt($ch, CURLOPT_URL, $url);

  if ($cookiefilepath != '')
  {
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefilepath);
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefilepath);
  }
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

  $got_page = curl_exec($ch);
  $headers = curl_getinfo($ch);
  $error = curl_error($ch);

  curl_close($ch);

  $retval = array('result' => $got_page, 'headers' => $headers, 'error' => $error);

  return $retval;
}

This function is great for writing crawlers as you can sent over POST variables, it can pass over and store cookies in a cookiejar and passes over a “User-Agent” header so site you’re connecting to can’t tell that you’re aren’t really a browser and a referrer so you can really mimic regular page navigation :) .

Power Adapters

I submitted the following to Nintendo via their contact form:

Hello,

please please please make the power adapter that comes with the 3DS in North America accept 100 to 240V. It’s very annoying that when I go on vacation I have to bring my PSP with me instead of my DSi because the adapter does not accept 100 to 240V just like my cell phone charger, laptop charger, camera charger, shaver and other modern gadgets do.

Regards,

Michael Tozzo.

Mario 3

Not just any Mario 3 though, this is the enhanced version Super Mario Advanced 4 version that used the e-Reader to enhance the game with game play elements from the other games such as the ability to pick up vegetables from Mario 2 and the cape from Mario World.

It makes you wonder if the programming for all of these additions are already in the game and unlocked or are really being added by e-Reader. My bet is on the former which would mean an enterprising and ingenious person could make some amazing level creation tools.

Star Craft 2

I ran across this recently and thought it was pretty funny. You will really only understand it if you have ever played Star Craft and know what Facebook is:

Star Craft 2 Facebook

This post serves dual purpose as I was also lucky enough to get in to the Star Craft 2 Closed Beta. While I didn’t really get to play all that much, I made my friend Jacob the happiest guy on the planet by inviting him to the Beta as well. Playing with him was really fun as he’s pretty good so I was elevated from averagely good to really good status just by being paired with him :) . I preordered the Collector’s Edition of the game and can’t wait to give the single player experience and it’s level editor a spin.