About Me

Training

Nothin But .Net Developer Bootcamp

Navigation

Search

Categories

On this page

VMWare Fusion vs Parallels 4.0
Are you playing in your arena?
In case you've been trying to contact me!!
Why do I develop with passion!!
Expanding template files in Ruby (for builds)

Archive

Blogroll

 Agile Developer Venkat's Blog
 Ayende @ Blog
 B#
 Barry Gervin's Software Architecture Perspectives
 Boy Meets World
 Brad Abrams
 Canadian Developers
 Christopher Steen
 Claritude Software News
 Clemens Vasters: Enterprise Development and Alien Abductions
 Coding Horror
 Coding in an Igloo
 Dare Obasanjo aka Carnage4Life
 Darrell Norton's Blog [MVP]
 David Hayden [MVP C#]
 Don Box's Spoutlet
 Eric Gunnerson's C# Compendium
 EZWeb guy: Jeffrey Palermo [C# MVP]
 Fear and Loathing
 Generalities & Details: Adventures in the High-tech Underbelly
 Greg Young [MVP]
 Greg's Cool [Insert Clever Name] of the Day
 IanG on Tap
 Ingo Rammer's Weblog
 ISerializable - Roy Osherove's Blog
 James Kovacs' Weblog
 Jason Haley
 Jean-Luc David
 Jeremy D. Miller -- The Shade Tree Developer
 JetBrains .NET Tools Blog
 Jimmy Nilsson's weblog
 John Bristowe's Weblog
 John Papa [MVP C#]
 Jon Skeet's Coding Blog
 JonGalloway.ToString()
 Jump the Fence or Walk Around
 Lambda the Ultimate - Programming Languages Weblog
 Larkware News
 Lutz Roeder
 Marquee de Sells: Chris's insight outlet
 Martin Fowler's Bliki
 Mike Nichols - SonOfNun Technology
 MSDN Magazine - .NET Matters
 MSDN Magazine - All Articles
 OdeToCode Blogs
 Onion Blog
 Planet TW
 Raymond Lewallen [MVP]
 Rockford Lhotka
 RodMan's Corner
 Roger Johansson's blog
 Sahil Malik - blah.winsmarts.com
 Sam Gentile's Blog
 Scott Bellware [MVP]
 Scott Hanselman's Computer Zen
 ScottGu's Blog
 secretGeek
 Service Station, by Aaron Skonnard
 Signum sine tinnitu--by Guy Kawasaki
 Stephen Toub
 Steve Eichert's Blog
 Steven Rockarts
 The Blog Ride
 The Coding Hillbilly
 The Daily WTF
 TheServerSide.net: News
 Tim Gifford
 Vance Morrison's Weblog
 you've been HAACKED

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 519
This Year: 28
This Month: 0
This Week: 0
Comments: 1593

 Tuesday, September 22, 2009
Tuesday, September 22, 2009 4:03:00 PM (Mountain Standard Time, UTC-07:00) ( Productivity | Tools )

A couple of weeks ago I installed a copy of Parallels Desktop for mac. The main driver at the time was that it would allow me to play typing of the dead!!I have been using it since the first week in August. I think parallels is a great product, but I just recently switched back to VMWare Fusion as it was a clear winner in performance (my perceived performance). Parallels also seems to be somewhat of a resource hog. When I first had it installed I installed Windows 7 on a vm allocated 2GB of memory (my MBP has 4GB). I was also running an Ubuntu VM on vmware fusion that serves as my git repository. After about 30 minutes of running the Windows 7VM the Ubuntu VM would error saying that it could not allocate enough memory to continue operation (keep in mind that this Ubuntu VM was only allocated 256MB of RAM).

After switching back to VMWare fusion I can run both vm's quite happily and I am keeping the Windows 7 parallels vm kicking around so I can fire up typing of the dead every once in a while.

Develop With Passion!!

Comments [2] | | # 
 Friday, September 18, 2009
Friday, September 18, 2009 7:00:00 AM (Mountain Standard Time, UTC-07:00) ( Inspiration )

Just re-reading an article in psychology today on the topic of late bloomers. The entire article is amazing, if you have an opportunity to read the whole thing (here) I would strongly recommend it. Here is an excerpt that I find awesome (and close to home with respect to the message I try to share with people):

Finding Purpose

"I made a decision that I wanted to be world class at something at a very young age; I just had to find that one thing that made me realize this is my arena, this is where I want to play," says Chris Gardner, founder and CEO of the stock brokerage Gardner Rich & Co.

After a childhood of brutal abuse and an early adulthood as a single parent - homeless and destitute - Gardner eventually found that arena. Seeing a red Ferrari pull into a parking lot, he approached the driver and asked him,"What do you do and how do you do it?" The answer, investment banking, turned out to be a perfect match for the math and people skills Gardner already had.

"This encounter would crystallize in my memory - almost into a mythological moment that I could return to and visit in the present tense whenever I wanted or needed its message," Gardner says in his autobiography, The Pursuit of Happiness."

Many highly creative people mention "a moment, an encounter, a book that they read, a performance that they attended, that spoke to them and led them to say, 'This is the real me, this is what I would like to do, to devote my life to, going forward," says Harvard professor Howard Gardner (no relation to Chris).

Passion burns so brightly, it's clear when one has it. As Chris Gardner puts it, "Passion is the thing that won't let you sleep at night because you want to get up in the morning and go do your thing." By itself it can fuel greatness. "If you're passionate about something, you can develop the abilities," says Gardner. "It can't be taught, it can't be bought. You can't go to Yale and say you want to major in passion. You have to bring it with you."

Develop With Passion!!!

Comments [5] | | # 
 Thursday, September 10, 2009
Thursday, September 10, 2009 8:59:00 PM (Mountain Standard Time, UTC-07:00) ( General )

This is just a quick post to let anyone who has been trying to contact me through my skype account know that, the reason you have not been able to get through is because my skype out number was inactivated a couple of months ago. I just reactivated it!! Guess I should check on things like that a bit more frequently!!

Develop With Passion!!

Comments [0] | | # 
Thursday, September 10, 2009 6:50:00 PM (Mountain Standard Time, UTC-07:00) ( Faith | Inspiration )

(this should have been posted a couple of days ago!!)

It is 6:45AM on a Saturday morning. Having not yet went to bed from completing another course, instead of going to sleep immediately I am blasting this down as I feel that someone out there needs to read this post . One of the many comments that I often receive from students of the courses is that they can't believe how passionate I am about writing software.

I often go into long rants about how I look back at the code I wrote years ago and ,even though it can make me shudder, I still smile with joy when I think about the experience I had while I was writing the software. I will talk on and on about the importance of being focused, dreaming big, living passionately. Of course there is some technical in there!

(!!!!!IMPORTANT - The following comments are not meant to come off as advertising, whether good or bad!!)
Some comments that often come up during courses are:
-How did you get so good
-Man you are fast
-I can't keep up
-I have no idea what I am doing
-You have not given me enough direction to complete the exercise
-Could you please stop changing the requirements part way through an exercise
-You're presentation style sucks
-You don't cater to different styles of learning very well
-I have no idea what you are talking about anymore

I have cut the list short because the list goes on and on and on. I listed both good and bad feedback above to highlight one important topic. Regardless of a students experience with the course there is no student who, having taken the course, is not able to say the following things:

-He seems to love what he does?
-He seems to not be caught up in the mainstream?
-He does not seem to be worried about trying to keep up with everyone else?

So is it a matter of focus? Partially? Am I driven? Somewhat?

Then what is the big deal???

Long ago I gave up the driver seat of my life to someone who knows way may about things than I ever could. I feel passionate about what I do because a long time ago, someone who demonstrated passion for something else, their love for the Lord, was something that changed my life. My wife was one of those people in high school who would walk up to a complete stranger and ask them the question: Are you saved? Do you know Jesus? This was one of the first questions she asked me having just met me. I was intrigued. Having grown up going to church, I was stumped at the question as I did not have any idea what it meant to have a relationship with the Lord. Aaron and I did not end up dating until the beginning of grade 12. Having witnessed the life of someone living out loud, and not being afraid, or even caught up in the popularity traps that can often snare people going through high school; I decided to give my life to the Lord, and things began to significantly change, I began to change!! I was not in a broken place when I found the Lord, I just knew that I needed Him in my life. The moment that I decided to follow Jesus, I started to change, and my perception of things began to alter as I drew closer to Him.

People often realize that the Nothin but .Net courses end up being much more than just about technology. Lots of people end up feeling empowered, energized (despite the long days), and having a renewed sense of purpose for both their development careers and lives in general. Of course, this is not the way everyone feels, but the important thing to realize is that none of it has anything to do with me at all. My family and I believe that God is using this course as a way to wake people up to the possibilities of what it means to have a rich life in Him; one that is not:

  • caught up in the meaningless comparison traps that bring us no satisfaction whatsoever.
  • driven by desires that do not end up in delivering any meaningful fruit, or leave us with any feeling of accomplishment/peace
  • tossed side to side by the crazy events that can happen in our lives
  • filled with uncertainty about what happens next?

The amount of great opportunities we have had to share the Lord with developers all over the world is amazing, and is the central reason that I believe the course is still going strong.

I Develop With Passion, because I am filled by the One that gives me an unshakable hope for an amazing future, that is promised to all who accept Him into their life!! Even if things in life don't go the way that we would like, there is an unbelievable, incredible, future that awaits all who give up the drivers seat to the One who really knows how to point us in the ultimate right direction!! I Develop With Passion because I want people to ask the question why? So I can point them directly at The answer. It has nothing to do with me whatsoever. I am nothing special.  Jesus is everything.

If you want to read more about what it means to have a relationship with Jesus I suggest you take a look at a fantastic resource: notreligion.com . If you have even the vaguest question, please take the time to read through the site. It could be the most important decision you make!!

Develop With Passion!!

Comments [10] | | # 
 Wednesday, September 09, 2009
Wednesday, September 09, 2009 2:44:00 AM (Mountain Standard Time, UTC-07:00) ( Productivity )

When doing builds with Ruby and Rake, one of the things I often like to be able to do is expanding a set of template files to a set of corresponding files with the appropriate tokenized settings replaced.

Here is an example of a tokenized app.config file (only the important section of the file has been included for brevity):

<connectionStrings>
  <add name="App"
     connectionString="@config_connectionstring@"
     providerName="System.Data.SqlClient"/>
</connectionStrings>

Notice that the only interesting thing to look at here is the @config_connectionstring@ value. This is a value that should be swapped out during the build process with settings specific to the machine the build is taking place on. The place where these settings are defined is in a build specific file named local_properties.rb. Here is a small section of one these files:

require "project.rb"

class LocalSettings
  attr_reader :settings
def initialize
  @settings = {
      :app_config_template => "app.config.xp.template" ,
    #app_config_template = "app.config.vista.template" ;

      :osql_connectionstring => "-E",
      :path_to_runtime_log4net_config => "artifacts\log4net.config.xml",
      :initial_catalog => "#{Project.name}",
      :database_provider => "System.Data.SqlClient" ,
      :database_path => "C:\\databases"
}
@settings[:config_connectionstring] = "data source=(local);Integrated Security=SSPI;Initial Catalog=#{@settings[:initial_catalog]}"

Notice that the goal of this class is to just define a dictionary. These settings indicate values that will be used specific to each machine that is performing a build (which means each machine potentially gets its own different set of settings. To take a file and have it expand out into a file with all the tokens replaced, I wrote a quick ruby class named TemplateFile that looks like the following:

class TemplateFile
  attr_reader :template_file_name
  attr_reader :output_file_name

  def initialize(template_file_name)
    @template_file_name = template_file_name
    @output_file_name = template_file_name.gsub('.template','')
  end

  def generate(settings_dictionary)
    generate_to(@output_file_name,settings_dictionary)
  end

  def generate_to_directory(output_directory,settings_dictionary)
    generate_to(File.join(output_directory,File.basename(@output_file_name)),settings_dictionary)
  end

  def generate_to_directories(output_directories,settings_dictionary)
    output_directories.each do |directory|
      generate_to_directory(directory,settings_dictionary)
    end
  end

  def generate_to(output_file,settings_dictionary)
     File.delete?(output_file)

     File.open_for_write(output_file) do|generated_file|
       File.open_for_read(@template_file_name) do|template_line|
         settings_dictionary.each_key do|key|
           template_line = template_line.gsub("@#{key}@","#{settings_dictionary[key]}")
         end
         generated_file.puts(template_line)
       end
     end
  end

  def to_s()
    "Template File- Template:#{@template_file_name} : Output:#{@output_file_name}"
  end

end

The goal of this class is to just take a named template file and generate it out to one or more locations while making the variable substitution from a provided dictionary of settings. All of these things come together during the build process as follows:

template_files = TemplateFileList.new('**/*.template')

desc 'expands all of the template files in the project'
task :expand_all_template_files do
  template_files.generate_all_output_files(local_settings.settings)
end

All of the template files in the project are grabbed into an array and the expansion happens during the generate_all_output_files method. For special files you can also create a TemplateFile to specifically point at that file and generate it to multiple locations:

#configuration files
config_files = FileList.new(File.join('product','config','*.template')).select{|fn| ! fn.include?('app.config')}
app_config = TemplateFile.new(File.join('product','config',local_settings[:app_config_template]))

task :from_ide do
  app_config.generate_to(File.join(project_startup_dir,"#{Project.startup_config}"),local_settings.settings)
  app_config.generate_to(File.join(project_test_dir,"#{Project.tests_dir}.dll.config"),local_settings.settings)

  config_files.each do |file|
    TemplateFile.new(file).generate_to_directories([project_startup_dir,project_test_dir],local_settings.settings)
  end
end

This makes it a snap to add new project specific configuration files as long as I follow a convention that all new "config" files go into the product/config folder (a build specific folder) with a .[extension].template extension. This way, the new file will get picked up without issue and can have tokenized values in the file easily replaced with machine specific settings.

Develop With Passion

Comments [2] | | #