Posts Filed in "Code"

30

Jul

Filed in Code, Django with no comments |

I posted another one of my small pluggable apps up on Google code the other day. It’s called django-object-view-tracking and is most suited for tracking things such as if a user has viewed a thread in a forum.
The API is fairly simple, but may need some improvements based on feedback:

def view_thread_list(request):
threads [...]

30

Jul

Filed in Code, Django with 4 comments |

I pushed an update to the django-sphinx repository tonight which includes a sample configuration generation tool.
It allows you to generate a source and index config for a Model based on it’s field type. For example:

from nibbits.maps.models import Map
import djangosphinx

output = djangosphinx.generate_config_for_model(Map)
print output

This will give you something like:

source base
{
type [...]

27

Jul

Filed in Django, DjangoCon with 5 comments |

I’m going to be giving a talk at DjangoCon, “High Performance Django”. I will be discussing what I’ve done at the past with Curse.com, what we do presently for iBegin’s Crazy Datastore, and general tips for scalability and performance in large web applications.
So why am I telling you all of this? I’m interested in hearing [...]

27

Jul

Filed in Bash, Mac with 1 comment |

One of my daily problems occurs when I’m ssh’d into a remote server and I’m using nano to edit configuration files or quick scripts to dump information. The problem being, that it screws up differently on different systems.
So let’s start with the problems:
Problem: Using the backspace key doesn’t remove the trailing character, but rather the [...]

26

Jul

Filed in Bash, Code with no comments |

Recently I ran across a trick on the net. I use iPython quite a bit, and I love how I can type a partial history command, and then use up/down to cycle through the recently used commands/code lines. I thought it would be pretty cool to have this same technique available in the bash prompt. [...]

12

Jun

Filed in Django, Other, Work, iBegin with no comments |

I’ve been out of touch for a little over a month now as I’ve been transitioning from the west to east coast. I decided it would be “fun” to head back to my hometown for the summer, and fun it has been.
While looking for a place I had been using tethering on my AT&T network [...]

12

May

Filed in Code, Django with 7 comments |

The question came up today, if there was a database logging solution available for Django. It turned out (to my knowledge) there wasn’t. So I quickly came up with django-db-log. It’s a simply middleware which will catch exceptions in Django, and log them to the database, allowing you to easily view them via the admin [...]

14

Apr

Filed in Django, Python with 1 comment |

The guys over at Pocoo have been hard at work on Jinja 2 lately. So far it’s looking awesome. The benchmarks are outstanding (putting it even further ahead of Django, and faster than Mako even), and some of the additions, and changes, such as the awesome addition to for x in iterable [if expr] are [...]

14

Apr

Filed in Code, Django, PHP, Python with 24 comments |

Constantly, and only in Python channels, I hear the argument brought up that “PHP is <insert random insult>” or “<N> is a PHP developer so he must suck”. One of the things I hate most, is stereotypes, based on false information. Stereotypes about people from Texas being rednecks are ok, because it’s true. Now, let’s [...]

13

Apr

Filed in Code, MySQL, PHP, PostgreSQL with no comments |

This afternoon I posted my PHP database library on Google code. It’s designed to be very lightweight, and uses the PHP4 MySQL functions as well as the PostgreSQL functions, but is built for PHP5. It uses sprintf formatting, and works must like the Python database cursor’s, to help alleviate injection concerns while you are writing [...]

« Previous PageNext Page »