I recently had a three hour head banging off of wall session getting Python to play nicely with MySQL. I was getting the following error: File “/Library/Python/2.6/site-packages/Django-1.3-py2.6.egg/django/db/backends/mysql/base.py”, line 14, in raise ImproperlyConfigured(“Error loading MySQLdb module: %s” % e) django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/eamonnfaherty/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): no suitable image found. Did find: /Users/eamonnfaherty/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so: mach-o, but wrong architecture This was a complete mix up between 32bit and 64bit Python libraries working together with MySQL. To fix it I put the following in my .profile file export PATH=$PATH:/usr/local/mysql/bin export CC=”gcc-4.0″ export CXX=”g++-4.0″ export PYTHONPATH=”/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/” export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/ export ARCHFLAGS=’-arch i386′ export VERSIONER_PYTHON_PREFER_32_BIT=yes After addingRead more
Anyone that knows me offline has probably heard me singing the praises of signals. I really like the stricter typing of signals compared to events. For me, strict typing means that my code is checked by the compiler (instantly, at compile time) as apposed to being checked by the AVM (eventually, at runtime). I have had countless times where I have seen code fail due to the event types declared in the handler method being wrong, even when the string values are stored as variables instead of using literals. The checking that event handlers are added correctly is not checkableRead more
Facebook have changed their Graph API policy so that when you view a profile feed you need to have a valid oauth access token. See here. Here is the PHP I used to get the feed of mypage.
I was asked by a friend recently to point him in the direction of some advice on unit testing within actionscript 3. I thought it may be useful to others so here is the email with some addition descriptions: What is unit testing Unit tests are methods that run in order to verify the output of a method is what is expected when given a predefined input. This is useful as you can check if your code does what it should. There is a whole world of information on this on the internet. Check out test driven development. History ThereRead more
To get me through development I try to be the agile chef: Imagine cooking a meal. You can split cooking a meal into smaller parts (not necessarily in order – I am not really a chef): sourcing the ingredients preparing the ingredients preparing the workspace preparing the oven making the meal cooking the meal serving the meal Using agile methodologies we would tackle each part of this process individually and then tackle the next only once it is completed. As a novice chef, he would tackle getting the ingredients; Knowing what he am making, he would make a list ofRead more
One complaint I have often heard is: Agile projects produce code that is under engineered. I do not think this is a fault of agile methodologies. I think this is down to the management of the code base. This is where the self managing team needs to step up. The team needs to know when to refactor/invest in their code base. They need to know how to communicate with the business if deadlines are too tight and they need to think where they are going wrong if their code is inflexible so that it doesn’t happen again. The main causeRead more
This is the first in a series of posts about agile development. It is going to be my experiences (both good and bad) and how I think agile could work and what it needs in order to work. What is agile software engineering? I think it is best described quoting the agile manifesto: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan That is, while there is value in the items on the right, we value the items on the left more. For me, agileRead more
I am returning to blogging again. I am going to post a series of articles about the cool work I am getting up to at the moment. It will be some actionscript/facebook/video based articles so stay tuned!
DJango is an open source MVC (or MTV) Web CMS written in Python, HTML, JS and CSS. It uses a urls file to interpret the incoming request, separating out the params from the action, eg /customer/1/delete would be interpreted as delete customer 1. The urls file links the request to a view function. This view function uses the model objects to modify the values in the database and then passes them onto a template. This template then displays them! The model objects are stored in a database and are defined using python. There is not really any need to knowRead more
I have been playing around with jiglibflash. It is a rigid body physics engine. I have been looking at example projects like this. I am working on a secret project at work and I thought it would be good to share what I have learned. I want to point out that I had no 3d experience before I started this! So you should be able to do this too! I have been using papervision to render a texture map. It takes a black and white jpeg which marks shallower and higher areas on a terrain. Papervision converts this into aRead more