ben sutcliffe

freelance web designer • berkshire uk

 

Posts tagged ‘python’


Tag Cloud  api apple asp blips blogger blogging book club brgs cake chocolate christmas chrome conservatives documents dog ecommerce facebook flickr google gui hybrid iphone meerkat msboatphotos music new year options photography php python quantel recipe safari 4 simple snow social media spotify squared steve jobs theme tommiesguides twitter viral wave wordpress

19
Apr

Tracebacks Rock

Whenever writing anything, pay attention to those tracebacks. Having only had the benefit of three-word PHP errors and next to useless JavaScript errors, I haven’t been used to checking out error messages. I’ve been getting better, especially with the WebKit developer tools in Safari and Chrome, but tracebacks in Python carry a lot if information.

You can view the outcome of a fatal error by running your application from IDLE, Python’s native editor. Once you’ve opened your app in IDLE, focus on to the shell window and execute the script (F5 on Windows). If you’re getting a fatal error but want to carry on executing after the bug is raised, use an exception to carry on past the error.

import traceback

try:
    # bad code here
except:
    traceback.print_exc()

Remember, tracebacks carry all that sexy information in a long list of jargon. But make sure you read the shell window, and never hide anything behind a try: in the hope that it’ll go away some day. I naively tried that a couple of times, but it just kept coming back to haunt me.

29
Dec

Blimey

It’s been a fair few months since I last posted here. Everything’s kicking off at the moment in my little world of web development. The new all singing, all dancing PilatesPlus web site is nearly ready to launch. I spent six hours yesterday designing the registration form. It’s working though, and does some fun stuff with Twitter too.

Two new clients are in the offing, which I promise I’ll write about once the deals have been sealed. Work at Quantel is going well too – only one last section of the latest version of some of their Python based software left to debug! I’ve learnt a lot from working in Python recently, and it’s definitely increased by ability to code in general – knowing functions in different languages helps when finding solutions to tricky problems.

Finally, the future looks exciting with a recent tweet from @wossy. Since the last book club meet a mobile version of the site has been launched for iPhone and BlackBerry, some of the site’s been made easier to use with the addition of some AJAX code, the interface has been redesigned to make it cleaner and simpler, the site got a new domain and  it now works better with Twitter. Plus @sardo02 and I have been working on an API to power an Android application for the site.

I hope that everyone had a great Christmas, and are looking forward to the New Year. Bring on 2010!

 
 
ben sutcliffe
loading content