Dec 11

How to demolish your software project with style

I did something unusual today. I pulled the plug on one of my own projects.

In Solving the CVS-lifting problem and Announcing cvs-fast-export I described how I accidentally ended up maintaining two different CVS-to-something-else exporters.

I finally got enough round tuits to put together two-thirds of the head-to-head comparison I’ve been meaning to do – that is, compare the import-stream output of cvs-fast-export to that of cvsps to see how they rate against each other. I wrote both git-stream output stages, so this was really a comparison of the analysis engines.

I wasn’t surprised which program did a better job; I’ve read and modified both pieces of code, after all. Keith Packard’s analysis engine, in cvs-fast-export, is noticeably more elegant and craftsmanlike than the equivalent in cvsps. (Well, duh. Yeah, that Keith Packard, the co-architect of X.)

What did surprise me was the magnitude of the quality difference once I could actually compare them head-to-head. Bletch. Turns out it’s not a case of a good job versus mildly flaky, but of good job versus suckage.

The comparison, and what I discovered when I tried to patch cvsps to behave less badly, was so damning that I did something I don’t remember ever having felt the need to do before. I shot one of my own projects through the head.

Continue reading

Dec 05

Heads up: the reposturgeon is mutating!

A few days ago I released reposurgeon 2.43. Since then I’ve been finishing up yet another conversion of an ancient repository – groff, this time, from CVS to git at the maintainer’s request. In the process, some ugly features and irregularities in the reposurgeon command language annoyed me enough that I began fixing them.

This, then, is a reposurgeon 3.0 release warning. If you’ve been using 2.43 or earlier versions, be aware that there are already significant non-backwards-compatible changes to the language in the repository head version and may be more before I ship. Explanation follows, embedded in more general thoughts about the art of language design.

Continue reading

Dec 02

shipper is about to go 1.0 – reviewers requested

If you’re a regular at A&D or on my G+ feed, and even possibly if you aren’t, you’ll have noticed that I ship an awful lot of code. I do get questions about this; between GPSD, reposurgeon, giflib, doclifter, and bimpty-bump other projects it is reasonable that other hackers sometimes wonder how I do it.

Here’s part of my answer: be fanatical about automating away every part of your workflow that you can. Every second you don’t spend on mechanical routines is a second you get to use as creative time.

Soon, after an 11-year alpha period, I’m going to ship version 1.0 if one of my main automation tools. This thing would be my secret weapon if I had secrets. The story of how it came to be, and why it took 11 years to mature, should be interesting to other hackers on several different levels.

Continue reading

Nov 05

Finally, one-line endianness detection in the C preprocessor

In 30 years of C programming, I thought I’d seen everything. Well, every bizarre trick you could pull with the C preprocessor, anyway. I was wrong. Contemplate this:

#include <stdint .h>

#define IS_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100)

That is magnificently awful. Or awfully magnificent, I'm not sure which. And it pulls off a combination of qualities I've never seen before:

Continue reading

Oct 30

Dell UltraSharp 2713 monitor – bait and switch warning

I bought a Dell-branded product this afternoon. That was a mistake I will not repeat.

Summary: the 2713UM only reaches its rated 2560×1440 resolution when connected via DVI-D. On HDMI it is limited to 1920×1080; on VGA to 2048×1152. This $700 and supposedly professional-grade monitor is thus functionally inferior to the $300 Auria I still have connected to the other head of the same video card, which does 2560×1440 over any of these cables.

Two things make this extra infuriating:

I spent more than four hours on the phone with three different Dell technical-support people to find out that not only don’t they know how to fix this, nobody can give any reason for it. It’s a completely arbitrary, senseless limit. The monitor’s EDID hardware apparently tells lies to the host system that low-ball its capabilities. This couldn’t happen by accident; somebody designed in this nonsense.

And then neglected to tell potential customers about it. Nothing anywhere in the promotional material for this monitor even hints at these limits, and Dell’s own technical support people haven’t been clued in either. Bait and switch taken to a whole new level.

(Why did I buy a Dell product? Because it was the only thing I could get my hands on same-day that matched the specs of my other Auria, which went flickery-crazy early this afternoon.)

When I unloaded about this on Tech Support Guy #3, he passed me to a marketing representative. I explained, relatively politely under the circumstances, that I has over 15K social-media followers and was planning to give Dell a public black eye over their repeated bungling unless somebody gave me a really good reason not to.

She declined to send me $400 so I wouldn’t have been taken worse than by buying another Auria, then passed me to somebody she described as a manager. But I could tell by the accent he was just another drone in a call center in East Fuckistan who had neither the ability nor the intention to improve my day. After two more iterations of this I had had enough and hung up.

Dell. You pay more, but you’ll get less. Pass it on.

(Yes, I typoed the model number originally.)

Oct 29

Your money or your spec

reposurgeon has been stable for several months now, since the Subversion dump analyzer got to the point where people stopped appearing in my mailbox with the Pathological Subversion Repository Fuckup Of The Week.

Still, every once in a longer while somebody will materialize telling me they have some situation in a repo conversion that they want me to help them fix. The general form of these requests is like this. “I have {detailed description of a branch/merge topology nightmare that makes Eric’s brain hurt to contemplate}. What do I do to fix it?”

I am now going to announce a policy about this. There are exactly two ways ways you can get me to solve your repository problem.

Continue reading

Oct 19

Stratum 1 time server on a tiny SBC?

I’ve been working on GPSD a lot recently – we’re heading towards a 3.10 release with a lot of new features. As part of this release I’ve decided to ship a HOWTO on setting up a high-quality NTP time server using GPSD. In the course of working on that, I’ve had an idea.

The idea has two antecedents. One is that if you start with any one of several inexpensive GPS modules (my favorite of which is the u-blox 6), and add GPSD to read it and feed an ntpd instance, it’s possible to build an NTP server that meets the usual standard for public Stratum 1 time servers – 10mSec or better accuracy to UTC.

The other is that there is a raft of inexpensive SBCs that run Linux out there – Arduino, Raspberry Pi and the current new hotness BeagleBone. So here’s my thought: why not build a low-power Stratum 1 timeserver on a credit-card-sized SBC?

Continue reading

Oct 06

Sometimes I hear voices

I had a very curious experience recently. I discovered that I know what it’s like to be insane. No, save the obvious jokes; this is interesting.

This came about because I read a magazine article somewhere which I cannot now identify – recent, online, a relatively prestigious publication with a tradition of think pieces – about patterns in delusional schizophrenia. [UPDATE: the article was How reality caught up with paranoid delusions.] The thesis of the article was simple: though the content of schizophrenic delusions changes wildly in different cultural contexts, there’s an underlying motivation for them that never varies and produces a fundamental sameness.

Continue reading

Sep 25

coverity-submit 1.10 is released

coverity-submit automates the process of running the Coverity static checker’s front-end tools and shipping the results to their public server for analysis.

One bug fix, two minor features. The build-version (-b) and description (-t) options now have sensible defaults. When run from a repository, the default for -b is the commit ID of the head revision. The default for -t is an ISO8601 release timestamp.

Actually, the build-version default presently only works in a git repo. I’ll cheerfully take patches that support other version-control systems.

Code here.

Sep 24

Can micropatronage save the net?

How can we fund common Internet infrastructure without risking that it will be captured by corporations or governments? He who pays the piper tends to call the tune, which is a bad thing when you don’t actually want the content of your network to be controlled.

This is a problem I’ve been worrying about a lot for the last couple of years. I’ve been working on one organized attack on it that I’m not ready to talk about in public yet (but will be soon; some of this blog’s regulars are already briefed in). I’ve just found something else that might help which I can talk about: micropatronage.

Continue reading

Sep 03

The Smartphone Wars: Nokia gives it up for Microsoft

It’s been quite a while since I wrote a Smartphone Wars post; I let the series lapse when I concluded that the source I was using for U.S. market share figures had likely disconnected from reality (and more recent surveys from other sources suggest I was right). But the developments of the last couple of days demand comment. Nokia has sold its phone business to Microsoft; Stephen Elop has returned to Microsoft to head its devices group; and there is talk he might succeed Ballmer.

You couldn’t make this stuff up for a satirical novel and have it believed. The conspiracy theorists who maintained that Elop was a Microsoft mole sent in to set up a takeover look prescient now – but a takeover to what purpose? Nokia’s phone business, the world’s most successful and respected a few short years ago, is now a shattered wreck.

And as for Elop: he masterminded what was probably the biggest destruction in shareholder value ever – and this is the guy who’s being talked of as Ballmer’s successor? Astonishing. On his record, the man isn’t competent to run a Taco Bell store; that that he’s even in consideration suggests Microsoft’s board has developed some perverse desire to replace a strategic idiot with an even more wrongheaded strategic idiot.

Continue reading

Aug 30

Fixing the fast-food strike

So, thousands of fast-food workers are out on strike against the national burger chains, demanding that their wages be doubled to $15 per hour. But the national chains don’t control employee wages; how much to pay their people is in the hands of local franchise owners,

Therefore, if you are one of the concerned, caring, and vastly indignant activists behind this strike, I’m here to tell you that your social-justice problem has a simple solution. Take out a loan (or put together the money from your like-minded activist friends), buy a franchise from one of the chains, and hire workers at $15 an hour.

There, that was simple, wasn’t it? You’ll make money hand over fist and demonstrate to all those eeevil corporations that they can too pay a “just wage”; they just don’t want to because they’re greedy.

Or…maybe not. If it were that simple, everyone would be doing it. The commercial landscape would be alive with virtuous workers’ collectives paying their members fat wages and thumbing their noses at top-hatted plutocrats. Why doesn’t this happen?

Continue reading

Aug 27

Hunger Games for real

“Students can only have one serving of meat or other protein. However, rich kids can buy a second portion each day on their own dime.” This is from coverage of Michelle Obama’s national school-lunch regulations.

Protein-starving the peasantry so it will remain docile and biddable is a tyrant’s maneuver thousands of years old. I was unaware until today that this has become official policy in the American public school system.

How clever of them to sell it as a healthy-eating measure! That’ll get all the gentry liberals on board; of course, their kids will be buying that second serving.

Aug 24

Questioning transsexuality

In Bradley Manning Is Not a Woman, Kevin Willamson makes a case that feeling like a transsexual – that is, that one is either a man in the body of a woman or vice-versa – should be regarded as a mental illness to be treated by therapy rather than with sex-reassignment surgery.

The article surprised me by presenting a coherent case for this position that I cannot dismiss as garden-variety social-conservative chuntering. I found the parallel with what Willamson calls BIID particularly troubling. If we treat people who desire to electively amputate their own arms and legs as mentally ill, why do we judge people who want to amputate the genitals they were born with any differently? What makes one an illness and the other a lifestyle choice?

Continue reading

Aug 23

vms-empire 1.10 released

There’s a genre of computer games called 4X (explore/expand/exploit/exterminate). well-known examples of which include the Civilization series and Master of Orion.

Ever wonder what the ur-progenitor of this genre was, the game at the root of 4X in the way Colossal Cave Adventure created the genre of dungeon-crawl games? It was Walter Bright’s game “Empire” from the early 1970s. You can read about it at his page on Classic Empire.

Since 1994 I’ve maintained an early Empire workalike written by Chuck Simmons in 1987 to run under the now-extinct VMS operating system; it was ported to Unix immediately, and remains to my best of knowledge the only open-source version or variant of Empire available.

Walter Bright does not acknowledge this version’s existence on his Empire page, which is fair because he didn’t write it and probably doesn’t consider it to be “Empire” at all. But it is close in gameplay and style to the earliest of Bright’s versions, except for being able to display its crude character-cell maps in color (I added that back when color terminals were cutting-edge technology).

If you love Civ or MOO, try this out for a look at what the computer 4X game was like before pixel graphics. The display and command interface are primitive by today’s standards, but the AI and general gameplay have held up surprisingly well. It’s instructive to see how many of the core tropes of later 4X games are already present in this one.

You can get version 1.10 of VMS-Empire here.