Showing posts with label Music'N'SFX. Show all posts
Showing posts with label Music'N'SFX. Show all posts

Friday, 13 April 2012

RPG Music'N'SFX - Docstrings are honking useful!!!

I've decided to really revise the documentations of my code today, mainly due to the fact that there hardly is any ;). Also when I haven't had the time for awhile to look into this little project of mine, I didn't have a clue what kinda things I sometimes did and why.

So then I figured, if I want to do it, I may as well do it according to the official guidelines. Said it and whipped out those badboy PEP 257 - Docstring Conventions. Apart from being pretty vague, they are actually quite good </sarcasm>.

I have to be honest, though, doing them at first was as boring as writing can get. Very repetitive and uninspiring, but then I noticed something. An 'A-Ha'-effect if you wish. I noticed an error in my code. A minor one due to sloppiness, but nonetheless an error and I would have not caught it, if it wasn't for writing those bloody docstrings! Then I noticed potential problems in my code or inconsistencies, simply because I went back over it again, because I wanted to document my code.

What I want to say is that these darned docstrings aren't just useful for other people, but for me, too1 It already saved me some hassle, that would have bitten me in the a** about two weeks down the line. I like it, it allows for preventing minor flaws and helps me seeing potential errors and exceptions, which I can then prevent by putting in appropriate fail saves.

In conclusion, I have to say, docstrings are honking useful!

Wednesday, 21 December 2011

RPG Music'N'SFX - Bitbucket and TurtoiseHg

I just committed my first changes to bitbucket for the new version using TurtoiseHg. Yay!

Looking forward to working with that!

... This has the quality of a twitter message -.-

Friday, 16 December 2011

RPG Music'N'SFX - A new approach

So, I was chatting with a friend of mine, who I roleplay with and who also happens to be a professional programmer about the music player as such. We started chatting about tagging like it is done in many applications (StackOverflow posts are a great example as well as this blog here). As a side note, those german speakers among you may be interested in this article, who discusses the merits of tagging.

Anyway, so he mentioned that it can also be done for files and it would be interesting to use it in a music player... such as the one, that I use. To cut a short story long, my next goal is to rewrite the already existing RPG Music'N'SFX player using a tagging based approach.

The approach in this case would be to have all files in one folder and sort them by using tags. This would make a lot of things easier simply because I wouldn't have a lot of hardcoded folders and everything would be a bit more dynamic. Also for the user, who would only have to dump all his files into one folder and then use an easily usable GUI to give his files suitable tags. How this GUI would look like is an entirely different question altogether, however. First ideas include a list of all music files in the folder and 2-state buttons for each tag that exists plus a text control for newly introduced tags.

In addition, it looks like the entire design would have to be redone, because it just is not adequate for the dynamics of the system (expanding categories. Tagging of files etc.).

I'll post updates, once I have something presentable.