Ruby is just an excuse for people who once loved spaghetti code, who wanted to be “the smartest guy in the room,” and who wanted to be indispensible, to get back at everyone who loved Python and thought that there was finally a decent way to write disciplined code.
Everyone talks about how nice Ruby folks [...]
22 May
Posted by Elf Sternberg as Linux, PHP, programming
I’ve been helping a close friend with her website, which is written in rails. She admits that’s a mistake, now, because it shares database tables with a PHP application, and the communication between the two has always less than stellar. I’ve been looking into her current major problem, but while I’ve been [...]
20 May
Posted by Elf Sternberg as Uncategorized, javascript, programming, python
Most people encountering the Ajax components of Django for the first time usually encounter this pairing:
from django.utils import simplejson
…
return HttpResponse(simplejson.dumps(some_python_obj))
For most applications, this is enough. But I’m especially fond of iterators, generators, functors and closures, dense components that express one thought well: the structure of a tree, or the rows of a database, to be [...]
For me, there are three stages of mastery for any subject:
Choosing a project and learning out of the front of the book on the subject.
Refining the project and living out of the appendices of the book,
Finishing the project with only the pocket guide or cheat sheets.
When it comes to Django, I’m somewhere around (2) right [...]
18 May
Posted by Elf Sternberg as django, programming, python
This was probably just about the gnarliest little problem I’ve ever wrocked my brains over in a long time. I was using the Treebeard library for a materialized path tree, and the problem came down to how to render it. The obvious solution was lists of lists, but… how?
I’m not going to explain Treebeard trees [...]
Experiment #5
Recently, I did some experiments with the GIMP, attempting to reproduce some of the “how to do it in photoshop” experiments that come across on the Internet from time to time. To the left is my latest experiment: an attempt to reproduce the Apple™ glowly mark used in some of their advertising by using [...]
I was reading through the Wordpress source code, trying to figure out a problem for a contractor, when I saw the function compact(). When I saw it I boggled, read the description, and shook my head.
Compact() takes a list of variable names as strings, and returns a hash of those variable names and their values. [...]
I don’t know if this is a common phenomenon. I’ve spoken with a lot of artists who swear by their Wacoms and don’t ever work on anything else at all, but I’ve found that while my Wacom Bamboo is good for some things, when it comes to rapid design I’m much happier tossing off sheet [...]
Well, that took a little bit longer than I anticipated. But, I’ve learned an important lesson and successfully brought a project in on time and budget, so I can’t complain.
When the customer says, “We tried this with the last contract but he was more of a designer than a developer. He almost got [...]