Minefields!
I work in computer security, and that is how this post came about, but it’s not really WHAT it’s about.
I’ve been thinking about the things we do to try to secure computer systems, and realised that what we’re doing is setting up minefields. It’s not a solid, impenetrable barrier to keep people out. Our access lists, file permissions, and selinux policies are more like a set of booby-traps and land-mines that we hope malicious people will bump into, so that they either cripple their attempts, or at least trigger an alert so that we know that they’re there.
But if someone is careful, clever, or lucky enough, they can still get through. And even if our tripwires trigger, if we don’t have our response prepared and ready to go, it wont help.
The only reasonable way to safeguard a system is to lock it in a safe and let no-one near it. And that makes it pretty useless. So all we can really do is to keep deploying our mines and hope they’ll catch someone.
And I think that our lives are sort of the same. No matter how organised and prepared we think we are, there are always things that can happen that we don’t expect and haven’t planned for. There is no 100% guaranteed way to make sure that things will always go the way that we want them to. We can try to be as prepared as we can, but in the end the best that we can do is to expect the unexpected, and be prepared to roll with the punches.
Programming is fun
The read at http://stilldrinking.org/programming-sucks is cool. It says a lot that is true (and it’s an awesome name for a web site), but I think that he’s missing something!
Programming is a creative pursuit. It is used in engineering, but it is itself only engineering in the same way that writing a novel is engineering. When you’re writing a {program,novel}, you have an idea to express. You have an infinite number of ways to express it, and you have many languages to choose from. But in the end you’re trying to create an effect, and you can judge your success on how well you create the effect.
I love programming. Before I discovered it I used to do a lot of logic puzzles and crosswords, because I liked solving puzzles! And programming is an amazing puzzle, because there is no single right answer.
The reason that I think the bridge analogy doesn’t really apply, is that people have been building bridges forever. It’s a pretty well understood field. Other than the substitution of more modern materials the requirements and design for bridges probably don’t change much. Compare that to software design. Bridge requirements change over decades, as trucks get bigger and traffic gets heavier. Software design changes by the minute. You demonstrate a system and when people see it they get an idea for a way to use it that they haven’t thought of before.
I think that if software design ever gets to the point where it can be done by numbers, the types of people who want to do it will change dramatically. At the moment people who like solving puzzles and creating things do well in IT. If it gets to a point where it is so cookie-cutter that it can be done by numbers, or standards and strict methodologies, we’ll have people seriously debating whether to choose accounting or IT as a career path! No offence meant to accountants, but creative accountants tend to get into trouble. As would creative programmers in that sort of environment.
Ironically, I think that ‘Still drinking’s article is a great piece of programming. He obviously enjoyed writing it, and is rightly proud of it and the effects that it’s produced. That’s programming!
The effects of many different people having different, conflicting opinions and standards can be a real problem, but only if what I think affects how you implement something.
I think that what we need to do, is to give people the freedom to create, rejoice in their creativity, and implement things however they like. Let people be as happy with their code as ‘Still drinking’ is with his article! BUT, when it comes to talking to others (code), we need to cleanly define the borders and interfaces.
Testing anything even remotely complicated is impossible, so reduce the size of the chunks that we develop to things that can be cleanly and unambiguously specified and tested.
Help, my Arduino is dying!
The Arduino/Raspberry Pi combo I’m using for my pizza oven failed completely last weekend, just in time for the biggest event the oven’s had!
We had a party Saturday night, so I lit the oven about lunch time Saturday and cooked a couple of pork bellies, then made pizzas when people arrived for tea. So the oven was fired for 8 hours or so straight. I would have loved to see how the temperature travelled through the walls being fired for that long. But it wasn’t to be.
I am powering the Arduino through a USB connection from the Raspberry Pi, which is I think a mistake. Still, it’s been fine until now. The whole thing is powered by a 12 volt power supply inside, feeding through the spare wires in the ethernet cable, which is fairly long. From the cable it goes through a cheap 12v -> 5v (USB) power converter into the Raspberry Pi, which has a USB connection that powers the Arduino, and lets the Pi pull temperature readings from the Arduinos thermocouple shield. It’s worked fine for over 12 months!
But now if I power the Pi up itself it works fine, but when I plug the Arduino in and initialise the serial the whole thing dies.
I have been wanting to build a decent 12v -> 5v power supply for a while, and power both devices directly from that. Or even better, find a thermocouple interface for the Pi that handles 8 thermocouples so I can get rid of the Arduino altogether.
I guess now that this is happened I finally have the incentive to built that power supply, or two of them, so I can use one in my car as well.
My broken Raspberry Pi
Raspberry Pis are great little machines. A PC in a couple of inches of circuit board! They make it so easy to develop applications. What can you do with a computer that would fit in your show? Anything you want.
I have a pizza oven that I built myself. Part of the design involved being able to record temperatures. So I originally installed some thermocouples from eBay, and an arduino with a thermocouple shield. Arduinos are also fairly cool, but are a bit harder to deal with and more limited software wise. And everything is an expansion. So I had to buy an Ethernet shield to get network connectivity.
I wanted to set it up so that my computer inside could connect to the arduino and grab the temperatures. I never really got it to work. I could work it with the Arduino connecting to the internal server, but not theother way around. The arduino just kept locking up.
After a lot of fiddling I got my hands on a raspberry pi. This was more like it. A Linux machine! I know Linux! I still needed the arduino to run the thermocouples, but connected it to the raspberry pi using USB. The USB fed the power and also let me poll the temperature readings through the serial interface. And then a simple web app using Ruby Sinatra lets my internal machine poll the readings as needed. The data goes into a MySQL database and generates pretty graphs.
Anyway, back to the point. My raspberry pi has stopped working. It’s mounted on the back of my pizza over in a plastic box. When I turn the power on, I can ping it for around ten seconds and then it stops. So I’m going to need to pull it out and connect a monitor and see what’s happening.
The point of all this is that while implementing these things is fun, the more you use them for around your home, the more you end up spending your home time doing free IT support!.
The fun is all in the implementation. Once that’s over, supporting it is just a chore!

Recent Comments