Development comments edit

I hear lots of stories about how designers and developers can’t get along. Personally, I don’t get it. I love our web designers. They do something I can’t. I don’t do pretty. I can design a user interface and make it functional, but that’s not enough. Our designers can turn that around and make it gorgeous. We complement each other, and I try to take care of them whenever I can.

So when we made the leap from self-hosted Subversion to Kiln-hosted Mercurial, I wanted to better integrate our designers in the development process. I wanted them to have the same advantages of version control that I, as a developer, was accustomed to. And I really wanted to put an end to opening directories and finding “default.aspx”, “default - Copy.aspx”, “default - Copy (2).aspx”, etc.

The problem with Mercurial is that it doesn’t work too well for web designers that don’t have a locally hosted webserver on their workstation. When testing a bunch of CSS changes, an “edit, save, commit, push, refresh, check, repeat as necessary” workflow does not work. Designers need to be able to modify files on a shared design webserver where they can preview their changes immediately and then commit when done with a task.

Additionally, the designers only need access to the website directory, and attempting to do a 3-way merge makes them run for the hills. And why wouldn’t it - I don’t even enjoy that.

So like most developers, I figured there must be a way I can fix this problem with software.

Read more →

Development comments edit

By default, NServiceBus uses Fluent NHibernate to persist saga data to either a SQL or SQLite database. With its plugin architecture, it’s relatively easy to swap out different parts with your own implementations, but it’s not always completely obvious how to go about it. In this article I will attempt to illustrate an attempt to do just that. It may not be perfectly generalized code that could be included in the NServiceBus codebase, but I believe it gets the job done.

Read more →

Development comments edit

Since Generics were first introduced with .NET 2.0 I have had a utility method I used to batch a list into smaller lists of a fixed size, usually to batch up a bunch of database inserts into manageable groups of 10 or 25 or so.

Today I needed to do the same thing except I will be dealing with a potentially VERY large data set with some fairly complex computations built in. Forcing it all into a list and batching the list means I will have to hold all of that garbage in memory.

So I started looking for a LINQ implementation that would deal with only one batch at a time and keep the memory footprint low.

Read more →

Development comments edit

Note: Thanks to a suggestion from Asbjørn Ulsberg, I have made this source code available as a GitHub repository. As I wrote it, it’s really a single-use tool - it even has my user path hard-coded. Please feel free to fork it and add whatever you like!

My wife is an incredibly talented woman. While she’s not working her day job at a magazine publisher, she makes and sells fondant-covered cakes, cupcakes, cookies, and other goodies. Let me tell you how difficult it is to try losing weight when there are constantly cake scraps lying around!

If you live in the Twin Cities area or are just plain curious, check out her website, Sweets by Natalie Kay. Some of my favorites: a Chocolate Cherry Chip Transformer Cake, and this Mario-Kart inspired birthday cake.

Her site is a WordPress blog that she started out its life hosted on wordpress.com, which is nice but doesn’t give a lot of flexibility over themes and layout. When she wanted more flexibility, the task of converting the content to a different hosting provider fell to the family IT director.

WordPress contains export and import functionality, but a problem quickly emerged. WordPress.com adds width and height parameters to the querystring of images that are embedded within post text, which are intercepted by a handler that resizes the image to those dimensions before serving it to the client. However, the export file contains the URLs of the full size image.

My wife captured these images with her 10-megapixel D-SLR camera. These are not small files. The images (2-4 MB each) would load at a crawl, slowing down the entire page.

Programmer husband to the rescue! It’s nice to be needed.

Read more →

Development comments edit

Yesterday Scott Guthrie wrote about the new “code-first” data access paradigm that Microsoft has released as an update to the Entity Framework, in his blog post with the same name as this one. (So I’m lazy!) I read it and was blown away. The speed, power, and elegance that this solution provides now (and will provide in the future after it matures out of CTP) looks like a big win for developers all over, but of course I had to download the bits and put it through its paces.

Read more →

Technology comments edit

Even though I’m a Windows-based developer, I grew up the son of a teacher and an Apple fanboy. While I like to think I’ve become more balanced since my youth, I still remain a fan of their products. My wife has a MacBook Pro which makes my Dell laptop jealous, and I love my iPhone to death.

When Apple announced the iPad, like many my reaction was along the lines of “OK that’s cool, but what do you use it for?”

I still haven’t bought one, but little things I hear keep inching me closer to the inevitable point where I’m sure I will break down and buy one.

My wife and I have friends who own one, and say it makes a great living room computer. The iPhone, while handy and always nearby, still isn’t big enough for some things, and the iPad gives you that real estate for casual web surfing and blog reading on the couch.

And now Scott Adams, creator of Dilbert, has bought an iPad, and I think he sums it up perfectly:

A regular laptop is like your boss: always making you wait before giving you busy-work assignments. The iPad is more like a punctual lover. It’s always ready for fun.

Check out Scott’s full post: The Amazingness of Instant.

Technology comments edit

I recently saw links to these two videos (one pro-HTC EVO, the other pro-iPhone) from several members of my Facebook network, and had a curious sense of déjà vu.

Warning: the videos contain language you may not necessarily want your children to hear.

While these vids are kind of funny to watch, I was instantly teleported back across time and space to about a decade ago to the height (at least, in my experience) of the Mac/PC flame war. Mac users were stupid because you couldn’t do anything for business or run Word. Windows users were stupid because their computers couldn’t do graphics and were soulless idiot boxes that couldn’t handle file names longer than 8.3.

Read more →

Development comments edit

I know a lot of us are using the LINQ OrderBy() method to get our data shuffled in the right order, but on occasion I still do like implementing IComparable, especially when defining the default, intrinsic sort scheme for a particular class.

What I don’t like is implementing IComparable when I want to compare on more than one thing.

I don’t like this kind of code because the engineer in me balks at essentially doing each comparison more than once, first for equality, and then for direction:

Read more →

Development comments edit

On my team, we use FogBugz for case/defect tracking and project management, and we absolutely love it.

So when the folks over at Fog Creek created Kiln for version control with integrated code review, we had to try it out, and once I tried it, I knew we had to have it.

Of course, Kiln is based on Mercurial, and in order to convert, we have a fairly large Subversion repository that we need to convert. At least, at over 4000 revisions and still growing, it feels pretty big to us.

(If you have no idea what Kiln or Mercurial is all about, I encourage you to check out Hg Init, a tutorial on Mercurial written by Joel Spolsky, which is extremely informative and well written.)

Fog Creek provides an import tool that is pretty impressive, since it is able to do import from half a dozen different existing source control systems (including just a pile of files on disk) and does it pretty well. However, it didn’t meet our needs in a few areas:

Read more →

Development comments edit

My parents always told me to say what you mean and mean what you say.  It’s good advice for life in general but even more so in software engineering.

I’ve been updating our online store back end jobs, which were still using legacy code, to use updated code to prepare for a database move that would have been impossible before.  At the same time, I’m trying to make the code more efficient and maintainable.

The new code threw an exception today from the e-commerce provider.  We were attempting to capture an amount that was more than what was authorized on the card.

Read more →