Glom Web UI

If nobody else gets around to it, I might have to implement the Web interface for Glom myself. But I haven’t done web programming recently and I’m very out of touch with the latest stuff. The last time I did any, JSP was the nobody-ever-got-fired-for choice.

It just has to read the Glom .XML file and from that allow people to navigate through tables and records, getting and setting the data from the database, laying the fields out appropriately as per the simple Glom layouts.

Feel free to add comments to tell me what the latest popular proven technologies are. Note that I’m not interested in using .Net or Mono, and I’d rather avoid relatively new programming languages like Ruby, or APIs that were invented last week. Python would be nicely middle of the road if there’s some suitable APIs for it. It might be nice to be able to call a C++ libglom library, to reuse some logic.

I’m not going to do this any time soon. (Unless someone pays me for it. As ever.)

Update: I’d like to have a nice AJAXy responsive UI, so I can, for instance, update a list of choices in one field based on what the user has just entered in another field. A small delay would be acceptable, but a page refresh would be annoying. But I don’t want to write any javascript myself. It would be nice if I could just have all that hidden inside some widget objects, like using GTK+ that renders itself to a browser.

Building modified debian packages

I recently had to create modified versions of some debian packages, to apply some custom patches and use some special compilation options for a scratchbox environment. It was time that I learnt something about actually making debian packages. These were packages that Daniel Holbach couldn’t do for me, but he did explain some stuff, which I’ll note here for my reference. He’s not to blame for my errors.

To get existing debian package stuff, make a directory and do this:

This gives you 3 files, of these types:

  • .orig.tar.gz: The original source tarball, exactly as you would get it if you downloaded the source code directly.
  • .dsc: The Debian Source Control file.
  • .diff.gz: A patch to add the debian sub-directory.

You don’t need to uncompress and apply all that manually. There are tools to help:

  • dpkg-source -x something.dsc, to expand the source tarball and apply the .diff.gz patch. You then have the source directory, with the debian sub-directory inside. If you did apt-get source then this has been done for you already.
  • cd into the source directory.
  • Do debuild (or debuild -us -uc to avoid the GPG signing). This builds the package, by reading information from the debian sub-directory, building the source, and putting it all in .debs in the parent directory.
    (On scratchbox, where debuild does not work due to fakeroot problems, do dpkg-buildpackage -rfakeroot -sa)

That should confirm that you can actually build the packages. If you are missing some dependencies, try “apt-get build-dep yourpackagname”.

Now you might want to change some things before building the packages again. For instance:

  • Using a newer source tarball release:
    • Get the source tarball of the latest release.
    • Rename it to match the debian convention. For instance:
      mv gconfmm-2.14.1.tar.gz gconfmm2.6_2.14.1.orig.tar.gz
    • Unpack the new tarball.
    • Copy the debian directory from the old source directory to the new one.
    • cd to the new source directory.
    • Do dch -i to edit debian/changelog with the editor. Export EDITOR=editoryoulike if you don’t like vi.
    • Change the version number in the new changelog entry. debuild/dpkg-buildpackge actually uses the version number in the changelog for the version number of the debian packages.
  • Changing dependencies:
  • Using special compiler options, or configure options:
    • Edit debian/rules and edit the appropriate makefile rule. Try to use a makefile variable, to keep things simple. Some debian/rules files already use CFLAGS or CXXFLAGS variables.
  • Apply patches:
    • Some debian/rules files have makefile rules to automatically apply any .patch files. If yours does then just add the .patch file in appropriate place. Otherwise, just apply the patch manually and store it in a debian/patches_applied/ directory.

After you have changed the sources and the debian files appropriately, debuild (or dpkg-buildpackage – see above), should build the packages again, putting them in the parent directory. It will even create the .dsc and .diff.gz files, completing the circle.

Romanian audio

I didn’t get a response to my previous request, so I’ll be clearer. I’ll transfer 100 Euros to a native Romanian speaker who records the following as Ogg Vorbis or MP3, in a clear slow voice, and provides the text for it, under the Creative Commons Attribution-ShareAlike licence. Please mention it in my blog comments so that you can know if you are competing with other people. This offer will be valid until April 30th 2006. It should have the following:

  • Some simple greetings for different times of the day.
  • Declination of the common verbs in the present tense: To be, to have, to do, to make, to need, to want, to give, to take, to see, to stay, to go, to pay, to work. For instance, “eu sunt”, “tu eÅŸti”, “el este”, “ea este”, “noi suntem”, “voi sunteÅ£i”, “ei sunt”, “ele sunt”. I know that eu, tu, etc are often ommitted, but this would help the learner at first.
  • For “a trebui” and “a vrea”, you might also decline stuff such as “el vrea să aibă”, to show the use of “să”, and to show the special “fiu”/”fii”,”fie”,”fim”,”fiti”,fie” form of To Be.
  • Simple directions: On the left, on the right, straight ahead, here, there, over there, behind, in front.
  • The numbers from 1 to 30, plus 40, 50, 60, 70, 80, 90, 100.
  • I guess it would be nice to have some English announcing the next verb or phrase, but I can add that in later.

This is really basic stuff, and not a recommended way to learn a language, but it would help people to get used to the unusual sounds and spellings, and nothing better exists yet. If it works then I’ll ask for more, such as the past and future tenses and useful phrases. Wikitravel has a list of Romanian phrases that would be good. Unfortunately its pronunciation audio files are missing.

According to this week’s Economist the average monthly wage in Romania is about 230 dollars, so this should be a worthwhile afternoon’s work for someone. Plus your name would be associated with something unique and valuable on the web.

I’m sure there’s some good software for Ogg Vorbis audio editing on Linux. Maybe someone can suggest something in the comments.

Update: Zsolt Czimbalmos from Miercurea Ciuc did exactly what I asked and the result is already online. The audio could be clearer, but it’s slow enough for me to hear the sounds well.

GNOME Platform Overview

I am really pleased to see Shaun’s great new GNOME Platform Overview documentation. It’s familiar information to regular GNOME developers, but we forget sometimes how essential this is for developers who are new to GNOME, so actually writing that up was neglected for a while. It’s also great to see how many important pieces of Freedesktop and GNOME are falling into place, so we really have a complete platform.

I believe that the GNOME Foundation board already plans to fund further chapters to expand on the various areas, providing recipes to actually implement applications and to integrate them with the platform. If not, then I hope they do, and I’d even love to do the work.

Of course, there’s some good gtkmm documentation already, though it lacks the freedesktop integration stuff.

Romanian

I’ll be visiting Romania this summer for maybe three weeks. First stop will be the Temesoara/Temeschburg area in the Banat. My girlfriend and her ethnic-German family lived there (“Gross Sankt Peter” and Bogarosch villages) until they emigrated/escaped mostly en masse from Ceacescu’s paradise in the 80s. Lots of good stories there. Hopefully we’ll also get to visit Bucharest and the mountains. She speaks Romanian quite well already, but I’d like to learn a little.

So I wish there was some creative-commons-licensed Romanian language audio somewhere. I’d pay a few Euros if a native speaker could record some simple stuff such as everyday phrases and declination of the basic verbs (To be, to have, to do, to make, to want, to give, to take, to see, to pay) in slow clear speech, with a text transcription of the recording.

Update: I already have the Teach Yourself Romanian CDs, but I need something more like Pimsleurs. Just the simple stuff above would be useful if it was slow and clear and on a loop on my audio player.

Security versus satisfaction

I had an interesting interview today for a contract in Munich, involving embedded Linux and VoIP. That’s good technology to work with, but the project is likely to be otherwise quite conservative. It would offer reliable income for a few months without being away from home.

The downside is that I’ve been thinking again about starting a company, because I’m seeing increasing demand for open source consulting, particularly with embedded GTK+/gtkmm. And I believe that Glom consulting can be a winner in the next few years. I think demand will increase more if I can offer a corporate partner with a pool of employees. One of my problems at the moment is that there aren’t currently many good employee candidates in Germany. Many of the best German GNOME developers have been snapped up by other companies, and most of the others that I strongly admire are still students so I’d feel bad about tempting them away.. Some people have already received emails asking if they’d be interested if I manage to find enough business to support them, just in case. I would really want my Openismus company to mentor new developers, but I think I need some dependable people to start with.

Maybe this will work out, but I guess I’ll get an offer about this contract in the next couple of days, so I may have to decide whether or not to risk seeing if things work out. A company, with sizable contracts, would insulate me from having to make these decisions every now and then.

Glom 1.0

Glom 1.0 is out. It’s reasonably stable, and it does many useful things, in a simple way:

  • Define fields in tables: number, text, boolean, date, time, and image.
  • Define relationships between tables.
  • Define field calculations with python.
  • Define field lookups.
  • Define default field formatting which can be overriden later.
  • List and details views, with automatic layout when resizing.
  • Related records portals on the details view.
  • Related Fields on list and details views.
  • Dropdown lists of choices for field entry.
  • Open and Find buttons next to ID fields (used by relationships).
  • Find mode: Using the existing list and details layouts, with a built-in full text search.
  • Reports: Simple reports with group-by and summary parts.
  • Per-table user/groups access rights.
  • Scripting: Add a button to the details view to run a python script.
  • Internationalization: Translate titles of tables, fields, layout items, relationships, reports, etc.

All without SQL. This is enough for regular people to create usable database systems, though the current version would probably be challenged by tables that have millions of records.

Glom will now voluntarily follow the GNOME release schedule, so new features will be implemented and stabilized every six months. I’m looking forward to implementing all the new features, but I will take a break to do some paying work. I recommend Ubuntu Dapper for trying out Glom – wait for the Ubuntu release on April 20th June 1st 2006 if you want a stable system.

Many thanks to the beta testers who helped me to reproduce and fix some annoying bugs, particularly Peter Williams, Ryan Paul, Phill Gillespie, Halászvári Gábor, and Daniel Holbach.

ListViewText

I have reluctantly added ListViewText to gtkmm 2.9/2.10 in CVS. It’s a very simple TreeView specialization that allows only text values, and doesn’t allow children, similar to ComboBoxText and ComboBoxEntryText. Thanks to J. Baltasar García Perez-Schofield, who implemented it.

I’m quite sure that this would be useless or awkward in most real-life situations, because you so often need to associate secondary non-text data with each item, but it’s probably good enough for some simple lists, and it does reassure people who are initially scared by the more capable TreeView API, though that’s still far easier in gtkmm than in C.