Netninja Mobile, now with sudoku

A little over two years ago, back when the iPhone SDK consisted of “here, kid, here’s a text editor, now go away and make yourself a nice little web page, and quit botherin’ me,” I quickly hacked together a little web control panel and called it Phonemarks. It ran, and continues to run in some form or another, at It has not been terribly useful in recent times. There are now native apps. You can put bookmarks to pages on your home screen. Through the magic of Foxmarks, I can keep my bookmarks in sync between Firefox (all the places I have Firefox installed), Safari, and (by extension) the iPhone. My Phonemarks project has all but died due to lack of usefulness and lack of interest. The only thing I find useful about the page these days is the search box. It allows for quick searching of Google, Google Images, Wikipedia, IMDB,,, Amazon, Powells, and Netflix. Adding a new search site is extremely easy. This simple little form has saved a ton of time.

Veering off in a seemingly different direction for a bit: I enjoy sudoku. I enjoy working on sudoku puzzles with pen, paper, and my brain — without the aid of programs to do the grunt-work for you. Increasingly, I can solve moderate and even a few difficult puzzles doing this grunt-work entirely in my head, but even when I have to do it, I find it simple and repetitive enough to be a sort of exercise in zen relaxation. Yeah, it’s weird to talk about a number puzzle like that. Quite often I will go to the New York Times daily hard puzzle and the USA Today daily puzzle and copy them down to a blank Hipster PDA sudoku template for “offline” “low-fi” play. Because one of those pages is Java and the other is Flash, it means I have to be sitting at a desktop browser to do this. Access from the iPhone does not work.

Veering off in yet a different perpendicular for a bit: I reverse engineered the data protocol for both sudoku sites ages ago. I took lots of notes and wrote pseudocode, but never got around to writing actual code. A few months ago, I cut my teeth on Adobe Flex programming by finally implementing a data scraper app in Flex. Flex is a nice language. For a sandboxed GUI front end. For apps that don’t integrate well into the native OS. It’s like Java for the Web 2.0 world and allows you to trade in all of the problems with Java for an entirely new set of problems. Don’t even talk to me about variable scoping. My sudoku scraper app is not available for download, as it only works in the debugger due to some cross-site sandboxing issues. A few weeks ago, I rewrote that scraper in PHP and attached it to my iPhone homepage.

Just today (finally tying together the above asides — see, I was going somewhere with those), I made a homepage for the Kindle similar to my iPhone homepage. Some things could be left out of the search form — for instance, Google, Wikipedia, and dictionary searches are available from just about everywhere in the Kindle OS, so are redundant enough to get in the way. IMDB searches are useful (but would be more useful if they offered a mobile version of their site; their site is dog-slow on the Kindle’s browser). Sudoku, of course, is in there.

netninja-home-iphone netninja-home-kindle

So far my only complaint with the Kindle web browser is that, while some parts of CSS are available, other (seemingly simpler) parts are not. There is no monospaced font. There is no non-breaking space. There is no <pre> tag. I tried to lay out the sudoku grid as plaintext instead of a table to shave a few dozen (or hundred?) milliseconds off of the page rendering time. Due to the nature of how I’d be using it, I care more about the speed of the page and the data contained in it than I care about a pixel-perfect fancy layout. But oddly, table CSS such as the right and bottom borders of the individual table data elements work fine but features I consider to be more simple, like monospaced plaintext, do not work at all. Javascript sometimes works, but often does not, so I will have to rework my Kindle/iPhone autodetector to work in PHP or mod_rewrite.

Posted in: Code iPhone Mobile

Leave a Reply

Your email address will not be published. Required fields are marked *