Odd Google App Engine Issue
I was having issues getting a url with urlfetch.fetch(url), it kept failing with:
[snip]
File "/home/channam/Code/python/google_appengine/google/appengine/api/urlfetch.py", line 241, in fetch
return rpc.get_result(allow_truncated)
File "/home/channam/Code/python/google_appengine/google/appengine/api/urlfetch.py", line 388, in get_result
self.check_success(allow_truncated)
File "/home/channam/Code/python/google_appengine/google/appengine/api/urlfetch.py", line 356, in check_success
raise DownloadError(str(e))
DownloadError: ApplicationError: 2
A little bit of poking found that the issue was caused by having a space in the url, something which I'm fairly certain was ok on early versions of GAE. Oh well you live and learn.
Laconica Fix
Thought I would have a go at making a timesheet based twitter thing using Laconica. All went well until I tried to run after install. All my links were screwed as they were prefixed with index.ph. Bit of googling found this solution http://laconi.ca/trac/ticket/1345. Strangly the ticket is closed but I`m seeing the same issue but the fix works:
Add $config['site']['path'] = ""; to your config.php file. Hope the fun bit goes a little bit easier than the install.
Doing a Presentation
First I'd like to make clear I have nothing but respect for anyone who does a presentation. Especially those who speak for free, just for the love of sharing their passion. I personally have only given small talks at work apart from ending up on stage at LUG Radio.
I have watched a quite a few presentations from lightning talks, 20:20 talks and Google developers. 20:20 are quite novel, 20 slides and 20 seconds on each. This makes for an interesting overview ideal for loud or time strapped meetings.
There are a few common mistakes that seem to keep coming up. So here are a few tips for anyone doing a talk from someone who never does it
- Don't read your slides! People are quite capable of reading them.
- Prepare, don't read from a script. If you must have some notes use small cards and don't read directly from them.
- Time yourself before hand. Bear in mind you might speak quicker live. Don't over run especially if you are unlucky enough to be before lunch.
- Try to leave questions to the end so you can maintain your flow.
- Look at your crowd, people like to feel wanted.
- Make sure your laptop works with the project in advance, amazing the number people who waste 10 minutes getting setup
- TALK LOUD! People at the back need to hear too. Also it will stop people talking amongst themselves.
- Don't show lines of code, by all means show a snippet, for example how few lines are needed. Instead show the code working - if possible. You can provide links at the end for people to go and look at your example code later when they will be able to take it in.
- Demonstrations are cool and are a chance to show what you can do with your chosen topic. MARE SURE IT WORKS! Under no circumstances make any chances the night before to the code for your demo, its only going to end badly.
- Have a sense of humor. Being able to laugh at yourself will get you out of most problems that might occur.
- If anyone gets lippy, rambles on for a question or keeps interrupting ask them to talk to you afterwards over a coffee or in the bar. As much as you might not want to talk to someone annoying it can be rewarding. If noone ever questioned things noone would ever learn, so treat it as a learning experience.
Python 2.6 or Google App Engine FAIL
Just installed Ubuntu 9.04 and tried to fire up Google App Engine. Some of it worked but I got the following error:
: No module named _multiprocessing args = ('No module named _multiprocessing',) message = 'No module named _multiprocessing'
A little googling found the issue: GAE Issue. Long story short Python 2.6 is currently not supported, please use 2.5.
New Job
Guess I should have mentioned it earlier: I can haz new job!
I am currently happier than a pig in muck. Still bedding in but I have a Ubuntu desktop and 2 HUGE monitors! Best of all its Python. I have made the change from hobbyist to professional!
Pidgin Notifier
A little script to create an alert box on gnome whenever you get a message on pidgin.
#!/usr/bin/env python
import dbus, gobject
import pynotify
from lxml import etree
from dbus.mainloop.glib import DBusGMainLoop
def my_func(account, sender, message, conversation, flags):
if pynotify.init("Hi there!"):
xml_data = message
root = etree.fromstring(xml_data)
output = 'ooops'
for element in root.iter():
if element.text is not None:
output = element.text
n = pynotify.Notification(sender, output)
n.set_timeout(2000)
n.show()
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()
bus.add_signal_receiver(my_func,
dbus_interface="im.pidgin.purple.PurpleInterface",
signal_name="ReceivedImMsg")
loop = gobject.MainLoop()
loop.run()
Cassandra
Just fixed up my App Engine application to be all standards compliant, gives you a nice warm feeling inside. Check out W3C Checker.
bit.ly for the win
I got my Google App Engine library featured on the list of entries for bit.ly's competition see bit.ly competition. Admittedly its a small bit of code but I hope someone might find a use for it.
But I`m still waiting for swag