Warming up to iPhone

I'm on the startup path. One thing you realize when you set out to do a startup where you will initially do all the heavy lifting is that you don't know everything you think you know. For me, I've been training for this for a while, I have web stack burned in to my head and it just drips out of my fingertips. However, what I didn't have was enough mobile to get me by. I've done plenty of web-based mobile apps and mobile web sites but what I plan to do quickly outgrew that and needed access to the phone's hardware.

I have released 2 apps which served me well as learning tools and submissions to the San Diego App Challenge. Win or lose, I figured I'd do these two apps rather than any "hello world" book samples.

San Diego Transit

Available for iPhone, this app is the only native iPhone app that integrates mapping and realtime bus location data for all areas that San Diego MTS covers. I was shocked to learn that such an app didn't yet exist in San Diego, but multiple existed for all other major California cities. See the video below for a walkthrough.

Download San Diego Transit on iTunes:
http://itunes.apple.com/us/app/san-diego-transit/id518207969?ls=1&mt=8

 

What I learned doing this app:

  • UIMapKit, iPhone's mapping framework
  • Loads of strategies for doing databases that live on the phone via SQLite
  • MonoTouch UI development
  • Web service / data connection and parsing (iphone phone-home!)

Street Report

Simply take a photo, share your location, and alert the city to issues. The trick here was getting the data to the city, and using some HTTP POST magic, was able to auto-fill the city's own service request form.

What I learned doing this app:

  • Photo taking / storing / manipulating
  • Low-level HTTP work for iPhone
  • Windows Azure cloud storage from iPhone
  • Location, reverse geo-tagging

Download Street Report on iTunes:
http://itunes.apple.com/us/app/sd-street-report/id518218814?ls=1&mt=8

 

The skinny on MonoTouch

Mono is an open source .NET implementation. MonoTouch, and MonoDroid are .NET libraries that allow for developing native apps in C# on iPhone and Android respectively. Because C# is also the language of the new Windows Phone 7 platform, I was intrigued by the possibilities of less code. I just stuck to MonoTouch

The short version:

I like it. It wasn't no-brainer by any means, but MonoTouch was just the right about of abstraction from Objective-C. I feel pretty confident I can cross-develop for all 3 phone platforms, re-using anywhere from 50 - 90% of the code, depending on the type of application.

The long version:

Since MonoTouch compiles right down to the native objective-c bindings, and it uses the XCode UI development tool, I really felt like I was developing iPhone the way objective-c developers do. In fact, I found I could talk to them and get tips / strategy, or follow along with solutions on Stack Overflow. The best benefit was writing it in C# and getting to use .NET framework pieces, like web service calls, JSON parsing, and a ton of other useful framework pieces we take for granted.

My second favorite thing was how easy MonoTouch can be to do real database work, using SQLite database development. An open source tool called SQLite-NET (https://github.com/praeclarum/sqlite-net). It's kind of like Entity Framework Code-First, for iPhone since it can generate the tables, and makes CRUD operations to that SUPER simple. It's a HUGE time saver and worked perfectly for large data sets / normalized data interactions

Let the fun begin

Now, back to these regularly scheduled programs. 2 Apps published, a ton of new development potential in the vault, and some exciting beta products coming soon.

***UPDATE*** 6/29/2012-  Street Report Wins Grand Prize and City Innovation Award

I'm so grateful to the judges of the SD Apps Challenge for thinking so highly of this app. It won 2 awards, City Innovation ($5,000) and Grand Prize 1st Place ($15,000). The money is of course helpful as I work on my company, Small Steps Labs, but the recognition is equally appreciated. More info from the UT article: utsandiego.com/news/2012/jun/29/tp-winner-fills-hole-in-city-app-market-winning/ 



(from TDD entry on Wikipedia)

 

In the programming world there's this school of thought called Test Driven Development. The idea is basically that if you were going to write a piece of a program you'd start first by writing a test that would verify that it works. Then, you'd write the code and try to get it to pass the test. Let's say it's an adding calculator, so the first thing you'd write is not the code that adds two numbers together, but a test that would verify the results of what you are about to write. Your test is that you'll pass it "1" and "2" and expect the result to come back as "3". Next, you go and write the code that does this. The advantage of this approach is that the test cases drive the implementation. Plus, you continue to use all the tests you write. So anytime you make a change anywhere in the app, all the tests fire as verifiers that you didn't break anything you weren't aware that you broke.

It's a good practice in programming, but I think this is also a great metaphor for startups (and even goals and ambitions elsewhere in life). I've just started working out of a great new co-working space called 3rd Space and have the pleasure of being around some great people, some doing startups, some doing apps, design, marketing, etc. I met a new friend here, Kevin from Fashioning Change, who has solid startup failure and success experience. He engaged me in a great line of questioning the other day. I was showing him a quick proof-of-concept of an app idea that I had made just to test out where the rough parts of developing it might be. I'm integrating 3 services in 3 different programming languages, so I just wanted a quick test if all that was going to work.

Kevin looked at me, excited to show him the programming, and focused me back on the product design. "OK, so back to the idea -- what are your unknowns? What do you need to know in order to say that this is going to work?". Hmmm, I thought about it for a second. I listed a few things that the users would do with this app, over a period of weeks and months. If they did it, that's a success. "OK", he said, so I think you have enough here to test that, don't you?" I resisted a little and let the excuses fly: "The UI is almost non-existent, the color scheme is black on white, the layout makes no sense, the authentication flow is terrible....", I continued. "Well, then just get 5 people you know. If you can't get 5 friends to use it, whom you can show it to and explain it, then a better UI for people you don't know isn't going to help. You just need to test the idea". 

Wow, this caught me totally off guard. In my mind what I was showing him was just scratch-paper quality code. This is the napkin doodle before the sketch, before the color markers, before you open the box of brushes and paints. But he's right, and he helped me define the test cases that my idea needs to pass. If it doesn't, then it needs to be tweaked until it does pass. I made him a deal, I wasn't ready to just release this version, but I'd focus for 2 weeks after the new year to have something testable and semi-presentable. Then, with the feedback, decide the next move.

There are lots of names for this process, and lots of existing wisdom out there to test early and often, but for the programmers and programmer-minded, 'test driven idea development' is the way to think about it. If you have an idea for something, write the test case first, then do what you can to try to pass it. Will your user come back X number of times per week and do Y number of actions a month? Will they pay Z dollars for products A, B, and C? You don't need a lot of code to test that out. In fact, you could even hand-write emails and web pages that mimic what a bigger system would do once you build it out. Or, just a really crude proof-of-concept web app that you're scared out of your mind to release with your name on it. 

 

 

 

Boycotting Godaddy.com

3 Apr 2011 In: Technology

I wanted to address a developing story you may have seen on the news surrounding a controversial CEO of an internet campany, Bob Parsons of Godaddy.com

I for one have an account with Godaddy, I have 23 domain names which Godaddy maintains (these are the "www.yourdomain.com" names that we all type in to our browsers). Domain names are actually just leased, and registrar companies act on your behalf to lease and renew yearly. I will be moving all of my 23 domain names off of Godaddy this year. Some were just renewed, some are eligible for transfer / renewal now.

This past week, Bob posted (and linked to from Godaddy.com) his latest "vacation" where he claims he went on a trip to Zimbabwe to kill an elephant that was a problem for a small village and their crop. He posted a very gruesome video, where after he and a couple others shoot and kill one of the elephants, the villagers are next seen wearing Godaddy hats and butchering it for meat.

His claims that this was helpful have been debunked. Just the cost of his flight alone could have paid for that village to eat for a year, plus, there are many non-lethal techniques for deterring an elephant away from the village.

I'm sharing this link, which explains the situation but does NOT have an embedded version of Bob's video in it but there is a link to it. Please take caution if you decide to watch it, it is pretty awful and stomach turning. http://www.aolnews.com/2011/04/01/zimbabwe-conservationist-responds-to-godaddy-ceos-elephant-hunt/

I'd also add that it shouldn't have taken me this long to move off of Godaddy. Their superbowl commercials and their website ads merely use women scantily glad, and many of their ads use poor-taste innuendo. I'll be moving to NameCheap.com a no-frills and long established registrar company, which is offering a promotion to move a domain name for free, first year price of $4.99 AND they'll make a $1 donation to a save the elephants fund:http://community.namecheap.com/blog/2011/03/30/elephants/ Domain.com also has a similar offer: http://www.domain.com/blog/domaincom/transfer-to-domain-com-for-4-99-and-help-feed-africa/. If you need some helping navigating the GoDaddy screent to release your domain, see this post: http://www.good.is/post/how-to-leave-godaddy-com/

As an Internet professional, I give Goddaddy hundreds of dollars a year, and this will end now, I won't be renewing any existing, nor creating any new domain names with the company. If I manage a website for you, or have a domain name I'm holding for you, just be aware that I'll be moving off of Godaddy. There shouldn't be any interruption of service, the transfers are seamless. There are plenty of online petitions and pledges by people to move off. One post I saw on Twitter was from a guy who has 650 domains with them and is moving them all off. That one person alone is probably taking $10,000 / year of business with him. It's the responsible thing to do.

I recently launched Food Buster (www.foodbustergame.com) as part of the Apps For Healthy Kids competition. It's a web game that utilizes jQuery, Ajax, and JSON based web services to send information to and from the web server and the web database. When players come back to the game they pick up where they left off, logging back in to their account and seeing how many points they have.

I decided to check out the PhoneGap project in the hopes of reusing some of the code I had already done. A lot of people know and love web technologies,. I much prefer building my iPad app in HTML5, jQuery, and local storage databases using SQLite. The beauty of this all is Webkit. Phonegap is basically a full-screen web engine, and if you include the Phonegap.js file in your html page, you get access to phone hardware, native dialog boxes, some native UI elements, and on phones you get some of the phone functionality.

Before starting your phonegap app it's important to think through the strategy. It's a little bit of a paradigm shift to move an app from a server/client setup to it all built in to the device.

Here was my strategy for conversion:

 

 

Web/Server PhoneGap What it is in Food Buster
SQL Tables (referenced data sets) static JSON object file There are 2,000+ food items with calorie, fat, sugar, portion size information. I converted this to a JSON object array and created foodData.js
SQL Tables (user and game history) HTML5 Datatables (sql lite) When you return to Food Buster, all of your previous games are used to calculate your current points and you start off where you left off in the game.
jQuery .ajax() calls none, since your data is local cut them out! On the web every time a user drops a food item on to the scale
 looped data output / grids / repeated items
 jQuery Templates
Food items are repeated, results page has repeated items, etc.
jQuery Templates
jQuery Templates
Dynamically add a new food item after one is stacked, dynamically add 
 CSS CSS
All the styles, image backgrounds, and style information is 100% identical. Food Buster makes use of a large background but the main objects are in a fixed-width container which is narrower than the iPad
 Session localStorage / sessionStorage (HTML5)
While you are playing a round of the game, each item stacked on the scale sends an ajax call back to the server to identify that it has been selected. That way, if the page is refreshed, you don't have to start all over again. On the iPad, this can similarly be done using localStorage. In fact, the app can be closed and then re-launched!

Ultimately you'll have to decide how you break up your app, not all scenarios map the way I've done it. 

A couple more tips I'll share:

That's it! enjoy iOS developing using the latest and greatest of web technologies and javascript frameworks!

Yesterday Facebook launched a whole bunch of new tools for web developers with the idea being that outside sites can taylor better to you, the user, with more information about you. Indeed, this has always been the idea; a website could look different, suggest different things, and show you what your friends have been up to on the site. To do this, facebook gives developers simple things that show up if you are already signed in to facebook: the "like" button, comments boxes, and list of friends who liked or commented on that site.

Beyond that, we, the web developers, have to ask you to log in with those blue facebook buttons. When we set up that login feature, we get to decide how much from your facebook account you are authorizing us to see.

SO... read VERY carefully these kinds of dialog boxes, they tell you what the developer has requested access to:

Great, so YOU know to be careful... but do your friends? That's not a trivial question, because with that same "Allow" button above users can approve third party sites to access the profile, photos, statuses, comments, likes, friends, groups, notes of all their friends! In fact, here is the full list, see the column called "Friends permissions": http://developers.facebook.com/docs/authentication/permissions

As a result, everyone you are currently friends with have a lot of power to share YOUR information with websites outside facebook -- a little scary if you ask me.

I encourage everyone to review the following new privacy permissions by following these instructions:

1) Log in to Facebook and go to "Account", then "Privacy Settings"

2) Click on "Applications and Websites"

3) Find the section "What your friends can share about you" and click the "Edit Settings" button.

 

4) On this screen you should decide what your friends can share about you to third party sites. THINK ABOUT THIS CAREFULLY.

Ultimately, you are the owner of your content so be careful what you post about yourself. Third party websites can store your data once they have it, so deleting stuff you don't want about you on facebook doesn't delete it from existence.

Keep in mind, this is new, so we have to see how things go. The notion that a website can personalize to you means that it needs some info. AND, facebook is leading the way towards a single sign on for all sites so that you don't have to recycle those 3 passwords all over the web which is a big security issue. My two cents though is that these particular privacy settings are too burried for how important they are.

Points, points, gimme points

5 Mar 2010 In: Technology, Social Media

In my new job I'm fascilitating a small team to decide on some strategy and deisgn of our overall social / mobile platform to reduce weight. It seems all the discussions come back to this new model of real world points (think Farmville, Mafia Wars, Nike+, or many common games). We came across the following video which really brings it home. I think this presentation is both interesting and scary -- the last 8 minutes are the best. So the question I have is how does Farmville succeed in getting so many people to work for points and can we leverage that for positive behavior change? Jesse Schell imagines a world where your points are automatic, but can we get the same result if there are a few steps involved to report your accomplishments and the positive result beyond the points is just better health and fitness? I guess we'll see...

 

 

My Ubuntu Linux Experiment

12 Nov 2009 In: Technology, Linux

Ubuntu Linux

Despite my enthusiasm for C# and ASP.NET, I'm actually a big fan of open source technologies. I love the concept of community driven projects and the freedom a developer has to add to a project and give it back. Software Utopia.

I'm not a fan of any one company, not devoted to any platform, and I don't mind paying for good software or tools. It's simple: I'm for what works. I program in Microsoft languages at work, I run a Mac at home  and virtualize Windows, and Linux. I love my Macbook Pro, and did all my work in school on Unix, have set up FreeBSD servers and Linux web servers as well as Windows Servers with IIS. If it makes my life easier, then that's what I'm going with, it just has to work.

What wasn't working were the 3 home computers of my parents, my Aunt and Uncle, and my Grandmother all of whom have Dell Dimension 3000 Pentium 4 computers with 1-2 gigs of RAM. All 3 user groups (family members) had been asking me to please recommend them a new system to buy because after 3 years of use Windows had slowed down to unuseable states. Literally, Grandma's computer took 5 minutes to boot and 3 minutes after double clicking her web browser it would open.  This drives me nuts because my Mac laptop from college, a 12'' powerbook G4 works just fine without any OS re-install. My wife uses it now, no problems. Why does Windows XP slow down? Is it rogue registry keys, "helper" toolbars, fragmentation in NTFS? 

Last year I attended a 3 day open source conference, SCALE 7x in Los Angeles. I highly recommend this conference even if you don't use Linux. I do use Linux for certain projects and for web servers. I've been messing around with Linux since high school when I got my first install on 10x 3.5'' Floppy disks from a friend named Eric who had a faster internet connection than I did. So, from that conference I hatched this experiment to test Ubuntu Linux on my family and delay the looming new system purchases.

I decided I'd start with the slowest computer -- Grandma's. She getting Ubuntu 8.10 (latest at the time). I used her existing Dell computer, installed Ubuntu and she went from a snail-crawling 5 minute boot time to a respectable 1 minute boot. Not only that, firefox loads in a few seconds, not the 3 minutes IE took before. She was so excited and since then we've bought her a Canon digital camera and a new printer to print photos and has been using both -- importing and managing her photos in F-Spot. I helped her migrate her Quicken finance data to GNU Cash and she says she likes GNU Cash even better. 9 months later she's still as happy as can be, I have had very little need to show her stuff and things just work -- one new computer purchase saved. 

A couple months after that my parent's Dell was on the way out. They got Ubuntu 9.04. It didn't take long to show them the differences, the only thing I really needed to do was change Open Office's settings to default to the .doc and .xls formats because they both still email those formats to collegues. My dad's iPod even works with Rhythm Box and has been importing CDs and filling it up.

Lastly, my Uncle and Aunt got wind of this new "Linux thing" from my parents who were raving about their computer being revived. So, I went up to L.A. and did an install for them on their Dell as well. That computer was also terribly slow. My only issues here was that they had a Lexmark printer whose drivers are all proprietary and just plain don't exist for Linux (check out the Open Printing database for what works in Linux). They mentioned it was "acting up", so the suggestion we go buy the new $69 Epson at Staples was not a hard sell. After that, no problems! I even found equivalent games for my Aunt for, "Spider Solitare" and Hearts in the Ubuntu app repositories.

All said and done, the experiment was a success. Linux isn't for everyone, but it  has gotten much friendlier. What Ubuntu has done for the Linux desktop is amazing. Really, there had to be something to fill the void for computers like these that just need to do the basics and maybe a bit more. Pentium 4, 2.8ghz, 2 gigs of RAM -- that's not a throw-away computer, but it's also not something you want to spend $200 on for the latest OS (looking at you Windows 7). We're trying to be "green" these days, stuff should last a little longer and not end up in the landfill so I'm glad this worked out. I'm also glad to not be dealing with Anti-Virus renewals, spyware showing up or malware taking over the browser, because someone clicked on a link they shouldn't have. 

One additional note, on a couple of these systems I replaced the hard drives with the cheapest ATA ones I could find. Hard drives die. In my opinion after 3 years you're on borrowed time, so I figure if I'm doing a full re-install might as well make it last with a fresh drive. If you plan on doing something like this for your family, check out the Fry's ad or newegg.com for good deals.

So, 9 months in to this experiment and I've gotten far fewer calls than I normally did. I will keep you all updated with how it goes!

These errors were commonplace. Every time she shut down or started up it seemed like we'd get a ton of weird errors.

 

Wow, grandma's internet experience has lost half the monitor to bars that got installed without her understanding over the years...

I used the Ubuntu installer to partition her 40 gig drive in to 2x 20 gig drives so we could boot back to Windows in case we needed to. This is a good idea, especially for a user not yet convinced to switch to Linux. You can always go back and delete a partition. In our case, we deleted Windows later.

Grandma's new desktop, complete with background of her dog.

Grandma eagerly trying out her new desktop. She was shocked how quickly things opened and closed.  

UPDATE (11/15/2009) : I'm visiting my parents this weekend and figured I'd update their Ubuntu 9.04 install to Karmic Koala 9.10 -- they did it themselves! Apparently they were prompted that it would take over an hour and they followed the steps to auto upgrade. The install screens and messages were in human-understandable language so they knew what they were doing and what to expect from the process.  

I'm going to PDC

14 Oct 2009 In: ASP.NET, Technology

Despite not winning the INETA grand prize, I won some great licenses to Telerik, ComponentOne, and SyncFusion components. I already use the Telerik Ajax controls on a daily basis, I'm excited to try out the ComponentOne suite and the MVC tools from SyncFusion.

And even more good news, I found out I will still be attending Microsoft PDC this year (Nov 17-19) thanks to my boss. In fact, our small team will be going -- awesome. Looking forward to learning about all the new stuff that is coming out. It seems like this year has seen more new technologies than most so it should be interesting. Plus, my brother-in-law lives 3 blocks from the LA convention center and has an extra parking space -- how perfect is that?

If anyone has any suggestions for which talks to make sure to attend please let me know! I'm halfway through a Wrox ASP.NET MVC book, and playing with LINQ and of course JQuery and fun ASP.NET 3.5 Ajax things. I'm also hoping to finish the Silverlight labs that I didn't finish at the Irvine Microsoft training. Silverlight 3 already? MVC 2.0? Geez.. it's to easy to get behind.

See you there!