Vincent Gable’s Blog

April 10, 2009

Pre-announcing Prometheus

Filed under: Announcement,iPhone | , , ,
― Vincent Gable on April 10, 2009

For the past month I have been working on my first iPhone application, code-named Prometheus. It’s a dedicated editor for Simple English Wikipedia.

Simple Wikipedia

The Simple English Wikipedia is a wikipedia written in simplified English, using only a few common words, simple grammar, and shorter sentences. The goal is for it to be as accessible as possible. That’s something that really resonates with me. There are many reasons why I think it’s an important project, but I’ll only briefly mention one sappy example.

Children can’t understand all of the Grown Up Wikipedia. Simple Wikipedia helps put more knowledge within their reach. I started writing weekly reports in the 5th grade. I’m sure many schools make students start sooner, and certainly I had to write infrequent reports much earlier. An encyclopedia at a 4th grade reading level would have been a fantastic tool to learn more about the world.

Prometheus

In Greek mythology Prometheus was, “the Titan god of forethought and the creator of mankind. He cheated the gods on several occasions on behalf of man, including the theft of fire.”

Similarly, the Prometheus iPhone app brings knowledge from the American-English Wiki Gods the to the majority of the world that does not speak English natively.

Given the platform, I believe enabling small quick edits is the best way to go. I want to make it easy for a native English speaker to spend 30 seconds correcting grammar while waiting in line.

With more constrained language, writing-aids become even more helpful. Surprisingly, I find myself using a thesaurus more when writing Simple English, to be sure I’m using the clearest synonym I can. There’s a lot more an application like Prometheus can do to help, because it’s not targeting a complex language.

Roadmap

I’ll be brutally honest, the first release is not going to have any fancy analytical features I originally envisioned. My goal is to get a 1.0 release out quickly, then iterate on the feedback and what I learn. I also have a selfish motivation here, because I’m looking for a job, and not having something in the App Store yet has been a big barrier.

What I can promise for 1.0 is

  • A greatly streamlined interface, as compared to editing through Safari.
  • A safe, save-free, experience, where nothing you write is lost if you suddenly have to quit and do something else.
  • Shake to load a random page. (Look, I know that’s nothing to brag about. But it is something Safari can’t do.)
  • A $0 price tag.

I’m trying to have 1.0 ready in about a moth, but that’s an aggressive goal.

Beyond that I would like to add a “simple-checker” that can flag complex terms, and a mechanism for as-you-type suggestions of more common terms. But both of these are technically challenging, and my main priority will be building on what I’ve learned by putting something in front of people.

Teaser

Here’s a picture of what I have running today.

prerelease.jpg

I have a lot to say about the evolving design in future posts. But this should an you an idea of what I’m shooting for — as minimal an interface as I can manage, hopefully condensed into one toolbar.

I don’t have an icon yet, if you can help there please let me know. Unfortunately this is a free project all around, so I’m not in a position to hire someone. My current idea for an icon is a hand
holding a fennel stalk with fire inside, much like an olympic torch. I’d love to hear your ideas.

Percent Escapes Gotcha

Filed under: Bug Bite,Cocoa,Programming,Sample Code | ,
― Vincent Gable on April 10, 2009

If you use stringByAddingPercentEscapesUsingEncoding: more than once on a string, the resulting string will not decode correctly from just one call to stringByReplacingPercentEscapesUsingEncoding:. (stringByAddingPercentEscapesUsingEncoding: is not indempotent).

NSString *string = @"100%";
NSString *escapedOnce = [string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *escapedTwice = [escapedOnce stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"%@ escaped once: %@, escaped twice: %@", string, escapedOnce, escapedTwice);

100% escaped once: 100%25, escaped twice: 100%2525

I thought I was programming defensively by eagerly adding percent-escapes to any string that would become part of a URL. But this caused some annoying bugs resulting form a string being percent-escaped more then once. My solution was to create an indempotent replacement for stringByAddingPercentEscapesUsingEncoding: (I also simplified things a little by removing the encoding parameter, because I never used any encoding other then NSUTF8StringEncoding),

@implementation NSString (IndempotentPercentEscapes)
- (NSString*) stringByReplacingPercentEscapesOnce;
{
	NSString *unescaped = [self stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
	//self may be a string that looks like an invalidly escaped string,
	//eg @"100%", in that case it clearly wasn't escaped,
	//so we return it as our unescaped string.
	return unescaped ? unescaped : self;
}

- (NSString*) stringByAddingPercentEscapesOnce;
{
	return [[self stringByReplacingPercentEscapesOnce] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
}
@end

Usage example,

NSString *string = @"100%";
NSString *escapedOnce = [string stringByAddingPercentEscapesOnce];
NSString *escapedTwice = [escapedOnce stringByAddingPercentEscapesOnce];
NSLog(@"%@ escaped once: %@, escaped twice: %@", string, escapedOnce, escapedTwice);

100% escaped once: 100%25, escaped twice: 100%25

The paranoid have probably noticed that [aBadlyEncodedString stringByReplacingPercentEscapesOnce] will return aBadlyEncodedString not nil, This could make it harder to detect an error.

But it’s not something that I’m worried about for my application. Since I only ever use a UTF8 encoding, and it can represent any unicode character, it’s not possible to have an invalid string. But it’s certainly something to be aware of in situations where you might have strings with different encodings.

April 6, 2009

A Teddy Bear in the Uncanny Valley

Filed under: Design | , , ,
― Vincent Gable on April 6, 2009

I came across this creepy robot on Sentient Developments,

battlebot.jpg

… Its head is designed to look like that of a teddy bear, to provide reassurance to the wounded soldier it is transporting.

I don’t think I’m alone in finding that cold metal visage discomforting. I wouldn’t want to come-to, bleeding on a battlefield, staring into those lifeless inhuman eyes.

Personally I think a red cross symbol on a plywood board would make a better head. It’s not unsettling, and it’s what medics wear, so it means “help” to the wounded.

What I find so interesting about the BEAR’s “face” is that it’s clearly nonhuman, yet feels off in the same way as an android from the Uncanny Valley. My understanding of the Uncanny Valley phenomenon was that people didn’t reject creations that didn’t mimic some real creature. But I can’t accept the BEAR, even though it’s mimics a fuzzy-doll, not any kind of living creature.

I think the BEAR is an important advance in life-saving technology. I’m sure that robots will have an important roll in dangerous rescues, on and off the battlefield. But I have a feeling that a more purly-mechanical looking machine would have a more pleasing bedside manner.

April 1, 2009

Microsoft Excel Does Not Excel at Graphing

Filed under: Design,Quotes,Usability | , , , ,
― Vincent Gable on April 1, 2009

I gripe about Excel a lot, as we’re more or less forced to use it for data analysis in the intro labs (students who have taken the intro engineering course supposedly are taught how to work with Excel, and it’s kind of difficult to buy a computer without it these days, so it eliminates the “I couldn’t do anything with the data” excuse for not doing lab reports). This is a constant source of irritation, as the default settings are carefully chosen so as to make it difficult for students to do a good job of data presentation.

Now, you might be saying “Well, of course Excel isn’t appropriate for scientific data analysis. It’s not really for scientists, though.” Which is true, but here’s the thing: the things I’ve complained about here aren’t good for anything. The color schemes and axis settings lead to illegible plots no matter what sort of data you’re working with. And I’m completely at a loss as to the purpose of the “Line” plot, or making it difficult to find uncertainties in fitted quantitites.

Professor Chad Orzel, Why Does Excel Suck So Much?

There’s no question in my mind that a lot of serious analysis is done in(spite) Excel. I’ve worked with some very smart programmers, with PhDs in experimental science, who have “numerics” in their job description, and used Excel to make quick graphs.

The best solution I can recommend is reading The Visual Display of Quantitative Information. It’s probably the best guide to honestly presenting data graphically.

Unfortunately I don’t have a good recommendation for a better software program. The excellent redrawings at the chartjunk blog were done in Adobe Illustrator (more info in this comment). But Illustrator costs $599, and is a complex drawing program. Honestly the sticker price, and ease of use, have kept me from trying it.

What do you use to draw graphs?

« Newer Posts

Powered by WordPress