If I code faster it is by copying the code of giants

Posted March 12, 2012 at 2:09 pm by Ed Guiness

I’ve never been expert at DIY, but I’ve always been willing to give things a go. I once replaced the floorboards in an Edwardian terraced house. This was memorable because while cutting a board with a circular saw I managed to also slice through a pressurised hot water pipe.

After days spent repairing the damage to the floor, the walls and the ceiling, I signed up for a plumbing course at the local adult-learning centre.

This was a few years ago, but I still remember a few useful tips from the course;

  • Don’t over-tighten anything, ever
  • Especially don’t over-tighten compression fittings
  • Compression rings (olives) are very easy to crush
  • A deformed compression ring will leak water
  • A deformed compression ring is difficult to remove from a soft copper pipe
  • Soft copper pipes are very easily crushed
  • A crushed pipe means starting over again.

Fast forward to yesterday, a different house and a different DIY job – replacing the sacrificial anodes in our hot water cylinder.

The idea is that these anodes corrode in preference to the metal of the cylinder. They must be replaced every year or two to remain effective.

If you leave them in place for three years they will look like this:

The anodes are screwed horizontally into the side of the hot water cylinder, and are removed by unscrewing and pulling them out. The cylinder must be drained first to avoid spilling 200 litres of water onto the floor.

Draining down our particular cylinder is a tedious process that involves releasing a pressure valve, waiting an hour while water trickles out an overflow pipe, then removing the valve and siphoning water out of the hole exposed by removing the valve. (This isn’t normal, there’s something wrong with our in-line scale inhibitor preventing water release)

Removing the valve itself would have been easy except that it was secured by a compression fitting, and the compression ring was firmly wedged into the soft copper pipe…

So picture me; pipes disconnected, 200 litres of water drained, staring in dismay at a compression ring that won’t budge. I don’t want to risk removing it with a hacksaw for fear of cutting the pipe underneath, and the ring is damaged so I don’t want to re-use it. I can’t cut remove a section of pipe since that will make the impossible to reconnect it without more serious work like soldering in a length of extension pipe.

Basically, at that point, I was stuck.

So I did what any other geek would do; I fired up a web browser.

And wow, did I find a fantastic answer to my problem.

These three ringsĀ make the job easy and almost risk-free, here’s how:

Inserting a very short piece of pipe into the fitting and then tightening up the nut will move the ring along the pipe. Repeating this with longer bits of pipe will eventually slide the ring off the original pipe. Three bits of pipe of increasing length make the job simple.

Hey presto, the compression ring was removed.

Which brings me to a confession and an epiphany.

First, the epiphany;

It is absolutely OK to copy a solution from the internet. That’s kind of what the internet is for.

And the confession;

I’ve often maligned other programmers for copying code they find on the internet, and in doing so I’ve developed an unbalanced attitude towards sites like codeproject, dzone etc. I’m sorry about that, especially if you’ve been on the receiving end of a sneer.

The reality is that every programmer stands on the shoulders of giants.

 

@KiwiCoder

 

 

Entry filed under: Programming, Software Development. Tags: .

Programming expertise, it’s all about the turtles Why software projects are always late (Part 2)


ABOUT.ME

Ed Guiness

I am the author of Ace the Programming Interview, published 2013 by John Wiley and Sons. In 2012 I founded SocialCoder.org, a volunteering organisation for programmers. I've been a professional programmer for more than 20 years, and a hiring manager since 2004. Ask me anything.

Recent Posts