Python vs. Haskell round 2: Making Me a Better Programmer

Another point for Haskell In Round 1 I described the task: find the number of "Titles" in an HTML file. I started with the Python implementation, and wrote this test: Very simple: I had already downloaded the  web page  and so this function had to do just two things: (1) read in the file, and then (2) parse … Continue reading Python vs. Haskell round 2: Making Me a Better Programmer

Python vs. Haskell round 1: Test Output

The point goes to Haskell On the surface, it may sound silly to compare these two languages because they're about opposite as you could get: Python is interpreted, dynamically typed, and slightly weakly typed as well. Haskell on the other hand, is compiled, statically and strongly typed. But they're both open source, and they both … Continue reading Python vs. Haskell round 1: Test Output

Goodbye “X for Y”: the cryptic Ruby error is becoming friendlier

Anyone who's used Ruby has seen this message: r.rb:1:in `name': wrong number of arguments (3 for 2) (ArgumentError) This particular error has been driving me nuts for years. It's just so unnecessarily difficult to interpret — especially if Ruby's not the only language you use. I never remember which number is which. Compare to Python: TypeError: … Continue reading Goodbye “X for Y”: the cryptic Ruby error is becoming friendlier

Python project organization, circa early 2015

The best, current guides I've found Python Packaging Authority's tutorial and sample project Cookie Cutter project templating system, specifically cookiecutter-pypackage Open Sourcing a Python Project the Right Way, and Supercharge Your Python Developers by Jeff Knupp It's hard to find current best practices for organizing a reusable python package. I'm starting a new project to get the world's … Continue reading Python project organization, circa early 2015