website = brain.collect{ |thought| thought.to_post if thought.useful? }


website = brain.collect do |thought|   thought.to_post if thought.useful? end
07 Oct 2008

I’ve recently started learning and programming in Python. It is an exciting and new experience for me, and since it had been so long since I’ve posted to this site, I felt that it would be a good time to share some initial impressions.
I’ve primarily worked in compiled languages, so the dynamic typing in Python has been a big adjustment

  • Whitespace - the fact that indentation matters in how the code is interpreted is very strange, but does result in code that is easily followed when read
  • IDE - working in an IDE is very different because the IDE can’t see what types objects will be since they are determined dynamically. It seems that the only errors that can be found then are syntax errors. Type errors or undefined objects or functions can only be found at run time.
  • Speed - because the code isn’t compiled, and everything I’ve done so far has been relatively basic, the environment runs very quickly
  • Development Speed - because the code isn’t compiled, it is easy to run, and the feedback from an error is quick and immediate. Also, as an object is returned, for functions I’m unfamiliar with, I can easily print out the functions I can perform on the object.
  • Everything is public - things are private by naming convention, but ultimately, objects are transparent, which makes coding interesting. Modules that are being used are transparent and can be examined
  • Dynamically generated code - I’ve working with web services and it is amazing to see code pull in a WSDL file and generate client code while the program runs. It means that the code you write is calling functions that aren’t even written, they are made as needed, which is wild, and awesome, but also hard because it requires running the code to find out what they are.

I’m really enjoying working in Python. After getting used to the differences in Python, and the development process implications of Python, I now feel that I’m able to quickly write code to do meaningful tasks. There is little overhead, and it is so very simple to get code up and running and doing something. That is hard to compete with. Part of the thrill I get from programming is seeing results, seeing those lines of output that I want to see. Python makes that easy and very quickly obtainable.

Most of all, as I’ve mentioned throughout this, but to sum up, I’m impressed with the ability to quickly get usefully code working in Python.

Note: Please remember this is just my first pass and initial impressions. As I work on my project more and complete it, I’ll be able to say more about it. But as a young software developer learning a new language, this was an exciting opportunity to share my experience.