Category: Life

Every other post.

  • Flou (GIS App) Update

    The GIS app now has a name. It’s called Flou. I like it, and it doesn’t seem to be taken.

    Qt has wonderful documentation, but that doesn’t make up for a lack of community. I’ve been developing with Qt for the past few months now, and it is the framework of choice for the creation of this application. Qt is a great framework, with great documentation. Anything you need reference wise is found in that bulk of documentation included with their IDE. There’s also a solid set of demo code bundled. The problem is that it isn’t enough.

    Equate trying to learn Qt as learning a new foreign language; say the fictitious Tjahiri. You’re trying to write a book in this language, Tjahiri, of which you know nothing. You have a great dictionary, and a phrase book – but that’s it. If you have questions that go beyond the scope of these tool’s ability to assist, you’re stuck.

    In any case, I’ve been practicing. I built a podcasting application that downloads from not just RSS feeds, but also Twitter and any other page accessible through a web server. Previously, my experience with Qt consisted of building a series of one off applications: five or six widgets, two dialog windows, etc. This was aimed at getting used to doing larger apps.

    AllFeeds

    I’m going to make Flou as minimalist as possible. The intent is to create a core that handles the presentation of maps, the coordinate system for each map, the graphical niceties (north arrows, legends, scales.) All other processing will be handled by outside binaries.  The end effect is to make developing for the platform as simple as possible. You want to add new functionality? Edit the XML configuration script which populates Flou’s menus, and add an entry that points to your executable. That’s it.*

    * Almost. The input/output of the executables would be standardized.
  • Bringing GIS to the masses.

    So with Rice Tea now done, it’s time to start on my next project. It’s a piece of software this time; one which aims to bring GIS to the masses.

    The idea is this: you’re a high school kid, or a university kid, or a worker in an office – and you need to produce a map. If you’re not in a field that’s familiar with geomatics software, what are you going to use? Photoshop. The Gimp. MS Paint. A screendump of Google Earth.

    And your map will still look shitty. It won’t have a North Arrow, a  legend, or a map border. You won’t be able to combine datasets, or plot on XY data. That’s where my software comes in: it gives an easy way to create maps, for non-GIS people.

    The focus will be on making map-making easy and accessible to audiences, much in the same way that Excel has made tabulating data accessible to audiences. That’s where it differentiates itself from other free products such as the excellent MapMaker and GRASS.

    The program will be both free as in speech, and free as in beer.

  • Python is awesome

    In the last year, I’ve had the pleasure to program substantial amounts in C, C++, Python, Ruby, ASP (VBScript), and PHP. I’ve also used Microsoft Visual C++ and Qt as graphical frameworks.

    By far, the most pleasant languages to work in have been Python. I love it for its utter simplicity and flexibility: it can make ordinarily large tasks two lines of code. Do you want to open a binary file and extract packets of little-endian unsigned four byte integers and character arrays? Two lines of code. I kid you not. Do you want to talk to a serial device? Use “import serial”.

    XKCD Comic about Python
    XKCD Comic about Python

    My initial gripe with the language was the use of whitespace to delimit what was meant to be inside a function/loop. Coming from C, which does not care about whitespace, it was a little offputting. But you get used to it, and frankly whitespace, which inherently enforces proper code indentation, makes more sense from a usability standpoint than concluding statements with a semi-colon.

    My other gripe with Python proved to be unfounded: speed. Python implementations interprets code – you do not compile it. Not only that, but Python was much more abstracted from the hardware than C, further hindering speed by the extra code it added in the background. As it turns out, computers are so fast these days that such differences really amount to nothing noticeable. I had Python running for real-time applications without a hitch. For most applications, it’s plenty fast.

    If you want to create a GUI, Python has three options of note: TkInter, wxPython, and PyQt. Personally, I recommend TkInter. It comes with the Windows Python install, has the most documentation out there, and can pull off some things (ie. invoke a dialog to save a file) in a single line of text. Furthermore, the code is cross-compatible: your GUI code on Windows will work just as well on Linux – without recoding anything. On the downside, like the other frameworks for Python, creating a full-fledged GUI requires a fair amount of code. This is where Python starts to look less like… Python… and more like C++/Qt or C/GTK+.

    All in all, Python and its modules are a wonderful asset to quickly and painlessly develop applications.

  • Greyhound makes me buy my tickets – twice.

    So I planned to drop in Montreal for a quick one-day jaunt this weekend. I bought my tickets online, and presented myself at the Greyhound bus station at about 6:40am (departure: 7:00am).

    Ideally, I’d pick up the tickets, be on my way, and that’s that. Unfortunately, the poor decision process of one employee did not make it so. I went into the line to pick up my tickets. The one employee working the desk was on the phone, while the person that she was attending waited. From what I could understand, this guy had American tickets that weren’t valid to go out east.

    He wouldn’t take no for an answer, and she kept trying to call new numbers. At this point, she should have perhaps quickly processed a few people before returning to him. But she didn’t. So I waited. At 6:57am she was still on the phone. I said fuck it – and went and bought a one way ticket at an electronic station there. So not only did I buy the return trip tickets online, but now I had bought an extra ticket to get to Montreal. Sucks, but shit happens I thought.

    The day in Montreal was nice. The person I went there to meet was a no-show due to a mishap, but I hooked up with a good friend of mine and had some excellent dim sum.

    When it came time to go back I went to the bus terminal in Montreal, and presented them my papers to get the ticket. They refused them, stating I needed to have picked up the tickets from Ottawa. They said the paperwork stated so. I checked – it didn’t. It said I could pick it up at a Greyhound station, and I assumed that since it was online, it meant any station – just like airline tickets. I explained to them the situation, but they didn’t care. They told me that I had to buy the ticket to get back a second time. Oh and no, I could not speak to a manager.

    This really pissed me off. On the way there – okay – it sucks that I had to buy a ticket a second time, but I could deal with that. But that they refused my ticket back – and told me to buy it again – that really upset me.

    This was a no-win situation. Even had I waited for that worker in Ottawa to finish her business, and miss my bus in the process, then that initial ticket to go there would have been invalidated (only good for that one time according to staff.)

    So thank you Greyhound, for telling me to buy my tickets twice.

  • Heading to Hackfest

    On the weekend of November 7th, I shall be in beautiful Quebec City for Hackfest, a bilingual hacker con. In exchange for five books and a banner on the Rice Tea website, they will waive the entry fee and provide me a table to sell the book.

    It’ll be the first time that I sell the book publicly like that, so I’m really curious to see how it will all go down.

    In other news, I’ve been hearing lots of positive comments about Daemon lately, a techno-thriller by author Daniel Suarez. He originally started self-publishing the work as well, and I aim to replicate his success. In any case, I’m thinking of picking up his book from Chapters.