Blocks v1.0.0

Blocks has always been a landmark application for me. What began life known as “The Blocker” and a simple command window quickly transformed into my very first full-GUI application, and continued to be a landmark by performing syntax checks on the files it created, something I had not tried before. Blocks has also been the informational resource for the (still incomplete) Building With Blocks tutorial, which examines the file format in context of manually modding the Island Xtreme Stunts Trouble in Store mini game levels.

It has been over a year since the last release of Blocks, namely v0.9.1. Just like my other projects, Blocks was put on hold because of college work. Although I have had some time to work on JavaScript-based projects since then, for a while I have been longing to get back to some Python programming. In order to transition back, I decided to work on a smaller project, a category in which Blocks in a member. Today, I am proud to announce yet another milestone release of Blocks v1.0.0!

In the year since the last release, I have learned much more about programming that I knew before. I have also ever so slowly come to mostly understand the Python Object-oriented programming paradigm. I ended up rewriting an entire module in PatchIt! a few months before resuming work on Blocks, and out of that OOP “clicked” more fully with me, and that script was better than it had ever been. When I returned to Blocks, I was greeted to what some would call a hack job. I hed many global statements, half-organized code sections, a multi-nested, monolithic series of try... except clauses, lots of workarounds, and had stuffed everything into the one script, making it over 1,500 lines long. It was an absolute mess. Now, I will not say I could not have done better a year ago, most surely I could have, but looking at it this time, when I know more than I did, the only option was a near total rewrite in OOP.

I started one piece at a time. I removed a few hacks here and there, fixed some formatting errors, small stuff. I then branched, rewrote the syntax checks in a separate module, integrated it, and merged back. I branched again, this time to split the maintenance code and command-line arguments into a separate module. Again branching, I took what I learned from releasing and re-releasing the LEGO Racers Track Selectors and make the GUI OOP-based. Finally, I came to the big part: the core of Blocks itself. This part took the longest, with nearly every little bit completely rewritten, and I do not mean retrofitting it using a crowbar neither.

I created a new method in the new class and wrote new code, consulting the old code only as needed. The result: a very nice code base with separation of church and state logic and GUI, paving the way for more advanced GUI libraries in the future and making Blocks my first main-status program to be fully converted to OO. πŸ˜€

Now, if you are part of the camp that perceives Blocks as a “fancy text editor”, this release will not change your perception. While it contains checks you would be required to perform manually, you are under no obligation to use Blocks. That being said, part of this release’s goal was to permit a more usage GUI that would make it much less like a text editor. That part of the goal was reached, and hopefully the fruits of this release will not be taken advantage of until a year from now.

Just because Blocks has reached 1.0 does not mean everything is all roses and tulips. I am sure some bugs are still present that I managed to miss (see The Rules of Application QA Testing) and there are a few bugs related to the GUI library I used and cannot fix them, and of course there is the ever-present plan to make Blocks better, but that is just normal development stuff for you. πŸ˜›

You can download this huge release of Blocks from GitHub!

Happy modding!
-le717

Advertisements

One thought on “Blocks v1.0.0

Triangular Reactions

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s