Cycling Safety, Printing with Cups & HPLIP, and Vino

All in all, not a bad weekend. I’d fixed our printing issues with Samba/Cups/HPLIP before 11, and I’d slept in until 9:30 (yes, I clearly needed sleep). It was, I think, a permissions issue, but it was a confusing issue.

Brokey:

lrw-rw---- 1 root cups 9 Sep 24 17:04 ugen0.2 -> usb/0.2.0
crw-rw-rw- 1 root cups 0, 128 Sep 24 17:01 0.2.0

Workey:

lrw-rw---- 1 root cups 9 Sep 24 17:04 ugen0.2 -> usb/0.2.0
crw-rw-rw- 1 root cups 0, 128 Sep 24 17:01 0.2.0

Yeah. I don’t see a difference either. Still, I was getting the following errors:

prnt/backend/hp.c 745: ERROR: open device failed stat=12: hp:/usb/photosmart_7350?serial=XXXXXXXXXXXXX

and

printer-state=5(stopped)
printer-state-message="/usr/local/libexec/cups/backend/hp failed"
printer-state-reasons=paused

whenever I tried to print (not the real serial number).

Then I chown root:lp both ugen0.2 and usb/0.2.0, and printing was magically working again. And yet, they still show as being root:cups. Go figure. Please. Go figure, because aside from some weird corruption in some place I don’t yet know exists, I can’t figure it out myself.

So, that done, I moved myself downtown to the KC Public Library for the first of two League of American Cyclists Smart Cycling KC: Traffic Skills 101 classes. Though there wasn’t anything in there that I didn’t already know, it was still a good time, and worth the time spent. Some really good discussion ensued around traffic law and cyclists place in it, and how to best defend ourselves out there. I’d be interested in the more advanced classes, so I’m going to keep my eyes open for those.

Now, I’m about to settle in for the evening with my beautiful wife, who’s been shopping nearly all day, with a bottle of wine and a weeks worth of DVR’d television stories.

Viva la Vino!

Over the weekend (and one of the reasons I didn’t get to post about Saturday’s ride until today) I rolled a quick wine database app for my wife and I. I’d been toying with the idea in the *very* back of my mind for a little while, and when Jami said “That would be really cool!” Saturday night, I understood how I would spend my Sunday.

It’s sad, really, how much PHP I’d forgotten. I used it about 10 years ago to write a quick and dirty rough draft for a mod_perl driven LAN party organizing site that helped us, get this, organize LAN parties. The people involved in those awesome times were spread between Lawrence, KS and Kansas City, and we wanted an online RSVP system for our weekend frag-fests. Before it fizzled out due to people moving away, moving on, and generally growing out of it, it was a very nice community blog with event organization as it’s core. Hewn from scratch, it was also a great vehicle of personal growth in all things web design for yours truly.

The rough draft for that site was the last time I’d used PHP. It’s amazing how much one forgets. In building this little ditty, I had to relearn such language specific basics as assignments and conditionals, much less deeply nested hashes and objects (all arrays in PHP are, apparently, associative – who knew?). Most of the concepts are fresh from my work (at work) with Powershell, but the syntax, naturally, differs.

The engine, if I can be so bold, is still rough. In fact, it’s a tangled mess of burnt spaghetti code sticking to the bottom of the hard drive that doesn’t deserve the name “code”, but it works.

Our requirements are pretty simple:

  1. Must work easily in mobile browser for updating while we’re out with nothing but our smart phones.
  2. Must have rudimentary rating system so we know which wines we’ve liked, and which we haven’t.
  3. Wines must each be sufficiently described so we know what they are:
    • Vintage (year)
    • Varietal(s) (grapes)
    • Winery (producer)
    • Region (geographic location of winery)
    • My Wife’s Opinion
    • My Opinion
    • Comments (general notes to jog our memories)
  4. Must be able to search on a variety of fields seamlessly and simply.

And that’s pretty much it. Everything else is gravy.

While it’s fully functioning, and in working order now, like I said, it’s a hideous ugly mess behind the scenes. From here, I want to clean it up, separate logic from presentation as much as feasible, utilize more fully objects and classes, incorporate more best practices, and generally do what I can with what it is to learn as much as I can.

It’s really been a lot of fun!

This is the search form. It’s the header, basically, and appears at the top of the screen no matter what. Very simple.

This is the form for adding new wines to the database, available via the “Add” button at the top of every page. Again, very simple.

This is the form for updating wines that already exist in the database. I just call the add form code with the right values to populate the form. Code reuse is a beautiful thing.

This is the results when you search for something. I like the pretty. You gots yer yellers, yer reds, yer sparkleys, and yer pinks. Sum’pin’ for everyone!

There Was Grilling…

This really hasn’t been the summer I imagined it would be. I imagined a lot more cycling. I imagined a lot more pool time. I imagined a lot more grilling. I imagined working on my deck, and actually being done by now. I imagined a lot less emotional turmoil. I also imagined being employed. Of those, I’ve cycled some. I’ve had a little pool time. I’ve even done a little grilling on my new Brinkman smoker, with some quality time spent on new folding camping chairs with good friends. However, I’ve not been employed, and thus, have not even started on the deck. It simply costs too much right now. Continue reading

Hermann! … and the lake, and the wedding, Oregon, and the islands…

Well, we’re set. On July 27th through the 29th, a group of friends and myself will be in Hermann, MO for the Very Berry Wine Trail. Personally, I cannot wait! It’s been such a tumultuous year thus far, I think I’m due for some no-holds-barred fun. Now, at first glance, a wine tasting trip might not sound that way, but the crowd, combined with the fact that we’re not going to have to drive anywhere once we get there, is a recipe for… yes… fun! Continue reading