Analyzing Objects in Python

There’s a built-in Python function called vars that can be useful in analyzing a Python object. Just as running dir(the_object) returns a listing of all of the attributes of an object, including it’s methods, the following code, will return key/value pairs for the named attributes (variables), but NOT the methods (functions): for k, v in … Continued

Debugging in OpenCart, MVC, JSON, Ajax

The primitive way of debugging php code often consists of combining checking the php error log and writing results out to the browser. But in OpenCart there are many cases where neither of the above approaches will work because OpenCart uses the MVC Design Pattern in which the scripts which handle the data are not … Continued

Yak Shaving for VirtualEnv on osX 10.6.8 Snow Leopard Python

So apparently Yak Shaving is the term computer programmers use to describe the slow, tedious processes the are involved in installing and properly configuring applications, modules, etc – and anything generally NOT creative that needs to be accomplished in order to move on to more rewarding adventures. This article will probably server to do little … Continued

Performance Analysis in Python

The following link is to a tutorial by Huy Nguyen which been a valuable resource in analyzing python scripts for speed and memory usage in setting benchmarks, profiling and discovering performance bottlenecks: Performance Analysis in Python

Find and delete all .DS_Store files recursively

find . “-name” “.DS_Store” -exec rm {} \; Thank you Alec Jacobson, who said: “This is posted all over the web, but sanity’s sake I’ll post it again here. This use of the unix command line program find will locate and remove all the .DS_Store files that Finder populates throughout your directories. The removes all … Continued

EchoNest Explorations

Working on a pretty amazing site for Chris Bulter’s Major Glitch project in which the longest pop song in the world is to be interactively re-asselbled and made even longer through collective development. Henry Lowengard turned us on to EchoNest, and EchoNest Remix, so have been experimenting with the JavaScript and Python Remix APIs and … Continued

find /usr -name “*.c” | xargs grep -l main Thanks, SA.