Dominique Dumont: A success story for Config::Model
Hello
Here s a mail telling how the Config::Model Perl module was used to refactor existing configuration tools in Perl. Some punctuation and blank lines were added to improve the flow of this text. The full name and mail address of gkr is withheld on his request.
Tagged: config-model, configuration, debian, Perl
I took over a perl script that was responsible to pull data from several sources and push it after validation and re-packaging including some meta data into one of our production systems. The script was never intended to be used for more then a few month. But as things go, we were still using it after a few years. Only now for a lot more sources. Since all the configuration of sources and meta data were contained as a single hash in this script, it became very unwieldy. Although the configuration seldom changed, once it got added it was not an option to keep it like this especially as we decided to prepare a Debian package for faster installation and version tracking. So I had to re-work it and was looking for some library that was allowing me to define how the configuration has to look like, providing sensible hard coded and computed defaults for some of the values. This was when I found Config::Model on Cpan. It was, after some digging into the documentation, quite simple to define a rough first version of the complete config, including global default values as ini file and very simple to read in and write out. A more advanced version was not working because the Config::Model in Debian squeeze did not provide needed features. Switching to yaml as configuration file format not only increased readability but also worked with the standard Squeeze package. Consistency is checked automatically inside the model so broken configurations are more unlikely in the future. Of course I had some work re-factoring the original source but Config::Model allowed an easy addition of a value-checked and documented configuration file. To access the Config::Model::Instance I added small wrapper packages that allowed an easy access of the config elements by name to make the source easier to understand. The re-factoring needed for creating a Debian package for the Script which is now a set of modules and a small executable was simple once I had Config::Model working, since I was able to add new configuration items effortlessly and remove a lot of hard coded parameters. I don t use the cli tool yet for configuration editing but that s going to be the next step.Many thanks to gkr for this feedback. Let s hope he will continue to give feedback on his usage of Config::Model. All the best
Tagged: config-model, configuration, debian, Perl
I did sort of commit to at least trying to add support for Android string resource to
LED Fireworks. Or, parent helpers go overboard
My friend, Mike Ward, and I help out at our kids school by teaching
5th and 6th graders programming in conjunction with a Lego class. For
several years, I was teaching Logo on ancient Apple II machines. The
teacher had a great curriculum and the kids learned a lot, but
this year we decided to switch things around and try them out on
Arduinos.
This spring, the kids are building a Lego display centered around
a birthday party theme for the star elephant at the Oregon Zoo
(Packy), who turned 50 last weekend. In a moment of fun, I suggested
that perhaps we should have some fireworks, along with the presents
and birthday cake. How hard could it be to wire up a couple of LEDs to
an Arduino to make something that looked like fireworks?
Selecting parts.
Mike and I sat down to order some parts from Digikey. We found these
nice, cheap,
You can see the LED driver chip sitting on a set of extension leads
plugged into the breadboard. It s hooked to the SPI port on the
Arduino board, with the clock set as fast as it will go. If you
watch the video, you can see that the LEDs actually vary in
brightness. They re actually being pulse-width modulated. Clocked at
2MHz, there s enough bandwidth in the SPI bus to drive 160 LEDs with
127 discrete pulse widths at nearly 100Hz (100 * 127 * 160 = 2032000).
Is bread boarding practical?
With the chip propped up on its extension wires, and the LEDs plugged
in, the whole setup was not surprisingly fragile. Getting five
of these chips wired up and running for the length of the Lego show
(one day at school and two days at the zoo) seemed unlikely. So, we
decided to build some custom circuit boards.
Using the GEDA tools to make circuit boards
My business partner, Bdale Garbee, and I build rocketry electronics
through 








Samuel Thibault is a French guy like me, but it took years until we met. He tends to keep a low profile, even though he s doing lots of good work that deserves to be mentioned.
He focuses on improving Debian s accessibility and contributes to the Hurd. Who said he s a dreamer?
Recently I wrote about packaging Falcon programming language for Debian. So here
is the status of package.
Package builds multiple binaries and we have successfully separated modules from core
Falcon language component
On my everyday netbook (a very reliable first generation
Two weeks ago, I was at
The other day, I was a bit puzzled over a seemingly simple task: Enable core files to be generated from a PostgreSQL instance running on Debian. That instance has unfortunately been segfaulting on occasion, but never left a core file.