Story Time

Apropos of my KenKen puzzle solver, a user writes:

I love this solver, but isn’t there a site where we can test our partial solutions and get a “correct” or “incorrect” verdict? That way we can keep going or start over without seeing the entire solution.

Well, the answer is now: “Yes, there is!”. Let me give you a quick overview of how that happened.

Continue reading

Posted in Projects | Comments Off

Justification

While reading “The Prince” I came across a passage that dramatically reshaped my understanding of the phrase “the end justifies the means”. The passage (from chapter eighteen) goes like this:

[I]n the actions of men, and especially of princes, from which there is no appeal, the end justifies the means. Let a prince therefore aim at conquering and maintaining the state, and the means will always be judged honorable and praised by every one, for the vulgar is always taken by appearances and the issue of the event; and the world consists only of the vulgar, and the few who are not vulgar are isolated when the many have a rallying point in the prince.

Let’s look at this a little bit.

Continue reading

Posted in Jack Handy | Comments Off

Pacquiao/Clottey

I see that Manny Pacquiao is fighting another “welterweight” match at a catch weight (of 144). I think that this sort of thing is ridiculous; the weight classes are there for a reason, and if you’re too small to fight in a class at the class limit then maybe you shouldn’t be in that class. This business of negotiating guys down to catch weights is a sham.

If Manny Pacquiao fought Joshua Clottey at 147 I would pick Clottey to win by TKO. I think he’s still got a good shot at 144, and frankly hope he gives Pacquiao a solid thrashing, not out of any personal animus, or bitterness over the breakdown of the Mayweather/Pacquiao “superfight”, or self-righteousness about any alleged use of “banned substances”, but simply because I don’t like to see the rules bent to make a very good fighter seem otherworldly.

According to this interview with Joshua Clottey, the fight will actually be at the welterweight limit. In that case: good for Pacquiao for not bending the rules (again), and I still pick Clottey by TKO.

Posted in Boxing | Comments Off

Robot Odyssey

Robot Odyssey is one of those early-to-mid-80’s computer games of which I am unreasonably fond. I’m not bringing it up to gush, however, but actually mention it because it’s a little annoying, albeit for an interesting reason.

Most games of its era really don’t suffer from their primitive technology because designers tailored their games to the capabilities of the hardware. As a result, games like Hacker, or Neuromancer, or Trinity hold up remarkably well; their look-and-feel is jarring to the modern sensibility, but it doesn’t interfere with the fun of the game. Robot Odyssey, on the other hand, does suffer from its technology; early-80s microcomputers just weren’t up to laying out digital logic circuits, and the awkward interface really gets in the way of the gameplay.

It’s still worth seeking out if you’re in the mood for a classic puzzler with strong EE flavoring.

Posted in Jack Handy | Comments Off

NSFetchedResultsController Warning

In what may well become a continuing series, I’ve got another word of warning for you about the otherwise astoundingly useful NSFetchedResultsController (NSFRC) class. It turns out to be highly inadvisable to delete an object that’s referenced in the NSPredicate of an NSFRC’s NSFetchRequest. For instance, if you set up an NSFRC with code that creates a predicate like this:

request.predicate = [NSPredicate predicateWithFormat:@"ANY people == %@",somePerson];

and subsequently delete the somePerson object (e.g. with the deleteObject: method of NSManagedObjectContext), then you’re setting yourself up for trouble.

Continue reading

Posted in iPhone | Comments Off

Saul Alinsky

Since we’re within measurable distance of the end of “The Prince”, I’m casting about for the next subject for Book Club. I’m considering (among others) Saul Alinsky’s “Rules for Radicals”. Stopping off at WikiPedia, I found the following except from the first chapter:

What follows is for those who want to change the world from what it is to what they believe it should be. The Prince was written by Machiavelli for the Haves on how to hold power. Rules for Radicals is written for the Have-Nots on how to take it away.

Now, every part of this is deeply disingenuous, deeply stupid, or both, but I want to focus on the middle sentence: “The Prince was written by Machiavelli for the Haves on how to hold power.”, and briefly explain why it is wrong in every important respect.

Continue reading

Posted in Jack Handy | Tagged | Comments Off

Now Available on Twitter

I’m experimenting with an automated re-tweet of this blog. If you’d like to view it as a series of context-free headlines and cryptic links, you can now follow @notobvious on Twitter.

Posted in Jack Handy | Comments Off

Web Design for the iPhone

AAPL provides a document that can be a great help to anyone who is trying to produce web content that will look good on the iPhone. Perhaps the most relevant part of this document is its discussion of the viewport, and perhaps the biggest takeaway from that discussion is the idea that, as a starting point for building mobile-Safari-compatible webpages, you should add this line to your HEADs:

<META name="viewport" content="width = device-width">
Posted in iPhone | Comments Off

Code Review

I probably now spend more time reviewing my code than I do writing it. In some cases, maybe twice as much. I would love to stop doing that, because it’s not much fun, and a huge time sink. Unfortunately, every time I start to consider dropping this part of the development process, I find some hugely relevant problem during a code review. Oh well.

Posted in Jack Handy | Comments Off

ABUnknownPersonViewController

The ABUnknownPersonViewController class is a handy way to prompt users to find records in, or add records to, the iPhone address book from within your application. Unfortunately, it’s not the most intuitive thing to code for. Today, I present a brief guide to integrating this controller into your application.

Continue reading

Posted in iPhone | Comments Off