My son Luca pointed out to me that it’s been way too long since I blogged. Geesh, my kids are reading my blog. Amazing. But he is right. I have a lot of things I should be writing about, but I’m not making it enough of a priority. That changes now.
At work we’re doing some new projects in C. Yep, writing close to the metal for maximum performance. It’s actually really exciting stuff (not the least of which is that I get to work with Ed Okerson again). Ed has chosen to use one of our favorite libraries – the UCL Common Code Library. Back in the day (oh, say, 2005) it was a nearly forgotten hunk of code that didn’t seem to be getting much attention anymore. In fact, if you go look at it’s web page you’d think ‘abandoned.’
Not true. It’s actually part of the Debian repository as ‘libuclmmbase’ and it’s on github too. I’ll probably be writing a bit more about using it in the coming weeks.
It’s fun to be doing serious C again. Of course, you all may think I’m crazy. Like a fox…
I got a new drive and wanted something a bit faster so I got a Thunderbolt drive. But, I wanted to really understand how fast it was so I tested it (credit).
For writes, I did this:
time dd if=/dev/zero bs=1024k of=tstfile count=1024
For reads, I did this:
dd if=tstfile bs=1024k of=/dev/null count=1024
The new Buffalo HD-PATU3 works with either USB 3.0 or Thunderbolt and is a 1 TB drive. I got it for a tad under $200 at Fry’s.
MBP internal SSD 371.301Mbps 359.458 Mbps
Buffalo 1TB Thunderbolt 88.7247 Mbps 109.269 Mbps
Buffalo 1TB USB 3.0 20.1375 Mbps 27.254 Mbps
Passport 1TB USB 3.0 20.6062 Mbps 24.6428 Mbps
Thunderbolt is well worth it if speed matters for you. It’s about 4 times faster than USB 3.0. But nothing compares to that wonderful SSD drive inside!
Well, turns out that the new Samsung TV I bought last year does not have optical digital audio output. Slam! That’s the sound of the door as my dreams of getting a Sonos Soundbar ended.
Darn. Time to go think about another solution.
I follow Kent Beck on twitter. He recently tweeted “When you work more hours you see the steps that get made but you don’t see the leaps that don’t get made.” That resonated with me and I kept thinking about it – and it took a bit for me to realize why. On one of my teams I got asked what exactly managers do. They were heads down building product and they really didn’t understand. Why did they need someone to tell them what to do, after all? They were doing it – and basically thought that some boss person telling them what to do was just waste. More than once I thought they would have preferred if I just dug in and coded with them full time.
But Kent hit a key point: leaps happen not from heads down coding, but from seeing a broader picture. Now, don’t assume that I’m saying that managers make those leaps. Sometimes yes, often no. But good managers should be creating an environment where leaps can happen. And that means making sure folks are not working too many hours – or at least that if those hours are needed that you are eyes wide open about the costs. It’s not just about sustainable pace and not burning people out. It’s not just about hitting a point where you are introducing more bugs than you are fixing. It’s not just about making poor design decisions because you are too tired. It’s all that, but it’s also that you get too into the weeds and you miss the leaps you could have made.
Coders code. Teams pull together. Managers make sure the environment is right for maximizing the value being created. And often that means staying out of the weeds themselves. And making sure their teams are not burning out. And making sure their teams are staffed with the best talent they can get. And making sure that product asks are clear and actionable. And asking their teams to explain and defend their technology choices, designs, and implementation – and making sure that it all makes sense to everyone – including to the non-Engineers.
And when all that goes right you have the best opportunity for someone to have that leap of understanding that will make a difference.
That’s what managers do.
This morning I was coding some Arduino stuff for my ROV Eddie. I was playing around with a basic motor control app that talks to a Raspberry Pi over USB serial. I want the RPi to be the high order brains of the robot and let the Arduino be the real-time controller.
The first thing I found was that writing real code in the Arduino IDE sucks. Badly. It does not even honor the basic keybindings my fingers know from forever… so it was frustrating to say the least. I’ve become addicted to Sublime Text 2 – a great editor – and I’m a command line wonk. So first I tried ino – and had to manually copy my boards.txt file to a place it could find, and yet it still cannot compile. I suspect some kind of version mismatch. So I banged off the other rail and tried playing around with installing all the tools natively and just using a raw makefile. Eh. Lots of dependencies. So I floated to the middle and found Stino.
Stino was easy to install and it just worked. It added another menu in Sublime Text that lets me do everything I could have done in the Arduino app – and I get a real editor with syntax highlighting and everything. Wonderful!
So, now I can really get busy on Eddie’s code. :)
Water test of the pressure housing with the wire penetration failed – minor leakage is seen inside. However, my ‘poor man’s gasket’ of using plumbers putty may be the culprit. I could not sense any moisture coming in around the epoxy potting – but it did seem that the putty was wet. I just bought a circle cutter (found in a sweet craft store) and I’m going to try to cut a real gasket instead. If that still leaks I may have to go back to the drawing board. Huge disappointment since I just got a basic motor control app running this morning. I was hoping to test steerage with two motors later today.
Oh well. If it was easy everyone would do it, right?
I’ve been designing a simple underwater ROV (remotely operated vehicle – aka robot) for a while, and when I have time it gets some love and attention. The pressure housing is done but untested at depth. I hope it will be good to 100 feet, but 50 feet would be just fine for this design. The Arduino and Raspberry Pi are ready to mount. The Logitech C920 HD web cam is taken apart and mounted but I have to shorten the USB cable to get it to fit. I should have some pictures up shortly.
But the kids and I have decided on a name. All good ROVs have names – Jason and Argo come to mind. So we chatted a bit and my wife Erin came up with the idea of calling this robot “Edmond” after her Grandfather. Eddie passed away Thanksgiving of 2011. Eddie was a tinkerer and a mechanical ‘hacker’ in his day and he would have totally loved this project.
So, the robot is called Edmond. Somewhere Eddie is looking down and smiling. Here’s to you Eddie!
If you create a command line tool for OSX in XCode, be aware that unless you add code you will be unable to use stdout the way you are used to on Linux. In the XCode debugger stdout is line buffered by default but alas, otherwise it is not. Your program will sit forever and not output at all unless you happened to use an fflush() on the stream. You can work around this by adding:
setvbuf(stdout, NULL, _IOLBF, 4096 );
in your code. This will enable the normal stream flushing that you know and love.
Thanks go out to this post for the information after a lot of searching around.
So, I spent a lot of time trying to set up a simple thing: remote desktop to a Windows Server 2008. What a pain. First, you have to install both the service and the licensing server, and then configure the service to see the local license server. This is silly when you get 2 local connections for admin purposes without needing a license! WTF? Seriously? Then it still didn’t work with the mysterious “Access Denied” failure. I finally found this: http://blogs.technet.com/b/askperf/archive/2010/07/08/the-case-of-the-mysterious-access-denied-aka-more-on-service-hardening.aspx from MS and changed the registry setting (which was damn hard to even find it). It’s in HKEY_LOCAL_MACHINE-SYSTEM-CurrentControlSet-Services-TermService. I’d done NOTHING to the box yet it was set to LocalService. Changing it to be NT Authority\NetworkService fixed the problem.
1. Microsoft, it’s a frickin’ server. It’s probably going to run headless. You should aut0-enable remote management. Having to go manually install a pile of crap is a waste of my time. On linux it’s just there, and it just works.
2. Microsoft, something is buggy. If a default install has a setting that makes it fail silently, you suck.
Net perception: I’ve not used anything from Microsoft other than Word that has just worked recently. I won’t even go into how much I hate the Win8 GUI (Classic Shell is the only savior there). Big company, slowly dying on the vine, potentially too stupid to know it. You need a management shakeup and a return to your roots. If I were you, I’d take a page out of OSX book and adopt linux as the base and build a Windows GUI on top of it. You need to do something. If my client didn’t use this Windows server I’d have punted it long ago.
I spent eight years making digital signage systems that didn’t do this. VeriFone seems to have a lot of reports of dead screens. Makes me wonder who is doing the Engineering.