Keeping it real in Chicago

Yesterday was my 44th birthday. First time I’ve felt like ‘dang that seems old to me’ when looking at my age. Not sure why it sticks out to me.

Over the weekend I took a trip to Chicago with my friend John who I use to work for and an older guy, Art, who currently works for John. John is one of the partners of Epic Systems Engineering, from my engineering days. Really cool guy, we share some common interests.

On the way up I discovered to my surprise that John keeps his 60 foot boat anchored in Lake Michigan and well that was going to be our sleeping accommodations. How fun! We arrived, dropped our luggage off at the boat and John gave us our first work assignment.  He purchased rope and what looks like short highway orange cones. The idea was to tie 4 of these together in a line with a weight at the end and then hang the assembly off the boat to reduce the rocking in the boat. Lot of wind catches his boat and acts like a sail. Being engineers we measured everything out, read the instructions and went to work. First we put the rope knots in the wrong place, then messed up our measurements. Had to restart the assembly 3 times before we got it right. Then had a hell of a time trying to tie a boat knot for the weight. John asked how many engineers does it take to complete this thing? I answered, clearly the answer is more than 3.

We decided to get in some clean clothes and took a cab into town. Found a nice Irish pub in Olde Town and watched the Stanley Cup final. Great game, I was rooting for the Red Wings who somehow lost at home. Can anything else go wrong for Detroit? Most of the people in the bar were still sour after the Red Wings handed the Blackhawks a semi-final defeat so there were plenty of Penguin fans in the bar. I looked around at all of the young people there. Beautiful shining happy faces, full of youth and beauty. As I gawked at the pretty girls, it just hit me I’m twice the age of most of them. Wow. Yes, they are unattainable now. Yep, I had a mini-mid-life crisis right there in the 3rd period. Thought about changing my clothes and haircut to be hipper, start exercising, etc. Ran through the gamut like a cornered rat looking for a way out. So that’s what it’s like.. hmmm. Not a pleasant experience. So the game ended and I left my “issues” at the bar. John is an adventurous person. Let me explain a little. He loves Chicago and wants to discover as much of it as he can on each trip he makes there. So he printed out a map of Chicago with red and blue dots on it indicating points of interest that he’s been to and one’s he hasn’t. The latter being blue. So he pulls the map out of his pocket and marks off the bar we just left and said hey how about this jazz bar called the Green Dolphin guys? We’re all game to follow John where ever. The cabbie drops us off at the Green Dolphin and we step out and have one of those butthole puckering “oh shit” moments. Remember in Animal House when the guys walked in on Otis at the bar he was playing at? Well that was us. So after getting John to stop laughing at the predicament he landed us in and reminding him that maybe he should at least drive through some of the “blue dot” areas before committing to them we got back into a cab and headed back to the boat to sleep off the adventure. I wish I had my camera with me to share with everyone how cool the Chicago skyline looks like from John’s boat.

We woke to rain on Saturday. John pulled out his map and decided on the Siskel Film Institute, told the cabbie to head there. While John was trying to find out the exact address for the cabbie I asked him do we know what time this place opens? He calls them and no, they don’t open for a few hours. Turn around cabbie, lets head to the Broadcast Museum, John searches for the address. I ask, ok do we know if this place is open? Phone call later, no it’s closed for repairs. Massive eye roll at that point. I finally say lets just go to the Field Museum and check out what’s there. I could spend all day in there but we decide to take the L out to Oak Park and check out Frank Lloyd Wright homes he designed at the turn of the century. Art decides to visit his sister in town while John and I continue the adventure. We get on the L and head straight west towards the suburbs. Each stop gets worse and worse in terms of urban decay. One drunk guy gets on the train asking if we could drive him to the homeless shelter in Indiana. I ask John, is this going to be a repeat of the Green Dolphin. At which point he says “no, I’ve been told it gets bad then it clears up”. My confidence getting shaky I stick with him on this. We arrived in a nice suburb and headed off to find the Frank Lloyd Wright visitor center. Purchased some tickets for a walking tour of the area. Tour guide gave us a run down of the many homes he designed during his “prairie design” period. At the time Oak Park was in the prairie where the rich elite lived outside the city slums. Really cool. Once again I wish I had a camera.

We met Art back at the boat and announces we are having dinner with his sister who he confides in me was married to Harry Caray for 20 years. Wow! So we meet her and her boyfriend at well Harry Caray’s steak house downtown. Fancy place with an overpriced menu. She turned out to be full of life, wonderful lady. 80 years young but looked 60. I sat next to her boyfriend, another octogenarian who had a Cardinal world series ring on. I asked him about it and he explained he’s a part owner of the team, along with several other professional teams. Cool. He’s was a star basketball player at Loyola Univ. in Chicago in the early 50s. They retired his number. Really nice old guy. I really enjoy talking to old people, full of stories and experience. Art sister asked him with a wink if he was spending the night and he motions me over and he says to me quietly “she doesn’t get it that at my age it’s like trying to play pool with a rope”. I reminded they have these wonderful little blue pills now. He waves his hand and says that’s all he needs is one more pill to take. Art’s sister, “Dutchy” told us how she met Harry. She was not interested in dating in the beginning. But he wooed her with rose deliveries and once hired three Italian tenors to show up at her work and sing a romantic song from one of her favorite Italian operas. Long story short, she was smitten :) The steak I ordered was incredible, you know the kind that just melts. Its food like that that spoils me later on when I’m forced back into the real world of chain restaurants. Art’s sister picked up the check, which I know was well over $500. We said our thank yous and goodbyes and headed to the bar where we were given carte blanche on any booze. An alcoholic's dream. I was spent after that large dinner and several glasses of fine wine but John and Art were just starting. Ha! Yeah poor Craig who just wants to hit the bunk. Guys, I’m ready to ship off. But I’m not a spoil sport, I hung in there and watched ESPN on repeat loop through each of the day’s baseball games. One of the Cub outfielders that day thought he caught the third out and threw the ball into the stands as the runners tagged up and circled the bases on the second out. Yep this is why people are so loyal to the Cubs, they are lovable screw ups.

Sunday we took a cruise on John’s boat up the Chicago river and then packed up and headed home. On the way back I realized the spontaneity of the trip. The whole trip was a total blank slate Friday morning and ended up having a really cool adventure. Life’s not about hanging on to a youthful look, staying hip or trying to stay in the “game”. It’s about the moment, carpe diem, live each day like it’s your last.

Posted by Craig

Javascript IDE

Lately I’ve been writing a lot of javascript and using the jQuery framework. I have to say, the jQuery framework is a godsend. Like cellphones and microwave ovens I ask myself, how did I manage without jQuery??

Visual Studio 2008 offers a half-hearted attempt in working with javascript code. Even with the jQuery addin it’s still pretty much sucks at it. Simple things like being able to collapse the code and code formatting is missing. My search for a better javascript IDE has landed on a free product called Komodo Editor. Out of the box it handles all the simple things Visual Studio misses on, including jQuery intellisense that’s built in. It’s fairly extensible and has sort of a dev community that has been creating addons for it. Here are a few that I’ve found --

JSLint
This examines your code for errors or suggestions. Just download the JSLint executable from here. Make a copy of js.default.conf and rename it komodo.conf. Open up the file in notepad and change the following sections to look like this --

### Output format
# Customize the format of the error message.
# __FILE__ indicates current file path
# __FILENAME__ indicates current file name
# __LINE__ indicates current line
# __ERROR__ indicates error message
#
# Visual Studio syntax (default):
#+output-format __FILE__(__LINE__): __ERROR__
# Alternative syntax:
+output-format __FILE__:__LINE__: __ERROR__

### Files
# Specify which files to lint
# Use "+recurse" to enable recursion (disabled by default).
# To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
# or "+process Folder\Path\*.htm".
#
#+process jsl-test.js

Start Komodo and open the Toolbox by clicking the “Show/Hide Right Pane” button in the toolbar. Click on the “Add Item to Toolbox” button and add a new command. Make your new command look like this --

 image

The parse output with command is --

                  ^(?P<file>.+?):(?P<line>\d+):(?P<content>.*)$

JSMin
This minifies your javascript. An internet standard. Download the executable here. Start Komodo and open the Toolbox and a new command as before. Make your new command look like this --

image

The one caveat here is that your original javascript file must have the extension .uncompressed.js in order for this to work.

Code Formatter

This is a macro I modified that formats your javascript code to the way you like it. I have my own personal preferences like 2 space indents, lots of spaces in parameters, etc. The original web site is here and the original code of the script I can’t seem to find anymore. In any case here is my modified version of that code --

/*
 JS Beautifier
---------------
  $Date: 2008-10-15 05:08:05 +0300 (Wed, 15 Oct 2008) $
  $Revision: 67 $

  Written by Einars "elfz" Lielmanis, 
      http://elfz.laacz.lv/beautify/
  Originally converted to javascript by Vital, 
      http://my.opera.com/Vital/blog/2007/11/21/javascript-beautify-on-javascript-translated

  You are free to use this in any way you want, in case you find this useful or working for you.

  Usage:
    js_beautify(js_source_text);
*/

function js_beautify( js_source_text, indent_size, indent_character, indent_level )
{
  var input, output, token_text, last_type, last_text, last_word, current_mode, modes, indent_string;
  var whitespace, wordchar, punct, parser_pos, line_starters, in_case;
  var prefix, token_type, do_block_just_closed, var_line, var_line_tainted, if_line_flag;

  function trim_output()
  {
    while ( output.length && ( output[ output.length - 1 ] === ' ' || output[ output.length - 1 ] === indent_string ) )
    {
      output.pop();
    }
  }

  function print_newline( ignore_repeated )
  {
    ignore_repeated = typeof ignore_repeated === 'undefined' ? true: ignore_repeated;

    if_line_flag = false;
    trim_output();

    if ( !output.length )
    {
      return; // no newline on start of file
    }

    if ( output[ output.length - 1 ] !== "\n" || !ignore_repeated )
    {
      output.push( "\n" );
    }
    for ( var i = 0; i < indent_level; i++ )
    {
      output.push( indent_string );
    }
  }

  function print_space()
  {
    var last_output = output.length ? output[ output.length - 1 ] : ' ';
    if ( last_output !== ' ' && last_output !== '\n' && last_output !== indent_string )
    {
      // prevent occassional duplicate space
      output.push( ' ' );
    }

    var last_output2 = output.length ? output[ output.length - 2 ] + last_output: '';
    if ( last_output2 === "( " || last_output2 === "[ " )
    {
      //alert(output[output.length - 1]);
      // prevent space inbetween empty parans
      output.splice( output.length - 1, 1, '' );
    }
  }

  function print_token()
  {
    output.push( token_text );
  }

  function indent()
  {
    indent_level++;
  }

  function unindent()
  {
    if ( indent_level )
    {
      indent_level--;
    }
  }

  function remove_indent()
  {
    if ( output.length && output[ output.length - 1 ] === indent_string )
    {
      output.pop();
    }
  }

  function set_mode( mode )
  {
    modes.push( current_mode );
    current_mode = mode;
  }

  function restore_mode()
  {
    do_block_just_closed = current_mode === 'DO_BLOCK';
    current_mode = modes.pop();
  }

  function in_array( what, arr )
  {
    for ( var i = 0; i < arr.length; i++ )
    {
      if ( arr[ i ] === what )
      {
        return true;
      }
    }
    return false;
  }

  function get_next_token()
  {
    var n_newlines = 0;
    var c = '';

    do
    {
      if ( parser_pos >= input.length )
      {
        return [ '', 'TK_EOF' ];
      }
      c = input.charAt( parser_pos );

      parser_pos += 1;
      if ( c === "\n" )
      {
        n_newlines += 1;
      }
    }
    while ( in_array( c, whitespace ) );

    if ( n_newlines > 1 )
    {
      for ( var i = 0; i < 2; i++ )
      {
        print_newline( i === 0 );
      }
    }
    var wanted_newline = ( n_newlines === 1 );

    if ( in_array( c, wordchar ) )
    {
      if ( parser_pos < input.length )
      {
        while ( in_array( input.charAt( parser_pos ), wordchar ) )
        {
          c += input.charAt( parser_pos );
          parser_pos += 1;
          if ( parser_pos === input.length )
          {
            break;
          }
        }
      }

      // small and surprisingly unugly hack for 1E-10 representation
      if ( parser_pos !== input.length && c.match( /^[0-9]+[Ee]$/ ) && input.charAt( parser_pos ) === '-' )
      {
        parser_pos += 1;

        var t = get_next_token( parser_pos );
        c += '-' + t[ 0 ];
        return [ c, 'TK_WORD' ];
      }

      if ( c === 'in' )
      {
        // hack for 'in' operator
        return [ c, 'TK_OPERATOR' ];
      }
      if ( wanted_newline && last_type !== 'TK_OPERATOR' && !if_line_flag )
      {
        print_newline();
      }
      return [ c, 'TK_WORD' ];
    }

    if ( c === '(' || c === '[' )
    {
      return [ c, 'TK_START_EXPR' ];
    }

    if ( c === '{' )
    {
      return [ c, 'TK_START_PARAN' ];
    }

    if ( c === ')' || c === ']' )
    {
      return [ c, 'TK_END_EXPR' ];
    }

    if ( c === '{' )
    {
      return [ c, 'TK_START_BLOCK' ];
    }

    if ( c === '}' )
    {
      return [ c, 'TK_END_BLOCK' ];
    }

    if ( c === ';' )
    {
      return [ c, 'TK_SEMICOLON' ];
    }

    if ( c === '/' )
    {
      var comment = '';
      // peek for comment /* ... */
      if ( input.charAt( parser_pos ) === '*' )
      {
        parser_pos += 1;
        if ( parser_pos < input.length )
        {
          while ( ! ( input.charAt( parser_pos ) === '*' && input.charAt( parser_pos + 1 ) && input.charAt( parser_pos + 1 ) === '/' ) && parser_pos < input.length )
          {
            comment += input.charAt( parser_pos );
            parser_pos += 1;
            if ( parser_pos >= input.length )
            {
              break;
            }
          }
        }
        parser_pos += 2;
        return [ '/*' + comment + '*/', 'TK_BLOCK_COMMENT' ];
      }
      // peek for comment // ...
      if ( input.charAt( parser_pos ) === '/' )
      {
        comment = c;
        while ( input.charAt( parser_pos ) !== "\x0d" && input.charAt( parser_pos ) !== "\x0a" )
        {
          comment += input.charAt( parser_pos );
          parser_pos += 1;
          if ( parser_pos >= input.length )
          {
            break;
          }
        }
        parser_pos += 1;
        if ( wanted_newline )
        {
          print_newline();
        }
        return [ comment, 'TK_COMMENT' ];
      }

    }

    if ( c === "'" || // string
    c === '"' || // string
    ( c === '/' && ( ( last_type === 'TK_WORD' && last_text === 'return' ) || ( last_type === 'TK_START_EXPR' || last_type === 'TK_END_BLOCK' || last_type === 'TK_OPERATOR' || last_type === 'TK_EOF' || last_type === 'TK_SEMICOLON' ) ) ) )
    {
      // regexp
      var sep = c;
      var esc = false;
      var resulting_string = '';

      if ( parser_pos < input.length )
      {

        while ( esc || input.charAt( parser_pos ) !== sep )
        {
          resulting_string += input.charAt( parser_pos );
          if ( !esc )
          {
            esc = input.charAt( parser_pos ) === '\\';
          }
          else
          {
            esc = false;
          }
          parser_pos += 1;
          if ( parser_pos >= input.length )
          {
            break;
          }
        }

      }

      parser_pos += 1;

      resulting_string = sep + resulting_string + sep;

      if ( sep == '/' )
      {
        // regexps may have modifiers /regexp/MOD , so fetch those, too
        while ( parser_pos < input.length && in_array( input.charAt( parser_pos ), wordchar ) )
        {
          resulting_string += input.charAt( parser_pos );
          parser_pos += 1;
        }
      }
      return [ resulting_string, 'TK_STRING' ];
    }

    if ( in_array( c, punct ) )
    {
      while ( parser_pos < input.length && in_array( c + input.charAt( parser_pos ), punct ) )
      {
        c += input.charAt( parser_pos );
        parser_pos += 1;
        if ( parser_pos >= input.length )
        {
          break;
        }
      }
      return [ c, 'TK_OPERATOR' ];
    }

    return [ c, 'TK_UNKNOWN' ];
  }

  //----------------------------------
  indent_character = indent_character || ' ';
  indent_size = indent_size || 4;

  indent_string = '';
  while ( indent_size-- )
  {
    indent_string += indent_character;
  }

  input = js_source_text;

  last_word = ''; // last 'TK_WORD' passed
  last_type = 'TK_START_EXPR'; // last token type
  last_text = ''; // last token text
  output = [];

  do_block_just_closed = false;
  var_line = false;
  var_line_tainted = false;

  whitespace = "\n\r\t ".split( '' );
  wordchar = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$'.split( '' );
  punct = '+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! !! , : ? ^ ^= |= ::'.split( ' ' );

  // words which should always start on new line.
  line_starters = 'continue,try,throw,return,var,else,if,switch,case,default,for,while,break,function'.split( ',' );

  // states showing if we are currently in expression (i.e. "if" case) - 'EXPRESSION', or in usual block (like, procedure), 'BLOCK'.
  // some formatting depends on that.
  current_mode = 'BLOCK';
  modes = [ current_mode ];

  indent_level = indent_level || 0;
  parser_pos = 0; // parser position
  in_case = false; // flag for parser that case/default has been processed, and next colon needs special attention
  while ( true )
  {
    var t = get_next_token( parser_pos );
    token_text = t[ 0 ];
    token_type = t[ 1 ];
    if ( token_type === 'TK_EOF' )
    {
      break;
    }

    switch ( token_type )
    {

    case 'TK_START_PARAN':
      print_newline();
      print_token();
      print_newline();
      indent();
      break;

    case 'TK_START_EXPR':
      var_line = false;
      set_mode( 'EXPRESSION' );
      if ( last_type === 'TK_END_EXPR' || last_type === 'TK_START_EXPR' )
      {
        // do nothing on (( and )( and ][ and ]( ..
      }
      else if ( last_type !== 'TK_WORD' && last_type !== 'TK_OPERATOR' )
      {
        print_space();
      }
      else if ( in_array( last_word, line_starters ) && last_word !== 'function' )
      {
        print_space();
      }
      print_token();
      print_space();
      break;

    case 'TK_END_EXPR':
      print_space();
      print_token();
      restore_mode();
      break;

    case 'TK_START_BLOCK':

      if ( last_word === 'do' )
      {
        set_mode( 'DO_BLOCK' );
      }
      else
      {
        set_mode( 'BLOCK' );
      }
      if ( last_type !== 'TK_OPERATOR' && last_type !== 'TK_START_EXPR' )
      {
        if ( last_type === 'TK_START_BLOCK' )
        {
          print_newline();
        }
        else
        {
          print_space();
        }
      }
      print_token();
      indent();
      break;

    case 'TK_END_BLOCK':
      if ( last_type === 'TK_START_BLOCK' )
      {
        // nothing
        trim_output();
        unindent();
      }
      else
      {
        unindent();
        print_newline();
      }
      print_token();
      restore_mode();
      break;

    case 'TK_WORD':

      if ( do_block_just_closed )
      {
        print_space();
        print_token();
        print_space();
        break;
      }

      if ( token_text === 'case' || token_text === 'default' )
      {
        if ( last_text === ':' )
        {
          // switch cases following one another
          remove_indent();
        }
        else
        {
          // case statement starts in the same line where switch
          unindent();
          print_newline();
          indent();
        }
        print_token();
        in_case = true;
        break;
      }

      prefix = 'NONE';
      if ( last_type === 'TK_END_BLOCK' )
      {
        if ( !in_array( token_text.toLowerCase(), [ 'else', 'catch', 'finally' ] ) )
        {
          prefix = 'NEWLINE';
        }
        else
        {
          prefix = 'SPACE';
          print_space();
        }
      }
      else if ( last_type === 'TK_SEMICOLON' && ( current_mode === 'BLOCK' || current_mode === 'DO_BLOCK' ) )
      {
        prefix = 'NEWLINE';
      }
      else if ( last_type === 'TK_SEMICOLON' && current_mode === 'EXPRESSION' )
      {
        prefix = 'SPACE';
      }
      else if ( last_type === 'TK_STRING' )
      {
        prefix = 'NEWLINE';
      }
      else if ( last_type === 'TK_WORD' )
      {
        prefix = 'SPACE';
      }
      else if ( last_type === 'TK_START_BLOCK' )
      {
        prefix = 'NEWLINE';
      }
      else if ( last_type === 'TK_END_EXPR' )
      {
        print_space();
        prefix = 'NEWLINE';
      }

      if ( last_type !== 'TK_END_BLOCK' && in_array( token_text.toLowerCase(), [ 'else', 'catch', 'finally' ] ) )
      {
        print_newline();
      }
      else if ( in_array( token_text, line_starters ) || prefix === 'NEWLINE' )
      {
        if ( last_text === 'else' )
        {
          // no need to force newline on else break
          print_space();
        }
        else if ( ( last_type === 'TK_START_EXPR' || last_text === '=' ) && token_text === 'function' )
        {
          // no need to force newline on 'function': (function
          // DONOTHING
        }
        else if ( last_type === 'TK_WORD' && ( last_text === 'return' || last_text === 'throw' ) )
        {
          // no newline between 'return nnn'
          print_space();
        }
        else if ( last_type !== 'TK_END_EXPR' )
        {
          if ( ( last_type !== 'TK_START_EXPR' || token_text !== 'var' ) && last_text !== ':' )
          {
            // no need to force newline on 'var': for (var x = 0...)
            if ( token_text === 'if' && last_type === 'TK_WORD' && last_word === 'else' )
            {
              // no newline for } else if {
              print_space();
            }
            else
            {
              print_newline();
            }
          }
        }
        else
        {
          if ( in_array( token_text, line_starters ) && last_text !== ')' )
          {
            print_newline();
          }
        }
      }
      else if ( prefix === 'SPACE' )
      {
        print_space();
      }
      print_token();
      last_word = token_text;

      if ( token_text === 'var' )
      {
        var_line = true;
        var_line_tainted = false;
      }

      if ( token_text === 'if' || token_text === 'else' )
      {
        if_line_flag = true;
      }

      break;

    case 'TK_SEMICOLON':

      print_token();
      var_line = false;
      break;

    case 'TK_STRING':

      if ( last_type === 'TK_START_BLOCK' || last_type === 'TK_END_BLOCK' || last_type == 'TK_SEMICOLON' )
      {
        print_newline();
      }
      else if ( last_type === 'TK_WORD' )
      {
        print_space();
      }
      print_token();
      break;

    case 'TK_OPERATOR':

      var start_delim = true;
      var end_delim = true;
      if ( var_line && token_text !== ',' )
      {
        var_line_tainted = true;
        if ( token_text === ':' )
        {
          var_line = false;
        }
      }

      if ( token_text === ':' && in_case )
      {
        print_token(); // colon really asks for separate treatment
        print_newline();
        break;
      }

      if ( token_text === '::' )
      {
        // no spaces around exotic namespacing syntax operator
        print_token();
        break;
      }

      in_case = false;

      if ( token_text === ',' )
      {
        if ( var_line )
        {
          if ( var_line_tainted )
          {
            print_token();
            print_newline();
            var_line_tainted = false;
          }
          else
          {
            print_token();
            print_space();
          }
        }
        else if ( last_type === 'TK_END_BLOCK' )
        {
          print_token();
          print_newline();
        }
        else
        {
          if ( current_mode === 'BLOCK' )
          {
            print_token();
            print_newline();
          }
          else
          {
            // EXPR od DO_BLOCK
            print_token();
            print_space();
          }
        }
        break;
      }
      else if ( token_text === '--' || token_text === '++' )
      {
        // unary operators special case
        if ( last_text === ';' )
        {
          // space for (;; ++i)
          start_delim = true;
          end_delim = false;
        }
        else
        {
          start_delim = false;
          end_delim = false;
        }
      }
      else if ( token_text === '!' && last_type === 'TK_START_EXPR' )
      {
        // special case handling: if (!a)
        start_delim = false;
        end_delim = false;
      }
      else if ( last_type === 'TK_OPERATOR' )
      {
        start_delim = false;
        end_delim = false;
      }
      else if ( last_type === 'TK_END_EXPR' )
      {
        start_delim = true;
        end_delim = true;
      }
      else if ( token_text === '.' )
      {
        // decimal digits or object.property
        start_delim = false;
        end_delim = false;

      }
      else if ( token_text === ':' )
      {
        // zz: xx
        // can't differentiate ternary op, so for now it's a ? b: c; without space before colon
        if ( last_text.match( /^\d+$/ ) )
        {
          // a little help for ternary a ? 1 : 0;
          start_delim = true;
        }
        else
        {
          start_delim = false;
        }
      }
      if ( start_delim )
      {
        print_space();
      }

      print_token();

      if ( end_delim )
      {
        print_space();
      }
      break;

    case 'TK_BLOCK_COMMENT':

      print_newline();
      print_token();
      print_newline();
      break;

    case 'TK_COMMENT':

      // print_newline();
      print_space();
      print_token();
      print_newline();
      break;

    case 'TK_UNKNOWN':
      print_token();
      break;
    }

    last_type = token_type;
    last_text = token_text;
  }

  return output.join( '' );

}

komodo.assertMacroVersion( 2 );
if ( komodo.view.scintilla )
{
  komodo.view.scintilla.focus();
} // bug 67103
var ke = ko.views.manager.currentView.scimoz;
var formatter;
var language = komodo.document.language;
var encode = ' -utf8';
switch ( language )
{
case 'Perl':
  formatter = 'perltidy';
  break;
case 'PHP':
  formatter = '/opt/local/bin/php_beautifier -s4 -l"Pear()"';
  //formatter = '/opt/local/bin/php-beautify';
  break;
case 'JavaScript':
  formatter = 'internal';
  break;
case 'XML':
case 'XUL':
case 'XLST':
  formatter = 'tidy -q -xml -i -w 100' + encode;
  break;
case 'HTML':
  formatter = 'tidy -q -asxhtml -i -w 100' + encode;
  break;
default:
  alert( "I don't know how to tidy " + language );
  exit( 1 );
}

//save current cursor position
var currentPos = ke.currentPos;

try
{
  // Save the file.  After the operation you can check what changes where made by
  // File -> Show Unsaved Changes
  //ko.commands.doCommand('cmd_save');
  // Group operations into a single undo
  ke.beginUndoAction();

  // Select entire buffer & pipe it into formatter.
  ko.commands.doCommand( 'cmd_selectAll' );

  if ( formatter === 'internal' )
  {
    ke.replaceSel( js_beautify( ke.selText, 1, '\t', 0 ) );
  }
  else
  {
    ko.run.runEncodedCommand( window, formatter + " {'insertOutput': True, 'operateOnSelection': True}" );
  }

  // Restore cursor.  It will be close to the where it started depending on how the text was modified.
  ke.gotoPos( currentPos );
} catch( e )
{
  alert( e );
} finally
{
  // On windows, when the output of a command is inserted into an edit buffer it has unix line ends.
  ko.commands.doCommand( 'cmd_cleanLineEndings' );

  // Must end undo action or may corrupt edit buffer
  ke.endUndoAction();
}

In the toolbox select to add a macro and just dump the above code into the macro text box and that should do it.

Posted by Craig

BSG

Watched the finale of BSG last night. What an incredibly lame ending. They found a second Earth a million light years distant from the last one they found? It’s inhabited with proto humanoid species with uh the same DNA as the surviving humans? Oh man <groan>.. come on.. what happened to good writing. They painted themselves into a corner and just threw a half honest effort to get on to their new jobs. Is it me getting older and expecting better writing or has writing just gotten worse through the years? I think one solution is to limit these shows to mini-series formats, 3-5 shows and it’s over. Sitcoms are really the only vehicles that can handle multiple seasons. Even then it’s usually takes a herculean effort to keep those shows from getting stale after a couple of seasons. Usually those devolve into serious dramas to save the last season.

Posted by Craig

Jon Stewart rips Jim Cramer a new one

Wow.. just finished watching Jon Stewart rip Jim Cramer on TV. This week Jon Stewart decided to show viewers what he thinks of CNBC and the rest of the financial "news" tv networks. It went back and forth. They claimed he was cherry picking clips from the show, Stewart explained that he likes to call it turd mining. Finally tonite he had Jim Cramer on, one of the bigger "stars" on CNBC and the one who had been the most outspoken critic of what Stewart was claiming. I thought it would be like any other show and Jon Stewart would get a few jabs in there but throw a few lighthearted deprecating jokes in there to keep things "comedic". No nothing like that. I watched as Jon Stewart reduced Mad Cramer almost to tears as he tried to defend himself. Yes it was uncomfortable to watch but you know what it was one of the most amazing TV journalistic efforts I think I've ever seen. Not since Mike Wallace in the 1970s was able to provoke fear in wrong doers have I seen anything like it. I thought those days were long gone. Can you believe it -- the only TV journalist left is a comedian who's show follows puppets that make crank calls. I hope Katie Couric was taking notes on how it's suppose to be done. I may be a biased since I do watch Jon Stewart's show regularly but hey bravo Jon Stewart! Keep up the good work!

Also bravo to Chris for somehow keeping this complicated blog going. Took me 20 minutes to figure out how to make this post...lol.

Posted by Craig

Posting from Windows 7 beta

Just got Windows 7 beta installed on a separate partition. Downloaded it from MSDN. So far so good. Has the same look as Vista but much improved. I can’t believe how much more stable this is that crappy Vista and this is a beta build! Goes to show you I guess. Anyway the new windows taskbar is kind of fun to play with, I’m not so sure if I’d go so far as to it’s more useful because practically it’s not really. But it does look cooler. Kind of reminds of some of the linux taskbars in a way. Then again most of Windows 7/Vista has incorporated some linux UI elements. That’s ok in my mind. Best of breed is fine.

I installed Firefox and WinRar without any issues. Will install MS Office, Nero and few other necessary items. I’ll leave the antivirus and firewall apps until later when I feel brave. I have a feeling those aren’t going to go smoothly since they fiddle with the OS underneath. I expect they won’t find what they are looking for and end up abending.

Posted by Craig
Filed under:

Vista, I want to love you but I can't...

Well I tried Vista again. This time it came pre-installed on my Dell desktop pc I bought from them last month. It started out kind of fun, it worked like a champ in many respects. I learned where everything was, started tweaking it little by little, being careful to not do anything drastic like install beta drivers or software. Then the evil started creeping in. First MS wanted to install a Windows update a week ago, which I did like a good Windows users. It asked to reboot. Came back up and lo and behold, my onboard video driver would not load, Windows complained that it was unrecognized. Well I have a PCI video card for my video so I figured so what, not using it anyway. So I left my pc on overnight and came back the next day to use and it was in hibernation mode and I couldn't recover from it. Why is a desktop set up for hibernation anyway? Nothing would bring it back, so I had to hard reboot it. I figured well I better stop that from happening. I looked and looked, nowhere could I find the setting to stop hibernation. Turns out the only way to turn it off is through an arcane command you have to enter through the command prompt. Wow. Ok, whatever. Then last Friday I worked from home and experienced 5 BSOD's!! WTF?! Could it be the failed video driver causing it? I hurriedly tried to back out the MS update but there was nothing in it about a updating a video driver. So I installed the Dell driver from the CD that came with the computer. Still BSOD's persisted. Also every time I came back to my pc after a few hours away, my internet connection was gone but the LAN connection was good. Geez. Did some searching on that, tried all kinds of things. Once again some arcane command line entry to turn off Windows network auto tuning. Then after that, another BSOD for good measure. Enough Vista, you maybe hot in bed but damn you are not a good friend. Goodbye forever, let me know when you sister Windows 7 is old enough to drive :D

Posted by Craig

A million first grade teachers just cried

Read the headlines of this article 

This is a test of the Windows Live Writer that Chris has been pestering me to start using. I have to agree, this is a very nice tool. Thanks Chris!

Posted by Craig
Filed under:

Wall of shame

Nettie and K are in Chicago tonite and tommorow. I decided to make a fire, pick up some Chinese food and watch season 2 of Secret Diary of a Call Girl. I went to pick up my hot braised chicken at Hunan Express and noticed their Wall of Shame. Basically it's a list on the wall of all the people that ripped them off. I read a few of them but didn't recognize any of them. What a great way to discourage people from passing bad checks. Season 2 turned out to be not as good as season 1. I guess the newness wore off. The writing kind of got stale and well Billy Piper is um British looking Wink

Posted by Craig

TV shows sucking as of late

I gave up on two promising tv shows this week. Heroes and Fringe. Heroes had a great first season or two. But now it's obvious the writers have no idea where to take the story or the characters. Rehashing the same storyline (save the future - time travel) and turning bad characters into good and good ones into bad. Dumb. 

Fringe looked to be the next X-Files but I seriously can't stand any of the characters in that show. The lead girl isn't even that great looking.  At least give me some eye candy! :) I wish all of them, with the mad scientist's son leading them, would walk into spinning helicopter blades.

Posted by Craig
Filed under:

War of the Worlds

"Never before in the history of the world have such a mass of human beings moved and suffered together. This was no disciplined march, it was a stampede. Without order and without a goal. Six million people unarmed and unprovisioned driving headlong. It was the beginning of the route of civilization.. of the massacre of mankind."

 


Posted by Craig
Filed under:

firefox crash fix

Been having a few issues with my laptop lately which required me to force a hard reboot. When I have Firefox 3 running, something gets wiped out and I have to set up all of my extensions again. Pain in the butt. But I figured out what file is getting wiped out. Tiny litte file called prefs.js. Make sure you back that sucker up in case you have to go through a system crash. It's located in this folder --

C:\Documents and Settings\username\Application Data\Mozilla\Firefox\Profiles\yourprofile.default\

Tonite I came home and decided to finally restack our firewood. Annette's stepfather sells us firewood every year. He brought a pickup load of wood this year for us. He's got a bad heart and I had every intention of unloading it myself but he insisted on helping. I had him fill the metal stack holder while I stacked the rest of the wood next to it. He finished, his face was flush and I could tell he was feeling really winded. So the other day I was cutting the grass in the backyard and noticed that stupid stacker fell over and all of his hardwork was laying across the yard. I realized what happened is the poles had dug into the yard and leaned forward and tipped over. So I put some boards under the feet and restacked the wood. I also cut up all the 2x4's that came out the bedroom project last spring when we tore down the wall between bedrooms 2 and 3 to give Kenzie a bigger bedroom. In a moment when I was rushing one of the boards smacked on the side of head. Still stings. There were all kinds of nails sticking out them, I was lucky one didn't puncture me. I'm such an idiot sometimes. 

It's 10:00 pm and I'm starving. I had a late lunch and then came home and got involved with the firewood project. Showered and cooled down and relaxed. Always happens. I had some bran granola cereal this morning and man did I pay today for it. I had to go outside and one point and just out gas for a good 15 minutes. Geez, what do they put in that stuff anyway?! 

Talked to my sister today. Since mom is doing much better we are now reconsidering having her move into a senior apartment instead of assisted living. It's such a struggle to remind mom to exercise her legs, to encourage her to socialize with people, just to enjoy life. If we could get her to improve in those areas she'd be fine for a long time I think. She just winds herself down into such a funk that it's so hard to pull her out of. I tell her over and over about the importance of getting out the house, walking, talking, moving around. She just wants to be left alone in her hobbit hole. There are times when I just don't want to think about it anymore and then I feel bad for not caring. Mein Kampf indeed...

Posted by Craig

The last lecture

Annette is watching a fad video right now called The Last Lecture. A college professor diagnosed with terminal cancer decides to make his final lecture something memorable. Mostly it's the same thing most people say who have a limited amount of time left, live for the moment, carpe diem, pursue your passions, etc. I hear it, I agree with it, but I can never convince myself to give up my comfortable lifestyle and experience the "now". 

I finally got back to the gym today after a couple of weeks off. Felt good to push myself to sweat again. Need to keep it up. Feeling fat lately but I just weighed myself and I'm still sitting at 201 lbs. If I went on a low carb diet I could easily lose 20 lbs. Once a month I fast for 24 hours. That time is coming soon. I've read that it allows your digestive system to take a day off and reset itself. Makes sense to me.

I installed another tv tuner card in my pvr awhile ago so I could pick up HDTV over the air with an antenna. I can recieve HD just fine now but my cable tv reception is kind of fuzzy using the pvr. Probaby just have the signal split too many times ( 4 to be exact). I bought a splitter with an amplifier and ran brand new RG-6 cable to my box but it's only marginally better. Good enough for viewing. I'm waiting for the day when the cable company will move all of their channels to the digital band, then my wonderful pvr experience will end. I don't see any cable cards or variant of in the future. 

Posted by Craig

Summer in the city

Last 2 days have been quite hot. Over 100 F yesterday. Took my mom to sign up at the Cardinal Ritter senior daycare yesterday in all of this heat. I was concerned that she would get heat exhaustion even though we weren't outside much. She did well though. She's getting much better. She can walk much better, bends her knees, has balance. She said she could not recall being in the hospital though. Very strange. She mentioned to me today that she's had episodes like that in the past year. I'm wondering if she's suffering silent strokes during these times. Takes her about a week to recover and then she's fine. I suggested that we monitor her condition in the coming months. My theory is that she wasn't taking her blood pressure pills and the hypertension is causing these strokes. Well I set up her pills in one of those daily pill dispensers so she would take her pills on time and every day. 

Funny thing with mom yesterday. At the senior daycare center while we signing her up one of the seniors was playing the piano, old time tunes. Some of the people were dancing along. I like those old songs from the 40s and 50s. They were basic melodies with a little edge. Laying the groundwork for the rock n roll explosion. Anyway after we finished up I told mom to hang out there while I go get car and drive it down and I'll pick her up at the door. That way she can avoid the heat. So I bring the car up front and she's not there. I get out to go get her and she's got two older men trying to get her dance with them. Man, I can't leave her alone for a minute! :)

We are finally getting our high speed internet line at work. Ever since I've worked there I swear we've all been sharing a 56K modem connection to the internet. Not sure what was going on there. But since we are adding more web sites and getting more traffic they decided to get more bandwidth. Took almost a year to get the vendor to bring the line in. Not sure why it took so long. The IT crew at work are good people, just a little under qualifiedfor the tasks they are now in charge of. I'm waiting to see how badly they mess this up when I go into work tomorrow. The new line is suppose to come online tonight. Chris called them the "Kama Sutra IT group". Meaning they will really f*ck it up good...haha.

Posted by Craig

This week in review

Annette and Kenzie are returning from Florida tonite. In fact I have to go pick them up at the airport at 9:30. Right now it's 7:30, got a couple of hours. I just ordered a Papa Johns pizza which is called a White Pizza. It looks interesting, has garlic and ricotta cheese on it. Yum. There use to be a similar pizza called the Bianca pizza at Uno's Pizza that was awesome. But they stopped making it about 10 years ago. It was so good that I never forgot it. So I have high expectations for this slice of heaven..

 I took Thursday and Friday off and worked on the house and my condo. Removed the popcorn from the hallway and bathroom ceilings at home. Popc orn ceilings -- the shortcut of home buliders and the bane of home owners. It's a bitch to take down. Requires a hand sander overhead. Wore me out. Full of dust and sweat. Not a pretty sight. Had to go back and mud over the whole ceiling, sand again and then paint. I started laying the Pergo flooring at my condo. Looks real nice. Got about 75% of it done and ran into a topographic problem. I'm in the hallway and on the last row. Problem is that in order to "snap" the boards together you're required to angle the board into the adjoining board. But the last row needs to sit under a couple of door frames.  So I can't angle the boards. Need to figure out how to pull this off without bending space. Any topographic math wizards out there? Anyway the floor looks kick ass so far. Talked to the guy who lives below me and he's pissed off because he can't sell his condo since the market is tanking and the association won't allow us to rent the units. He's going to pursue getting a renter and calling him his brother since that's the loophole (can rent to family members). Not sure how risky that kind of move is. He also said he's going to look into trying to force a vote to repeal that rule. From what I hear that association is made up of a bunch dickhead nazis. Good luck. 

Ok Papa Johns, 30 minutes and no pizza man yet! I've been watching a comedy called It's Always Sunny in Philadelphia. Very much like Seinfeld. A group of young people who are self-centered that own a run down bar. It's not as well written as Seinfeld but still funny. I think it's running on FX, not sure. I found the first 3 seasons on the internet sites. Almost through season 2. I finished watching the first season of Secret Diary of a Call Girl. It's a British show starring Billy Piper (Doctor Who's companion who was named Rose). It was entertaining, soft core porn, interesting storylines. I guess it's edgy material but I can see it running out of drama quick.  I've been watching a Nova special called the Ghost Particle (aka the Neutrino). I thought I knew most of the lay science on the neutrino. Guess again. Interesting particle. I would say it's a misbehaving particle if anything. Doesn't really fit right with the standard model of quantum particles. Oddball, sticks out like a sore thumb. Which makes me think scientists still aren't close to understanding the basis of matter. Did I hear somebody say string theory? I listened to a good audio book called Feynman's Rainbow. One thing I got from it was the idea of string particles came from the result of and experiment performed in the late 60's involving crystal matrices. When they would fire a neutron into a lattice (by the way this is way overgeneralizing) the resulting energy distribution of the scattered particles did not look like the collisions were with point particles but with a particle that resembled a string. So there is some physical basis behind string theory after all. Did not know that. By the way, the book was good. Richard Feynman is one of my heroes and the biographer who personally knew him in his final days didn't pull any punches. Feynman was a gruff codger that didn't like to dick around. He had such a childlike amazement of nature that he had to the end. I enjoyed one particular exchange the author had with Feynman. When he was trying to decide if he should puruse string theory he inquired with Feynman on his thoughts. Feynman jumped on his case telling him look don't ask me what I think, ask yourself does this particular theory fascinate you? Don't come into my office and bug me about your hand wringing, if you want to talk string theory tell me why you think it's the best theory out there and that I don't really understand it. A nice life lesson, don't spend your time on something unless you have a passion for it. Not all of us are lucky enough to have that choice but if you do, then make it happen. 

The pizza finally came. Eh it's ok. Not enough garlic flavor. I want it to taste more like garlic bread. Little too cheesy. Literally. I washed my car today in addition to cleaning the house top to bottom. We have a new neighbor, a couple about our age. Anyway the lady likes to sun bathe a lot and runs around in a bikini. From a distance it's an attractive site. I wore my glasses while washing the car :) I've talked to them once when they first moved in. Nice people. I'm so anti-social that I never get to know them any better. But I do enjoy the view so to speak...haha. I'm a perv, I admit it. You know I'm so glad Hillary Clinton won't be running for president. It's not that I don't want a woman to run it's just that I personally think she's a power hungry bitch. Ever work with women like that? I always try to give them the benefit of the doubt but damn why do they always have to come off as total bitches? Am I a misogynist? Did I even spell that right? Seems like every job I've had there's one woman in charge that I just end up avoiding like the plague. I know women have to work extra hard to make it in a previously all male management world but dang, be a little nicer.

The dog is eyeing my pizza from the couch. He's got his head laying between two of the pillows. Looks cute as hell. I put him in the shower with me tonite. Figured he needed a shampoo. Smell good when his mom and sister gets home. He's so funny after I dry him off and let him go. He runs through the house like a crazed animal, top speed, knocks the cat over, leaps over the couch, does cuts and wiggles like a canine running back. Should video it sometime. Most dogs just shake like hell and give you that "I hate you" look. Not him, he gets all jazzed up for some reason.

Gregg got me some geek toys for my birthday. One of them is this little red button on a box. Flip the cover and press the red button and it starting beeping, getting faster and faster until you hear an explosion. I love it. It's like popping bubble wrap. Just a nice release when you're stressed. He also got me titanium spork. That's gonna be hilarious to use when we all sit down for dinner and I pull that out. Oh and he got me a usb thumb drive that has a dog figure attached to it. When you plug it in, the dog starts humping the drive....haha. I put it in Annette's laptop. Wait until Kenzie or Annette sees it. Ha!

Well it's almost time to get going to pick up the family. It was a fun week without them around but I really do miss them. I hope Annette enjoys her time alone when Kenzie and I go to Chicago in July. I'm not sure when the last time she had alone time like that.  Absence makes the heart grow founder. I need a spell checker by the way. Chris can you get one of those for this blog?? 

Posted by Craig

New laptop

I just got a new laptop. Didn't like my old one since it was really too big. 17" screen, heavy, just wasn't what I wanted out of a laptop. I sold it on craigslist for $500. So I went shopping for a smaller version of what I had. I really like HP laptops. The two laptops I've owned have been HP and have had no problems with them. Annette has an HP laptop that works very well for her and Kenzie. So I ended up with a 14" laptop.

Here are the specs:

 HP Pavilion dv2700t Special Edition CTO
- Genuine Windows Vista Home Premium with Service Pack 1 (32-bit)
- Intel(R) Core(TM) 2 Duo Processor T5550 (1.83GHz)
- 14.1" diagonal WXGA High-Definition HP BrightView Widescreen Display (1280 x 800)
- 3GB DDR2 System Memory (2 Dimm)
- 128MB NVIDIA GeForce 8400M GS
- HP Imprint Finish (Verve) + Webcam + Microphone
- Intel(R) PRO/Wireless 4965AGN Network w/Bluetooth
- FREE Upgrade to 160GB 5400RPM SATA Hard Drive from 120GB 5400RPM SATA Hard Drive!!
- FREE Upgrade to LightScribe SuperMulti 8X DVD+/-RW with Double Layer Support
- High Capacity 6 Cell Lithium Ion Battery

Yeah really nice laptop. It's got the stylish keyboard and artsy fartsy "Verve" pattern artwork on it. I like that it's not that boring silver/black combination that is so common with laptops.

I decided I would try out Windows Vista. I have a copy of the Ultimate version and right away installed it over the preinstalled Premium version. I've heard it performs better so why not. Now let me say up front, I am a power user, I write software for a living and will squeeze, tweak and abuse every last bit of bits out of my computer. So I'm not a normal email/web browsing/MS Word user. I've heard a lot of whining about Vista and had low expectations going in. I downloaded the Vista drivers from HP's web site and away I went. Installed a copy of MS Office, Firefox, Outlook and things were ok in the beginning. Little bugs here and there but nothing I couldn't live with. Beautiful UI, very pleasing to the eye. I didn't like that Vista moved important settings around, changed the File Explorer app significantly and did a lot of cpu intensive tasks like massive file indexing. They added a layer of security that reminded me of linux in that you are not a "root" user with admin privilege but a simple user that requires constant popup dialog boxes asking "do you really want to do this? this is possibly unsafe". I immediately switched that off and made myself root. Like I did when I worked with linux. So far so good, learning how to turn off the indexing, removed unnecessary services, tweaked this and that. I started to install some simple applications like Weather Bug, Outpost firewall, NOD32 antivirus. Then the real bugs started coming out in force. The video driver started flaking out, leaving artifacts on the screen from previous menus that I had clicked on. Things would just lock up on me, taskbar suddenly was not responsive, the touchpad would go into constant tapping whenever I tried to use the start menu, wireless would shut down. I really didn't have much installed or had played too long with it. I finally threw in the towel. I figured if after 2 days I'm getting these kinds of issues, what will be like when I started pounding on this sucker after 2 months! So back to XP I decided to go.

After much searching online on how to do this and pissing Annette off for spending most of Memorial Day on that "damn computer" I figured out how it's done. So this is how I did it. Of course YMMV for anyone taking hints from this blog post. 

First off here are two urls that helped me out a lot:
http://tinyurl.com/4bqonx
http://tinyurl.com/48uub5

The steps that I took to "downgrade" my laptop to XP were as follows:

1. Download a copy of nLite. This is a wonderful tool to build your own Windows XP installation CD. This is needed to "slipstream" the SATA hard drive controller driver that is required before Windows XP can read the hard drive. This is not as hard as it sounds. I used a copy of Windows XP with service pack 3. Once you get nLite installed, download the driver for the SATA hard drive controller. This web page has excellent instructions on how to slipstream the SATA drivers in using nLite. The driver I selected from the list was Intel 82801HEM/HBM SATA AHCI. The best way to see what you should choose is by opening up Device Manager in Vista and looking under the IDE/ATA controllers.

2. From Windows Vista, install bios version F.13 (download)

3. Put your Windows XP CD in your laptop and reboot and get Windows XP installed on your hard drive.

4. Once Windows XP is installed and you are logged in for the first time, install the Intel chipset driver (ver: 8.3.1.1009). (download).

5.  Install the Intel Matrix Storage driver (sp38088).

6. Install the NVidia video driver (v156.66). 

7. Download the ConexantHDAudio audio driver v2.21. Sometimes that site doesn't work, so here is an alternative download.

8. Installing the audio driver is not so straight forward.

    Install from Device Manager.
    1. Go to device manager and select Unknown audio device.
    2. Choose Update Driver...
    3. Select No not as this time
    4. Select Install from a list at a specific location
    5. Select Don't search. I will choose the driver to install.
    6. Select Show All Devices
    7. Select Have Disk...
    8. Choose the \ConexantHDAudio 221_XP\XP32\WiSVHe5.inf file
    9. Select Yes when Windows barks at you.

 9. Install the Alps touchpad v5.7.401.1 driver.

10.  Turn off your wireles connection by sliding the wireless slide switch on the front of your laptop to off, so that the wireless blue light turns orange.

11. Install the Intel PRO wireless driver (sp38439). After install turn wireless switch back on.

12. Install bluetooth driver (sp32883). 

13. If you use a cellphone with bluetooth you may want to go ahead and install Microsoft ActiveSync at this time. I'd add a link here but Microsoft constantly changes their urls so just google it. 

14.  Download the modem driver (sp37817). Just like the audio driver you need to install this through the device manager as follows:

    1. Go to device manager and select Unknown modem.
    2. Choose Update Driver...
    3. Select No not as this time
    4. Select Install from a list at a specific location
    5. Select Don't search. I will choose the driver to install.
    6. Select Show All Devices
    7. Select Have Disk...
    8. Choose the \sp37817\V32\HPQHERzm.inf file
    9. Select Yes when Windows barks at you.

15.  Install the Ricoh 5 in 1 card reader (sp33604).

16. Install the web cam driver (sp33544). 

17.  Install the HP QuickLaunch driver (sp34796).

18. Install the Yukon Mavell 88E8039 ethernet driver (sp37854).

19. Since the F.13 bios can't control the cpu fan (it just keeps it running on high constantly) we can now upgrade back to bios F.2A. Download it from here and install it. I'm sure you're asking me why did I downgraded the bios in the first place? Don't ask me, my googling kept coming across comments that the install will blue screen unless you downgrade it during the XP install. Also when you upgrade the bios for some reason Windows loses the audio and modem driver and those need to be reinstalled. This time just answer "Yes, search for a driver". Windows will find it on it's own. 

20. The bios upgrade kind of hosed up the HP QuickLaunch driver. Just install using this version (sp38171). 

That should do it. People have complained that the microphone doesn't work. I got it working by right clicking on the volume icon in the taskbar and selecting "Adjust audio properties". Click Voice tab and press the Volume.. button under Voice recording. Select Options from the menu and select Advanced controls. An Advanced button should appear, select it. In the dialog box just select Mic Boost On. Also there should be a Smart Audio app in the Control Panel with some adjustments for the microphone. The best sound I got was setting it to Speakerphone / Omnidirectional. However if you are a Skype or VOIP user you're probably going to have you own microphone and not dick around with this builtin pos. 

Take care and good luck with your laptop!!

Craig 

More Posts Next page »