Category Archives: Programming

Omega Hymnal improvements

Since uploading Omega Hymnal to Github ten days ago, I’ve made numerous improvements.  It almost seems like it’s time to slap a version number on it and call it a release.  Here’s a rundown of the features and fixes:omegahymnal-ss-2014-1-22

  • The utility links (import/export/settings/etc) are all grouped under a “Tools” submenu
  • I removed the default DB file from the source, so if you happen to use the default settings I won’t clobber your database when you “git pull”.
  • Omega Hymnal can initialize a clean database if you don’t have one, or you can reinit your database if you want to start clean.
  • I fixed a lot of nuttiness in the auto-text-sizer on the song screen. It’s more consistent now.
  • I added the capability to manually insert pagebreaks in the lyrics using the [pagebreak] tag. This is an alternative to manually shuffling things between text boxes.

Not sure where to go next, hopefully I can convince some others to start using this and get some good ideas. I’d love to figure out a way that I can make lyrics + chord entry a lot easier and less geeky (the world apparently doesn’t share my love of markup languages), though my ideas so far either go beyond the limits of JS or just over-complicate the problem.

Introducing Omega Hymnal

I’d like to announce the availability of a new program that I’ve been writing, Omega Hymnal. Omega Hymnal is a lyrics display program for informal worship settings.

omegahymnal_ss_1.png omegahymnal_ss_2.png

(more…)

On programming, kids, and game development

As many parents of boys can tell you, the dream careers of “Fireman” and “Astronaut” have long since been supplanted by “Video game programmer” (and “Lego designer”, but that’s another article…). Pretty regularly I hear from other parents that their son has an aspiration to learn programming so that he can make video games, and my own boys are no exception. This isn’t an entirely bad thing.

Kids want to make games because they understand games, and for many of them games are the most compelling thing they do on a computer. It’s not a bad way to get started in computer programming; frankly, anything that motivates you to write code is a good way to get started in programming. If that thing is games, so be it; if it’s a loan amortization calculator, that works too. Far be it from me to discourage any aspiring programmer from coding whatever gets his or her brain ticking.

Even so, there are three morsels of food-for-thought that young people and their encouraging parents should chew on when a child sets his (or her) sights on a career in video game design.

(more…)

LIFTS: the Large Internet File Transfer System

Some time back, I wrote a little utility at work using CherryPy called EasyLIFT. The idea was to reduce the number of large files that were being sent as email attachments without having to resort to the tedium of setting up FTP accounts or a big complex CMS system.

EasyLIFT allowed users to login through their LDAP credentials, upload a file to a public-facing web server, and dispatch an email with the download location to recipients. The interface was minimal and quick to use, and was a real success at work.

Recently, I was looking for an open source project to keep my coding skills sharp, so I decided to do a clean re-implementation of the EasyLIFT idea using Flask instead of CherryPy. I dubbed the project LIFTS for “Large Internet File Transfer System”. No, we aren’t transferring “Large Internet Files”, or transferring Files over the “Large Internet”, but ILFTS is kind of goofy and not memorable, so there you have it.

The project is fairly young and not fully functional yet, but if you’re interested in pitching in or just checking it out, head on over to github and grab it from the repo: https://github.com/alandmoore/lifts.

More news to come, hopefully!

Python Code completion in Emacs — at last!

I’ve been coding Python in Emacs for years now, and for the most part it’s been a satisfactory experience. After experimenting with various python modes and utilities, I’ve had a pretty good environment that marries Emacs editing to syntax highlighting, real-time error highlighting, the ipython shell, linting tools like pylint and pep8, and various other goodies. But the one hole, the one sore spot in the whole works, was code completion. Something even idle can do out-of-the-box was simply beyond my ability to get functional in Emacs.

I’d tried just about every solution the internet could offer: PyMacs, company-mode, anything-mode, ipython completion, standard autocomplete-mode. Everything I tried either gave unacceptable results (like autocomplete-mode, which just scans the current buffer for completion information), or just flat-out didn’t work no matter how many tutorials I followed.

Here lately I’ve been trying to work a lot more on my Pythoning, so I decided to see if the state of the art has caught up with this need. Echo base, I’ve found it. Repeat: I’ve found it.

(more…)

Tkinter: not dead yet!

If you follow my posts or projects much, you know that, when it comes to GUI toolkits for Python, I’m a confirmed PyQT guy. QT is arguably the most advanced, polished, complete, and powerful GUI toolkit do-everything programming library out there, and a treat to use. But sometimes it’s overkill, and when I have to put together something quick for certain legacy OS that lack decent package management, having to load in Python and extra libraries just to get a couple text fields and a button doesn’t make sense1.

Wouldn’t it be great if there was a really simple, easy to use, lightweight graphics toolkit built right in to the standard Python libraries, so you could pop together those little one-window GUIs without loading in extra stuff? Well, hey, what’s this dusty thing over here in the corner? It looks like… Tkinter!?!??

(more…)

WCGBrowser update: http_proxy and more

For users of WCGBrowser…

In the last few days I’ve added a few features:

  • Firstly, proxy server settings. Several people requested this, though none wanted to sponsor development (I only asked $100 US). Turns out I needed it for something I was doing myself, so happy birthday everyone, you get this for free. Proxy settings can be set from the CLI, config file, or environment variables (common on many Linuxes).
  • Secondly, stylesheets. Not that there’s much to style on WCGBrowser (the navigation bar, mostly), but you can now do it with QSS style sheets. A (really tasteless) example stylesheet is included.

Latest code can of course be downloaded from the wcgbrowser github page, or just do a “git pull” if you cloned it from there in the first place.

Enjoy! 😀

Five reasons why I choose PostgreSQL

I’ve worked with most of the major SQL databases over the last several years, including Oracle, MS SQLserver, MySQL, and PostgreSQL, both as an admin and (more often) as a developer. They’ve all got their ups and downs (some more of one than the other…), but when it comes to choosing a database for my own projects, my choice these days is nearly always PostgreSQL. This amazing, powerful server is unfortunately one of the hidden gems of the relational database world, so I thought I’d share a few reasons why it’s my personal favorite.

(more…)

From PHP to Python: things I wish I’d known

The story so far…

Back around 2005 I took my first leap into the world of writing useful programs armed only with my laptop, a Pentium II running Debian, and a fat book on PHP5. Though I’d taken a few classes on C++ and tinkered with BASIC on a few different platforms over the years, I’d never managed to produce anything that actually did anything practical (or, did it very well, at any rate); with PHP, though, it didn’t take long to spread my coding wings and take to the air as a novice web developer.

Before long, my skills proved useful in some critical situations at work, and my place as a web developer was cemented. My PHP code became more mature as I learned hard lessons of experience and combined them with the programming theory and computer science I was avidly consuming on the web.

Around the same time, I got interested in Python when I saw a coworker using it to build powerful desktop applications quickly and effortlessly; I wanted to round out my programming skills with a “desktop stack” as quick and simple as PHP, and Python turned out to be a good choice.

So for a few years now I’ve written mainly in these two languages, PHP for the web and Python for the desktop. As my applications have grown bigger and more complex, I began to develop a growing discontentment with PHP on a number of levels. So when people started talking about doing web development in Python, I had to see if I could make the switch.

(more…)

Emacs 24 is here!

Well somehow very quietly last month the worlds greatest text-editor/IDE/anything-you-can-imagine software, Emacs, got ratcheted up to version 24.  Actually, 24.1 to be exact.  Major version releases of Emacs don’t happen very often (between 2 and 6 years, on average), so I’ve been excited to get my hands on some of the new features.  My first attempts to compile it on my Ubuntu boxes failed, but fortunately Damien Cassou came through with a PPA for emacs24, and this past weekend I found time to upgrade my systems to the new version.

(more…)

« Previous PageNext Page »