Vacation Hallucination

We are vacationing in Phoenix. Nutjob politics, crazy heat and humidity, reminiscences of years past, and hidden object games are all giving me these weird waking dreams without even having to take drugs.

Junglemonkey remembered a feature on a kids radio show where the youthful host tried to explain the lyrics of pop songs. This morning I found myself wondering what the songwriter needed from Biggles last Saturday. A ride, maybe, or the key to his bike lock.

Also, there are grackles all over the place. These are the rattiest looking birds I’ve seen.

Trust Your Kid

Earlier today I tweeted this gem: “I don’t worry about my girls’ future boyfriends. I trust my daughters to be smart and capable.” I’d like to expand on that a little.

This was inspired by a quote I read on the Freakonomics blog:

“I want my girls’ potential boyfriends to think I’m a crazy lunatic,”Haley said.

I’ve heard this kind of thing before from my male friends who have daughters. They talk about getting all weird and scary with their daughters’ hypothetical boyfriends when those daughters are finally old enough to start dating. Just what are all these guys afraid of? Do they consider that their daughters are utterly helpless and are such bad decision-makers that they’ll be dating boys who won’t treat them well? I suppose I could be super uncharitable and guess that they extrapolate from their self-knowledge and think these hypothetical swains will be rapists who will nonetheless be deterred by the idea of a vengeful father. I bet, though, that it’s just that they don’t trust their daughters, and that makes me kind of sad.

Your kids are going to grow older whatever you do. I figure the best thing I can do for my kids is to teach them to be thoughtful and to value themselves. If they think of themselves as precious, they won’t put themselves in situations where they’ll get really hurt. All that remains, then, is to teach them enough to be able to recognize a bad situation, a bad idea, or a dangerous person. That’s hard, but not in the way that calculus is hard. It just requires a lot of time and engagement and trust. You can’t just wake up one morning and think, “Holy cow! My daughter, with whom I last interacted when she was five, is now old enough to be dating boys! I’d better teach her some stuff!” That won’t work. You have to be engaged all along; then when your daughter starts considering dating, she can bring up questions and you can offer insights and it won’t be all weird and fake.

And yeah, no matter what, if Mom or Dad says it, it’s probably wrong. So your daughter won’t believe you and will go make mistakes *anyway*. If she’s got a good sense of self-worth, though, she’ll come out okay. Just like you, right?

Doomed by History

I’ve probably mentioned this before somewhere, but from about five years after I got out of college I’ve felt acutely my lack of education. I got four years of Catholic school (an important four years, too) but otherwise I went to public schools in California. As a result of my time in private school, I can diagram a sentence, conjugate verbs, and use commas, semicolons, and apostrophes correctly. To that school I also owe my ability to perform well on SAT-type tests. To my public school education, I owe my knowledge of the geography of North America and western Europe. So far as my history and geography teachers were concerned, it was of passing interest that there existed some cultures somewhere east of Germany, but I swear, I learned more world geography from playing Risk. I suspect that the cold war had something to do with that, but I don’t see how, “We do not like communists,” translates into, “Our schoolchildren should not be shown maps of any communist country.” How can you be expected to drop a bomb on a country you can’t even find?

Since then, I’ve been eager to fill the void. I’ve read histories of China, of Persia, and of various African regions. I’m a sucker for maps and love trying to wrap my head around the geography of whatever story I’m reading. When I read histories of Alexander, I followed along on Google Earth and on the maps on Wikipedia. Of course, whenever I do this, with whatever region, I wind up with a temporary wish to go there and walk around in the area. It’s not just books, either: in 2009 Junglemonkey and I saw the Afghan gold exhibit when it was in New York. After that, I had to spend hours looking at maps of Afghanistan and its neighbors.

I just finished listening to Edward Gibbon’s “Decline and Fall of the Roman Empire, Volume 1” but, instead of going for the maps, I’ve been digesting it in terms of economics and politics. (Okay, I confess, there was my short investigation of when we stopped calling it the “Euxine Sea” as Herodotus and Gibbon did.) For instance, there’s “Why Nations Fail“, as well as “23 Things They Don’t Tell You about Capitalism“. The parallels between the politics of the Roman Empire around the time of Diocletian and the politics of the United States today are pretty obvious. Even more chilling is the thought that prosperity in the U.S. is not predicated on making stuff but on taking stuff from others. No wonder poker is so popular: this culture seems to be in love with zero-sum games.

 

Oh, hey, you know that phrase, “blood and treasure,” our military leaders use when they talk about what we’re spending on these conflicts in Iraq and Afghanistan? Yeah, that’s what Gibbon used to describe the expenses of Roman military expeditions on the borders of the empire (I bet he got it from the Romans). Since they’re likely going to be in charge of the country in a few decades, I’m glad that at least our military commanders have read some history. I just hope they have also read some economics.

Sometimes Continuity Sucks

Facetime stopped working on my laptop sometime this year. I don’t know anyone far away with whom I actually want to chat, so I only use it when Junglemonkey goes out of town. She’s out for a few days and today the Badb came back from camp and of course we all want to see one another. Junglemonkey called my cell phone and complained that we weren’t answering Facetime and we were pigs. It turns out that my iPod’s application was working okay (but we didn’t hear it beeping, in the other room, in my purse, etc.) but my laptop’s app wasn’t. It never rang. I should know, I was sitting at my computer while it was failing to connect.

Eventually, I got it sorted out. It turns out that this is a thing – some unspecified change gets made to an obscure security file and suddenly Facetime and other messaging clients Just Don’t Work. Thanks, Apple.

My computer is new. The operating system is new. However, I’ve had a Mac laptop since 2003 and whenever I upgrade I migrate my user. Some of the files on my hard drive still date back to those early days. In this case, the problem file dated from 2006. Holy cow, 2006! That was two computers ago!

Fallacies Everywhere

The thing that has got me motivated enough to write this as a post is this article on the BBC website. It’s got a provocative title, “Green food report favours home-grown curry,” so of course I checked it out. The real meat of the story is that a commission in the UK has just turned in their report on the food production infrastructure in that country and they’ve made some recommendations. Well done, good work, I’m sure the Department of Agriculture (or whatever it’s called in the UK) will be pleased and start publishing tracts and faxing flyers to farms all over England and Wales. But here’s an interesting line, down in the middle of the story:

The project consisted of five subgroups to look at particular areas within the food system – wheat, dairy, bread, curry and geographical areas [emphasis mine] – with the goal of consider ways to “reconcile how we will achieve our goals of improving the environment and increasing good production”.

A few ideas occurred to me when I read this:

  1. That’s a heck of a food pyramid. “I think I’ll only have one helping of Kent, I’m trying to stay slim.” “Oh, go on, you know it’s the midlands that have all the calories.”
  2. Wait a second, we’re gonna look at five different things, two of which are grain? No, I get it, bread is different from grain because bread is processed grain so we need to look at the whole supply and production chain. It’s not a boondoggle to get the commission to pay for junkets to France to look at “bakeries” there.
  3. Curry? Are we sure this wasn’t put in there to justify the lunch tab at every commission meeting?
  4. So, a commission starts out investigating how to increase production of curry (and by the way, are we talking hing, chiles, pepper, ginger, fenugreek, turmeric, and on and on? Really? That’s some amazing climate change y’all are expecting in England.) comes to the surprising conclusion that increasing production of curry would be a good thing! And this is so surprising that the Beeb makes that the headline!

It should be no surprise to anyone who’s ever eaten at a hotel or restaurant in the UK that fresh vegetables and fruits are not on that list. Oh hey, this is like in those Stieg Larsson books where the only thing anyone ever eats is white bread and cheese and all they drink is coffee with milk.

Hey, The Beeb, check this out! (Oh yeah, specifically, this.)

I Didn’t Geddit

I just got an email from Yammer announcing that Yammer has been acquired by Microsoft. I had a couple of Yammer accounts because some people I wanted to play nice with have Yammer accounts, but I confess: I just don’t get why Yammer is something I should want. It doesn’t solve any problems I have. It’s sort of like spam: in theory, some person might be sitting around the computer thinking, “Golly. I really wish I knew where I could get some Au)t}*h-entic Tablets. If only someone with a fake email address would send me an email with a link to a website where I could score that!” Similarly, there might possibly be someone sitting in an office somewhere thinking, “Dang, I’m getting too much work done. I wish there were some kind of website that would have the faint whiff of corporate approval but that would really amount to my wandering the halls and chatting with everyone.” Someone, somewhere, who gets paid not for working but just for being some special and precious snowflake. You might be that person (if so, check your spam folder, it’s got what you want).

So now Microsoft has acquired Yammer. This is all the signal anyone should really need, and now it explains why I didn’t get what the heck Yammer is good for. It isn’t. It’s got the smell of something that’s got a lot of people excited; it’s got the minimum feature set required to be written up in a trade magazine as being an exemplar of whatever the hell it is supposed to be; it’s got confused corporate IT departments paying for it; and it’s not a big enough player to be unpurchasable. So, it’s crapware that Microsoft will rebrand as some kind of productivity thing for groups but is fundamentally a waste of time. Got it.

New Project

This seems to happen to me all the time. I’m wrapping up whatever I’m working on and I have a plan for what comes next. Then, before I have finished the current project but after all the real decisions have been made, I start coming up with all sorts of new projects. I haven’t really analyzed this behavior before, nor even reflected too much on it (although it does bear a strong resemblance to how I envision software development in general – but that’s a separate discourse), but I suppose it’s because the part of my mind that’s involved in creative problem solving gets antsy when it’s idle and starts coming up with things to do.

Some of these things might actually be really cool and worth pursuing, but most of them are, I think, the equivalent of sudoku or crossword puzzles. They’re engaging and require mental effort but in the end they just don’t produce anything good or useful. They’re intellectual busywork. That’s not bad if one is just trying to stay sharp, but it can be really distracting if there is real work to be done. To me, being able to tell when it’s appropriate to follow up on these fun side projects and when it’s not is a skill that I prize and try to develop. Acting on that decision is discipline.

I commonly talk about startups being, “resource constrained,” and use that as the starting point of my analysis of how a startup chooses technology, human resource policy, and other business decisions. Given that you want to do lots of things but you only have the ability to do a few things, which things do you choose to do? How you answer indicates, in some fundamental ways, what kind of a person you are; it reveals what you hold to be really important. What’s most important, people or money? Who’s more important, yourself or your family or strangers or shareholders?

It’s a common observation that ideas are cheap; that it’s execution that is expensive and valuable. So here’s an idea that has popped up to the forefront of my mind; it’s been kicking around for a while, but I don’t claim any kind of proprietary interest in it. It is certainly in the category of distraction to me since it is nowhere near the projects that I have coming up. I’ll write it down here so that if any of the three occasional readers wants to pick it up and run with it, they can be my guest. And if not, then the next time I’m actually idle and trying to stay sharp, it’ll be there for consideration.

Think about LACS; the idea was pretty nifty. An app that discovered other instances without being told explicitly by the user where those instances were; it exchanged data with the discovered instances without really interacting with the user, and the user got to see what was going on and to inject new data into the mix. That was cool. What if the messages had some extra metadata, like how reliable the author considers the message, or the repeater does; when the message was created, maybe other stuff. But really just playing urban legend, right? How interesting would that be? This is almost like Twitter, except that with Twitter (and Facebook, and G+, and the like) you have to choose what you see. You explicitly follow people, and they explicitly retweet (or like or repost or whatever) items. That gets you the water cooler conversations, but it doesn’t get you the snippets you overhear at a restaurant or in line at the grocery store. What if your phone communicated with the phones around you, collecting messages and offering messages and then the results of those exchanges came up in your Twitter feed? We all have these explicit networks – our friends, our families, our coworkers, our congregations and classmates – but there are also these implicit, loosely defined and weakly bound networks based on where we stop for gas, where we shop for butter, and where we go for burritos. Social networking apps try to emulate the explicit networks and extend their reach, sending messages out farther than we normally do in personal interactions. What about the others?

I hate the idea of foursquare because I think it’s creepy (and more than a little stupid) to advertise your specific, personal location at any and every moment. “Hey, Internet, Charles Emerson Winchester III is at Taqueria Vallarta in Felton right now and therefore a good hour and a half away from his house full of expensive and easily fenced consumer electronics. Also, please let his psycho stalkers know this.”

PDF::API2 and Landscape

I’m currently working on a way to generate a custom PDF of a Bugzilla record (which, in turn, contains a bunch of custom fields). One of the requirements of the spec is that the PDF is targeted at US letter size paper in landscape orientation. I’m looking at using PDF::API2 and PDF::Table but one of the problems I had, just like manu, is that when you call $page->rotate(90) it sure-enough rotates the page at render time, but it’s really as if you printed on a portrait-oriented page and then turned the page sideways. This is not what one expects, since this is not, at the end of the day, something that one has much call to do.

Here’s how to achieve the actually desired effect: set the mediabox manually to the appropriate settings for a landscape orientation.

$page = $pdfdoc->page();
$page->mediabox(0, 0, 11*72, 8.5*72);

In my code I’ve defined a function that returns that list so that the code can be a little more descriptive:

sub LETTER_LANDSCAPE {
    return (0, 0, 11*72, 8.5*72);
}

...
$page = $pdfdoc->page();
$page->mediabox(LETTER_LANDSCAPE());

There’s probably a prettier way to do it, but at least this works. Gotta ship code, man.

Prime Factorization – Actual Code

I finally had a little time free and put together a solution to the prime factorization problem. As with the tic-tac-toe program before, there are lots of opportunities to make this program better. This only runs once, rather than looping. The number being factored is a constant so you have to edit the program to get the factors of a different number. I limited the list of primes so the program as it stands will only compute the prime factors of numbers less than 65,535 (an homage to the old 8-bit days).Continue reading “Prime Factorization – Actual Code”

I Hate Your Favorite VCS

Whenever I have to start working with a new software package to do a task I already know how to perform using a different software package, I feel a little frustrated. I’m sure everyone can relate to this. Programs that do similar things are often unnecessarily differentiated. It’s as if DeWalt and Makita made cordless drills that not only had different colored plastic and different battery packs but also spun around in entirely different dimensions and one was hand operated while the other was controlled with facial tics.

I’ve now used, professionally, several different version control systems. Visual SourceSafe, CVS, Perforce, subversion, Mercurial, Bazaar, and git. I hate them all.

Okay, maybe that’s a bit strong. I’ve figured out how to get work done with Perforce. I really love its changelists. That’s great. Other systems let you shelve changes, and that’s great, too. But here’s the deal: I’m in a new environment, I know how to write software and I’ve got bugs to fix. I don’t want my tools to get in the way. And yet, here I am, trying to figure out how in the world to undelete a file, how to commit a change, how to remove files, and how to generate a diff that doesn’t make my eyes bleed. And did I mention that I’ve got actual work to do?

The latest crop of distributed SCM tools (git, Mercurial, and Bazaar) want you to drink their Kool-Aid and spend days just becoming a dittohead for their path. I’m getting a bit profane and testy because it’s taking me too dang long just to get done what I want to get done. I’m not a 16 year old with nothing better to do. I will pay actual money for someone to write a decent manual.

I want it to be task oriented and with real examples. I have a repo with files in it that shouldn’t be there. How do I delete them? I want my cleaned up repo to be picked up by the main repo. How do I do that? Those deleted files are actually metadata for my development environment; once I delete them from the repo I want to put them back in place locally; how do I keep the VCS client from deleting my files or bitching about them the next time I pull changes from the repo?

Everyone puts up “how-to” pages for creating a new repo (which you do once per project), checking out source, adding files, checking in changes, and sometimes even branching and merging. That’s not enough. Revert files to the unlabeled version from yesterday before lunch. Restore a deleted file. Ignore some files in the source tree that were temporary files or program logs or IDE metadata. Rename a file. Move a file from one directory to another. Move a whole directory. Look at the version history of a file to figure out who, four years ago, was the person who wrote an otherwise undocumented subroutine so you can ask about it. Start doing these things and you realize why configuration management is an actual professional field distinct from software development. You’ll also discover that whoever set up the repo in your company didn’t know what he was doing, any more than you do.