Turning Off Import Warnings In Python
This works for all warnings.
http://docs.python.org/lib/warning-filter.html
I’m A CrackBerry Addict
Last year when my manager mentioned getting a BlackBerry I really didn’t like the idea. I didn’t want to have it be a drain on my productivity. It also seems like a ball-and-chain. Now my calendar is so hectic that I just went ahead and got one.
I now have a shiny, new 8330 and I couldn’t be happier. Now I know why they call it a CrackBerry. I find myself reading my Gmail, Google News or whatever in what was previously wasted time. I’m no longer bored while standing in line!
Hopefully this new addiction won’t become problematic.
Tip: Use string literals instead of the pass statement?
The pass statement is simply used where the Python syntax requires a statement, but the application doesn’t need any logic. Typically it is accompanied by a comment explaining why it is there. A simple example:
my custom exception
class MyException(Exception): pass if condition: pass # we don’t need this right now - testing
More often than not I will use a triple quoted string in its place. This makes it more self documenting and looks cleaner to me. My preferred usage:
class MyException(Exception):
"""my custom exception"""
if condition:
"we don't need this right now - testing"
What do you prefer?
Free Downloadable SOA Book
The book "Service Oriented Architecture - Getting It Right" is available free as a PDF. You just have to fill out the normal registration junk.
I haven’t read through it yet, but it does look interesting from what I have seen. I’ll do a more detailed review once I actually read it.
Pretty Good CSS Tutorial
I found a pretty good CSS site that helped me with floating elements. It’s all very vanilla content, but the way it presented was exactly what I needed.
PyOhio 2008 Registration Is Now Open
PyOhio is a daylong miniconference for Python programmers in and around Ohio. It will be held Saturday, July 26, 2008 from 9:00 to 6:00 at the Columbus Metropolitan Library.
We have some great talks scheduled. We are also planning on having Lightning Talks, Open Spaces and a Poster Session.
Did I mention that it is free as in beer?
You can register by going to http://www.pyohio.org/reg/register/.
Under The Hood Of The Internet
This video is old but interesting. It has some behind the scenes footage of a large scale data center.
Commit Early, Commit Often - The Sane Way To Work
A recent post by Ben Collins-Sussman talks about the benefits of frequent commits. This is a must read for all developers that work as part of a team.
Ben talks about some potential benefits to distributed version control, but didn’t go into too much detail. All of my source code repositories use Subversion. I often use DVCS as a way to let me work offline. With a DVCS I am able to make very small commits and take advantage of version control when I’m on a plane, in a park or a variety of other places. I am then able to sync up all of my commits as individual commits into the Subversion repository. The trick is to not go more than a day or two in between the syncs.
PyOhio Call For Proposals
PyOhio, the first annual Python programming mini-conference for Ohio and surrounding areas will take place Saturday, July 26, in Columbus, Ohio. The conference is free of change and will include scheduled presentations, Lighting Talks and unconference-style Open Spaces.
PyOhio invites all interested people to present scheduled talks. All presentations are expected to last 40 minutes with a 10 minute question-and-answer period. PyOhio will accept abstracts covering any area of Python programming. A classroom area with computers will also be
available for possible hands-on sessions.
All presentations proposals should submit abstracts no longer than 500 words in length. Abstracts must include the title, summary of the presentation, the expertise level targeted, and a brief description of the area of Python programming it relates to.
All proposals should be emailed to cfp@pyohio.org for review.
The submission deadline will be June 1, 2008. Accepted proposals will be notified by July 1.
If you have trouble submitting a proposal, or have specific questions about proposals please email Mat Kovach matkovach@gmail.com or call at 216-798-3397.
Using Simple, Useful Class Names
In a previous post I complained about developers using worthless names for Classes. A couple of people called me on the fact that I never really defined what a good name is or how I come up with them.
During the application design process I’ll typically do a little domain modeling. Each problem space usually already has its own terminology and concepts. This is where I get the bulk of the names I use for Classes. For example, at a bank you may find terms like Customer, Account and Interest.
There are also common names I use when implementing a pattern. These common names are almost always used in conjunction with a domain term. A couple of quick examples:
- CustomerFactory
- HttpAdapter
- SmtpAdapter
- AccountAdapter
This is not rocket science. As an object oriented developer I want to model a solution in terms of real world objects or at least concepts from the problem domain. Why would I call an Account a PiggyBank or a Customer a John? I wouldn’t. Would you? Try asking the project stakeholder to define withdrawal rules for a John getting some spending money from the PiggyBank.




