What happened in 2007
Here the main things that happened in 2007 grouped by month.
January
It’s my last month at my former employee Adrega AS. We’re working hard to get as much as possible done on a new module for our product before I leave. I’m sad to leave, but I think I’ve accomplished a lot as developer and development manager the past 3 years there.
I have my birthday the 8th and I’m just a year from my thirtieth.
February
I start up my career at my current employer Norconsult Informasjonssystemer AS. It’s a soft start, but I eventually get everything up and running and start to get productive on an internal project merging two older applications; Visual Project & GProg ProsjektØkonomi -> ISY Prosjekt Økonomi (project economy). I’ve long neglected a lot of hard core technical topics, but now I’m back in and I start reading technical blogs. I find that they’re a great source for what’s hot. Take a look at my blogroll.
March
Still doing work on ISY Prosjekt Økonomi, I’m mostly doing the administration part. I’m finding it somewhat hard to adjust to my new position, being a peripheral employee in contrast to what I was at my previous job.
April
I’m supposed to get technical responsibility for a new application currently developed by a sub-contractor, but it is in no way finished. So I’m still doing work on the ISY PØ application. I’m getting more involved every day, and I’m doing some interesting work in the core of the application. I’ve stated my interest in development methodologies at work and I’m getting involved with an ongoing quality project. I’m also starting a job making an aggregate installation for the Visual Project product line.
My oldest son turns 3 the 10th, and is definitively growing his own mind by the minute
.
May
Working with ISY PØ most of the time. I’m also involved with another section at work regarding a planning module with a third party tool from Ilog called Gantt for .NET. If I tell it to dance, so it does.
I’m buying a few books from Amazon on development; WCF, WPF, Software factories and some more.
Most of May and June I’m home with my youngest son which is about 9 months old, giving our father-son relationship a real boost.
June
I find myself intrigued by the blogosphere, and I order a web hotel to host a blog.
I’m still mostly changing diapers at home though.
July
It’s a month mostly filled with summer vacation at work.
After a lot of waiting (felt like ages!) my web hotel is around and I start blogging. It’s going slow, but at least I got it out there.
I download my first podcast from .NET Rocks, but don’t listen to it right away.
My wife and I celebrate our 5th wedding anniversary.
August
Things are now rolling at work as I embark on a new development project with some initial analysis and estimation. It was the only thing missing, so I am very pleased with situation at the moment. I’m also guide for two new employees at our section, showing them the out and ins of NOIS and the projects they will start on. They are fresh out of school as MScs.
My youngest son is 1 year old on the 27th.
September
We’re awarded the project we just estimated, and starts up the initial exploratory phase. Deliverables from this phase will be a specification document and a working prototype showing a vertical slice of the architecture and testing its feasibility. I’m also pretty involved with our company’s effort to evolve our development methodologies. My first submission is a guide to source control going a bit further than just check-outs and check-ins; going into labels, branching, merging and general best practices.
I get hooked on podcasts, and I download episodes from .NET Rocks and Hanselminutes continually. My commute is 45 minutes twice a day so I got plenty of time to listen to it. Good thing I have a lot of catching up to do.
October
Now working full time on the prototype, trying some technologies and how they can fit into the big picture. We’re steadily heading towards a smart client solution as a rich and responsive user interface will be crucial. We don’t want any stone unturned, so we’re trying AJAX-solutions and different vendors before we’re going down the Windows Forms-road.
November
We’re settling for the smart client solution, and we’re ramping up the environment (continuous integration ++). We also have our first sprint planning sessions, and project kick-off with all participants.
The wife is 30 years old on the 16th, oh my, she’s old
December
Our first sprint started and we’re developing at full throttle now. We’re going TDD and I find it a very good methodology.
I’ve listened to 114 hours, 20 minutes and 52 seconds of quality podcasts from .NET Rocks and Hanselminutes since September.
We’re celebrating Christmas with my mother and I’m amazed at the all the presents for my sons.
Happy new year!
And good luck with that. 2007 was a great year overall, and I’m hoping 2008 will be just as great.
I’m starting the year adding my blog to the Technorati community. Do place my site in your favourites if you like what you read.
I also have a new year resolution regarding this blog; there will be a post at least once a week.
Phuh… then I’m saved the first week
NUnit swallowed errorcodes
Posted by haugern in continuous integration, cruisecontrol.net, nunit on December 4th, 2007
Update: The header is now in past tense as I figured out a GREAT solution; upgrade from 2.4.1 to 2.4.3!
By accident I earlier today checked in a failing unit-test to our TFS source control. While waiting for the dreaded red light from my CC tray I was about to fix it, when I suddenly discovered…
It didn’t fail the build!
Going through the build report revealed that it did in fact discover the failing test:
I couldn’t really live with that so I started investigating. I tried the following:
- Testing the NAnt-target local on my machine – build successful
- Manually running NUnit with all the same parameters as in the build-file, checking errorcode after run – errorcode 0 (success)
- At least now I know it’s NUnit that is failing
- For no good reason at all I’m just trying the failing test-assembly, leaving the other test-assemblies alone – errorcode 1 (1 failure)
- I’m on to something
- I add another test-assembly that doesn’t have failing tests in it – errorcode 0 (success)
It looks like NUnit forgets the result from the first test, and is just giving me the errorcode from the latest test-assembly provided!
Adding several test-assemblies to a NUnit project however does work correctly.
The solution
I didn’t want to make “static” NUnit project files, so I had to look for answers somewhere else and turned to the NUnit home pages. Earlier searches for errorcodes didn’t bring me to these pages at all, but I started looking around on the site and I found my way into the release notes.
I was using version 2.4.1 from May, and there was a 2.4.3 out from August. I downloaded it, updated my solutions tools folder, and….
It was fixed (the build failed… confused yet?!?)!
So, just to wrap it up: If you’ve been running NUnit 2.4.1 with more than one test-assembly, and your build server is happily saying the build is fine, don’t believe it!
Upgrade to a newer version and find out if your build is still fine .
.Net Collection<T> vs. List<T>
Posted by haugern in best practice, development, dotnet on December 2nd, 2007
Recently, we have gotten a couple of “fresh out of school” employees, and here the other day we went through the code of one of our applications and explained how it was built (at least how was supposed to be or “do as I tell you, don’t do as I do”).
Our O/R-mapper returns a generic Collection<T> when it is asked for a list / collection of some objects, and is consistent in doing so. The question however, was why that wasn’t a List<T>.
I had to admit I hadn’t dug into the material properly, so the question kindof got left there in open air. My bad excuse was of course I had been mostly doing managment stuff lately, and so was my companion presenter as well.
So to make a not so long story short, I had to dig into the collections that is found in .NET, and I explain them to myself for later reference, beginning with the aforementioned Collection<T> and List<T>.
The difference
Just to sum it up, Collection<T> is made for extensibility and List<T> is made for performance. See this and this from the FxCop guys.
For a full blown explanation, a great reference is also found here.
Use List<T> for all your heavy lifting internally, and expose a Collection<T> in your public API.
My first Fluent Interface experience
Posted by haugern in development, fluent interface on December 2nd, 2007
The starting point
A pretty standard API involves a factory and an add-method. In between the New/Create method call, we usually set some properties on the created child object. When we’re done, we add it to the collection of its parent/container. The factory and the parent/container are often collocated. Below is the standard API I had as a starting point.
IRibbonItem button = m_view.RibbonMenu.CreateButton(); button.Name = "Save"; button.Image = GetImage("save.jpg"); m_view.RibbonMenu.AddItemLink(button); IRibbonPage structurePage = m_view.RibbonMenu.CreateRibbonPage(); structurePage.Name = "Standard"; m_view.RibbonMenu.AddPage(structurePage); IRibbonGroup bsGroup = structurePage.CreateGroup(); bsGroup.Name = "BS"; structurePage.AddGroup(bsGroup); IRibbonItemGroup moveButtons = m_view.RibbonMenu.CreateButtonGroup(); bsGroup.AddItemLink(moveButtons); IRibbonItem outButton = m_view.RibbonMenu.CreateButton(); outButton.Image = GetImage("out.jpg"); outButton.Name = "Out"; moveButtons.AddItemLink(outButton); IRibbonItem inButton = m_view.RibbonMenu.CreateButton(); inButton.Image = GetImage("in.jpg"); inButton.Name = "In"; moveButtons.AddItemLink(inButton);
Look at the above code and then tell me you haven’t done it before. Bleh… In the above code I’m setting up a ribbon menu structure (as found in various Office 2007 products). The code is tedious to write, and there’s a lot of it. So what if I tried to wrap the API so I could set up my ribbon menu more elegantly, and how do I do that?
The result
I’m going straight to the point and I’ll show you the resulting code. (Because I’m really pleased with it and must share it!) One thing I additionally might do is to resolve the image implicitly from the name inside the configurator to make the footprint even smaller. Oh, and please don’t get hung up on the literals. I’m trying to get a concept across here, give me a break!
RibbonConfigurator.Configure(m_view.RibbonMenu).With. Toolbar.With. Button("Save", GetImage("save.jpg")); RibbonConfigurator.Configure(m_view.RibbonMenu).With. Page("Standard").With. Group("BS").With. ButtonGroup().With. Button("Out", GetImage("out.jpg")).And. Button("In", GetImage("in.jpg"));
Next time
Some other time I’ll talk some more about Fluent Interfaces, and the makings of my RibbonConfigurator.
Catching up
Posted by haugern in development, learning, personal, technology on November 12th, 2007
In my last post I mentioned that I’ve been doing a lot of catching up on the technology side of things lately, and when I started out reading blogs I quickly realized it was a lot of ?LAs (1,2,3,4,5,.. Letter Acronyms) that I didn’t grasp or understood.
So I made a list of every ?LA and buzzword I didn’t know about while reading (and didn’t need to because of context at the moment), and I’m now at a point where I want to grok’em. I also wrote down things I had heard about or just scratched the surface on, which I wanted a clearer view of.
One by one, I’ll describe them in my own words. I’ll provide pointers to references where I found useful information and I’ll let you in on what detail made me go “Oh, a-ha!”. The list can be found here.
Sources of Software Development learning (About Me)
Posted by haugern in development, learning, personal on September 19th, 2007
I’ve been steadily increasing my knowledge of SD during my career, but just now I found yet another way to squeeze in some more learning.
So I thought I’d share how I’ve been learning earlier and how I’m acquiring new knowledge these days.
The early years
During my college years I was laying the newly discovered internet at my feet. I had a huge interest for the hardware part of computers, and was an avid reader of Tom’s Hardware and Anandtech. This of course wasn’t a drawback as I worked part-time in a local pc hardware shop as technician and seller. So via classical web pages I was ploughing the local hardware fields. I also had a subscription to the Norwegian version of PC World magazine at the time.
As I turned my interest towards programming, we where introduced to the first beta of Visual Studio .NET in one of our college courses and I was hooked. Again I turned to the web for more, and I picked up the occasional Dr. Dobbs Journal.
At the time I also discovered Amazon, where I could find great books on .NET and ASP.NET in particular which I was in love it. I bought Alex Homers first ASP.NET (Wrox) book early on, I even submitted a “bug” in the book and I think it still there on its errata. It seems that Wrox denies the books existence, as they doesn’t have it on their web pages. I guess it was replaced by the Professional ASP.NET 1.0 book from 2002. Anyway, here’s a link to the original BETA book!
Fresh professional
The first flirt with IEEE was during my master thesis, and for quite some time after graduation, I had “forgotten” all about it. We had full access to the vast library from IEEE at the University, I remember I had no idea so much had been written about my specific field of interest, and was amazed at the time.
During my first year as professional I had little or no time to further educate myself except the occasional web-browsing you do during death marches. So my main source of mental income where of course from my colleagues.
Making the leap
I hadn’t been developing professionally for long, before I was promoted way past my level of incompetence. I was suddenly the company’s developer manager and I was terrified at first. So to compensate for my incompetence, I scouted the web again for useful information on how to succeed. At least I had the clear sight to see my shortcomings, and make up for it after the fact, which of course is useful at any given time.
I turned to Amazon again, searching for management books in general, software development management books, etc., you name it. A couple of colleagues had heard about Scrum, so I tossed a couple of books about that into my shopping cart. In my search I also found other books, in particular from Steve McConnell which had gotten great reviews. From there it was just the snowball effect, Amazon makes a great salesperson with all its semantics on its books. I ended up with 10 books, and that Christmas I didn’t do much but read!
So with my hard-earned death march experience, possibly natural management talent, a fresh literature study, and a big pile of beginners luck, my management career was of to a flying start.
My brief encounter with IEEE was at this point also coming back to me, and I applied for a personal membership that same Christmas, and we’ve had an ongoing romance since.
It wasn’t long either, before I found specific websites where I could find useful development management information, tips & tricks, and so forth. Joel on Software was one of the first sites I found, and it was a lucky strike.
Doing more managerial tasks, my interest was turned in that direction. I continued to add books to my collection from great people like DeMarco, Lister, Brooks and Yourdon. My technical reading was not up to speed as I had great confidence in my subordinates doing that for me. I still had to code some, but I was more an organizer, scheduler, project manager and so on at the time.
Time of change
Commuting for a 2+ hours a day can make your day pretty short. And it certainly didn’t get any longer when my second son was born. So I was tempted by an offer from a company closer to where I live. I left the firm I was part of building up, and started fresh in Norway’s largest consultant company in engineering disciplines.
Gone was my manager title, and I was back into the world of {} and ;’s at full throttle. And I went off into the web to get up to speed on the technical side of things.
I browsed the usual suspects (Amazon) and found new books to silence my hunger. The theme of books this time was architecture, design, and construction. I should really mention Martin Fowler, which I got a couple of books from. I was tossed into ASP.NET 2.0 and AJAX development project, so I figured I needed some reference work on that as well.
The present
After just a couple of weeks into my new position, I had turned to a several technically oriented web pages which all had the form of a blog. As I followed even more links from those pages, I figured out the beauty of RSS feeds. It wasn’t all unfamiliar, but now I grokked it and started subscribing to feeds through SharpReader.
I was thrilled, much like when I first saw the IEEE library. There were lots of bloggers out there with great things to say about nearly everything I potentially could be interested in. Here I could really see what the innovators and early adopters where doing in our community. So blogs are definitively a great place for information.
My latest addition in my toolbox of learning is podcasts. I still do some commuting, and what better way to fill that time than listening to interesting people talking about interesting subjects? Well, I’m hooked.
And to sum it up
The most important thing here is to never stop learning. Continuous Learning. That should really be the motto. So, to facilitate that today I use these primary sources:
- Books
- Magazines
- Professional societies
- Blogs
- Podcasts
In a later blog I’ll get more in detail on the specifics in those bullets. Until then; happy learning!
Tuning my writing expectations
I have a writers block. After a couple of blog posts I have a writers block. Isn’t it just sad.
Well, it’s just partially true. I’m not out of ideas or drafts, I have several 90% there. But I’m reluctant to finish and publish them, I’ve come down with what I think is a serious lapse of self confidence.
The last months I’ve been reading up on a lot of .NET related issues. I have found great blogs, written by people I think is the front figures in today’s .NET world (you can see them in my blog roll). These have inspired me to share what I know and to start my own blog, but now I’m being discouraged by the same people because I can’t write like them (yet)!
For a blog to be interesting, the person writing it must know what to write about or how to write about it. If the person knows their way around both issues, you have a blog superstar.
Jeff “Coding Horror” Atwood is one of those superstars, and he recently wrote a blog post about how you shouldn’t be a commodity blogger. I’m certainly not an expert in any field, nor am I a wizard with words, so where do I start?
Atwood says it in the end, it takes an effort. Another superstar and a personal favorite of mine is Joel Spolsky, and from this article I quote:
Writing is a muscle. The more you write, the more you’ll be able to write.
Because if I want to get better, I have to practice. Practice makes perfect is an old proverb that certainly fits the bill. And to practice I have to write this blog, even though it still is a commodity.
The main problem is to live up to expectations, my expectations.
I’m putting myself out there, no filter applied, and I’ll try to speak my mind. I’ll have to face my fears.
And for the rest of you trying to blog about something, Chris Garrett gives us a pat on the back with this post.
Phew… It helped writing this. Maybe one of the other below average posts will reach the public as well after this.
Allways qualify your insert statements
Posted by haugern in best practice, database on July 11th, 2007
An absolute rule for your database insert scripts and stored procedures should be to qualify all field names.
An example could be the following schema:
Where you would have a script saying:
INSERT INTO FAMILY VALUES ('Bob','Dolly','Bill')
Then, you could see the disaster inserting a new field named Girlfriend in between You and your Mom (in more than one way
).
Then you have a schema like this:
Suddenly after your next insert your Girlfriend is your Mom, and your Dad is your Mom!
Well, the one solution to rectify this mess is of course guiding your values into the correct fields like this:
INSERT INTO FAMILY (You,Girlfriend,Mom,Dad) VALUES ('Bob','Julia','Dolly','Bill')
The rationale is then as follows:
- This will assure that if you have changed the schema ie. moved or inserted new fields, the script will not fail or most importantly it will not insert data in the wrong fields.
- It will fail if you have removed or replaced fields which assures that you will not get corrupted data from these changes either.
The agony of registrar change (A registrar change cookbook)
Posted by haugern in annoyances, blog, internet, security on July 10th, 2007
To get this blog up and running I finally took the step of ordering a web hotel. I have long planned to host it myself, but I can’t seem to find the time to assemble the machinery, nor do I find the machinery (in my basement) suitable for the task at hand.
The history so far…
So, last week (Wednesday June 27th) I was browsing the web to find a proper host. I originally wanted a windows host, so I could make my pages in ASP.NET as this is my natural habitat. I had also been looking at some blog-applications for ASP.NET, like Subtext, but it seemed to require a SQL database for storage. And you’re not going to get SQL hosting for free.
The simple solution had to prevail. My one requirement was really that it could host this blog, my technical preferences set aside. Maybe a good chance to brush up my PHP skills, or possibly take a look at Ruby (on Rails)?
OK, so lets get back to the headline. I found a host, www.one.com, which was cheap and seemed to have what I needed. I ordered the smallest solution, got the receipt and I thought I was on my merry way to blogging-land in no time, no time at all….
The steps to change my registrar (for later reference)
intpossibleTripwireCount;
The first thing I had to do was getting the authorization code from my current registrar. As of October 29, 2006, you have to get this for all .COM and .NET domains from your current registrar.
So I log in to my current registrar, navigate my way through to a link called “Get Authorization Code” and click once. Ouch. I can’t do that. Or at least that’s what I’m told, and it is rather cryptic as to why I’m not able to do so.
Scratching my head some, and reading the FAQ tells me that I can try to UNLOCK my domain (did I ever LOCK it?). So I unlock the domain and voila; the “Get Authorization Code” link works. I take the code and enter it into the new registrars system.
possibleTripwireCount++;
After a couple of hours I receive two (seemingly) identical emails from my new registrar telling me to confirm I want to transfer the domain. Looking like it’s a mistake sending me two (still seemingly) identical emails I just reply to the first through a link in the email, confirming I want the transfer to continue. It gets rather late that first evening so I go to bed confident I’ll be able to blog some the next day.
The next day I’m trying, waiting, and trying again to see if the domain has transferred, but it does not seem to have been updated. There’s no indication or status on either registrars, so I turn to the online help at my new registrar.
He asks me if I have confirmed the email from the day before, and even if I had, he couldn’t see the status. As I was leaving, I told him about the mistake with the identical emails. “That’s not a mistake” he proclaims, “if you are listed as both Registered Name Holder and Administrative Contact, you will have to confirm both emails!”
possibleTripwireCount++;
So please make a bigger difference in the emails than just the link to confirm! A simple line saying which role the email was to, or how about telling me so in the topic!
And then I waited for the transfer to really go through (in my imagination anyway), because nothing happened. Ever. Until Sunday, three days after I confirmed the transfer. And what do you know, it’s a INVERSE CONFIRM email from my current registrar. Yet another security instance!
The polite email from my current registrar provides med with a link if want to cancel the transfer. And if I don’t, it will automatically be transferred in 72 hours…. read my lips: 72 HOURS. Hey, where’s the transfer now link?
Well, at least I knew what I was waiting for this time around.
The happy ending
Well, you’re reading my blog now, so the transfer must have gone through one of these days. It took exactly one week from I ordered the transfer until it actually got through.
On a positive note I should mention that I do appreciate that the security surrounding the domain transfer is thought of, but there’s always the classic trade-off between a great user experience vs great security.
Below is a sequence diagram detailing what was going on and in what order. I’ll remember to take a look at it the next time I’m transferring a domain!