Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Derik Whittaker

Thoughts on Software Development, .Net, OOP, Design Patterns and all things cool

November 2007 - Posts

  • Source Control, works for code, why not use it for SQL Scripts

    Pretty much any developer with half a brain (or any real world experience) knows that you MUST keep your source code in some sort of source code repository.  There are many of them out there, VSS, Vault, TFS, CVS, SVN, the list goes on.

    If putting your code (C#, C++, VB, etc) into a source control system is considered standard practice, why do shops still not put their SQL scripts into the same source control system.  I know that there really is NO good way to integrate sql IDE's with source control systems, but deal with it. 

    We ran into a scenario yesterday here at work where a proc was changed, but we have no idea why or by whom.  We are do not put our sql scripts in any scs system (against my protests an rants). We would not have this issue if everything was in an scs.

    Can someone tell me why sql scripts are special? 

    Till next time,

  • Things I am thankful for...

    In celebration of Thanksgiving tomorrow, i thought i would list out some of things that i am thankful for in the development world.

    • Open source tools
      • RhinoMocks
      • NUnit
      • StructureMap
      • Reflector
    • The great blogs of the blogosphere
    • Having 3 monitors (sooo much better than 2, trust me)
    • Writing fun meaningful code that helps businesses grow
    • That I am NOT doing classic asp/COM+ (worst week of my life earlier in the year)
    • All the new great technologies that are coming out.

    Thought i would also mention some non-development items as well

    • My great wife
    • My son, being a father is the greatest thing in the world
    • All my friends and family
    • And of course, having my health (kinda had to say this, it is so Clech'e)

     Anyway, have a great Thanksgiving (for all of you here in the states)

    Till next time,

  • Initial thoughts on VS 2008 and .Net 3.5

    As I am sure most of you are aware, Microsoft has released the VS 2008 IDE to MSDN subscribers yesterday.  I decided to give it a download and take it for a twirl.  I thought I would must dump a few random thoughts from my hour or so of 'playing' with it.

    1. It appears to be running MUCH faster.  However, keep in mind I have not opened any large projects in it yet.  And, this is installed inside a new VM running Vista.
    2. Opening VS2005 project/solution files seems to work without a hitch (as it should).  I was able to open up and convert an existing project with no issues.
    3. Automatic properties are kinda cool.  I think this feature will be extremely useful in reducing unneeded code.  But if you do anything in your properties beside get/set values this new language feature will do you no good.
    4. Object Initializes are kinda cool, but I am not 100% convinced of their usefulness.  I am not saying there is NO need for this feature, but I am not really sure what value it adds.  Also, if you DON'T have a empty default constructor, you CANNOT use this new feature.
    5. Extension methods are cool, but I can see this new feature being the singly most abused feature.  Give the man a hammer and everything becomes a nail.

    Anyway, thought I would just share my initial random thoughts on VS 2008.  And kudos to MS, they released a product early for once.  Well, at least early based on the product name :)

    Till next time

     

  • I knew I choose the wrong career choice

    I know this is way off topic, but oh well

    As a software developer I make a nice living, I have a nice house, own a nice car, have money in the bank, I really don't have too many wants.  But I now know I made the wrong career choice.  Today it was announced that Alex Rodriguez is going to re-sign with the New York Yankees for a reported 280 million over 10 years (info here). 

    Anyone that knows me knows I am a huge baseball fan.  I am I pretty sure I could have played pro baseball, if it were not for the height issue (5' 8''), lack of the ability to throw a fastball over 80mph, or that I am not big or strong enough to hit a baseball out of the park.  But aside from that, I could have made it.  Hey look at Marcus Giles, he made it (btw, I am actually a huge MG fan).

    But really, are pro athletes really worth 28 million dollars a season....?  Guess so.  Oh well, maybe in the next life I will make better career choices.  Or, there is always the kid, maybe he can make me my millions. :)

    Till next time,

  • If the code is dead, then bury it

    This post is just a quick rant, brain dump, food for thought or what ever.

    If you ever need to make changes to existing code base, and you need to remove old code.  DELETE IT, don't EVER COMMENT IT OUT AND LEAVE IT FOR THE NEXT GUY (yes, I am trying to yell) 

    I don't know how many times I stumble across dead, commented out code.  And every time I do, I wonder, is this code really needed?  Was it left here for a reason?  Should it be in use?

    I know that when I do stumble across dead, unburied code, I bury it.  If at some point in the future that code is needed again, that is what source control is for.

    This post may appear to be obvious to many, but I still come across this scenario all the time. 

    Till next time,

  • If at first you don't succeed, try/catch it again

    I came across this gem today when I was rolling out an upgrade for one of our legacy web sites. 

    try {
    if(Request.QueryString.Get("skin").Length > 0)
    	sSkinCode = Request.QueryString.Get("skin");
    else
    sSkinCode = GetSiteName();< } catch { sSkinCode = GetSiteName(); }

    Can anyone see what is wrong with this?  Wanna guess where my code is failing?  Hope there is no exceptions thrown in GetSiteName().

    Doh!

    Till next time,

  • Windows Live Writer out of Beta (finally)

    Today I was having an connectivity issue with my Windows Live Writer so I started googling for a solution. I came across the home page for Windows Live Writer, and I noticed that it was finally out of beta.  YEA.

    I would recommend to anyone using this tool (nice tool by the way) to grab the latest non-beta build.  You can find this here .

    Till next time,
     

  • OpenWinForms.com - An open source resource for WinForms controls

    Today I came across a posting for OpenWinForms.com, this is a site that is setup to be a resource for all things WinForms. 

    The site contains various different controls/libraries as well as different articles on how to do cool stuff with .net and WinForms. 

    Check out the site, it looks like it could be cool.  Right now it looks pretty new so there is not much content, but give it time.  I know that will check back the next time I need some cool FREE .net WinForms controls.

    Till next time,

     

  • Chicago MOSSCamp Followup

    Yesterday I spent the afternoon in lovely downtown Chicago at MOSSCamp 2007.  The turnout for this was great.  Actually, there were more people then there was room for (about the only negative on the day). 

    The day started out great.  There was a nice group discussion ranging from the different ways that companies where utilizing MOSS to various 'grips' they had about the product.  After the initial  group discussion completed and lunch/beer was consumed the actual camp began.

    To go along with the main topics, there were multiple breakout sessions throughout the day.  I attended a few breakouts as well as a few general discussions.  The breakouts where great.  The one i enjoyed the most was about implementing InfoPath.  I personally had NO knowledge of what InfoPath was so it was a great way for me to learn. 

    All the presenters were great, they all came prepared and were able to stay on task and complete their topic.

    All in all it was a great camp, I walked away knowing more about MOSS then when I arrived, which was my goal.

    Finally, I would like to say thanks to all the sponsor, Microsoft and especially Clarity Consulting for hosting the event.

    Till next time,

     

  • Failing builds, the sound of silence

    I'm sure that everyone has heard the riddle 'If a tree falls in a forest and no one is around to hear it, does it make a sound?'.  This riddle is all about observation and knowledge of reality. 

    Well, I have a riddle for software teams following TDD. 

    'If a build fails and no-one fixes it, did it actually fail?'

     

    Till next time,

  • Subclassing for Success

    As someone how has been designing and developing WinForms based applications for the past 7+ years, I have learned that subclassing UI controls is a must.  You may be thinking, why would I want to subclass a text box?  Or a combo box?  The answer is simple, the better future proof your app. 

    How many times have you been into the development cycle of your application and you found out that you needed/wanted to extend the text box that is being used.  By extend I am not necessary talking about adding functionality to it, but do something like having the control highlight the entire contents of the control when the it receives focus.

    If you don't have your controls subclassed, extending your control will be a pain in your ass.  Sure you could find EVERY use of the control and add the needed code.  Or you could find and replace your control later with the subclassed control, but both of these suck.

    When I start a new WinForms (same concept should work for Browser based as well) application, I will immediately add a Controls namespace and simply add my subclassed controls.  In many cases I never extend the control, but knowing that I can do so allows me to make better decisions later on. 

    One example of where this has helped me in the past was on a project where about 6 months into development, the business owners decided that would like the UI controls (text box, check box, combo box, etc) to change background color when the control receives focus and then change back when it loses focus.  Because I had everything subclassed i was able to implement this request in a very short time frame and did not even have to open up a single form.  Had I not subclasses the controls I would have either pushed back heavily or it would have taken me much longer to implement this change.

    Another good use is for things like data grids.  Whether you are using the out of the box data grid, or some third party grid like Infragistics or Janus, subclassing can save you a ton.  How many times have you developed an application where you wanted a standard look and feel for your grids.  Say every other line is gray, and there are no selection column.  If the control is not subclassed you are asking each developer to remember to make the look and feel customizations.  But, if it is subclassed, simply add the control to the form and you are done.

    Till next time,

  • Sir, please put the Blackberry away

    This is WAY off topic here, but I just have to say this.  Our society is way too connected.  We have everything from 5 year olds with cell phones and 85 year olds with blog postings.  But sometimes we need to just put the Blackberry down for a 3 minutes.

    A few weeks ago I was in the men's room and another gentlemen came in and stood in the 'stall' next to me.  The problem was that he was going 'hands free' because he was too busy reading and replying to something on his Blackberry. 

    Really, can you not 'disconnect' for 3 minutes to answer natures call?  Do we really need to be reading emails, answering emails, or worse yet TAKING CALLS while going to the bathroom? 

    While I am on this subject, will all you idiots that are texting or surfing the web while driving just please stop.  I really don't care if you kill yourself while doing this.  I just don't want you to kill me or a loved one.

    Again, sorry just had to get this out there.

    Till next time,

More Posts

Our Sponsors

Proudly Partnered With


This Blog

Syndication

News