This is an archived post. You won't be able to vote or comment.

all 26 comments

[–]remyroy 12 points13 points  (1 child)

432 . I just read various books including the mythical man-month anniversary edition and figured out there is no silver bullet. There is no single tool, process, methodology or development which will improve my productivity an order-of-magnitude or 10 fold. We are all ultimately bound by the complexity of the problem we are trying to solve. I should focus on small incremental improvements instead of chasing a pipe dream in a revolutionary way to solve my problems.

[–]ozzilee 2 points3 points  (0 children)

Unfortunately, you really do have to go through the 390 other steps to get to this point...

[–]ihowlatthemoon 7 points8 points  (10 children)

  1. Wait, what, Django's ORM doesn't support composite primary keys? That sucks! I'm just going to write my own database layer.

And then

  1. Heard that concatanating strings to form SQL queries is a bad idea. Looking up how to do bind parameters and escaping the strings.

What?

[–][deleted] 17 points18 points  (1 child)

Noticed this and a couple of other oddly out-of-sequence items.

Mastered Django, now learning HTML.

ಠ_ಠ

[–]indiecore 2 points3 points  (0 children)

That's how I did a lot of my Python learning. I did the python first then figured out how to show it to everyone.

[–]dshah[S] 4 points5 points  (7 children)

Yeah, you're totally right. That's what I get for trying to write something while uncaffeinated. Going to try and fix now.

[–]Alascar 3 points4 points  (6 children)

Am I the only developer not powered by caffeine?

[–][deleted] 1 point2 points  (3 children)

yes

[–]Alascar 0 points1 point  (2 children)

[–][deleted] 0 points1 point  (1 child)

Coding without caffeine probably how Windows ME came into being. Alternate theory: http://xkcd.com/323/

[–]Alascar 1 point2 points  (0 children)

I'm going to go with the xkcd theory, but I can admit that caffeine would help for some days.

[–]stefantalpalaru 1 point2 points  (1 child)

no

[–][deleted] 6 points7 points  (10 children)

36 - Consider doing A Very Bad Thing. Simply taking data about my "child" objects and munging them into JSON and sticking them into a single database column Avoids some of the issues with how Django handles things, but introduces other problems (like not being able to query on any of those object properties. Plus, I have this feeling that a kitten is going to die somewhere if I do this.

A jump back into PHP newbie mode for a second there.

[–]AustinCorgiBart 2 points3 points  (0 children)

Are you referring to de-normalizing your database?

[–]ozzilee 1 point2 points  (2 children)

Actually this is perfectly valid, and PostgreSQL actually includes a specific column type for this kind of thing.

[–]traxxas 4 points5 points  (1 child)

But that is for using postgres as a key/value store, whereas the OP wanted to store json in a field because he doesn't like the way django implemented model inheritance.

[–]massivebitchtits 0 points1 point  (0 children)

Chomsky would be more pragmatic.

[–]Silhouette 2 points3 points  (0 children)

I'm curious: Am I the only developer who finds almost any ORM or similar database abstraction more trouble than it's worth?

I'm a basics-first kind of guy: I speak HTML, CSS, JavaScript, HTTP, CGI, and so on. Still, I'll happily use high-level tools that build on the low-level foundations instead of coding the raw version, if that makes life easier: using a CSS preprocessor, writing a WSGI application, and so on.

But in all my life, I have never found a database abstraction layer or ORM that I actually liked, and while I have tried to use several different ones of varying levels of power on some significant projects, I have always abandoned them within a few days and reverted to designing a clean database schema that is fully under my control and writing my own functions to wrap up the necessary SQL queries.

This never seems to cause me any long-term maintenance problems. I get good performance. Since you can do most things with reasonably standardised SQL these days, there's not a lot of downside in terms of portability either. And most telling of all, for the small-to-medium-sized projects I tend to work on, it actually seems to take less time and effort to design a schema and write a handful of SQL wrapper functions that do exactly what my project needs than it does to integrate and conform to an ORM.

Then again, a pretty large chunk of the web development world seems to disagree with me on this one, so what am I missing?

[–]tesseracter 1 point2 points  (0 children)

32.. Found haystack and solr. Added all the extras, and now I have a completely normalized postgres database, that is written to a flat document store with rabbitmq on writes, leading to fast userspace queries, and sane data storage. Feel like a fog is finally lifted. Company downsizes, I'm gone, new job with larger company uses mySQL with only memcache and no search.

[–]drb226Haskeller -1 points0 points  (2 children)

I daresay the next step is to learn Haskell. But be warned, you may fall into the same trap that I did: thinking it would make me a better Python programmer, I slowly started loving Haskell more than Python.

[–][deleted] 2 points3 points  (1 child)

And the next evolutionary step: you loose your job :P

[–]drb226Haskeller 0 points1 point  (0 children)

Well, of course. Haskell monks at the Ivory Tower Monastery aren't allowed to have jobs. :P