June 21, 2008

Weekly Report #3: Recipe for the perfect disaster

Posted in GSoC tagged , , , , , , , , , , , at 1:29 am by fadinlight

First of all the GSoC weekly report news:

Yes, I know this is not kinda “weekly report”, but, as I’ve already told to my mentor, I’m quite busy in these days because I’ve an exam on June 25. However, step by step, I’m solving the main “behind-the-scenes” difficulties of the project.

SVG markers and patterns

As you can see in the image above, now, when a class is selected, if it contains a reference to an SVG marker contained in the rule file, the marker is shown on the right. Not quite beautiful yet, but it works. The following is another example, even if more difficult to read:

Because I’ve not already upgraded my Linux box to Firefox 3, I couldn’t take a snapshot showing SVG patterns (which are supported by my code as well), because SVG patterns aren’t supported in Firefox 2, as also stated in MDC. However it works smoothly on Firefox 3 for Windows.

Rules Modeling

Beyond SVG markers and patterns, I’ve got progress in rules handling too. Now quite all rules are parsed (think only “tag” elements inside “text” elements aren’t handled yet; same for selectors too), and class/mask-class parse-to-arrays is working.

As you can see in the above picture, if we search in the rules for “tunnel-core” class, the correct rule is shown even if tunnel-core is a mask-class and not a real class in the rule file.

Else elements are handled as well:

So what about the recipe for a perfect disaster?

That’s simple:

  • Take a laptop computer, Windows XP/Kubuntu 8.04 dual boot
  • Edit three critical GSoC project files in the Windows XP FAT32 partition for a while with Aptana
  • Go to dentist without powering off the computer
  • Return at home, find the pc powered off, power on it, go to Kubuntu and edit three critical GSoC project files in the Windows XP FAT32 partition for a while with KWrite
  • The day after, boot to Windows XP to read some notes rapidly
  • Find it was suspended, see Aptana still open with that three files.
  • Close Aptana without closing the three most critical files of the project before
  • Power off the PC and, during the evening, boot to Kubuntu
  • Find the wireless is not working, so reboot Kubuntu again
  • Leave the laptop booting, and find after a while the dosfsck has run and fixed automatically something in the FAT32 partition
  • Open Dolphin and, finally, cry looking at the following screen

Obviously I had a backup, but several hours of work got wasted however… Sic!

Advertisements

April 25, 2008

Studying…

Posted in GSoC tagged , , at 9:26 pm by fadinlight

I think that there is no activity in life that I love more than studying (perhaps coding :)). I love to get in touch with new things, especially new technologies, new way of coding, etc. Another thing I love is software design. So, I really enjoyed spending all day to start up studying for my project design. 🙂

After I set up another thing or two in the project’s wiki page, I announced it in the dev list and in the talk-it list. Then I went into the #osm channel to get in touch with other developers there, telling my wiki page URL and trying to get some feedback.

I’ve received a few hints, which I reported in the wiki page as well, crediting everyone. As I’ve got in touch with Mapnik users/developers, I’ve also received a link to a Mapnik’s rule file and to a little help about it. I think that a little bit of study about Mapnik internals will give me more ideas to improve the abstractness of my architecture and JS API.

Then I’ve started to study and take notes about Osmarender rule file internals, writing down some new ideas also. But I don’t want to anticipate anything now, because I’ve to study more to be sure. I’ve studied Osmarender a few when I was writing my application, but now that I’ve more awareness of it.. I have to confess that I’m really loving it 🙂

However, as far as I can tell, I’ve found similarities in Osmarender’s and Mapnik’s rule file… perhaps, if I can get a good design, there is room for some Mapnik compatibility for this frontend. But… now I’ve to stop dreaming, and don’t forget GSoC deadline 🙂

I’ve found also something odd: dragging and dropping, by error, an XML Osmarender’s rule file in Firefox 2, I’ve found that he got rendered automatically! This is not something really new, I know what’s behind this functionality.. but now.. why using a JS call to the XSLTProcessor Firefox 2 crashes (with the same rule,osm data, osmarender.xsl version)? Beside this: I knew that Firefox 2 doesn’t handle node-set() XSL instructions… why is it working? Perhaps I was wrong when I’ve found this, perhaps 2.0.0.13 version handles node-set() instructions… perhaps there is something magical in my Kubuntu laptop. I’ve to dig inside this in the next days (along with some Osmarender rules’ playing), because more cross-browser compatibility means more users, and more users means more OSM spreading, and more OSM spreading means GOOD! 🙂