Older blog entries for lmjohns3 (starting at number 9)

bgeiger : Hey, that's a pretty high probability observation there ! I've been mighty curious and clueless about the chalst list myself. It's also reassuring that the low diary ratings from a low-rated individual seem to have had little overall effect : evidence for a functional Advogado ?
bjf: Just use your rating power. I think the advogato network is functioning fairly well (although it does seem a bit skewed toward over-certification).

Vocabulary

robocoder: I appreciate and share your disappointment with writing that's difficult to understand. Notice how many of the words you mentioned came into English from Latin (usually through French) ? It's interesting to see if non-Latin counterparts exist for some of these words (thanks for your links to the dictionary, btw !). Consider : repertory ~ storehouse, burgeon ~ grow, ameliorate ~ better, lacunae ~ gaps, armamentarium ~ tools, obeisance ~ bow, pejorative ~ belittling, boustrophedonic ~ do what now ? :-) It is interesting and useful to expand one's vocabulary, but writers who refuse to step out of a more elitist vocabulary level really annoy me.

Coding

Been working a lot on this CORBA component generator tool, completely rewrote the Python parts in Java (yuk, but it makes for a much cleaner build process). Finished the local C++ component generator, useful for generating components that run in the same process and can communicate directly. Working now on implementing a generator for remote C++ components, components that run in separate processes and have to use CORBA for communication. Hopefully we'll convince the management soon to let us open source the whole project ; I think it's too useful not to.

Contributed a few things to Confix as needed for the generated component code.

Also got back to working on GStreamer a little, and even managed to fix a couple of bugs, which was nice, in preparation for the 0.6.0 release. It's quite educational and fun to get to work on a large(r than one developer) project. Hope to get Jack and Alsa support working much better in the next couple weeks.

Coffee and other stuff

I get the jitters when I drink coffee, but I can't help it. Coffee is good. Went boarding this weekend at Klippitztörl, the weather was beautiful. Got a cold (before I went skiing) but forgot to bring kleenex to work. Doh !

dyork : I'm down with the busy. But as long as it's good busy, it seems to be ok ... still, it's frustrating sometimes to know that you could be working on fun free software projects when you've got to be doing other stuff (like commuting. blech.).

And what's up with the linux-audio-dev mailing list sending out messages like they're on crack ? I subscribed on Sunday night and had 60 new messages when I got to work the next morning ! Good grief.

Thinkpad battery

My Thinkpad battery started to die last week. I'm pretty sure it's related to the cold weather sweeping in. (I suppose some tradeoff has to be made for all the beautiful snow.) At any rate, the symptoms are the same as before : The battery discharges normally until it's about 1/3 full and then suddenly drops to empty. This sudden drop cuts the battery life to about an hour (the original life was about 2.25 hours, back in April or May). Fortunately, Raph's Thinkpad 600 battery problem page has a hint from Javier Valero about covering the pins that communicate the battery level (but only while discharging !). So far, it seems to be working well. Thanks, Raph and Javier.

Work and code generation

We finished up a very preliminary version of our component code generator, which is pretty exciting. This tool can generate CORBA component logic by reading an IDL file (specification version 3.0) ; the only code a person needs to write is in the interface function implementations (the "business logic"). When we compiled and ran the first test component, we all wandered out en masse from the R&D floor and scoured the building for beer ... but (strangely) finding none a coworker had to drive to town to get some. :-)

Since the generator is written in Java and Python (Jython)—and because Jython can't follow symbolic links when importing packages—the path config stuff was a headache, to say the least. So I've spent the last week or so translating the Python into Java, which is kind of amusing. I guess I just think anything involving Java is amusing. Any language that has a split() but no join(), or that routes you through three classes to get a useful file.readLines() method is pretty silly, if you ask me.

Props to braden : checking out OpenVRML helped a lot in smoothing out the automake build process with Java.

Open source development at companies

So now we've got this useful tool, and some documentation and examples for it as well. Wouldn't it be nice to share it with the rest of the computer science community ? Well, I think so, but I work at a company ... that makes money by writing and selling proprietary software ...

But fortunately my coworkers are big Open Source fans (shameless plug : check out confix, just released by a coworker), and our department manager is as well. So maybe we'll be able to convince the boss boss that we should release the project.

What happens if we can only release part of the project, say the API library that the generators use ? Would that be worse than releasing the whole tools package, or ... ? I tend to think that any movement towards Open Source that a company makes would be positive. But there might be drawbacks, I don't know. Is it acceptable to release code as Open Source even if the motivation behind such a release is to leech free testing and bug reports from the user community ? I've thought about this ever since starting this project, but I haven't had any truly productive thoughts yet. Suggestions welcome. :-)

It's been a little while since I posted. I'll try to make this worthwhile.

Java and automake

I think I may have found a shape that is both circle and square at the same time, at least in the sense of trying to fit a square peg into a round hole. For the past couple of weeks I've been trying to integrate my project at work (a CORBA 3.0 code generator) with GNU automake. Normally (read : if this project were written in C or C++, or even if I could use GCJ), this would be no problem, and I could even get libtool to help in writing shared libraries. The thing that makes this task interesting is that the project is written in Java, Python, and Jython.

Automake's support for Java is fairly on the sketchy side at the moment, but it does try, and it seems to me (a complete beginner on this particular task) that automake could (almost) fully support Java eventually. Similarly for Python. (Thank goodness that s/python/jython/g works for Jython in the M4 aclocal script, so Jython can get wrapped up in with Python in all these comments.)

So far, there are two difficulties in my wanderings :

  • Automake does not support Java the way I want it to, meaning that it does not directly support building and installing jar files instead of class files. (This is compounded with the difficulty that Sun's JDK javac byte compiler is a pain and won't (a) create a build directory automatically for you when you give it the -d option or (b) tell you what version it is. Sorry, just had to complain there.)
  • Python has its own build and install program, distutils, that works beautifully, but only for Python (and the Python parts of a Jython program). Integrating distutils with automake somehow would be a blessing from heaven unknown since the likes of purchasable packages containing parallel pieces of bread, identically sized, that came from a single loaf.

So, the result for the time being is what any beginner in these domains would do : a hack. (At least I keep telling myself that any beginner would do this.) In the various *-local targets of the root Makefile.am and in directories where there are Java source files, there are some simple-but-theoretically-unnecessary shell scripts, just for loops and ifs that copy various files to various places. Nasty, effective (on my machine), could be avoided, but currently necessary.

Automake itself

All of this learning about automake has been enormously instructive, though, and I am sure I have gained more from this little tangent than hacking up some customized makefiles would have gotten me. In the process, I got to read the automake manual, the autoconf manual, an interesting Advogato article from a ways back, several mailing list threads on various Java and automake problems, and automake info for other projects. It does indeed seem like these auto* tools, while functional, helpful, and particularly a boon to the user and platform independent builds, are still not all they could be.

I am a Python fan by heart (but really have no problem with other languages, just haven't learned them as well ... yet), so I tend to lean in the direction of a Python/XML solution for building packages. I think Perl was an excellent choice for automake, though, so perhaps there just needs to be more hacking on automake. I'm not trying to complain about automake here ; on the contrary I think these tools are nice enough to warrant further work.

Social life

Huh ? I still haven't found out how people manage to program, contribute to Open Source, and have a social life of any kind in any sort of simultaneous manner. If anyone has tips, please lay them on me. :) It's frustrating to want to contribute something to the greater good of the software world, and to also want to spend the evening at a bar, and to also have to go to work. Seems like Kant and Bentham would have much to contribute on this issue. These automake issues have brought this question once more to my mind, since I feel it would be a significant contribution to try to add Java (and Python !) support to automake, but I already have so much going on. Maybe I can con my employers into letting me work on automake for work ...

Project naming

I'm trying to find good names for two projects I have going. One (referred to below as project (A)) is a python web site builder that crawls down a directory tree and generates pages based on plain text files in each directory. Non-leaf node index files are also generated automatically based on the contents of child nodes. My web site uses this project, and I think maybe one other person might find it useful, so I would like to release it. The second project (referred to as project (B)) I've mentioned before, it's a code generator for CORBA 3.0 that reads IDL 3 files and generates Java, C++, IDL 2, or Python code.

So far, the original project name for (A) was genpage, but that is too sterile, so last night I came up with pywesibu but that sounds a little too chaotic. I'm pretty clueless about a name for (B) so far, other than the normal ccmgenerator or the risky hagc (hagc actually generates code). Any suggestions are more than welcome.

Metrics

At first wingo showed me advogato, but I wasn't really that impressed, mostly due to schoolwork constraints (yuk). Now that I am a full time programmer though I have found it a good place to express some of my more geeky tech thoughts that might be ostracized elsewhere. Also, it's fairly interesting reading about what the gods of open source development are doing and thinking about. In looking around a few days ago I came across an interesting trollish part of the community and some corresponding interesting evaluations of the trust metric and “person space” (or maybe it would be better called “geek space”). The trust metric concept is interesting, particularly (for me) as a graph theory exercise. But is it really a good idea to want to quantify person space ? Maybe the really interesting thing is that it is not objective quantification, but rather a collection of subjective quantifications.

15 Oct 2002 (updated 15 Oct 2002 at 11:54 UTC) »
Hacking

Last night I got the hacking urge after working a little on GStreamer. I knew I had to wake up early today to head to work—our carpool group has decided to try to beat rush hour so we have to leave at 7—but just two hours of hacking was not enough : I couldn’t get to sleep. I just added measures and beats and a clock to the playondemand filter, which means I can start writing the sequencer library on top of it now. Drumbox is starting to appear possible. Yay !

So, at any rate, I finally managed to get to sleep, but I had to promise myself that I would get up early and hack before going to work. Sick, you say ? No ! Demented ! The early morning programming helped fuel the need for a green tea at home, and then the usual morning coffee at work ... now I am pretty wired but must wait til this evening to start building the sequencer. Looks like those plans to go running are getting thwarted.

Code generation

Work is fine, I’m getting to the middle stages of writing a code generator for CORBA 3.0. It’s difficult at this point because there is a lot of obscure debugging to do, and Python is probably not the easiest language to debug (can anybody say “eval” ?).

I am also starting to work on a code generator for GStreamer plugins and applications. It is remarkably similar in concept to this CORBA generator task, but the GStreamer app is more fun (because it’s not work, of course). And many thanks to the libglade-2 and Gnome 2 Python bindings, application building and execution is as simple as writing a script and editing an XML file (using Glade for the wysiwyg warm fuzzies along the way). As long as things like low latency and small execution time aren’t high on the priority list.

Red Hat 8

I finally saw a Red Hat 8 desktop last night. It looks really good. Kind of remarkable how the Gnome 2 desktop (or at least the Red Hat 8 version) is kind of splitting the difference between MacOS and Windows. It’s also nice to see the usability of Linux reaching out a little bit more toward the average computer user (though I think it’ll be a while yet before it’s on point, if there is really a point to reach). Over the past few months I have truly started enjoying using Linux myself : the Gnome 2 apps have made huge strides in usability and functionality, the looks are getting better all the time, and the same old Linux power is still there (I am just starting to learn shell scripting, for example.). Now, though, I am longing for all my programs to come out in Gnome 2 debian packages : evolution, gnumeric, gnucash, galeon, the gimp, emacs (but only for the font antialiasing !).

Emacs is really useful

Update ! I just discovered the isearch-regexp function in emacs. C-M-s. Your life as a programmer will never be the same. Now that I’m on the topic, I think I will list some (default on debian) emacs keybindings that I find helpful. “Point” is the cursor, “mark” is set by pressing C-<space>.

  • M-/ — completes the text preceding point by looking for matching strings in all open buffers. Dealing with long function and variable names is really easy with this.
  • C-/ — undo the last command.
  • M-\ — delete all horizontal whitespace surrounding point.
  • M-x tags-search – look through all files in a source tree for a given function or variable name. This will prompt you for a tree to use if you are not already visiting a TAGS file. Also see the ctags(1) function.
  • C-x r o — open a rectangle of whitespace with corners at point and mark. Useful in combination with the other rectangle functions for mass function/variable name prefixing or deprefixing, LaTeX table manipulation, etc.
  • C-x r k — kill the rectangle with corners at point and mark.
  • C-x r t — fill each line in the rectangle with corners at point and mark. This prompts you for the text to fill in. Very useful for things like mass prefixing rows of text.
  • M-l, M-c, M-u — downcase, capitalize, and upcase the word following point (the end of a word depends on the major mode). I never thought I would use these functions until I learned the shortcut keys. Now I can’t live without them ; Notepad and Word are evil demons because they do other things with these keys.
  • M-q — fill the current paragraph, wrapping long lines at the boundary set by C-u <numbers> C-x f (set-fill-prefix). This is really useful with filladapt mode.
  • C-f (C-b), M-f (M-b), C-M-f (C-M-b) — move point one character, word, or sentence forward (or back).
  • C-t, M-t, C-M-t — transpose the characters, words, or sentences surrounding point.
  • C-d (<backspace>), M-d (M-<backspace>), C-M-d (C-M-<backspace>) — delete the character, word, or sentence after (or before) point.

Happy typing !

Work and scripting languages

Work is going well. I have finished a first pass at a Java code generator for our CORBA 3 implementation. It will probably take another week or so to create all the remaining templates, and then probably two to four weeks to iron out bugs.

I wrote the generator in Python (displaying that well known affinity for one's preferred scripting languge), mostly so I could use the supernifty print-using-values-from-a-hash operator. I know somewhere deep down that Perl is likely better suited to this task, but I really don't know Perl that well.

Development followed the classic Leif Python pattern :

  1. Write colossal single file with necessary classes and functions from a first glance at problem.
  2. Realize colossal single file is difficult to maintain and hard for others to read.
  3. Reanalyze structure of program, split colossal file into smaller files (usually one per class).
  4. Add functionality to smaller files until they are colossal.
  5. Go to step 2 for each new colossal file.

I enjoy writing Python programs because I get the opportunity to see the structure of my program evolve. Thanks to Python's fascist indentation policies, I actually get to see the design of my programs in the way they code is laid out on my screen. I like that in a programming language. Also, did I mention that the print-using-values-from-a-hash operator is groovy ?

The other fantastic thing about scripting programs (in general) is their ability to adapt to changing external environments automatically thanks to functions like eval and doing things like executing code over elements of a list. So, for example, in this code generator, a general enough driver class in Python is able to dynamically read values in from code templates and adapt to those values accordingly. Change the template, change the resulting functionality. Want to generate a different output language or add new functionality to an existing output language ? Just write a new set of self-referential templates. No compilation needed.

GStreamer and drumbox

This weekend I spent quite a bit of time working on some things related to GStreamer. In particular, I got a new web site for drumbox whipped up, and I started moving code from the old drumbox libs into the playondemand filter. wingo suggested I look in to making a GInterface for a sequencer element, so I think I will take a look this week.

The app will still take a while to program, at least several months, but I am looking forward to it now. After reducing the scope of the drumbox interface itself, the project is looking much more feasible (and easier to debug).

Fonts and the Gnome 2 desktop

I finally figured out how to get the fonts I want (i.e. Verdana) using my Debian Gnome 2 desktop ! I had to add

dir "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
to my /etc/X11/XftConfig file. Things now are looking really good.
8 Sep 2002 (updated 19 Sep 2002 at 18:13 UTC) »

technical writing in Austria

I'm learning quickly here that my education as a Franklin Scholar helped give me one exceedingly valuable skill : technical writing. There are literally millions and millions of people in the world who :

  1. do not speak English as a native language, or perhaps are native English speakers but lack solid grammar skills,
  2. are working in technical disciplines, e.g. computer science or mechanical engineering, and
  3. have to write papers or documentation in English to publish their work.

Now most people, for the most part, do a really good job of communicating their ideas. However, they often need help with pesky prepositions, difficult sentence constructions, or common usage problems in their English writing. English is not an easy language to learn well ! In addition, the only editing help the people from the above lists have usually comes from one of two sources :

  1. colleagues who have concentrated in English studies and don't know much about the technical side of the papers they are proofreading, or
  2. colleagues who have concentrated in technical disciplines but are not native English speakers or do not necessarily know English that well.

This is really not intended as a self horn tooting. My own language and technical skills can always use work ! But because I am a native English speaker and have studied both a technical field and a more language oriented one, my colleagues at work have found this combination of skills to be quite valuable for them.

Actually, I intend this mostly as a challenge to all students to search outside your chosen discipline, in whatever language you want. Broad educations might never be finished, or they might be socially abnormal, but if you can help someone (even a native speaker !) proofread a technical publication in any langauge, they will truly appreciate an editor that can combine knowledge of a technical field with the ability to communicate that knowledge.

USB rocks

On a completely unrelated note, I just bought a USB optical mouse and got it to work with minimal hassle under X 4.2. Yay ! All I needed to do was "mkdir /dev/input" and "mknod /dev/input/mice c 13 63" after installing the kernel modules.

2 Sep 2002 (updated 19 Sep 2002 at 18:12 UTC) »

Dangerous

After a mostly caffeine-free existence throughout college, the temptation has finally become too great. But it's really not my fault: here I am faced with an irresistible combination of early mornings, ten hours of programming a day, and free good coffee at work. Now if only they had little pastries and cookies as well, or fresh fruit or something like that.

Documentation

I have started to really charge into one of the GStreamer documents, the Filter Writer's Guide. It needs serious help, and I am trying to get a handle on at least some of it. Writing documentation is tough, though, and requires a really good understanding of things. Looks like much reading is in the near future.

Work

At work I've installed Bugzilla. Bugzilla is a hacked up set of Perl scripts that functions (and functions well, even), but not without a heavy dose of voodoo. Unfortunately, a nasty DNS situation seems to have thwarted the effort to get Mailman to work, but we might be able to hack it up a little to get some mailing list action in the house.

So that was the first two weeks, interspersed with some emailing and web browsing ... now I've got some real programming projects. I'm looking at creating a Zope interface for CORBA 3, trying to see if it's possible to use Zope to act as a thin client for CORBA apps. I might also start working on a CORBA 3 code generator, but we'll see. CORBA is really complicated, but it's kind of cool. Definitely the kind of thing that management drools over (platform independence ! code reuse ! rapid development !).

well, as i type this, gstreamer is installing on my machine, hopefully step 1 of 3 in getting rhythmbox to work.

i've started to get the hacking urge again, postponed by a mindless summer of driving, sleep, and no work whatsoever. of course, wingo spent much time this summer (while i was slacking) getting a nice app out the door, and that's been a source of some of the hacking urge as well. but now i'm on the job, programming all day and beering on the weekends. what other ingredients are needed to start programming in one's free time ? perhaps just an internet connection (check) and the right mindset (check) and lots of unclaimed or low(er) priority time (check).

so the plan is to get to work once more on drumbox. granted, there are already drum machine apps out there, but i don't think they have good interfaces for my uses. also, i just want to hack on a program for a bit. :)

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!