Point-Free style: What is it good for?

If you’re not interested in what inspired this post, then skip this section and jump to the more interesting bits.

A little bit of history…

Recently I’ve been delving into Haskell quite a bit. It’s part of my apparently never-ending quest to learn as much as I can about as many languages as I can (well, those that appeal to me at least :)). While I love playing around with a language, toying with ideas, writing small programs, reading books, blog posts, etc it’s not really the same as having an on-call expert to help and guide you. Read the rest of this entry »

Data Crunching in Haskell

A few days ago I was having a chat to a friend of mine about a little data parsing problem. He had the need to parse a multi-dimensional array to pull out some values. That array was guaranteed to be square, but not necessarily in contiguous memory. He needed to parse each “column” of the array, calculate a total, and then determine the biggest and smallest of those totals.

A sample of the data might look something like this:

data = ({150,200,45,57,95,2,45,32,15,10,5,2,2,4},
         12,20,45,37,10,5,2,2,10,95,2,45,32,7},
         32,15,10,5,2,23,24,15,20,45,57,95,0,45})

So the first step would be to add 150, 12 and 32 and store the value. Then 200, 20 and 15, and store the value. Do this for all of the columns, then get a maximum and a minimum. Read the rest of this entry »

Setting up Trac, Mercurial and SSH on Windows

WARNING – This blog post is long :)
This post has been edited since it was published. Please see the end of the article for any notes/modifications

Some Background Info

I had the need to do this for work recently. It was nothing short of a right royal pain in the butt. It was such a pain, in fact, that I have decided to document what I had to do to get it working so that other poor unfortunates will feel less pain if they have to do this themselves.

Almost regardless of the company and the software I’m working on, I use Mercurial for source code control. For the work I am doing at the moment, I was also using hg because the company I am involved with is relatively new and they hadn’t yet sorted out a plan for version control or ALM. It was working quite well and I was pushing all my changes to my NAS box to make sure I had other copies backed up, etc. I was living the dream :) Read the rest of this entry »

Out with the Old and in with the New

For the past year or so I’ve been constantly annoyed with the blackapache.net domain. Not because I think it’s awful, but because it’s such a PITA to say to people. Here’s an example of a very common conversation:

Them: “Do you have an email address?”
Me: “Yes, it’s ‘oh-oj’ …”
Them: “ooohhhh-jaaaaaay”
Me: “at black … apache …”
Them: “at back scratchy …”
Me: “No no! ‘black’ bee-ell-ay-see-kay”
Me: *thinking* – sh*t, if they’re struggling with ‘black’ this next bit is going to be fun.
Them: “Oh BLACK! Yes …”
Me: “apache …”
Them: “bless-you!”
Me: *sigh*…

You can see where this is going. While the above example might be slightly exaggerated, the point is still valid. At the same time I was a little tired at the length of the original URI had chosen.

For some reason I felt the need to put the ‘rant’ subdomain in to give people an idea of what the content was going to be like. Hence, rant.blackapache.net was born (the origin of blackapache as a name is related to the combination of my favourite song and my wife’s favourite song).

It served it purpose rather well and over time it’s managed to get linked here and there and thankfully has around 100 readers on a regular basis! I have learned a great deal from both researching my posts and from reading the comments that others have left. It has been a great experience.

My plan now is to take it up a notch. Write more often, try and get more technical, cover a wider range of things, etc. But I didn’t want the same URL. I wanted something fresh, shorter and a bit more indicative of what it is that this site is about.

So last night I bought a new domain and migrated all of the content over. Everyone please welcome buffered.io. Those geeks out there will hopefully appreciate the meaning and agree that it’s not a bad indication of what goes on here.

In the grand scheme of things the new URI doesn’t really mean much other than the links will be a little shorter and both the site and the emails hanging off it will be a little easier to say :)

I’ll be keeping the blackapache.net domain and all of the old content will redirect to the new URI and point to the appropriate articles. Hopefully after a period of time the respective links will be updated in the search engines and people will fix up their bookmarks.

Those of you who subscribe via RSS shouldn’t have to do anything. The feeds were running through Feedburner which has been updated to reflect the new address. Having said that, if anyone has any issues then please let me know as soon as possible.

As always your feedback, both good and bad, is greatly appreciated. Thanks!

I Don’t Need Your Frickin’ Framework!

Scaffold FailHow many companies have you worked with/for that have their own framework? How many have been in the process of developing their own framework? How many have been in the process of redeveloping their own framework? How many have taken another framework and hacked improved it?

When I attempt to answer the questions listed above, I start to shiver. I feel the need to burn my clothes and take a very long shower. Read the rest of this entry »

A Quirk in List.Find()

Earlier today I was having a chat with a friend of mine, who lives in Vancouver, about finding items that are stored in generic Lists. He flicked me a code snippet that looked something like this:

List<foo> list = new List</foo><foo>();
// .. do some stuff
Foo f = list.Find(delegate(Foo f) { return foo.Name == "Bar"; });
</foo>

Straight away I fired back with an update to the code which used lambda expressions instead, as I’m a fan of how concise they are ;) Read the rest of this entry »

Damn you, Crystal Reports!

I’ve had Visual Studio 2008 installed for quite a while. When I first installed it I decided not to install the Crystal Reports components because I was fairly certain that I’d never need them at home.

Well, the worm has turned! On my new gig, I have the joy of working from home. It just so happens that I also need to use Crystal Reports. How silly of me to not bother installing a few extra components the first time so I didn’t have to go through the pain of going through another VS Setup.

On the surface this doesn’t sound like a painful experience right? WRONG. It’s a lot more painful than you think. Read the rest of this entry »

N Things You Don’t Want to Hear when Starting a New Job (where N >= 1)

Here are a collection of quotes that can drive fear into the heart of every developer. They’re made worse when heard at the start of a new gig, as any hope of a brave new world is smashed before you even get a login! Read the rest of this entry »

An All Too Common Issue

I think the following statement goes way deeper than it may have been intended (I might be wrong of course)…

Engineering is about making tradeoffs. If you refuse to make the choice, then you’re taking the cowardly route and ultimately are creating more work for your team. Instead of solving problems, you’re creating them.

All because you’re too chicken to make a hard decision.

Thank you, Raymond Chen! You are a legend.

Read the article :)

Server Refresh

Over the weekend I revamped the webserver. Over the last month or two I’ve been bummed about the amount of overhead in maintaining a Gentoo install as my webserver. Now before any of you Gentoo zealots have a whinge, let me explain.

Yes, Portage is cool. It’s quick, it builds stuff from source, etc. While that power is great, it’s a pain in the butt at the same time. Especially when you’re running on a VPS. I am tired of the underlying bits and pieces changing constantly and me having to muck around with masking and unmasking packages just to get things to update and play nicely together.

I made the decision to switch to Debian and I am happy I did it. I don’t think the time I’ll have to spend maintaining the server will be as high as before. This is all about productivity and as far as I’m concerned this is going to reduce my workload. Given that my software installs don’t change once I’ve got the server up and running, I shouldn’t have to spend that amount of time keeping things running.

As always, there’s a risk of teething problems when you do a full reinstall. So if anyone out there is having issues then please let me know. Cheers! :)