Respirapedia on the iPhone

April 23, 2010, 8:36 pm

I was very happy to be involved in the development of Respirapedia. It's a glossary of respiratory care terms.

Now available on Android.

Over 1500 important respiratory care terms, for class, clinic, or home, all at your fingertips! An interactive glossary version on the book "Respiratory Care Lexicon" by Kenneth M. Bretl, Professor Emeritus at College of DuPage in Glen Ellyn, Illinois. An invaluable resource for the health care professional, the medical, respiratory, or nursing student, or the health care consumer. Practical, easy to use, and authoritatively accurate.

From apnea to zarfirlukast, from bardycardia to Yankauer, this lexicon serves all of your respiratory care needs and knowledge.

Glossary Engine Developed by Cannonade.Net. Distributed under contract for College of DuPage Press by Gnu Ventures Company and J&S Tech Designs

Permalink - Comments - Tags: Development,iPhone,App,Glossaries

Filtering pages with a Chrome extension

April 15, 2010, 8:00 am

I decided to dip my toe into the sordid world of browser extension development. Being a Google fan boy, I naturally decided to check out the newly minted Chrome extension framework. The illicit rush I received programmatically messing with other people's web content, is everything I imagined it would be.

I am a lurker and occasional contributor on Mahalo, specifically in the history tag of the Q&A section of the site. Some time ago Mahalo set up a relationship with another Q&A site, Conundrum Land, and are pulling their questions into the Mahalo answers stream. I wouldn't really have a problem with this, except that the questions tend to be pretty inane and are consistently miss categorized as history questions:

Are you better able to forgive yourself or to forgive another person?

I have tried to bring this up with the Mahalo team and haven't got much attention. So, armed with the gleaming scalpel of a browser extension framework, I have taken matters into my own hands.

This extension is extremely simple. It creates an icon in the address bar that, when clicked, will hide/show any questions that link to Conundrum Land. The icon is only visible if you are on a Mahalo Answers page.

If you also find the incessant drone of "conundrums" distracting, then you can find my extension in the gallery.

If you are interested, this is the business end of my extension:

function filterLink (question, i, hide) { // called for each question and featured question div in the tree var href = question.find(".question-link").attr("href"); // if this is a Conundrum Land question, then hide or show it (based on the UI toggle) if (href && href.length >= 34 && href.substring (0, 33) == "http://www.whatsyourconundrum.com" && hide) question.css("display","none"); else question.css("display",""); } var toggle = true; function showAll () { toggle = (toggle ? false : true); $(".question").each ( function (i) { filterLink ($(this), i, toggle); } ); $(".featured-question").each ( function (i) { filterLink ($(this), i, toggle); } ); chrome.extension.sendRequest({}, function(response) { showAll (); }); } // initially, hide everything $(".question").each ( function (i) { filterLink ($(this), i, toggle); } ); $(".featured-question").each ( function (i) { filterLink ($(this), i, toggle); } ); // send a message to background.html so we can get a callback when the user clicks the icon chrome.extension.sendRequest({}, function(response) { showAll (); });

Permalink - Comments - Tags: Development

Chomp Connect

April 9, 2010, 11:29 pm

I am a big fan of Chomp. It's social network driven software for iPhone app discovery. I think there are very real pain points with the app store and Chomp does a pretty good job of resolving those issues:

  • Negative Bias - Currently users are offered the option to rate apps when they are deleting them, so it is logical that there is a strong negative bias in ratings.
  • Barriers to review - I don't tend to review apps on the store because the UI is not available in the app.

With Chomp Connect I was able to add some UI to my about box which lets a user leave a review without closing my app. There is the initial barrier of a Chomp signup (if the user doesn't already use Chomp), but I think this barrier is still less than the multiple steps needed to review something on the app store.

The code to implement this functionality was trivial. I just had to include a bundle ,containing the code to show the Chomp dialog and some resources. Then add a few lines attached to my "Review on Chomp" button to show the dialog:

NSString *appID = [infoDictionary valueForKey:@"CFBundleIdentifier"]; ChompDialog *cDialog = [[[ChompDialog alloc] initWithApiKey:@"" forApp:appID] autorelease];

I did encounter a rather obscure problem when I went to submit my newly Chomified apps to the store. When I submitted the new binary, I got the dreaded generic submission message:

The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate.

If I didn't include the Chomp bundle, I was fine. With the Chomp bundle, I got the error. The Chomp dev team were extremely helpful sorting out this issue, which they hadn't seen for any of the numerous devs who had submitted apps without the problem. They asked me to check the contents of the bundle for any hidden files that might be screwing up the signature. What I found was quite interesting:

I downloaded the bundle, unzipped it, checked for hidden files and found everything ok. Then I copied the bundle from the downloads folder (on my MacOS HFS drive) to my dev directory (on a Windows drive). Boom! Suddenly there was a bunch of hidden files in the bundle. It turns out, when you copy from an HFS drive to a FAT32, MacOS needs to create a hidden file for some additional metadata that it can't put in a FAT32 file (fork data attributes).

So mystery solved. For any other lunatics out there that keep there source code on a FAT32 partition of their macbook, beware the lurking fork data attribute files.

Permalink - Comments - Tags: Development,iPhone

Programming Paragon

March 16, 2010, 1:25 pm

A very old friend of mine Phill Joyce has recently started a games development journal at pegwars.blogspot.com. As a programmer, Phill has been a source of inspiration since my very first days as a fledging programmer and I am looking forward to reading about his game development exploits.

The image is a 3D render of the ship model that Phill built for Pegwars v1. it occasionally reappears as my desktop background.

Permalink - Comments - Tags: links

Python vs Go Cage Match! Fight!

March 3, 2010, 8:30 am

So this is not exactly a comparison between Python and Go. I just wanted to use my Gopher eating a Python logo image.

I love Python, it is sleeping in on Saturday mornings, my favorite book being picked up by HBO, baby holding onto pinky finger ... well, you get the idea, I like it a lot. I use it extensively for the piles and piles of code I write that never sees the light of day. Code that pre-processes files, scrapes web sites, munges together data sets, but doesn't actually end up anywhere near a user. When I saw Rob Pike talk about Go at a Sydney GTUG meeting, it occurred to me that a slick, modern, compiled language might be worth looking at for some of these behind the scenes projects that I embark upon.

Compiled vs Interpreted

Ok, duh! This is why I am here. I love Python with the heat of a thousand suns, but waiting a couple of hours for a process to finish, cools my adour a little. Compiled languages are fast and, from what I have seen, Go is a fast compiled language that also compiles fast. Fast is a feature. I have stuff to finish so I can go and watch The Sopranos.

Strong vs loose types

Occasionally, when I find myself in a particularly self deprecating frame of mind, I feel like I fit the mold of a duct tape programmer a little too much. Not in Joel Spolsky's generous, smart and get things done kind of way, but in the dumb and makes lots of mistakes kind of way. For me programming in a loosely typed language (like Python or PHP) tends to be a sequence of tiny, and sometimes humiliating, steps from a hideously broken thing to something approximating a working system. It would be nice if I could build something that was a little less flawed from the beginning. My experience is that a strongly typed language helps me do that:

// ahh ... compile error :P var testStringMap = map[string] int {8:"eight"}

Useful built-in types

When I am forced to work in languages (and to be fair, this doesn't happen very often any more) that don't have strings, maps, arrays just built-in, it causes me physical pain:

STL I used to like you because it beat writing this stuff myself but, you kinda suck.

typedef std::map StringIntegerMap; StringIntegerMap mapThatMakesMeTypeTooMuch; int theNumberEight = 8; std::string alsoTheNumberEight ("Eight"); mapThatMakesMeTypeTooMuch.insert(StringIntegerMap::value_type(theNumberEight, alsoTheNumberEight)); StringIntegerMap::const_iterator it; it = mapThatMakesMeTypeTooMuch.find (theNumberEight); if (it != mapThatMakesMeTypeTooMuch.end ()) std::string whatWasThatNumberAgain = it->second;

Python .. is awesome.

pythonDictionaryFTW = {8 : "Eight"} theNumberEight = 8 if (theNumberEight in pythonDictionaryFTW): whatWasThatNumberAgain = pythonDictionaryFTW[theNumberEight]

The map semantics in Go are just a little weird. I am sure I will get used to it. I got used to STL after all.

var testIntStringMap = map[int] string {8:"eight"} var theNumberEight int = 8 if mappedString, ok := testIntStringMap[theNumberEight]; ok { fmt.Printf ("Mapped String %s\n", mappedString) }

Libraries

There are smarter, better looking programmers out there who can build awesome stuff that I want to use. I think the biggest reason not to switch from Python to Go is the range of third party libraries available for Python. Obviously this is something that will get resolved over time and I am sure there are lots of clever Google people squirreling away in their 20% time to build me awesome stuff (me personally). Beautiful Soup port for Go anyone?

Conclusions

I have lots more to learn about Go, but at this point I like it. It has a weird edgy feel about it that makes me feel a little smarter than I actually am, but it also reminds me a lot of Python and I luurve Python. I am hoping that I can find the time to actually build something real in the language and acquire enough knowledge to crush all resistance in the Go StackOverflow tag.

Permalink - Comments - Tags: Development,Google