Archive for the ‘Work’ Category

The Office Wiki Stored in my iPhone

Wednesday, March 4th, 2009

Yesterday, I was looking for a way to carry around a local copy of a wiki on my iPhone.  It seems that there are several apps that let you carry around an offline copy of Wikipedia — in case you are stuck on an airplane or out of cellphone range and need to look something up — but those do not appeal to me because I am always around a 3G or WiFi signal.  What I am more interested in is being able to carry around a copy of the office wiki because I can only get iPhone access to that in a small area within the building.

office_wiki_on_iphone_q

After some research, I found that there was no easy, straightforward, or direct way to do this.  But a little experimentation showed that I might be able to roll my own offline reader with a web crawler and an ebook packager.  This would allow me to browse the wiki with Stanza.  Overall, my experimentation resulted in some good news and some bad news, all of which I will reprint here.

The Good News

The good news is that it looks like this is quite possible.  Although I did my experiments by hand, it can easily be scripted.  Downloading and packaging do take a little while (somewhere between 4-6 hours for our wiki of about 500 pages), but that is well within the realm of possibility for nightly builds.

The heavy-lifting is done by wget and Calibre.  First, you tell wget to spider the wiki.  You have to tell it to ignore certain pages, such as edit pages, revision history, and pages requiring login.  I even told it to ignore the Apache indexes of the upload directories.  The specific command I used looks a little something like this:

wget --no-verbose -Q0 --mirror --restrict-file-names=windows \
--convert-links --page-requisites --no-parent \
--reject '*action=*,*oldid=*,*printable=*,*returnto=*,*redirect=*,*index.html*' \
http://machinename/wiki/index.php

This took some time, but downloaded the most recent revision of all pages, all interlinked, with links altered for the local filesystem-based pages.  I also told it to use Windows filenames because, although everything in my pipeline (my workstation and iPhone) is Unix based, sometimes apps get confused by having a ‘?’  in a filename.

Next, I converted the downloaded archive to an ebook with:

html2epub --output=officewiki.epub ./machinename/wiki/index.php/Main_Page

This took just about as much time as downloading.

Next, I could copy this over to an http-accessible location and point Stanza at it.

The Indifferent News

Stanza picked up the file immediately, but then had to process it.  The epub file is 38MB, but is a zip file that decompresses to 68MB and Stanza insisted on working on a decompressed copy.  The decompression took about 5-10 minutes, which is bearable if updates are infrequent, but I am not too happy about it.

The Bad News

Although the process seems to work and browsing the wiki ebook works about as best as can be expected, my iPhone backups are now so slow as to be unusable.  I have been backing up for 2 hours now and it is still incomplete.

The Future

At present, I am not sure where else to take this.  I could simply “scp” the HTML files to my jailbroken phone, stored in a place that is not backed up.  There are jailbroken apps for reading arbitrary files on the phone.  I would really like to avoid this and go the official route, though, because it opens it up to a wider audience. 

My knowledge of ebook formats is not too large, but I have to believe there is a format that lets you zip raw HTML files, which saves a large amount of time from the packaging.  Perhaps there is an ebook reader that does not require the archive to be unzipped on the phone — directly accessing files within the zip, instead.  This would save processing and backup time.

So the initial results are promising, but not spectacular, and (in my opinion) not yet usable.  More research will be required.

Ketchup Post

Thursday, November 6th, 2008

As I unloaded a bunch of photos to Flickr yesterday, I realized I haven’t posted here in a while.  It’s about time for a catch-up post.

Election! Yeay!  What more can I say that others haven’t already said much more eloquently than I could come up with.  The original plan was to go to the Doug Fir to watch the election.  The Mercury was there as well as Sam Adams (the mayor-elect, not the beer), but the place was too packed.  The gang went a few doors down to Rontom’s.  Despite the rumors of coke-dealing in the bathroom, it was a decent place that I had never been to before.  The whole bar is pretty much a big open room and a projection screen was set up at one end.  The second Obama was announced as victor, everyone screamed and that screaming reverberated around the room.  I had to cover my ears for fear of my eardrums!  I tried to take a few pictures, but didn’t want to be that-annoying-guy-with-the-flash.  I cleaned them up a bit in post-production, but they’re still pretty dim.  Here are two, but feel free to click through to more…

Obama Election-Rontoms-07 Obama Election-Rontoms-05

After that, the gang went to Montage / La Merde for some cajun food and half-price bottles of nice Chilean wine.  When it was time to depart, Kim and I ran, ran, ran, ran, ran to catch up to the #14 bus.  When it hit the Bagdad area of Hawthorne, the bus had to keep away from the curb.  People were spilling off of the sidewalks, yelling and cheering and setting off fireworks.  You would have thought it to be New Years!  Heck, maybe even Y2K!  The blue voters in Oregon barely outweigh the red voters, but we’re all here packed into PDX whereas all the red folks are riding tractors in the rural rest of the state.  Yee-haw.

Pig Heart! The other night, I had a pig heart as part of dinner.  (That’s a rather graphic link of a raw heart.  I didn’t include the actual picture inline for the sake of the sensitive vegetarians/vegans out there.) It was marinated in red wine with garlic, various spices, and lemon, then fried up in olive oil.  It tastes sort of like liver, but with a rubber consistency reminiscent of octopus.  You might like it if you like liver.  You probably won’t otherwise.  Kim had a little centimeter-sized cube and needed no more.

Payphone With Phone Books

Telephone? I know that in this cellphone-carrying world that payphones are becoming obsolete, but I kind of thought that phonebooks at payphones have long since been extinct.  I guess I was wrong.

The heating element on the old grind-n-brew coffee maker finally got to be erratic enough that it was time to get a new one.  When dealing with a piece of equipment that can potentially burn down the house, “erratic” is not exactly the best adjective in the world.  After hearing some suggestions in response to my post a few weeks ago and doing a little research, I settled on another grind-n-brew, but made by Capresso and has a burr grinder instead of a bladed one.  It arrived today and I have made a couple of test batches.  Good stuff.

There was something more I was going to say about computers and desktops and laptops, but it’s pretty lengthy and I’d rather just save that for another day.

Work has been… odd.  Previous to a few months ago, I would be dealing directly with the president of the company frequently–maybe not daily, but at least a couple of times a week.  As the company grew, a manager got inserted in the chain.  He’s a great guy, and moreover acts as a buffer between Engineering and the president.  The big boss can be a little abrasive at times, but the manager knows how to handle that well.  This week, the manager has been out and I ended up having to deal directly with the boss.  Has this been months ago, there wouldn’t have been a problem–but I found I was a little out of practice in my communicating-effectively-with-abrasive-boss skills.  I was unprepared and it caught me off guard.  Everything worked out fine, but it made me pause and be thankful to have an effective and intelligent manager.

There is no spoon

Wednesday, October 22nd, 2008

scared pumpkinAt work today our source code repository disappeared.  This is a bad thing.  You know how, at 7-Eleven, they have that big safe bolted to the floor behind the counter?  It has the slot in the top to make night drops if the cash register ever gets a lot of money in it so that someone robbing the place only gets a tiny bit of money and cannot open or take the safe.  That safe keeps piling up money inside until a manager makes a deposit.  That safe is sort of like our code repository, only instead of holding money it holds intellectual property (which is as good as money in many industries.) Admittedly, that is a bit of an oversimplification.  The “safe” we use for code, under this analogy, would also have a time machine attached to it so we could see what was in the safe yesterday.  It would have a blank-book journal with a pen-on-a-chain attached and wouldn’t let you open the safe or even put anything inside until you wrote in the book.  It would also send you an email any time someone made a deposit.  It would probably have lasers on it too, because lasers are cool.

Today, it was as if our hypothetical 7-Eleven employee turned his back for a minute to pour more flavor syrup in the Slurpee machine and then noticed the safe was gone.  Not only is the safe gone, but the bolts holding it to the floor are gone.  The tile floor under the safe is pristine–no sign of holes where the bolts used to be.  The can of soda that was placed on the safe before refilling the Slurpee machine is resting on the floor directly under where it would have been had the safe been there.  The safe is gone.  The safe had never been there.  These are not the droids you are looking for.

Fortunately, just a short time ago, I had a tiny bit of an epiphany.  It’s possible that two tiny bugs in two completely unrelated systems combined, Voltron-style, to form a particularly nasty super-bug that extracted the “safe” with surgeon-like precision.  Fun.

LCD demo video

Tuesday, July 8th, 2008

People ask me what I do for a living.  There are several answers to this question that, effectively, mean the same thing but differ based on audience:

* telecommunications – This is the quick answer that nobody questions.  The typical response is “oh.”  People figure it has something to do with the phone company.

* I design network routers – “little boxy things that let multiple computers talk to each other.”  This usually prompts a little more conversation than the simple “telecommunications” answer.  Most people come to the realization that this is some kind of hidden infrastructure at their work that someone else maintains–it lets them save their PowerPoint slides to the network share.

* firmware – “It’s like software, but in things you don’t typically think of as computers–things you don’t usually want to crash: cellphones, televisions, cars, and the like.”  This usually prompts a prolonged question and answer session.

But now, I can provide a more visual demonstration of the sort of things I do at work.  I visualize Matrix Code and create fireworks.

Okay, so what I do is actually a lot more boring than this, but I thought this was a fun demo of one of the more entertaining R&D projects I got to do recently.

P.S. that purple thing in the background is my yoga mat.

More Ketchup

Tuesday, April 22nd, 2008

This is another catch-up post to cover all sorts of topics from the past week.

Dream

Last night, I had an odd dream in which I somehow lost a cadaver.  I have no idea why I had one.  I might have been a mortician or transporting it or merely keeping an eye on it for someone.  (Wait–what?  Keeping an eye on it?  Why?  In case it walks away?!) I also have no idea how one could lose a lifeless body.  But I did.

I pretty much have to put the blame on this week’s This American Life: Mistakes Were Made.  It was all about a haphazardly run cryogenics company in the 60s that made a bunch of choices that might have seemed good at the time, but looking back were pretty poor.

Extra points to TAL for using NIN’s Ghosts as incidental music.

Too Much Coffee Man

Saturday was the final evening performance of the Too Much Coffee Man Opera.  Although I have seen plays and concerts in Portland, I had never actually seen anything in the Performing Arts Center.  Presumably, it contains some pretty large halls, but it also holds a number of smaller ones.  The show was in a room that could probably seat about 100-150.  There were a half-dozen or so tables up front and conventional theater seating in the back.

The opera itself was quite fun.  It was campy and low budget, yes, but that’s sort of the point!  The adventures of TMCM and Espresso Boy, who both fall in love with the coffee shop barista, but she runs off to be a superhero and marry the leader of the evil Martians (but she convinced him to be good.) In the end, the Earth is destroyed but the coffee is saved. 

Imbibe

Kim and I met up with Julian at Imbibe on Sunday (or was it Friday?  It was some time over the weekend.) I used to really like Imbibe, but something changed recently.  Last October they got sued by the RIAA because a live band played a cover without approval.  I don’t know if that’s the reason or if it’s under new management or what.  They slimmed down the menu, lowered the quality of the food and raised the prices.  My $15 olive and cheese plate (which was formerly $10 or $12) was pretty skimpy (it used to be huge.) The other food our table got wasn’t particularly good for the price, either. 

The one good thing I pulled away from that evening was the Gotan Project, which was playing on CD between bands.  I believe the genre is called “tango fusion.”  Basically, I’m a sucker for a good accordion in a modern song. 

Photos

My bus transfers!  Let me show you them!  (Oh, speaking of this phrase, I got an email newsletter from Nintendo today about some new Pokemon game.  The ALT text for the main image was “Let Me Show You Them!”)

bus transfers passive-aggressive flowchart

That’s the past month or so of bus tickets–at least, the ones that didn’t get thrown away.  I ride the bus a lot, but not nearly enough to make a monthly pass worth the cost. 

On the right there is the flowchart that was taped to my door today.  We’re in a crunch to get something out next week and I kept getting pestered with inconsequential requests this morning.  I’d submit it to PassiveAggressiveNotes.com, except I already have something in their queue.

Historic Photos of Portland

HPOPortland.jpg

I now have a copy of Historic Photos of Portland (sparked off by my “then and now” post), but have yet to really sit down and really give it the time it deserves.  Initial impressions are that it’s a high quality book with some great pictures.  I’ll talk about it in more detail in the next couple of days.  (This weekend was much more busy than expected.)

How to completely derail the Engineering department in 2 easy steps

Friday, April 18th, 2008

How to derail the Engineering department in 2 easy steps:

Step 1: Have one of your coworkers announce publicly that he stealthfully gave his 2 weeks notice two weeks ago and has been keeping it on the down-low.  He’s moving on to bigger and better things (going back to school) and he’ll really be missed by all.  Long lunch, party with cake, great words spoken.

Step 2: Post a printout of the WeRobot shirt image so that everyone can help identify the robots:

Sense.

Wednesday, April 16th, 2008

The vending machine at work confuses me.  Water is twice the price of soda.  Sure, the Cokes are 12oz and water is 20oz, but it’s water!  I can get filtered water for free from the refrigerator.

Sense.  Your pricing makes none.

In other news, I went to a site with a cute little CAPTCHA today.  Sure, it’s not quite KittenAuth, but it was still cute enough to give me a chuckle.

cat-captcha.png

Signs of Change

Friday, March 28th, 2008

Last week, new signs were put up in the restrooms at work.  I am not entirely certain why grown adults need to be told to wash their hands in a method befitting 3rd graders, but I did not question it.  I wash my hands anyway and just ignored the signs.

Today, somebody put new signs up over the existing ones…

Somebody switched the signs

Ceiling Cat is watching you stand around the coffeemaker

Thursday, March 20th, 2008

While chatting with some coworkers around the coffee station at work, I looked up and was surprised by a ceiling cat.

Ceiling Cat 1 Ceiling Cat 2
(sorry about the blurry)

It would appear that a pattern is available here: http://tubbypaws.blogspot.com/2008/03/meow-you-can-has-lolcats.html

Work

Wednesday, February 27th, 2008

I am very fortunate in that I work in a place that, while a large amount of it is writing code, there is still science to be done.  I can put up with the occasional meeting full of people vying for what color to make icons because I periodically get to put on a lab coat and play with soldering irons, lasers, and circuit boards.

Also: Nacho Libre’s head on a pike.
Nacho Libre's head on a pike


Rodney's 404 Handler Plugin plugged in.