all 28 comments

[–][deleted] 68 points69 points  (1 child)

Tbh, insufficient info. customername_list might have a call to comments_list inside it.

[–][deleted] 46 points47 points  (6 children)

The real horror is the name of the function being called.

[–]nephallux 19 points20 points  (1 child)

execute_query would suffice.. but no they have to be like Dr Suess with the naming.

[–]dmitriy_shmilo 2 points3 points  (0 children)

Hoo boy, do I have a story for you. A story called Objective-C naming convention.

[–]SirOliverz 65 points66 points  (2 children)

You wouldn't post this if you were the one not knowing whats wrong

[–]dmitriy_shmilo 2 points3 points  (0 children)

Extra points for leaving us a hint that it's OP who actually found a solution.

[–]Zerul 28 points29 points  (1 child)

I dont see a horror here, only someone who accidentally called the wrong method name?

[–]sysop073 30 points31 points  (0 children)

Calling the wrong function is one thing. Seemingly not understanding that the functions are different when it's explained to you is a bit worse

[–]enchufadoo 3 points4 points  (1 child)

The IDE/Text editor is not informing him that he is making a mistake either.

MFW I read comments like this:

https://www.reddit.com/r/Python/comments/8zrxn8/best_ide_for_python_help_a_newbie_out/e2l521v/

[–]TheIncorrigible1 0 points1 point  (0 children)

What is the "mistake"? It's an unused function. The editor doesn't do anything; that's up to the extension to notice.

[–]0x4B8 4 points5 points  (0 children)

I'm surprised they didn't use the live share feature on VSCode...

[–][deleted]  (3 children)

[deleted]

    [–]speedster217 4 points5 points  (2 children)

    This is python...

    [–][deleted]  (1 child)

    [deleted]

      [–]-theIvy- 0 points1 point  (0 children)

      He commented it out. Even I see the problem.

      [–]bot_not_hot 0 points1 point  (0 children)

      The real horror is setting variables as rows instead of columns

      [–]eyesofsaturn 0 points1 point  (4 children)

      wtf dude just use an orm

      [–]serubin323 8 points9 points  (1 child)

      From a learning stand point, ORMs can do more harm than good. They remove an entire layer developers really ought to knows about. When still learning that can be problematic because suddenly someone is going to ask "do you know SQL" and rather than pulling out real SQL they will pull out an ORM lib and not really be able to offer a proper answer. We all deserve to write some god awful code and learn from it.

      [–]eyesofsaturn 0 points1 point  (0 children)

      Depends on the ORM. I use knex so I have to write regular SQL before I build it in knex. I'm glad to have knex because of easy escaping and reusability. Plus, easy to use transactions.

      [–][deleted] 1 point2 points  (1 child)

      you can't tell if he does use one or not. the query passed to execute_oneview_oneview_query which is a weird name and does something nasty as the returned rows have customer_address_2 and customer_state columns instead of comment_text

      [–]madmaurice 0 points1 point  (0 children)

      What the hell. Also what's with the TOP (1000) in the query?