Open main menu

Difference between revisions of "User:Buddha^/GSoC2007-ProjectDiary"

Added info on 2007-06-08's and 2007-06-11's work.
m (Changed wording on 2007-06-07's summary.)
(Added info on 2007-06-08's and 2007-06-11's work.)
Line 86: Line 86:
Got it done! It took some hours though ;) And it compiles too... let's see about
Got it done! It took some hours though ;) And it compiles too... let's see about
testing and hopefully my first code patch tomorrow.
testing and hopefully my first code patch tomorrow.
== 2007-06-08 (Friday) - Communication lessons and first code patch ==
Talked with my mentor Sev and got a little wiser about portability. Now I know
that seeking in files can be very slow on some platforms, like e.g. GP32.
I had ignored Sev's advice on some code choices because I didn't think
seeking in files would be an issue at all. There was some discussion and
I'll try to be more frank and communicative about my own decisions and ask
about the reasons behind others' choices in the future.
I think it's good to know the real reasons behind choices... in this
particular case the reason for a certain coding choice was "We shouldn't do
much file seeking because file seeking is very slow on some platform (e.g. GP32)
that we support".
So I changed my WAG-file parsing code to read in the whole file and handle parsing
it in memory rather than go seeking in it on the disk. I separated the changes
needed for the dynamic string content generation in the fallback detection from
my WAG-file parsing code and submitted the former's changes as a patch. Woot!
[https://sourceforge.net/tracker/index.php?func=detail&aid=1733764&group_id=37116&atid=418822 My first code patch to ScummVM] :)
== 2007-06-11 (Monday) - Changes to the first patch and cleaning WAG-parsing ==
During the weekend Fingolfin had given feedback to my first code patch in
the tracker. And his second alternative approach was clearly better so I took it,
made some fixes to it and submitted that to the tracker.
I also took my WAG-file parsing code and simplified and cleaned it. I took some
code out to make the code more maintainable (Things like allowing to read only
the header of a property and afterwards also its data or skipping that data altogether
if we know we don't need that property's data). At least in this case I think it was
better to not have them there, rather have more maintainable code than some little added
performance boost or less memory usage in this particular non-critical area.
Oh, and I also came to notice that I had somehow managed to get non-normalized line endings
in some of the source code files in my local ScummVM copy. Probably something to do with
using diff and patch, applying Fingolfin's version of the fallback detection patch to my
own local copy etc (It had 0x0A (LF) as the line ending, my local source code files had
0x0D & 0x0A (CR & LF)). Oh, the joys of choice between CR, LF, CR & LF etc :P
417

edits