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

Jean-Paul S. Boodhoo

Develop With Passion

July 2007 - Posts

  • Calgary Open Source Group is founded

    Just got an email from Manoj Khanna informing me that he just completed the creation of the Calgary Open Source Group. The goal for this group (as stated on the site) is simple:

    “Calgary Open Source Group (COSG) is a forum that promotes the spread of Open Source Software and Free Software culture in Calgary. Through lively debate/talks, presentations and interactive network events, COSG aims to showcase the potential of open source software development and the impact it may have on software engineering for companies based in the oil city. “

    It is too early to tell what impact that this group will have on the Calgary community. Currently I am member number 2!! I am hoping that number will grow over the course of the next couple of months. I am definitely excited about the prospect of increased awareness about the use and application of open source software for more projects being run in the Calgary area (and elsewhere).

    This is a time where projects all over the world have realized the benefits at looking at the Alternatives that are being offered by the open source community. People are slowly starting to realize that there actually is less friction involved when looking at many open source offerings compared to their heavyweight counterparts. If nothing else, it is always good to be aware of other options and approaches to tackling the problems that you encounter in your project.

    I hope that this group will help fuel some debate among the developers in Calgary who are both for and against Open Source development. As long as defenses do not go up, conversation is one of the quickest ways to expand your mind to possibilities you may not have even thought of!!

    Posted Jul 16 2007, 06:56 PM by bitwisejp with no comments
    Filed under:
  • Nothin But * Courses Coming Your Way

    This year has been an awesome year for allowing me to venture into the training arena. Although I am not a full time trainer (nor do I ever intend to be), I have greatly enjoyed taking a week out of my schedule once a month this year to deliver top tier Agile development training to students all over the US and Canada. For the remainder of the year I will be blessed with the ability to take the course offerings globally with my first course in England scheduled for September.

    My focus this year has been on delivering – Nothin But .Net. An intense 5 day course that stretches people to think outside the box of how they typically program and delve into realms they have potentially not event thought about yet:

    • Behavior Driven Development
    • Applied Object Oriented Programming
    • Incremental Design
    • ……

    I have greatly enjoyed delivering this course, but feel that it is time to throw some other course options into the fray. With that in mind, here are “some” of the courses that people will be able to request (on demand) for the 2008 calendar year:

    • Nothin But Agile Project Management***
    • Nothin But Virtual Wizardry***
    • Nothin But Build Automation
    • Nothin But An Introduction To Unit Testing
    • Nothin But Test Driven Development
    • Nothin But Domain Driven Design
    • Nothin But Windows Presentation Foundation
    • Nothin But Windows Communication Foundation
    • Nothin But De-mystifying Design Patterns
    • Nothin But Developing With Open Source Frameworks (NHibernate,Monorail,Windsor ….)

    It should be noted that not all of these courses are 5 day bootcamps.

    This is just a small sample of the offerings, and if your company is in need of training that is focused around a particular application that you are going to be (or are currently) building, all of the courses are completely dynamic and able to adapt very quickly to the needs of the students. I am about a week away from finishing my full blown web site where information on each of the courses will be explained in detail, and where you will also be able to request course offerings that you would like to see.

    I am going to be collaborating with people over the next year to offer up a wide group of trainers who all exhibit the values and skills that I would expect of someone able to teach a Nothin But * course. Know that when you engage in one of these courses that your minds will be pushed to the limit for the entire duration of the course.

    Being first and foremost a developer, I am still going to be only committed to teaching a course a month so that I can continue to “sharpen the sword” during the remaining weeks of the month. Leveraging collaborators will allow more people to get exposure to what I feel is pivotal training that can completely change your development career, it will also allow more courses to be offered over the course of the year than what I could offer on my own.

    Spread the word, Nothin But * is coming your way!!

     

    ***I am fairly excited about these courses as there is a huge need for some de-mystifying around these areas.

  • Simple Patterns for Simple Problems

    James Kovacs and I are presenting at the Calgary .Net User Group Thursday, July 19th 2007. The session is called : “Simple Patterns for Simple Problems”. Here is the abstract:

    Everyone has that little (or not so little) class called Utility that holds all kinds of intersting bits of business logic. It is a hodge-podge of code that you're not sure where to put. This session will examine some common types of methods found in utility classes and how to refactor your design using simple patterns to eliminate these troublesome kitchen-sink classes.

    Location:
    330 - 5th Avenue SW, T2P 0L4
    Calgary AB Canada
    Conference Room CP1-1106
    (the elevator will be open to the floor between 11:30 and 12:00 so no security pass will be required)

    I think that the presentation should be a lot of fun, and I think there will be lots of information that people will be able to glean from the patterns and techniques presented.

    If you in Calgary on that day, register for what promises to be an interesting topic.

    Develop With Passion!!

  • Leveraging the EventHandler<T> delegate more effectively

    If you are now coding in .Net 2.0/3.0/3.5 and are creating types that expose events. Chances are you have started leveraging the EventHandler<T> delegate that frees you from creating custom delegate signatures for events anymore. If not this post is for you. Let’s say that you want to expose an event that another object could consume. Normally you would follow these steps:

    1. Create a type that inherits from EventArgs if the event is going to propagate event specific data. This step is optional as you may not have any custom data to propagate.
    2. Create a delegate signature for the event. If you are not using a custom EventArgs derivative, then you can get away with just leveraging the EventHandler delegate that already exists in the framework.
    3. Create the type that is going to raise the event and have it declare the event using either implicit or explicit event registration.
    4. Create a method on the type that will raise the event.

    In .Net 2.0/3.0/3.5 these steps can now become:

    1. Create a type that inherits from EventArgs if the event is going to propagate event specific data. This step is optional as you may not have any custom data to propagate.
    2. Create the type that is going to raise the event and have it declare the event using either the EventHandler delegate type for an event that does not propagate custom data, or leverage the generic EventHandler<T> delegate to declare an event bound to the specific EventArgs derivative you need to use. Again you can use either implicit or explicit event registration.
    3. Create a method on the type that will raise the event.

    This can actually become slightly better. Instead of always creating a class that derives from EventArgs if you need to pass custom data; create a parameter object that encapsulates the information you would want to propagate in the event. This class does not need to inherit from EventArgs. Then create the following utility class:

     

    public class EventArgs<T> : EventArgs { private T eventData; public EventArgs(T eventData) { this.eventData = eventData; } public T EventData { get { return eventData; } } }

    This means that the 3 steps above can now be changed to:

    1. Create a parameter object that encapsulates any information you want to propagate in the event.. This step is optional as you may not have any custom data to propagate.
    2. Create the type that is going to raise the event and have it declare the event using either the EventHandler delegate type for an event that does not propagate custom data, or leverage the generic EventHandler<T> delegate, with the generic EventArgs<T> class to declare an event bound to the specific parameter object you need to use. Again you can use either implicit or explicit event registration.
    3. Create a method on the type that will raise the event.

     

    So if I had a parameter object that looked like this:

    public class ReportingPeriod { private DateTime start; private DateTime end; public DateTime Start { get { return start; } } public ReportingPeriod(DateTime start, DateTime end) { this.start = start; this.end = end; } }

    I would be able to create a type that raises an event to propagate this data as follows (using implicit registration):

    public class ReportTrigger { public event EventHandler<EventArgs<ReportingPeriod>> RunReport; }

    Or using explicit registration:

    public class ReportTrigger { private EventHandler<EventArgs<ReportingPeriod>> subscribers; public event EventHandler<EventArgs<ReportingPeriod>> RunReport { add { subscribers += value; } remove { subscribers -= value; } } }

    Develop With Passion!

  • DateTime Formatting with single custom format specifiers

    I may be the last one in the .Net world to find this one out!! Say you wanted to execute the following string format statement:

     

    return string.Format("{0:MMMM} {0:d}-{1:d}, {0:yyy}", start, end);

    The result of that format command would be: January 1/1/2007-1/7/2007, 2007. This is obviously not what I was expecting. In order to specify a single character format specifier I have to use the following:

     return string.Format("{0:MMMM} {0:%d}-{1:%d}, {0:yyy}", start, end);

    Which results in the following output: January 1–7, 2007 (which is what I wanted).

    Notice the use of the % format specifier prior to the single digit day format specifier. That is what I was missing. If you want to know more about how this works check out the documentation here.

    Develop with passion!

  • dasBloggers' Put Your Design Hat On

    In the spirit of promoting more community involvement around dasBlog, Ben Scheirman is hosting a contest to see who can come up with the coolest theme for dasBlog.

    As well as the winner walking away with a $100, this contest can serve as a good introduction to the way that dasBlog implements its skinning architecture.

    If you are feeling artistic, or you are in need of some cash to buy a new book, spend a couple of hours and get your theme submission into the contest.

    Happy designing!!

    Posted Jul 08 2007, 01:25 PM by bitwisejp with no comments
    Filed under:
  • Late Speaking Announcement

    Dave Laribee and I will be giving a talk titled – You Got Served : Ping Pong Pairing, at the Oklahoma code camp on July 28th. I am pretty pumped about this session, and you can expect that Dave and I will be bustin out some ReSharper madness and Domain Driven Design goodness right before your very eyes!!

    There are lots of good speakers who are going to be speaking at the code camp, so the event promises to be very interesting. If you happen to be in the area, come check out what promises to be a great day of coding.

  • Update - (Taking a short break from)Typing With The Datahand

    As you can see from the title. I am currently not using the datahand to type right now. This is due in large part to the immediate needs of a client and my personal frustration with going from being able to type fairly fast on a natural keyboard to not very fast at all on a DataHand.

    During the 2 weeks that I used the DataHand, I personally found the learning curve to be fairly low. In fact, the need to not have to reposition your fingers around the home row keys was a big plus. If you are a fairly proficient touch typer, you would probably have no problems making the transition to the datahand. I think it would be even more beneficial if you are not already a fast typer, as I think that in the long run, the speed improvements to be gleaned from the datahand far outweigh what you could gain from regular keyboards on the market.

    I was hoping that the DataHand would be able to become a mouse replacement for me also. Alas, the mouse on the datahand is pretty weak, and I think I would still resort to reaching for my mouse at the times that I absolutely had to.

    An interesting experience using the DataHand came into play when I had to switch to using studio combined with ReSharper. The keyboard shortcuts definitely took less effort to pull off. It did require me to remember to “mode switch” in order to be able to pull off certain refactorings and navigation. I think it will take a bit of time to make this “mode switching” automatic.

    It was ultimately the slowdown inside of studio that caused me to switch temporarily back to a natural keyboard, as I am unfortunately in a heavy delivery mode right now.

    The effort involved to operate the keyboard is definitely much less than any keyboard I have ever worked on. Your wrists and hands will feel the difference almost immediately.

    One other big negative that I had not even counted on was the actual size of the unit. It is fairly beefy. I currently tote my natural keyboard with me wherever I have to type. Granted, it is not the smallest of keyboards, but it is slim and can fit nicely into a suitcase or backpack with no problem. On the other hand, the DataHand is a fairly bulky unit. Just a little wider than a natural keyboard, but considerably thicker. Unhooking this, and transporting it between work and home is a little annoying (which is why I have 3 natural keyboards, one at work, home, and one for presentations). Obviously, having more than one DataHand is a little ridiculous from a price perspective.

    There is one last final negative that I have to mention, one that I did not even think about. There are lots of times in the morning, when I am working from home, when our youngest son runs into my office and wants me to hold him on my shoulder. This leaves me with one hand available to type. On any regular keyboard, you can get away with pecking away at the keyboard to get some stuff written down, this is not really the case with the datahand. To use it, you really need to have both hands available. I know this is of little concern to most people, but it is one of those little details that I did not even think about.

    I am going to take some time off from work near the end of the year, to truly immerse myself in the datahand unit. Where I can devote a full 2 weeks to learn the device well without the pressures of deadlines looming. If you are thinking about buying this device, you need to be sure you have the time to allow yourself to get comfortable with it. Because I spent 2 weeks completely isolated to the DataHand, I got an opportunity to learn it without confusing myself. This allows me to go home, and do the practice exercises on the unit without getting confused between my natural keyboard and the unit.

    I would strongly recommend the DataHand as an alternative to the regular keyboards that are on the market. You just have to keep in mind the caveats that I listed in conjunction with the rampup time required to get proficient with the device.

    Posted Jul 06 2007, 09:35 AM by bitwisejp with 16 comment(s)
    Filed under:
More Posts

Our Sponsors