Josh vs. the Snake

I’ve been bat­tling a Python for the bet­ter part of a week now. Mostly just in terms of cre­at­ing a nice habi­tat for it to inhabit, so that we can gather all man­ner of use­ful infor­ma­tion about the habits of pythons and inter­ac­tions of humans with things that the python does. I’d been win­ning most fights and attribut­ing the fact they arose at all to my slowly becom­ing famil­iar with the way it worked at all.

I’d been doing some research on this par­tic­u­lar kind of snake for a cou­ple of months before I decided it looked like a GoodThing™ to be wrestling with, so I knew a bit about it rel­a­tive to some­thing else that I knew a bit about (enough to be dan­ger­ous, as is appar­ently the case with 95% of the world’s PHP devel­op­ers). I knew that it was slightly more strongly typed than PHP, but didn’t really think that was some­thing I’d have to know about.

Ba-baauummm.

Error in formatting:__str__ returned non-string (type int)

Oh, come on, just play with the pretty lit­tle num­ber. Grum­ble grumble.

I am in the strangest place right now. It’s 1.30 in the morn­ing on a week­night and I’m writ­ing code, but I’ve spent most of the day going between Pho­to­shop and a cock­tail of a cou­ple of shell ses­sions mixed with php­MyAd­min and a bit of Django doc­u­men­ta­tion. It’s cool being able to write use­ful code again (and, bet­ter still, I am work­ing on code to solve prob­lems I’d be itch­ing to solve for our own min­istry con­text at TACKLES/Matthias but am being paid to do it under the aus­pices of the CYIADA project, which means I can afford to spend more time and do it prop­erly!), but it’s pos­si­bly even cooler to have ready access to great design tools at home since last week — qual­ity tools are an awe­some blessing!

# by Josh on February 13th, 2007 Tags: ,
| No Comments »

Print CSS styles

A friend needed a copy of an order form yes­ter­day, so I scanned it all in, and couldn’t be both­ered to PDF it. Actu­ally, that’s not quite true. I had an itch­ing to play with some code, so it was scratched in a way that PDF’ing wouldn’t have managed. ;-)

It’s basi­cally just five scanned pages pre­sented in a hor­i­zon­tal aspect, allow­ing you to scroll page-to-page as would occur on real paper, yet, by the use of the print styles I’d setup, it allows the page to be printed in a nor­mal man­ner (i.e. images aren’t get­ting cut in half because they go off hor­i­zon­tally!). I’ve done a spot of work with Print stylesheets before, but this is the first excit­ing and rel­e­vant appli­ca­tion I’ve had for it. There’s also a mod­er­ately work­able print media stylesheet on this blog, if any­one felt so inclined.

I can’t recall if that was some­thing which shipped with Word­Press, or whether I cus­tomised it based off another web­site… I recall tin­ker­ing with it, but that’s about all.

If you’ve got a spare moment, click over to here and “Print Pre­view”. Unless you’re run­ning Netscape 4 or some­thing equally stu­pid, it should work okay… com­ment and let me know how it is.

# by Josh on September 18th, 2004 Tags: , ,
| 1 Comment »