Django: Pt 2

A quick note to say as much as I like Django, it turns out I still get really frustrated with Python. I keep getting stupid indentation errors. I find that using spaces instead of tabs is as I said in my earlier post a big part of this. I just screw up spaces when I go back and edit older code. I don’t see the indentation wrongness and find it even harder to fix once I get the error an “unindent does not match any outer indentation level.” Yeah… right… as if I can tell.

Python just messes with my head. Its enforced code style for syntax just frustrates me too much. I enforce a particular code style on myself. I believe in good, consistent code styling. I even like the standard Python code standards in general. But when a common invisible character like a space (or tab) causes errors and you can’t see it just by reading the code… well, as frustrating as a missing semi-colon is, I can still see it is missing. I can’t see when a space is missing or even know if I need to add a space or delete a space or whatever. Sure, I can show “invisibles” in my editor but who wants to count spaces… or figure out whether to add or subtract.

I can do Python using tabs instead of spaces. Unfortunately, that is not standard Python code. I feel if I am going to write in Python, I should follow the Python coding standards (as seen in PEP 8). Of course, just as the writer of PEP 8 has some pet peeves, I do too and they are in a couple cases just the opposite of his. And I hate writing code limited to 79 character lines. I have been writing code since …. uhm, well, my first program I entered into a computer would have been like ’73/’74. Anyway, my first computer had the capability to do 132 character lines and that was a monochrome , amber display in 1981. Every Linux box I have ever set up, the first thing I do practically is set the console font for a wider console (like alt-8×8 or default8x9). 80 character wide displays are way too narrow to get work done. Even the teletype¬† I used in the 70’s was 132 characters wide. I think way too many people are programming on toy computers these days (can you say ‘netbook’).

Ok, I guess you can see Python just isn’t my thing. So, after a couple weeks of trying, I am going to put Django to the side as a brilliant idea but one that is based on a programming language that just doesn’t like me.

Leave a Reply