devul refactoring night

Session start: Fri Nov 12 10:23:13 2010
Last night I refactored the script quite drastically. The driving force, besides that I like neat and readable code, was the urge to switch from the (big) Pygame dependency to the lightweight GUI API Tkinter. One big advantage with Tkinter, besides being faster at boot / shutdown time, is that it is built into Python. That makes running devul under Windows and Mac easier (users don’t have to install anything but Python to run devul). So cross-platform is the future of devul! 🙂

Anyway, If you are nerdy enough to read code, you can look at the source before and after the cleanup session last night. I’m not wholly finished/prepared for the Tkinter switch yet  – got some more globals to encapsulate into the Devul class* – but I think I will be before this day is over.

When Tkinter is a part of Devul, I’ll release version 0.04.

Till then,
Session end: During 3 minutes, 140 words were added at a pace of 2327 words per hour.

* The introduction of the class Devul was one of the major changes to the script. Other changes include:
– removal off all(!) top-of-script imports
– segmentation of the code into sections “Independent functions”, “Devul logic” & “Pygame land”.
– minimization of Pygame territory (that is, moving as much functionality away from that part of the code. This is a work-in-progress, still got some more nuggets to move. The idea is to be able to switch this section from Pygame to Tkinter without too much trouble)

(click to download; you need Ubuntu & Python to run devul right now. Read about devuls origins)


Flattr this

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s