iPhone Push and My First App
I’m working on my first (useful) iPhone app. It’s a push mechanism for Twitter updates and functions similarly to the Polar Bear Farm Tweet Push updater app ($0.99/30 days). Their app pushes all friend updates, which is quite a bit too much. Instead, mine is set to only push those tweets with users marked for notifications. That’s an option not available in any of the push notification Twitter apps that I’ve seen so far. This is to save on the outrageous SMS costs on which I still refuse to subscribe to any more than the base plan on. Twitter can eat that like candy if I want alerts. I may opt to allow ad-hoc distribution to friends’ iPhones, we’ll see. Until then, my server’s hard drive seems to have crashed so service quality is a bit low!
As far as thoughts about my experience with developing the app, I followed a recipe that I had seen in an article on Ars Technica before the 3.0 SDK was public. Overall it was very easy to write the skeleton push app and have it launch Twitterific once it loads, but the notifications certificates and other required handshakes were fairly hard to navigate. After all that’s done, all I had to do was make a daemon to check Twitter and push it over Apple’s network. For this, I used Python Twitter Tools to great success.
I did run into one fairly odd problem. It turns out that Twitter’s API doesn’t actually match up to what I’m fairly sure it’s supposed to be at the moment. Requesting a user’s friends status list (statuses/friends, max 100 at a time) seems to correctly report which users are set with device notification turned on. However, the friends timeline (statuses/friends_timeline) function that returns the last X number of tweets has a user tag in it for each update. This user tag doesn’t show the same value for notifications that the friend list does. That’s a problem since my app is suited to using the friends_timeline to get the last few updates to push out, but can’t use the notifications without spending another API call per 100 friends a user has. A bug report has been submitted to the API folks. For now, I can manually filter the users out without using Twitter’s data, but if I were to let anybody else use the app, I’d really prefer it to work correctly.
Python Resources (for B481 classmates)
I’ve converted the sample code from Homework 4 (part 2) into Python for your consumption. (http://pastebin.com/f7e832c4e) This is the same as the C version and could be written in a few different ways.
Other Resources:
- Python Official: http://python.org/
- Python Docs: http://docs.python.org/
- Tutorial: http://docs.python.org/tutorial/index.html
- PyOpenGL: http://pyopengl.sourceforge.net/
- PyOpenGL vs C: http://pyopengl.sf.net/documentation/opengl_diffs.html
- NumPy: http://numpy.scipy.org/
- NumPy Example: http://pastebin.com/f408de359
Parents Today
Dr Tanya Byron, the television psychologist whose study was commissioned by Gordon Brown, said allowing children to play on computers unsupervised is as dangerous as letting them play outside on their own.
Anne Diamond gives her chilling verdict on the violent video games that are to carry age ratings
ANYTHING BUT PLAYING OUTSIDE ON THEIR OWN!! Wow I don’t think I’ve seen anything that stupid before. Then, it goes to show how much stock can be put in british news sources.
Raspberry Melomel v1.0
I put my mom’s fresh raspberries together with some honey and yeast to get a new mead started. This mead came out significantly lower gravity than the first with a SG of 1.086. The process itself went a bit smoother since I had a few more things that I needed and a fresh memory of what needed to be sanitized that I had forgotten the first time around.
Recipe:
2 lbs. honey (cheap)
1 quart homegrown red raspberries
3 quarts water (tap)
1 tsp. yeast nutrient
1 tsp. irish moss
1 tsp. citric acid
1/2 package Red Star dry wine yeast
It’s been reported to me that just 3 hours after pitching the yeast, it’s started burping. Not only that, it’s already blown its top! As quickly as that’s happened, it’s not actually very exciting because the whole thing is sitting on white carpet, and the raspberry juice stains like crazy. We’ll see how everything goes!
Another Brew
We’re on a marathon here. We brewed a honey/wheat beer at Ross’ house. It came out to 1.061 SG which is about 0.010 higher than expected, and that gives it a really nice boost in alcohol! The next brew I know of is still my raspberry mead, but we might just see another Sunday night brew on the horizon. My porter is done carbonating as of the 18th so if we brew on sunday, we may be partaking in at least one porter to test carbonation. Good times!
