Archive for the 'programming' Category

Tipr, now with added txt

Sunday, July 29th, 2007

So, as it turns out, this little app I built for myself is actually useful to other folks.

Over the 3 weeks since it launched, I’ve been keeping an eye on the traffic patterns, reviews, and mentions of Tipr across the intarwebs, but I’ve also been busily adding some new features, which brings me to this post. I knew people with iPhones and other capable mobile browsers were quite happy with Tipr, but folks without a mobile browser or with a sucky one were not, in my opinion, getting as much out of Tipr as I’d like them to. I wanted to correct that.

My first thought was to create an SMS service for Tipr, but there’s no way I can afford to rig up a server capable of receiving and replying to SMS messages and I certainly could not afford to pay the $1000-2000/month for an SMS short code (after all, I’m not making any money on this thing). Then the answer dawned on me: Twitter.

Since Twitter offers an SMS interface (40404 once you register your mobile), I could simply piggy back on their service to offer Tipr via SMS. All I had to do was build a TwitterBot capable of receiving and responding to messages. Lots of folks have built IM bots in the past, but there weren’t that many TwitterBots and there was even less information about building one. Even with the odds stacked against me, however, after about an hour of reading the Twitter API documentation and 6 hours of actual programming, I had built a working PHP-based TwitterBot class.

The whole thing works using Twitter’s direct message functionality and runs several independent services to do things like reciprocate friendships, check the inbox, process responses, and send messages back. Unfortunately, the API was only able to get me so far, so I did have to resort to a little hackery to get some of it to work, but in the end, the Tipr TwitterBot, which sits on top of my generic TwitterBot class is pretty solid and quite responsive — even with the 70 API calls in 60 minutes limitation, most messages receive a response in approximately 45 seconds (depending on your network and whether Twitter is releasing a new feature and takes the service offline for a few minutes).

Overall, I’m pretty happy with the results and the early beta testers seem to be liking it as well. Hopefully some of you out there will find it as useful (if not more so) than the web interface. If you’re on Twitter, give it a shot and let me know what you think.

New Easy! app: Tipr

Thursday, July 12th, 2007

 Those of you who’ve been paying attention to the apps that came out of iPhoneDevCamp (or who are using Applists, AppMarks, or any of the other iPhone web app aggregators/launchers) are probably already aware, but we just launched our first micro-application named “Tipr” last week.

Tipr is a super-simple web-based tip calculator aimed at mobile devices. You simply enter the bill total and choose a percentage to tip and Tipr does the rest, giving you the tip amount and the total. As an added benefit, the total is always converted to a palindrome to make it easy to spot fraudulent adjustment of your tip amount or total when scanning your credit card or bank statement.

Tipr started off as a tool for me, really. I have been doing the palindrome thing for over a year now and, even with the calculator on my phone, it takes a minute or so for me to calculate out the tip amount to end up with a palindrome for a total. To speed things up a bit for myself, I built Tipr and it’s proven quite useful. I hope you will find it useful too.

We’re trying to keep Tipr pretty simple, but if you have recommendations for improving it, let us know by leaving a comment.

WestHost gets Rails

Friday, April 14th, 2006

I received an email announcement yesterday that WestHost (my host of choice) is going to be offering Ruby on Rails for install through its Site Manager. I guess it means that, sometime this month, my tutorial on the subject will no longer needed. Still, I’m glad it will be a bit easier to set up Rails on WestHost now.

Speeding up your code with the Bitwise Operator (&)

Tuesday, March 28th, 2006

While building a Flash game, I wrote some code to alternate through squares on a grid system and it seemed rather slow. My code made use of the % (modulo) operator and, thinking that was the cause, I went in search of a better solution. I blew the dust off the Bitwise operator (&) and researched what it actually does. As it turns out, this little bit of programming’s past can be quite handy.

Comments & corrections are always welcome and if you have any similiar tricks to share, I’d love to hear about them.

Du You?

Sunday, January 29th, 2006

I built this popular game in Flash 8 for a brain exercise before I had ever actually played it. I did no research and when I completed the code, I played it once to test it out. I can see how it could become very addictive.