Software, technology, sysadmin war stories, and more. Feed
Sunday, May 19, 2013

Updates and responses to reader feedback

It's time for some "meta" updates and feedback!

It's been two years since I escaped from that place in Mountain View to start my own thing. I'm obviously still writing, and still immersed in the world of technology, with various nerdy creations issuing forth from time to time. At the moment, I'm working on the second book so it's stealing cycles from things like software defined radio projects.

I think I might purposely take a trip down to that office space where I encountered a distinct lack of connectivity. It's amazing how much you can get done when you don't have viable routing to the Internet. By way of comparison, last year, the book was a smaller project, and I managed to finish a bunch of it while flying to Maine and back. When you have to fly from San Jose to Denver to Charlotte to Portland just to get there, and from Portland to Charlotte to Phoenix to San Jose to get back, there are many opportunities to buckle down and just work without distractions. Sorry, HN and reddit, but it's true.


I've gotten a few anonymous feedback questions and requests over the past couple of days which need responses, so here we go. (I can't e-mail these people since they didn't leave any sort of contact info.)

Last week, someone asked if I would "consider doing a short tutorial on AJAX with C", that was "... fancy like a dynamic datagrid". Okay, that's an interesting one.

Assuming you really mean C and not C++, I suppose I could. I could certainly write something which is just plain old C and doesn't use any part of C++ to get things done. The biggest impact I can imagine at this point would be from throwing out the STL and strings, and not being able to organize things in classes.

None of this would stop me, particularly since I've done this sort of thing before, but it would definitely slow me down. In order to do this in C, I'd probably need to do things like writing my own hash table implementation in order to store the parsed results of the query string (the part after the ? in a URL in a GET situation) or the POST data received on stdin. If not that, then I'd have to make it parse into a temporary space, and then call back into the C code, which would then have to figure out what to do with it.

Basically this would mean my calling code would pass in a function pointer and that module with its callback function would be something like this:

#define CGI_VAR_SIZE 256  /* or from a .h file... or something... */
static char cgi_user[CGI_VAR_SIZE];
int cgi_callback(const char* var, const char* val) {
  if (strcmp(var, "user") == 0) {
    strlcpy(cgi_user, val, sizeof(cgi_user));
    /* ... and maybe check the retval from strlcpy and bail... */
    return 1;
  /* ... over and over ... */

... Only, I'd have to fight with whether 'strlcpy' even existed on that platform, and then either pack in a suitably-licensed copy or (ugh) write my own. Then I'd need to wrestle autoconf into noticing such things and have it do the appropriate #define and/or Makefile creation magic to make sure the compatibility objects were compiled and linked into my final creation.

This also assumes that everything I'm shoveling around in there can be expressed as '\0'-terminated C strings. If any binary stuff is involved, now I have to start tracking lengths explicitly and pass all of them around too. Maybe I'd have to invent my own "string". UGH.

In short, it would be a serious piece of work. I already decided that Make and autoconf are things to be avoided, and so avoid them I shall. Sorry.

Now, if you're okay with C++, most of that work is already done. The AJAX part would be a matter of some jQuery (or raw JS, perhaps, but why?). The real unknown would be the "dynamic datagrid" part. I had never heard of it before, and had to dig around to find out this is some kind of ".NET" thing. It looks like a fancy way to render a table of data, sort of like a program like Excel might use.

So really, if you want to see a web page with some tabular data which is dynamically populated via AJAX, that wouldn't be so bad. The last big questions are: what sort of data, and is it read-only, or read-write?

If you want to see this or have other requests or comments, let me know. Thanks!


Time machine

Another anonymous reader asked about my encrypted time capsule post from last summer. They want to know where I got the screenshot.

The answer: I took it myself. I just cut out the name of the device since that's a private detail and doesn't affect the point of the post which is that "encrypted" now appears.

If it looked weird, that's just because I cropped the screenshot to show just the pertinent part. The dialog box itself is too wide to fit in a post here without being squashed. I put a copy right here in this post to show what I mean by squashed.


In my "No." post about the GNOME terminal bug which was closed with just one word and "WONTFIX", I mentioned not knowing anything about whether there were "out of band" discussions about this problem which didn't show up in that bug (698544). In response, someone wrote in to give me some details on the situation, including a link to another bug with some more context (695371):

None of the 'usual' mailing list or blog discussions along the lines of 'does anyone actually need this feature any more, it is making it hard to do X, Y or Z' have happened. See below.


So, okay, apparently the person who closed the second bug has already expressed doubts that it's of any use. Given that, it's not too surprising that the feature was yanked and there seems to be no interest in restoring it now.

In pondering this situation, I've attempted to think of some experience from my own past in which I deleted a feature from something and received pushback from users. The problem is that I can't think of any. I've written software which has had real users over the years, and while most of it is "plumbing" stuff which doesn't have a shiny user interface, all of it still had features. Some of those projects went through different stages of life and a couple of them wound up being ported to some other system or effectively rewritten as part of a bigger coordinated change.

I'm having trouble remembering examples of this. About the only thing which comes to mind is a project I did with some other people some number of years ago. I had to purposely exclude some modules from later releases since that side of the project had fallen behind. I figured it was better to only ship code which was still being actively maintained rather than trying to maximize some feature list.

The difference is that nobody was forced to upgrade. They could stay on an older version (with the now-unmaintained code) as long as they wanted. Unlike things like GNOME, there were no complicated dependencies. You could easily hang back a major release or two if needed and nothing bad would come from it.

Maybe that's the true problem here. These interwoven dependencies mean that you are forced into upgrading even if it means giving up something you really want to have. The only solution to this is better isolation and stronger interfaces which stand their ground and don't change every time the CADT model strikes. Then users can treat such stupidity as damage and just refuse to upgrade.

For what it's worth, that is, and continues to be, my response to iOS 6.


Finally, I had a thought about "No." from the GNOME situation. It's a movie from 1973. Perhaps you have seen it, too.

Battle for the Planet of the Apes.

He uttered a negative imperative.