Yep, I’m alive && rants

Since my blog is still being visited by ~15 people each day despite I’m not posting anything new in 7 months (oh my god), I think it’s a good idea to give a small update about what I’m doing, and why I haven’t blogged that much lately.
This summmer I wasn’t selected to partecipate to the GSoC event, so I’ve used all this free time to dive into my remaining University subjects, I made a lot of exams and now there are only two to go 🙂

I’ve even started my thesis project, but this is kinda a sad point (and the reason of the && rants stuff)..
I cannot reveal the details, but basically I’m working on a spinoff project made by my Supervisor, and one of my task regards writing a parser for a given file format.

“Where’s the problem, since a parser it’s simple to implement”, you may ask?
Writing a parser for the file format they gave me would be fairly simple, if I could start it from the ground. Unfortunately I cannot, because I have to derive it from an abstract class made my Supervisor, and because other parsers for others file formats already derive from this base class (and I dont want to refactor them, see below why).
This class is written in Java, but basically fails on every concept of object-oriented programming such as:

  • information hiding: this abstract base class has every members declared with a public keyword (plus two public abstract metohds meant to be implemented in the subclasses in order to do the actual parse process)1;
  • design pattern: you would expect some kind of mix between a Strategy/Visitor patter, but the other file format parsers are made of just a single class (derived from the infamous abstract one), with a huuuuuge while(true) loop where all the parsing takes place, and so I have to do the same;

If this is not enough for you, there’s even more!
The global app has to be efficient and fast(why using java, then?), so the Supervisor had the brilliant idea to design the parser in order to convert the various file formats in his brand-new, intermediate, completely undocumented2 file format, and write it back to disk instead to put it in the ram for a faster access:\
Kinda scary, isn’t it?

However there are some projects of mine which pulls me away from the ragged edge of insanity, and my next post (I hope to write it in the next month) will be about one of them 😉
Sorry for my rant, cheers!

1: lol why not using a plain C struct then?
2: how I can tell it’s undocumented? simple, when I asked for the specs of this “file format”, I was told to look at the exsting parsers and do something similar “by inspection”