Want a Job?

I can’t recall if I mentioned it or not, but I spent a good bit of time looking for work when I was in Colombia … not there, but here. Between the Internet and Skype you can do 80% of your job search without even setting foot in the US. It worked out, and since mid-May I’ve been working at Motorola on the MotoCast team.

(Do I really need to mention that everything I say here is on my own account, and not on behalf of Motorola Mobility, Inc.? Yes? Well, consider it said.)

Req

Now I’m on the other side of the table, and looking to hire. So if you’re a sharp engineer, I’d like to hear from you. Nice-to-haves include Java, mobile, multimedia (GStreamer, transcoding, &c.), and server-side, but the real requirement is great coding chops.

What’s In It For You?

Relative to some of the criteria I’d laid out for what makes a good job, I can tell you that you’ll be working with “hot” technologies (mobile, “cloud”), writing a marketable language (mostly Java, some Ruby, and as much Python as I can sneak in), and solving important problems on an important product.

Compensation is good, work arrangements are flexible, and the people are agreeable. If you live and work on the San Francisco peninsula, please send me your resume. (Helpful resume writing tips here.)

Posted in Projects | Comments Off

GCHQ VM

So, Britain’s GCHQ (the UK’s equivalent of the NSA) has put up a programming contest to attract coders. (The punchline is that the gig only pays $39,000, so good luck with that, chaps.) There are several parts, and the only one that appealed to me required the user to implement a little VM. Since I’m a sucker for simple machines, I thought I’d give it a go. (The original puzzle is here.)

Continue reading

Posted in Reverse Engineering | Comments Off

Alfonso Cano is Dead

The FARCs top dog just got killed. Couldn’t happen to a nicer guy.

Peace

The funniest thing about this story is the following comment from the link:

Five Decades and the fighting’s still on? With all the killings and maimings and bombings on all sides aside, can’t someone or group or neutrals come up with some form of negotiated settlement and permanent solution to this “cancer” in the innards of Colombia?

You gotta love fools like this. The solution is victory, and today it is one step closer.

Prosperity

Incidentally, it is my view that in 50 years Colombia will be the preeminent country in Latin America. “What about Brazil?” you ask. Well, in Brazil they elect leftist guerrillas, and in Colombia … well, they deal with them differently. This difference will tell over time.

In that connection, I’d like to mention in passing how delighted I was to see the Colombian FTA finally signed. Long overdue.

Posted in Jack Handy | Comments Off

The Internet, Summarized

Too good not to quote:

The Internet has a lot about it that is admirable, but it is also a completely open book which is mostly filled with mindless, narcissistic drivel, pornography, bigotry, self-delusion, paranoia, redundant nonsense, and spam.

Love that “mostly”.

Posted in Jack Handy | Comments Off

Sillyness

For some reason, I’m inordinately fond of claiming that a particular song belongs to the “my-dog-left-me-and-my-wife-got-run-over-by-a-truck” genre.

Speaking of which: Take it away Roy Clark

Posted in Jack Handy | Comments Off

What a Coincidence!

I like to drop by Yahoo’s Colombia site every now and then. Although I like to joke that they only run three stories (Shakira, floods, and extradition) you do, in fact, see some interesting stuff.

Today, for instance, there were these two stories:

EEUU podría enviar al Congreso acuerdos de libre comercio

Mahmud Abas buscará en Colombia voto clave a favor de Estado palestino

The first story reports that Obama may finally send the Colombia, Panama, and South Korea FTA agreements to the Senate on Monday. The second story reports that Mahmoud Abbas is poking around Colombia for support in re: his quest for a Palestinian state. (Colombia currently holds one of the rotating seats on the UN Security Council.)

I’m just saying.

Posted in Jack Handy | Comments Off

Pushing the Boundaries of Stupid

If you’re lucky enough to live in a state that hasn’t, say, lost its mind, learn from our example and don’t make our mistakes.

Posted in Uncategorized | Comments Off

My Pet

People sometimes ask me if I have any pets. My usual response is: “No, but I have a houseplant I’m very proud of.” As it turns out, however, I do have a pet. Well, sort of. The adorable little guy to the right has been hanging around my apartment for the last week or so, and I seem to keep surprising him while he’s out and about. (Like almost all of his genus, he’s very shy. I think I probably nearly gave him a little spider heart attack while taking his picture.)

He’s about 2.5in leg-to-leg, and an excellent climber. (He can climb right up those vertical window blinds without problems.) He’s also passionately committed to the theory that if he stands still he’s as good as invisible. This doesn’t strike me as a good theory, but based on his size it’s obviously served him well for a good long while. It warms my heart to know that he’s out there, fighting the good fight against the 6-legged banes of my existence. And isn’t that just the cwuootest widdle face!?

(Editorial note: Some parts of this post may be written slightly tongue-in-cheek. OTOH, I genuinely do like and admire spiders. Maybe it’s because they build traps — there aren’t too many animals that do that. Much cooler than merely building a nest, or those lame dams that beavers build. Now, if the beavers put in hydropower installations — that would be cool.)

Posted in Jack Handy | Comments Off

EMs

A reader writes:

Can you add option to print in larger print?

I print puzzles, and need larger squares for possible choices, mostly 8’s and 9’s.

As it turns out, this was pretty easy to do. If you visit my puzzle page, and use your browser’s “Print” feature, the grids will now print out about 35% larger than they used to … this is about the biggest I can make them while still fitting the result onto an 8 1/2″ wide page.

CSS

I already had a media-specific STYLE tag for printing:

<STYLE type="text/css" media="print">
	div.field {
		position:		static;
		width:			100%;
	}
	div.copy {
		display:		none;
	}
	p.controls {
		display:		none;
	}
	td.active {
		background:		transparent;
	}
</STYLE>

So all I had to do was adjust the base font-size:

<STYLE type="text/css" media="print">
  	body {
		font-size:		100%;
	}
	// … snip …
	td input.cell_data {
		border-bottom:		0px;
	}
</STYLE>

(I also took the opportunity to remove the input field markers shown on the web page.)

EMs

This worked because all my font-size parameters were set relative to the document’s base font-size (in the BODY tag), and (almost) all my spacing, padding, borders, &c. were specified in ems. EMs are a unit of size defined in terms of the font-size of the containing element. Therefore, when I changed the BODY's font-size, the entire document scaled properly.

This is a pretty old trick, but since it came in so handy, I thought I’d mention it.

Posted in Web stuff | Comments Off

UISplitViewController (Quickie)

I’ve been working on porting Taipan! to the iPad, so I recently installed a UISplitViewController as the root of my controller hierarchy. There was a somewhat non-obvious trick to getting it working (spoiler warning: orientations), so I thought I’d write a short piece about it.

The Easy Way

The Apple documentation states:

The easiest way to integrate a split view controller into your application is to start from a new project. The Split View-based Application template in Xcode provides a good starting point for building an interface that incorporates a split view controller. Everything you need to implement the split view interface is already provided. All you have to do is modify the array of view controllers to present your custom content. The process for modifying these view controllers is virtually identical to the process used in iPhone applications.

Everything written there is absolutely true, but since I wasn’t starting from a new project, it wasn’t relevant to me. I followed the instructions for adding a UISplitViewController to an existing project, but the result didn’t work. The problem turned out to lie with interface orientations.

Autorotation

All UIViewControllers respond to the shouldAutorotateToInterfaceOrientation: selector — but, as Apple puts it:

By default, this method returns YES for the UIInterfaceOrientationPortrait orientation only. If your view controller supports additional orientations, override this method and return YES for all orientations it supports.

The default behavior worked just fine for the iPhone version of the game, as landscape mode didn’t make much sense for my UI. Unfortunately, it turns out that UISplitViewControllers don’t work well if their child controllers don’t support all (or most?) of the possible orientations. Their behavior seems a little unpredictable: black screens, views drawn only in some orientations, views drawn only after a rotation, &c., but it’s always ugly and wrong.

Solution

The first-order solution is simple enough: just include the following code in all the view controllers displayed inside the UISplitViewController:

// Override to allow orientations other than the default portrait orientation for iPad.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) || (interfaceOrientation == UIInterfaceOrientationPortrait);
}

(Be sure to include this code in any descendant view controllers, e.g., view controllers pushed onto navigation controllers displayed inside the split view controller.)

The complete solution is a little tricker, as all affected view controllers must be recoded to display properly in all orientations. Some may work automatically, but, at a minimum, you’ll probably be revisiting some NIBs.

Posted in iPhone | Comments Off