Comments on: What’s your trick, Python? https://www.raggedclown.com/2012/05/12/whats-your-trick-python/ forget about today until tomorrow Thu, 12 Feb 2026 17:30:11 +0000 hourly 1 https://wordpress.org/?v=7.1.5 By: Ragged Clown https://www.raggedclown.com/2012/05/12/whats-your-trick-python/comment-page-1/#comment-100427 Mon, 11 Dec 2023 16:26:25 +0000 http://www.raggedclown.com/?p=3100#comment-100427 In reply to Jeffrey Fredrick.

I’m the ghost of Christmas future. We ditched Python soon after this post. Django turned out to be too horrible and we didn’t use NLP after all.

For strange reasons, we used PHP next (not my doing!) and PHP is officially the worst programming language ever.

We’ve been all Ruby & Javascript since 2013. Ruby is still lovely and Javascript is still ugly. I’m constantly surprised at Javascript’s tolerance for ugliness.

]]>
By: Kevin https://www.raggedclown.com/2012/05/12/whats-your-trick-python/comment-page-1/#comment-13513 Fri, 15 Jun 2012 13:53:45 +0000 http://www.raggedclown.com/?p=3100#comment-13513 nltk is pretty incredible. I tried RubyAnalytics but it’s not really in the same class as NLTK.

You have a bug in your code sample. It should be:

def mymethod(a, b = {}):
    blah

PyCharm (by JetBrains) flags mutable default params as a warning so i learned that gotcha quite early.

]]>
By: Bob https://www.raggedclown.com/2012/05/12/whats-your-trick-python/comment-page-1/#comment-13510 Fri, 15 Jun 2012 06:15:13 +0000 http://www.raggedclown.com/?p=3100#comment-13510 Nice article. Reminds me of how much I love programming in Ruby even without all the Rails-isms.

For Natural Language Processing in Ruby, I am curious if you tried the frameworks listed here: http://stackoverflow.com/questions/999410/natural-language-processing-in-ruby. If so, what were your thoughts?

NLTK is pretty sweet from what I can tell, but it would be nice to use Ruby instead of Python.

Another reason why, if you use a reference type as a default argument in a python method signature, watch out because every invocation uses the same instance, e.g.,

def mymethod(a, b = {}):
blah

the default hash for b will be the same for every invocation. At least, it used to be this way when I tried Python in earnest. Surprise!

]]>
By: Kevin https://www.raggedclown.com/2012/05/12/whats-your-trick-python/comment-page-1/#comment-13162 Mon, 28 May 2012 16:46:43 +0000 http://www.raggedclown.com/?p=3100#comment-13162 once you start with the generic types, it never stops

]]>
By: Matt https://www.raggedclown.com/2012/05/12/whats-your-trick-python/comment-page-1/#comment-13161 Mon, 28 May 2012 14:51:46 +0000 http://www.raggedclown.com/?p=3100#comment-13161 I don’t know C# but I assume it’s misleading to say their presumably type-safe dictionary is less nice based just on the char count. Doesn’t that facilitate IDE niceness and error catching?

]]>
By: Rob Heiser https://www.raggedclown.com/2012/05/12/whats-your-trick-python/comment-page-1/#comment-12908 Mon, 14 May 2012 17:32:51 +0000 http://www.raggedclown.com/?p=3100#comment-12908 “…you can barely shake a stick without causing a ShakenStickException.” caused people in the coffee shop to raise their head to look at the guy in the corner that possibly had Laughing Tourette Syndrome.

Also, your C# example has a bug where it’s going to give away all your Country music albums.

]]>
By: Kevin https://www.raggedclown.com/2012/05/12/whats-your-trick-python/comment-page-1/#comment-12904 Mon, 14 May 2012 03:34:11 +0000 http://www.raggedclown.com/?p=3100#comment-12904 PyCharm is $100 for a personal license. I’m sure vim will be fine.

We went with 2.7.x because none of the libraries are available in 3.x yet. 3.x is allegedly dramatically different and broke all the existing libraries. Don’t have any experience with it though.

]]>
By: Matt https://www.raggedclown.com/2012/05/12/whats-your-trick-python/comment-page-1/#comment-12903 Mon, 14 May 2012 03:02:11 +0000 http://www.raggedclown.com/?p=3100#comment-12903 Was about to begin a little something to do a little something that vaguely need and was planning on using Python, because it sounds like the sort of thing that would probably be interesting and possibly someday helpful. You’re fine post is as timely as it was entertaining to read.

2.7 or 3.x? Do I need to give Jetbrains $$$ to help me through a few hundred lines of code or is VIM (or Eclipse?) ok?

]]>
By: Kevin https://www.raggedclown.com/2012/05/12/whats-your-trick-python/comment-page-1/#comment-12901 Sun, 13 May 2012 17:16:48 +0000 http://www.raggedclown.com/?p=3100#comment-12901 One other thing I could have talked about but didn’t.

StackOverflow is a constant companion when you are learning a new language. You can tell a lot about the philosophy of the language by the tone of the answers.

For Objective C, every response is patient and diligent with examples and there are three comments on every answer saying “Dude! You have a memory leak at line 7. You need to release the connection”.

For Python, every question has three comments saying that the question is wrong and five answers saying go read the documentation. Even the helpful answers use a grudging tone like the writer is quietly saying “You are so stupid, I can’t believe I have to answer this question.” then someone will follow up with “Imagine how many lines of Java code you’d need for that *snort*”.

]]>
By: Kevin https://www.raggedclown.com/2012/05/12/whats-your-trick-python/comment-page-1/#comment-12900 Sun, 13 May 2012 17:09:02 +0000 http://www.raggedclown.com/?p=3100#comment-12900 I didn’t mention unit testing because I had already written 2000 words and wanted to go drink beer and discuss the cold war with my russian neighbour.

Unit testing in Python and Objective C are pretty pathetic compared to Ruby and C#. I don’t think either of them really get it. I expect the Xcode people put in testing support reluctantly and under pressure. I doubt they really understand what it is for.

The Python people seem a bit more pro-testing but it’s old fashioned test-a-big-idea testing and TDD is quite hard to do. They expect you to put all your tests in a single tests.py file and it takes a heroic effort to do something more sensible like break tests out by idea. Sucks, really.

]]>