Category Archives: Code

a few very small mobile apps, as I learn jQuery Mobile

I’m putting together a few mobile apps (in the form of mobile web sites) that are designed for small-screen phone use. Here’s what’s in the works. Each of these are likely to change over time, so don’t get too fond of anything just yet.

The a2trees app provides some kind of on-the-go listing of street trees in Ann Arbor that are interesting. The observation that there is a great apple crop in 2013 and that there are city trees laden with nice apples just waiting to be picked was the motivation. It’s really bare-bones now, with not more more in the way of detail than my old juneberry listing post, except neatly set up for mobile use.

The mobile web app is self-referential in that it tries to collect useful bookmarks to mobile-ready versions of things like newspaper, bus, weather, netnews, and other web pages specially formatted for mobile use. I got tired of typing in the URL to fetch the bus listing so I put it on a menu. This is an up-to-dated version of the list I kept of mobile sites on dating back about 5 years from when I had a Blackberry and was collecting same. The project is up on Github (and has been for the past 5 years!) but there’s not much more to look at than data. Please do feel free to give me feedback there as well as here.

Finally two power outage related mobile sites. The mobile power outage maps collection is a slow but sure approach to turning my popular power outage maps blog post into something more tidy for the small screen. The state it’s in is functional but not complete, and I expect I’ll chip away at it as storms or outages warrant. A second and new app for me is a utility company finder site that takes as its input the first three digits of a zip code and returns the utility companies that serve that area, or type the utility name and get back a list of 3-digit zips it serves. The big caveats on this are that it’s slow, slow, slow, and that the data set it’s derived from is nominally from 2011 but shows many signs of not being kept up to date with utility mergers and name changes since then.

All of these “mobile” things are browser-based right now, so you can try them from whatever system you are likely to be typing at. They use jQuery Mobile for the fancy bits, and I’m pretty happy so far in just how far I get with that system using HTML do to the work and not having to write a bunch of Javascript to get things to work. On the server side I have been generating these as static sites using old-fashioned Unix shell scripts and makefiles, and though it’s not elegant by any means, it is well within exactly the kind of coding environment I’ve been using since the 1980s.

Taking inventory of old Github projects

Setting up Octopress has given me a chance to look through some of
my old Github repositories and re-assess what’s there and how to
improve on them.

This is more like a wish list than an actual set of directions, and it
reflects how much the world has moved since I first signed up for a
github account.

  1. aadl-amazon-linky and superpatron. Both of these are interfaces
    to the Ann Arbor District Library catalog, which has a very accessible
    programming interface with things like RSS feeds for catalog searches.
    I’d like to go back and revisit two parts of this. One was a Greasemonkey
    plugin to put library results in Amazon; that should be a Chrome plugin.
    The second was a “wall of books” report displaying an RSS query as a
    page full of book cover images. Of the two, the second looks easiest to
    recreate; I just checked in some new code, wall by keyword, which does
    the trick.

  2. vielmetti-shelltools. This is a small collection of shell scripts
    that I carry around with me and put on whatever system I happen to be
    working on. It would be worthwhile to go back through and compare
    what I used then with what I use now and refresh the collection.

  3. postcard. This was a hopeful project to use various web-to-postcard
    APIs to generate custom postcards on the fly from the command line. Alas,
    several of those APIs have disappeared. The real action in this market is
    sending a real postcard from your iPhone or Android phone, with products
    like Postagram leading the way. The other neat feature is to go to a drugstore
    and make an instant print, then stick a stamp on the back and mail it.
    (Steve Cisler taught me that trick.)

  4. twitter-mutual-friends. Once upon a time, the Twitter API was so
    simple that you could write a useful application in four lines of shell
    script. Now the API has improved itself, and it’s gotten a lot more
    complicated. Look at simple apps like latest_tweets by gianu to
    get an idea of what you’re up against now.

  5. mobile. Again, once upon a time, I had a Blackberry phone which
    had the world’s worst usable web browser. Fortunately there were enough
    web sites that had a minimalist presentation that I was able to put
    together a directory of workable sites, which I used for quite a while.
    Now I have an Android phone that runs Chrome as well as apps and I don’t
    need the list of sites quite so much; still, it’s worthwhile to have
    a place to collect them when I find them.

So when it’s time to write some code here are some ideas for where
to start again!

octopress up and running

I am using Octopress to build a new web site at This looks like it will be a good place as any to write about code and any github projects I am working on. I will keep writing about everything else here.

To write in Octopress you put files in a directory written in Markdown. Then you use a command line tool called ‘rake’, the Ruby version of ‘make’, to do the publishing. Files that have changed get checked in to github. Then the whole site is put into static files, so that it all loads fast.

Amazing how much more time you have for hacking when you are not on Facebook.

Hacker News summary, 1 June 2013, 11:15 p.m. EST edition

A late night Hacker News summary, pulling from

1. Apple betrayed by its own law firm. John J. McAleese, III, an attorney at one of Apple's own go-to law firms, (Morgan, Lewis & Bockius), was behind a patent troll lawsuit from Flatworld Interactives. McAleese has been digitally erased from the Morgan Lewis site. (Ars Technica) "I predict this is going to be as much fun to watch as the Prenda Law case!" ( 4 comments ) 

2. Bill de hOra writes about the Go language. "To my mind it bucks some orthodoxy on what a good effective language is supposed to look like; for that alone, it's interesting. It makes sensible engineering decisions and is squarely in the category of languages I consider viable for server-side systems that you have to live with over time." 

3. In the New York Times, Wikileaks founder Julian Assange takes on the banality of Google's "Don't be evil". His review starts: “THE New Digital Age” is a startlingly clear and provocative blueprint for technocratic imperialism, from two of its leading witch doctors, Eric Schmidt and Jared Cohen, who construct a new idiom for United States global power in the 21st century. 138 comments: "But I must confess, that Julian Assange seem to be rather well spoken. And language wise – at least – it was a rather joy to read. Seemingly unlike the book he was reviewing."

4. code search on Github turns up tens of thousands of PHP projects susceptible to a SQL injection attack. 79 comments: "There's more low-hanging fruit, if you're willing to use more specialized searches."

5. Manish Burman and Brandon Kase wrote a version of grep that uses hardware acceleration from the CUDA libraries to run 2 to 10 times as fast as standard grep. 22 comments include discussion from the developers.

6. Max Headroom and the Strange World of Pseudo-CGI, a discussion in Cartoon Brew of the weird pseudo-computer animated graphics of the 1980s that were done with a series of non-computer techniques. 19 comments.

7. "Cruise ships are similar to assisted living centers in the amenities provided, costs per month, and many other areas." J Am Geriatr Soc. 2004 Nov;52(11):1951-4. 7 comments: "I met an elderly woman that lived on a cruise ship. She need a walked but was otherwise in good health. She knew everyone on the ship, and made new friends with every cruise. To her it was an awesome life, rather than being stuck in some home. The discounts you get for multiple cruises made it quite affordable for her. Eventually she would need more healthcare but she was going to stay as long as she could."

Hacker News summary, Wednesday 29 May 2013, 5:00 p.m. EST edition

Welcome to the Wednesday version of a daily Hacker News summary. In the news today: a new Gmail interface, a Drupal security breach, how to negotiate a job offer, Bill Gates goes to India, and Mary Meeker’s Internet Trends.

I’m going to diverge a little from past practice and pick and choose a little more carefully than normally, going a little beyond the top 8 to find the stories that actually interest me.

1. Gmail is getting a new user interface, one that adds tabs and more integration with Google+. (Gmail Blog) “I know we feel the need to comment on everything right away these days, but honestly there isn’t much to say about this feature until we’ve actually used it.” (223 comments)

2. “The Security Team and Infrastructure Team has discovered unauthorized access to account information on and” Users are advised to change their password, not to reuse passwords between sites, and to turn on two-factor authentication.
“Malicious files were placed on servers via a third-party application used by that site.” – and commenters are wondering which third-party app was involved.

3. For $100/node/month, Linode announces a managed IT infrastructure.
“If the remote hands are awesome, this is well worth $100 per node. If they are anything but awesome, this wouldn’t be worth it for any amount of money.”

4. “The Magazine” has been sold by founder Marco Arment to editor Glenn Fleishman.
(Marco Arment)
Instapaper. Tumblr. and now The Magazine. Sounds like Marco is clearing house a bit.

5. How to negotiate a job offer. “If you’re not currently working, and you don’t have competing offers, you’re pretty much out of luck.”
“The “Pre-Reqs” piece is not right. You really don’t need to have another job offer or a current job to negotiate. ”

6. Bill Gates is going to India because it has the grand challenge of extreme poverty and also the resources to attack that problem. He’s also going to pick up some dance moves from a Bollywood star.
(The Gates Notes)
“Have you seen real poverty? Just take a trip to Mumbai and visit the slums there.”

7. Amazon announces “Login with Amazon” as a single sign-on function for web sites.
(Amazon PR)
“I think this is a great idea. I don’t love the Facebook OAuth flow and the amount of access most apps ask for.”

8. Mary Meeker’s Internet Trends.

Hacker News summary, Tuesday 28 May 2013, 9:45 p.m edition

A late evening version of Hacker News for Tuesday 28 May 2013. I've added links to the comments for each entry, and try to pull out a useful quote from the comments if there are any that are easy to find. Of interest: Pixar raytracing, Liberty Reserve money laundering, and Harvard email snooping.

1. A breakdown of github pull requests by acceptance rate, for a variety of languages and projects. If you want to get your pull request accepted, don't write C++, write Scala; and contribute to projects like Akka and backbone-fundamentals that take 80+% of pull requests. (Paul Miller) "I'm surprised the acceptance rate is so high." (28 comments)

2. "Pixar's lighting/rendering systems were completely redone for their new film Monsters University." Correspondence with Chris Horne, who worked on MU. "So our Director of Photography went to a studio that is so clearly raytracing averse and essentially said "We're raytracing everything." (Mason Smith) (92 comments)

3. "Liberty Reserve, which was incorporated in 2006, was a "bank of choice for the criminal underworld," according to the indictment, which said the operation allegedly laundered the money through 55 million transactions before it was shut down earlier this month." $6 billion was allegedly laundered. (Wall Street Journal) The comments note the precarious legal position of various Bitcoin exchanges. (50 comments)

4. Topcoat is "CSS for clean and fast web apps". Download version 0.3 (Github). The comments compare it to Twitter Bootstrap and Zurb Foundation. (78 comments)

5. Thomas Friedman writes about HireArt, which has HR software to better match candidates with job openings by tailoring tests and quizzes to the qualifications for the job. (NY Times) (no comments)

6. Evelynn Hammonds will step down as Harvard College dean, in the wake of a scandal involving searches of Harvard faculty and staff email accounts. She will return to teaching and research in the History of Science and African and African American Studies departments. ( (18 comments)

7. A Facebook engineer waxes poetical about his four years with the company and the engineering challenges he has faced. (Ryan Patterson) (1 comment) (why is this on the top 10)

8. You have 13 days to buy the Humble Indie Bundle 8 with 7 games for Windows, Mac OS X, and Linux. Pay what you want. (Humble Bundle) The comments have game reviews, many of which are favorable. (53 comments)

9. Build startups and systems to help the "unexotic underclass", which lives in small town America and includes single moms, returning veterans, and others who live outside of the startup-fueled glitz of Silicon Valley (C.Z. Nnaemeka) "Condense the article down and you're left with this nugget of advice: You'll have a better chance of success if you target unsaturated, boring markets." (28 comments)

10. Pure is "a set of small, responsive CSS modules that you can use in every web project" brought to you by Yahoo! The library is tiny and works well with mobile applications. (Pure) The core developers of Pure are contributing in the comments. (106 comments)


Related articles

Pixar moves to raytracing
On summarization
Hacker News summary for Tuesday 28 May 2013, 7:00 a.m. edition
The Evolution Of Hacker News
Liberty Reserve shut down in $6bn money laundering case

Hacker News summary for Tuesday 28 May 2013, 7:00 a.m. edition

Here's a summary of the top stories on Hacker News at this moment, as part of daily exercise to do a closer reading of the tech news. See On Summarization for more background.

1. "Opera for desktop has not only been redesigned; it's also completely re-engineered under the hood. With the Chromium engine, users get a standards-compliant and high-performance browser." (Opera) "The price of switching to Chromium: = 37.8 MB,
Opera = 103.1 MB" (@maxart via @gen)

2. "The Haskell Platform is the easiest way to get started with programming Haskell. It comes with all you need to get up and running." For Windows, OSX and Linux.  Current release: 2013.2.0.0 (Haskell)

3. John Dryden, a Batavia IL teacher, is under fire from the school administration after informing his students of their Fifth Amendment rights against self-incrimination. The students were given a survey with their names on it asking about drug, alcohol, and tobacco use. (Daily Herald)

4. Sony has made a lot of money selling insurance and making movies and music, and has lost quite a bit selling electronics. Analysts wonder if Sony should exit the electronics business rather than invest in strengthening it. (NY Times)

5. There is a problem with the spacing on Facebook's display of text in the timeline, and 3 pixels of added whitespace would fix it. "I'm sorry for rageskitching about Facebook, but I can't help it." (Garry Tan)

6. "Michael Markieta, a transportation planner at global engineering and design firm Arup, has spent the last year developing visualisations of flight paths crossing the globe." The maps are very pretty. (BBC)

7. "Identify a pattern, run a mask, put recovered passes in a new dict, run again with rules, identify a new pattern, etc." How password cracking is done. (Ars Technica) "Correct horse battery staple." (XKCD)

8. "I am still learning to manage my time better and would love to hear your thoughts if you’ll are a startup dad/mom." Some productivity hints from a father of a young child who runs a startup. (Sahil Parikh)

9. "These cases are covered under a new HTML5 called the meta referrer. Now a simple tag can be used, such as <meta name="referrer" content="always">, to specify the exact behaviour of the HTTP Referrer regardless of whether we're using HTTP or HTTPS." (Stephen Merity)

10. Find a set of complementary colours just by moving your mouse around. (