in

 

Jason Meridth

There is no spoon
  • How did I get started in software development?

    Thanks for tagging me Joey.

    How old were you when you started programming?

    I was 11 years old (6th grade) when I started using QBasic to make easy games.  I actually knew about the easter egg that showed the developer names.

    What was your first language?

    Like Joey I used to write basic apps with QBasic and even mimicked a Windows Blue screen for fun.  I also used to code my TI calculators for games  when I was bored.  Pascal was my first third generation language for school and then hopped to ANSI C and C++.  Java and C# followed.  Python and Ruby are my new study items.

    What was the first real program you wrote?

    Mentioned above .  It was games written in QBasic.  For friends and family.

    If you knew then what you know now, would you have started programming?

    Most definitely.  This is one of those industries where you get to learn about other industries.  You get this because you write software for them. :)

    If there is one thing you learned along the way that you would tell new developers, what would it be?

    The easiest answer is to go read "Pragmatic Programmer" by Hunt and Thomas, then go pair program with someone with Agile (Scrum/XP) experience.  I'm not trying to start an Agile flame war, but in my personal experience it works.

    What's the most fun you've ever had ... programming?

    The current team I'm on successfully wrote an internal web app for our mortgage company, with 6000+ unit tests, pair programming, continuous integration, and other little goodies.  The best part: project finished ahead of schedule, under budget, with zero defects, and a VERY happy end user.  That is fun.  Lasted almost a year.

    The poor saps that I'm tagging?

  • Getting VMWare server working on Ubuntu 8.04 (Hardy Heron)

    I had some slow issues with Virtual Box, which I've heard have been fixed.  I'm heading back down the VMWare path and did some research first.

    I found this post and tried it out.  It worked great.  My VMs are moving at my required speed now.  The latest version of VMWare 1.06 still requires some bash shell work.  This post gets you setup good.

    I'm running Virtual Studio 2008, Re# 4.0 (latest nightly build), and a couple other apps. 

    Using virtual machines have become the development de facto.  I'm finally getting back into the grove with ASP.NET MVC and some ExtJS stuff at work. (THANK GOD).  We've brought in the latest Rhino Mocks (3.5) and Castle Windsor.  Fun stuff ahead.  

  • xkcd2 - someone is wrong

    Who was I thinking of when I read this?  Oh, there are so many people. (mouse over for alt text, funny also -- you do this with all xkcd comics) 

     

  • xkcd - ubuntu, python comics

    If you don't currently read xkcd.com, you should be.  It has some mushy lovey dovey junk in it sometimes, but the python references and open source references are hilarious.

    Today's comic: (mouse over for the Ubuntu reference)

    One of my other favs:


  • Ubuntu 8.04, VirtualBox, and USB support

    UPDATE: Make sure your user account is a member of the vboxusers account.  VirtualBox will not start and the error will tell you this, but just want to be explicit.  You will have to logout and log back in.

    I recently upgraded my Ubuntu to the latest version, as mentioned in a previous post.  I'm very excited about it, due to greater support for hardware items that I've had to fight battles with (one of the many reasons people won't make the switch to Linux).  I upgraded to Hardy Heron and then upgraded VirtualBox when prompted.  It was a fatal hardware recognition mistake.  As soon as I booted back up after a restart, I didn't have sound, wireless, etc. 

    After just not being in the mood of going down the road of trying to get the hardware re-recognized, I reloaded and di my research on the virtualbox upgrade.  It seems to be a known issue on the ubuntuforms. 

    I looked through the forums and got educated on a few things about the ose (open source edition) versions of VirtualBox.  1. no usb support (I will update if I'm proved wrong). 2. the new ose kernel modules hose toshiba satellite hardware detection (at least on my laptop).

    To get the gutsy non-ose version of Virtual Box, add this repository to /etc/apt/sources.list:

    deb http://www.virtualbox.org/debian gutsy non-free

    then in a terminal:

    apt-get update
    apt-get install virtualbox

    if you get a host key issue, the do the following:

    go get the public key.. go to this website and it'll have the key there just right click anywhere in the page and go to save page as then save it to your home directory preferably.

    http://www.virtualbox.org/debian/innotek.asc

    Now to add that key run...

    apt-key add innotek.asc
    apt-get update
    apt-get install virtualbox

    This will give you the gutsy version that I've worked with and have had no problems with.  The bonus is that you get USB support. 

    I will get back to code posts next.  Just want to share the knowledge with other Linux users. 

  • MSDN - can't download with firefox

    UPDATE: I'm on Linux.  Getting this to work on Windows is simple enough, just like James mentions in the comments. Thanks. 

    I'm writing this, because it's about the 5th time I've had to use my Windows box or VM to get iso files from MSDN.

    <rant>

    I understand, in a business manner, why Microsoft won't allow downloads from Firefox at MSDN.  I work for a company that was kind enough to give me a MSDN license.  I've used it a great deal to get software like Vistual Studio 2008 and SQL Server 2008 recently.  I also use it for the iso files I use in my VMs.  I recently had to download Vista again and from Firefox the specific items I want (the checkboxes in MSDN's new Silverlight UI) are grayed out.  COME ON!!!!!

    I use Firefox more than I use Internet Explorer.  And before, you non-Linux users tell me about the IE tab plugin for Firefox, let me remind you that you still have to have iexplore.exe on your PC.  Linux doesn't have it (and shouldn't).

    I like where Microsoft development teams are going recently (Guthrie, Haack, Conery, etc), but the MSDN team needs to wake up and open the ability to download items via Firefox.

    If someone out there knows a way to do this with Firefox, I will update this post and eat some humble pie.

    </rant>

  • Ubutnu 8.04 (Hardy Heron) after upgrade - I have complete sound!!

    UPDATE: Do not upgrade your virtual box install.  Stay with the Gutsy version if you already have it.  If you are just installing Hardy Heron from scratch, I will have a post in a little bit and link to it here about how to ensure you get the correct version.

    In a previous post, I shared the pain of getting sound working on my Toshiba Satellite laptop with prior versions of Ubuntu.  It has been off and on for a while and I've even resorting to recompiling my kernel to get it to work (no luck).  After upgrading to Hardy Heron today and restarting, I heard the wonderful drum sounds you here when Ubuntu loands.  YIPEE!!  I just logged in and finally got to watch some of the CodeBetter screencasts on the Seattle conference on my laptop without having to use my Windows VM.  For some reason, when I plugged headphones in and used my Windows VM, I got sound.

    I also got the latest beta of Firfox 3.0.  Wow.  My del.icio.us plugin was not compatible, but I did find the Shareaholic plugin that lets you post to Twitter, Facebook, Reddit, Digg, Del.icio.us, etc.  Nice.  A few special effects also.

    I noticed that the OS also has indexing in place now, so you can search for programs like you do with Vista.

    There are other new features that I'm excited about, but will use them in greater detail before I blog about them.

    Don't get me wrong folks.  Microsoft pays my bills with the day job, but I like Linux for personal reasons (oh and it's free).  Just want to share in case anyone is thinking about switching or is currently using and hasn't upgraded. I finally got my Vista VM up and I'm working in IronPython again.  I plan to post on that soon.

    I'm just very happy my sound is working flawlessly.

  • Ubuntu 8.04 came out today (Hardy Heron)

    Download here

    Feature List and a little more detail here

    I'm currently on Gutsy Gibbon (7.10), the previous version.  I'm upgrading after I post this.  I'll update this post afterwards.

    Also, for all you hesitant Linux users out there, on this version of distribution you can get the iso, create a CD and put in your windows box and install Ubuntu like a Windows application.  This tool is called Wubi.  This will let you see what Linux has to offer. 


    Also, if you haven't, go check out Virtual Box, so if you decide to make the switch, you can still have your Windows fix for pleasure or development in a nice VM.

     

  • Multi-processor builds with MsBuild

    I use a mixture of NAnt and MSBuild and the following was very interesting.

    Scott Hanselman posts about using multiple processors to build solutions. 

    If you are not subscribed to Scott's blog, you should be.  Also check out his tools list that he does every year.

     

  • Bil Simser's elevator question

    Bill recently posted a question to the nerd community about, "...if you were stuck in an elevator with 2 other nerds, with no technology at all, who would you like the 2 other nerds to be?"

    I may be a little late on this one since I am finally catching up on my blogs, but mine would be Linus Torvalds and Oren Eini (Ayende).  Linus to just meet him and Oren to learn from him.

    The comment from casey on Bill's post was hilarious.  Anders + Oren and the mentioning of internals. Let bloodbath commence. Lulz. 

  • How to install Twhirl on Ubuntu (7.10 Gutsy Gibbon)

    Update: I jumped the gun and I thought I'd never have to say this about Linux, but you may have to reboot after the install.  I lost all title bars on all windows after the install.  After reboot, they came back.  Glad I didn't have to go down that rabbit hole. 

    Get the new Adobe Air (Alpha) download for Linux from here.

    Go to where you downloaded it and type the following, to install it:

    chmod +x  adobeair_linux_a1_033108.bin
    ./adobeair_linux_a1_033108.bin

    Go download Twhirl from here:

    I let the adobe air installer take it and let it install in the suggested folder (in case there are any dependencies on the air libraries that I don't know of).

    Last install screen will ask you if you want to start Twhirl up.  Do it!  Enjoy!!

    I'll update this post if I have any issues.

    Check me out on twitter at http://www.twitter.com/jmeridth 

  • PTOM: Single Responsibility Principle

    The Single Responsibility Principle

    This post is about the first letter in Uncle Bob's SOLID acronym, Single Responsibility Principle, and a continuation of The Los Techies Pablo's Topic of the Month - March: SOLID Principles.  Sean has already posted on this, but I'd like to "contribute".

    Note about the SOLID acronym and this blog "storm":
    This "principle" is more or less common sense, as are most of the other items in the SOLID acronym.  I like the idea of this series because I personally have interviewed with companies who would ask about possible code scenarios and I respond with one of these principles or one of the GOF patterns and they look back at me with a blank stare.  I know these are just labels, but if they can reduce the miscommunication possibilities and start standardizing our industry, I'm all for it.  I know some of the new ideas and labels out there are still being hammered out (i.e., like the BDD discussions as of late), but that is part of the process and what has to happen in such a young industry like ours.

    Single-Responsibility Principle (SRP):

    A class should have only one reason to change.

    A good anti-example is the Active Record pattern.  This pattern is in contradiction of SRP.  A domain entity handles persistence of it's information. (Note: There is nothing wrong with using Active Record; I've recently used it on a quick demo site and it worked perfectly)  Normally, you would have a controller method/action pass a "hydrated" entity to a method of a repository instance.

    Like my favorite quote says:

    Talk is cheap, show me the code ~ Linus Torvalds

    let's look at some .NET code.

    Anti-SRP (Active Record)

    Imagine you have a User entity that has a username and password property.  I'm using the Castle Active Record libraries for this example.

     
       1: using System;
       2: using Castle.ActiveRecord;
       3:  
       4: namespace ActiveRecordSample
       5: {
       6:     [ActiveRecord]
       7:     public class User : ActiveRecordBase<User>
       8:     {
       9:         private int id;
      10:         private string username;
      11:         private string password;
      12:  
      13:         public User()
      14:         {
      15:         }
      16:  
      17:         public User(string username, string password)
      18:         {
      19:             this.username = username;
      20:             this.password = password;
      21:         }
      22:  
      23:         [PrimaryKey]
      24:         public int Id
      25:         {
      26:             get { return id; }
      27:             set { id = value; }
      28:         }
      29:  
      30:         [Property]
      31:         public string Username
      32:         {
      33:             get { return username; }
      34:             set { username = value; }
      35:         }
      36:  
      37:         [Property]
      38:         public string Password
      39:         {
      40:             get { return password; }
      41:             set { password = value; }
      42:         }
      43:     }
      44: }

    As you can see you use attributes to dictate how your properties map to columns in your database table.  Your entity name usually matches your table name, when using just the ActiveRecord attribute with no explicit table name (i.e., [ActiveRecord("UserTableName")]. 

    To save the user you would take an instantiated user and just call user.Save();  This would cause an update to fire if the user instance had identity (aka an Id) and insert if it did not.

    Translation to SRP

    What I would normally do is have an architecture like the following:

    image

    The UserRepository would be used by a web controller (I use monorail for my web projects), being passed a User instance, and Save(user) would be called.

       1: using System.Collections.Generic;
       2: using Castle.MonoRail.Framework;
       3: using SrpPost.Core;
       4: using SrpPost.Data;
       5:  
       6: namespace SrpPost.Web.Controllers
       7: {
       8:     [Layout("default"), Rescue("generalerror")]
       9:     public class UserController : SmartDispatcherController
      10:     {
      11:         private readonly IUserRepository userRepository;
      12:  
      13:         public UserController(IUserRepository userRepository)
      14:         {
      15:             this.userRepository = userRepository;
      16:         }
      17:  
      18:         public void Index()
      19:         {
      20:             RenderView("userlist");
      21:         }
      22:  
      23:         public void Save([DataBind("user", Validate = true)] User user)
      24:         {
      25:             userRepository.Save(user);
      26:             Flash["LoginError"] = "User saved successfully.";
      27:             RenderView("userlist");
      28:         }
      29:     }
      30: }

    So, what it boils down to is that the user class now knows nothing on how it is persisted to the database.

    SRP is one of the hardest principles to enforce because there is always room for refactoring out one class to multiple; each class has one responsibility.  It is personal preference because class explosion does cause some people to become code zealots.  One of my other favorite quotes lately is:

    Always code as if the guy maintaining your code would be a violent psychopath and he knows where you live.

    Enjoy!

  • ReSharper 4.0 Nightly builds

    I just recently found out about this, and may be late on the band wagon, but you can download the ReSharper 4.0 nightly builds for free.  They last ~15 days, so you will have to uninstall the build you have and then install a more recent nightly build.

    Get the builds here.

    JetBrains does not guarantee any of the builds, but I have yet to find any issues with the current keystrokes that I use.

     

    Thanks Joe and Nelson for the information.

  • Goodbye HD-DVD

    As a "computer guy" I am always asked about everything technical.  One of the latest most popular questions has been, "Should I get an XBOX 360 or Playstation 3?".  My answer as of late has been, "Which one do you like more: Halo or Blu-ray?".  I personally purchased a 360 because I love to play Halo.  If someone is purchasing it for the ability to play HD DVDs then they should get a Playstation 3.

    The reason for this goodbye gesture is that Microsoft has stated they will be discontinuing the HD-DVD add-on device for the XBOX 360 as your can read here. 

    I think everyone knew this was coming around the corner, but when MS jumps ship you know that VHS has beaten Beta, oh I mean.....Blu-ray has beaten HD-DVD. 

  • NAnt and .NET 3.5

    I recently started a personal .NET 3.5 project (finally learning the ASP.NET MVC architecture) and noticed when I tried to migrate an old NAnt build file over and run the automated build it died.  The main reason was because when I call out to msbuild to build my solution it uses the nant.exe.config file to call the msbuild.exe file in the current designated framework path (i.e., C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\msbuild.exe).  Well, that won't help because .NET 3.5 solutions can't be compiled by the .NET 2.0 msbuild.exe.

    NAnt 0.86 Beta1 supports .NET 3.5.  So for those of you, using NAnt for your automated builds, and compiling .NET 3.5 solutions, hope this information helps.  If you're concerned that it's a beta, then read the following from their site:

    "This release focuses on extending our already strong support for multiple target frameworks, bringing improved flexibility and performance."

    I know you can use csc and compile the solution that way, but it doesn't read as nicely as a msbuild target call. :)

    Does anyone have any other workarounds?

More Posts Next page »
Copyright Los Techies 2007. All rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems