All posts by Bombe

So, We Meet Again…

The day has finally come! My decision to keep all objects (Sones, posts, replies, etc.) in memory and never re-create them is finally coming back to bite me in the ass. And even though I knew for a long time that it was coming I was kind of surprised and relieved this morning when I realized why I even did that in the first place: because I thought I had to create Sone (and post and reply) objects before I ever had any real data for them!

Now that I finally rediscovered the reason behind this ancient decision I should be able to rework the parts in question to fit in better with the database changes. Just having discovered this makes me have a much more positive outlook on the whole database topic than I had before. :)

So Many Things to Code

Once again, I got sidetracked from Sone development. More or less caused by my moving from Linux (and Windows) to OS X I am currently developing a replacement for the software I used for tagging and organizing my audio files. I used to use JRiver’s Media Center for that but as its OS X port still has a very long way to go to be at least partially usable I decided to write my own software, at least for tagging, converting, and organizing my audio files. So, if I’m currently coding, I’m probably working on AMS.

Why Sone Is Stalling Again…

At work we started watching “Clean Code” by Robert C. Martin (“Uncle Bob”) a couple of weeks ago. While some colleagues are of the opinion that these videos are unbearably stupid (and they do have a point: the way all the knowledge is presented is… uhm… questionable, at least) I have grown quite fond of some of the things Uncle Bob has shown us.

Two points that have especially struck home for me: keeping methods short and test-driven development. While the former is (more or less) easy to implement the latter requires more discipline and is also difficult to work with when a sufficiently large codebase already exists.

So lately I have been writing tests. Thousands and thousands of lines of test code have been added to Sone; in the process I was able to eliminate almost the same amount of lines from the production code because it proved to be unnecessary after various refactorings have performed.

However, one of the targets of the current refactoring still has not been achieved: storing everything in a database. I am a lot closer to finishing this task, though: most objects and their relationships are already managed by a non-persisted, in-memory database. Persisting the database will be a second step that follows later.

I will continue writing tests and increasing coverage to make it easier to finish the big refactoring. Unfortunately that will mean that there won’t be a new Sone version in the near future.

Code Deterrent

As mentioned in the last post I am currently busy rewriting the album and image handling stuff. Unfortunately it’s a lot more complex than I had initially estimated. Plus, we currently have the best summer, like, evah, and I don’t actually get to spend much time in front of the computer. :)