For me, today is the last day of the summer holiday period (
). School will start at the 21st of September, but I decided to follow some extra courses meant to bridge the knowledge gap between people who had a lot of maths and sciences, and those who didn’t. These courses start tomorrow, and then continue for 3 weeks.
I just finished creating the developers manual to extend Semantic Maps. Like the manual for Maps, it targets developers who want to add support for a mapping service to one of the features Maps and Semantic Maps support. It goes over all the key aspects of the PHP code, like how to add your own service, how to create a query printer or form input class, and what the most notable differences with the parser function classes are. Examples and out-takes are also provided. The manual does not cover the JavaScript aspects of adding your own mapping service, since that code really depends on the API it uses, and although the overall structure might be similar, the code itself most likely is not.
While translating some of the C# code of MyDownloader to VB.Net for the .Net download library, I’ve already come across quite some awkward code. IMHO, the underneath example could go into the code horrors section of The Code Project.
Why? It uses breaks and returns in the middle of the code, like if C# is some lame generic language without selection structures. The use of the try-catch bloks also seems odd. Also have a look at the condition for the do while loop – lol. The only thing missing are a few GoTo statements, which would have convinced me to print this out and torture fellow geeks with
I started off translating this literally, but got so annoyed by the bad coding practice I decided to attempt to rewrite it. I say ‘attempt’, cause code written like that is not easy to understand, esp for people who are used to ‘decent’ structured code. I splitted the code into 2 subs instead of one, removed all breaks, returns, the insane do while true and put only the required code in try catches.
Today I again did some work on my .Net download library project. I added some stuff to the main class, Download, and also created the base of the DownloadManager class. This class will allow you to work with multiple downloads at once, by putting them in a list, and providing a variety of methods and properties that enable you to gather info or work with all or selections of the downloads.
I’m getting close to actually be able to start debugging the code, something which can take up quite some time with so much untested code.
Today did quite some work on .Net download library, the successor to my current FileDownloader class.
I started off with finishing the protocol provider code (see revision 4), and then went on adding a lot of the still missing stuff to the Download class (see revision 5), which now counts almost 800 lines of code. Most changes I made are pretty much C# to VB.Net translation from MyDownloader, one of the projects I’m basing this library upon. Doing this translating also comes with the challenges of leaving out code that’s not needed (for example a hook system for protocol providers), holding into account all the name changes I’ve made, and at some points revising the logic layout of the code, since I don’t agree with the original design. I also had some great fun with working with SyncLock statements and interfaces.
Although the project is still far from a first release, the basic structure is taking form, and I’m beginning to see where and how future features will need to be added
I’m about to release a new version of Maps and Semantic maps. Since it does not feature any mayor structural changes, it’ll be added to the 0.3.x branch, and so become version 0.3.3. This version features some small, but important bug fixes, some code improvements, and also some new features.
New features
Bug fixes
Refactoring
If no more small, or easy to fix bugs or feature requests trun up, the next release will be 0.4, which will feature some big new functionality, like defining custom base layers (for OpenLayers), custom overlays, lists of points next to the maps and probably also a thoroughly revised hook system.
Like every self respecting geek, I have a collection of science fiction books, mainly Star Wars. Today I found a bunch of Star Wars books in a second hand English book shop in Gent. Surprisingly, quite some of the books where pretty recent, including ‘The new Jedi order‘ and ‘Legacy of the force‘ books. Even Timothy Zahn‘s just released novel Allegiance was present.
I bought 14 books, and will probably go back after I’ve checked some stuff about some other books. The funny thing is that each book was €3. So the total was €3*14. WIN! (That’s 42, for those who don’t get it!) I managed to get a discount though, but it still stays a win
Now the Google Summer of Code coding period has finished, I can divide my attention between multiple projects again. Since I’ve been doing PHP and JavaScript only for over 2 months now, I’m starting off with taking a PHP-break. This means I won’t do any development of mayor new features for Maps or Semantic Maps, and definitely won’t work on any other PHP project. Of course I’ll still ensure bugs get fixed for my mapping extensions, and help people out with code when needed, but that’s about it. So basically I’m closing my Zend Studio, which has become one of my most used applications in the last months, and starting my Visual Studio again. Now I think of it, this is really awkward. I used to start my VS practically every time I booted my computer for over a year, and then only opened it a handful of times in a 2 month period.
So, what am I going to work on now? One of my last projects before I started GSoC was a VB.Net background file downloader, of which I released an article on The Code Project, and later on created a C# version. I got quite some positive feedback on this project by people, although it was initially created with the sole purpose of helping that needed a simple downloader someone out, to improve my own skills, and to demonstrate how to create a simple to implement downloader. I’m now continuing this project, by rewriting it from scratch, to both add some mayor new features, and mess around with some multi-threading stuff I’ve been wanting to try out for months now.
The mayor new features that will be added are simultaneous downloads (the current classes only support one download at a time), segmented downloads (woot!), download priorities and bandwidth limitation options. This will require a nice OOP approach, with some more advanced multi-threading. I’m basing part of my code on MyDownloader, an extremely nice C# downloader, which has quite some more functionality then what I’m doing. It’s more extensive then required for most people though, and not all that easy to implement. I also don’t really agree with some naming choices, and it lacks both code docs for devs that want to modify it, and devs that want to implement it. So clearly, I’ll put a lot of effort in keeping the new project as small and to-the-point as possible, and pay attention to easy of implementation, and usability. Another obvious difference is that this project is in VB.Net and not C#.Net. This has more advantages then disadvantages IMHO. If the project is compiled to a .dll or is used in a multi-project solution, it simply doesn’t matter what language it uses. A lot of casual programmers don’t know how to handle either, and the majority of these uses VB.Net, and not C#. And the ones that do know C# are more likely to know VB.Net then the other way around.
I’ve created a project on SourceForge to host the code, and be able to commit to the project’s SVN. Since the project now contains multiple classes, I renamed it to .Net DownloadLib.
After that project I’m planing to put some real effort into my mapping extension for MediaWiki again, and possibly to have a look at Python and Ruby. When school starts again, somewhere half way through September, some new project opportunities will probably arise for me, but I guess I’ll see that then. I’m also looking forward to ‘learning to program’ at school, which is destined to give me some great laughs. Luckily for me I’ll have to learn C++ at university, so I won’t be totally bored with it. I hope they don’t drive the low-level aspects of the language to far, since that’s pretty useless in today’s world IMHO.
I just created a new home page for bn2vs.com. It’s based on (read as ripped off) the layout of my forums, and contains links to the most important sub domains, including this blog, and some external links.
Today I finally announced the new releases of my extensions on a few wiki mailing lists. I also gave the Semantic Maps documentation another overhaul, and created a manual on how to extend maps.
This manual targets developers who want to add support for a mapping service to one of the features Maps and Semantic Maps support: parser functions, query printers and form inputs. I still have to create the manual for the later two features though. Currently, the subjects of adding a new mapping service, adding parser function support and creating new geocoder classes are covered.
I hope to get the Semantic Maps part done by tomorrow, as a nice conclusion to my GSoC project.

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 