Category Archives: Programming

Debugging in IE.

I did something I shouldn’t have done: from JavaScript, I appendChildNodes()-ed some text and an img to an existing img. I apologize. Firefox told me it was OK. To put it more accurately, Firefox didn’t tell me anything, and just … Continue reading

Posted in Javascript, Programming, rants | Tagged , , , , | 1 Comment

Actual Data Always Needs To Be Explicit

This might seem obvious, but it wasn’t to me it first. Now I consider it a database design rule of thumb, or even a patten. I’ll explain using an example. Consider an application where you also need automatic tagging of … Continue reading

Posted in Databases, Design, Programming, startup | Tagged , , | Leave a comment

Computing Large Determinants in Python

Story: For my seminar work, I had to calculate the determinant of a large integer matrix. In this case, large meant n>=500. You might say that this isn’t very large and I would agree. However, it is large enough to … Continue reading

Posted in Algorithms, computer science, Math, Programming, Python, Research | Tagged , , , , , | 2 Comments

Easy Harvesting

Image by existentist. I’ve been doing a lot of harvesting (aka screen-scraping) lately. Fortunately, I don’t need forms automation, so I’m using urllib2 and not Mechanize like my friend Ron Reiter recommended. At first, when I wanted to get some … Continue reading

Posted in Programming, Python, Utility Functions | Tagged , , , | Leave a comment

You know you need to install a new Python version when…

>>> import decimal >>> decimal.Decimal(’0.2′) <&nbsp; 0.3 False >>> This little gem took me two hours to track down. It turns out that since my code is using sqlobject, it also uses the decimal module. I had some constants set … Continue reading

Posted in Programming, Python | Tagged , , , | 4 Comments

A Python Rant

Last night I encountered yet again one of Python’s annoyances. The annoyance I’m referring to is the lack of string like functions for lists. Trivial examples include find() and rfind(). Before you mention index though, it’s important to point out … Continue reading

Posted in Programming, Python, rants | Tagged , , , , , | 6 Comments

Mochikit Drag&Drop Corner Case

I found myself working again on the UI for my startup. As my Javascript library, I use Mochikit. One of the reasons for that is that it’s the Turbogears builtin, and I came to like it. The other is that … Continue reading

Posted in Javascript, Programming, startup, web-design | Tagged , , , , | Leave a comment

Fractals in 10 minutes No. 5: Sierpinski Chaos Game

A few years back, I was in some course where they also taught me some Matlab. One of the exercises was to draw the Sierpinski triangle using a method of progressing a point randomly. I was quite surprised at the … Continue reading

Posted in Fractals, Programming, Python | Tagged , , | Leave a comment

Fractals in 10 minutes No. 4: Mandelbrot and Julia in Ascii Art

I felt like it’s about time I tackled the Mandelbrot and Julia sets, in Ascii-Art. Heck, the Mandelbrot fractal is on the logo of this Blog! However, being the most well-known fractal, this issue was tackled already, with satisfactory results. … Continue reading

Posted in Fractals, Programming, Python | Tagged , , , , | Leave a comment

Must Have Python Packages

Python 2.6 and 3.0 are upon us. I helped a friend set up the new Python environment for research and development, and we thought about constructing a PythonPack: a compilation of packages every home should have lying around.

Posted in Programming, Python | Tagged , | 8 Comments