Django: Pt 2

A quick note to say as much as I like Django, it turns out I still get real­ly frus­trat­ed with Python. I keep get­ting stu­pid inden­ta­tion errors. I find that using spaces instead of tabs is as I said in my ear­li­er post a big part of this. I just screw up spaces when I go back and edit old­er code. I don’t see the inden­ta­tion wrong­ness and find it even hard­er to fix once I get the error an “unin­dent does not match any out­er inden­ta­tion lev­el.” Yeah… right… as if I can tell.

Python just mess­es with my head. Its enforced code style for syn­tax just frus­trates me too much. I enforce a par­tic­u­lar code style on myself. I believe in good, con­sis­tent code styling. I even like the stan­dard Python code stan­dards in gen­er­al. But when a com­mon invis­i­ble char­ac­ter like a space (or tab) caus­es errors and you can’t see it just by read­ing the code… well, as frus­trat­ing as a miss­ing semi-colon is, I can still see it is miss­ing. I can’t see when a space is miss­ing or even know if I need to add a space or delete a space or what­ev­er. Sure, I can show “invis­i­bles” in my edi­tor but who wants to count spaces… or fig­ure out whether to add or sub­tract.

I can do Python using tabs instead of spaces. Unfortunately, that is not stan­dard Python code. I feel if I am going to write in Python, I should fol­low the Python cod­ing stan­dards (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 cou­ple cas­es just the oppo­site of his. And I hate writ­ing code lim­it­ed to 79 char­ac­ter lines. I have been writ­ing code since .… uhm, well, my first pro­gram I entered into a com­put­er would have been like ’73/’74. Anyway, my first com­put­er had the capa­bil­i­ty to do 132 char­ac­ter lines and that was a mono­chrome , amber dis­play in 1981. Every Linux box I have ever set up, the first thing I do prac­ti­cal­ly is set the con­sole font for a wider con­sole (like alt-8x8 or default8x9). 80 char­ac­ter wide dis­plays are way too nar­row to get work done. Even the tele­type  I used in the 70’s was 132 char­ac­ters wide. I think way too many peo­ple are pro­gram­ming on toy com­put­ers these days (can you say ‘net­book’).

Ok, I guess you can see Python just isn’t my thing. So, after a cou­ple weeks of try­ing, I am going to put Django to the side as a bril­liant idea but one that is based on a pro­gram­ming lan­guage that just doesn’t like me.

Leave a Reply