Showing posts with label work related. Show all posts
Showing posts with label work related. Show all posts

Travelogue

DEPARTURE

I am on a plane.

It's been well over a decade since I've flown anywhere, almost 20 years since traveling for work. I'd never even heard of early check-in before yesterday (when an app on my phone when got really insistent about doing so). I went ahead and printed the boarding pass since a paper ticket sounded familiar, and then carried it around the airport. I loitered for while near the check-in counters, reading my oddly-homemade ticket and making sure it would get me to my seat.

The security check wasn't too bad. There was that familiar panic of trying to get all my things into the little tub, convinced I was going derail the entire process causing the line to back way up. People would stamp their feed and huff with rage while I trembled and wept. It was fine. I strolled right through in step with everyone else. Again, not too bad.

At the gate, I went all in and plopped my phone down on the scanner and checked in with the QR code on my screen, thus boarding without using my paper ticket. That part was neat.

(Actually, I'm 99% sure that the barcode was an Aztec code, not QR. Not getting out much doesn't make me some kind of savage.)

Upgrading to first class was an indulgence that I considered a reward for being willing to travel. This was a sound decision. They had free booze, but I didn't want any. They had free lots of things that didn't really interest me. The true luxury of first class can be summed up in one word: ELBOWS. I spent four hours in the air and didn't have to think about where to put my fucking elbows. Not even once.

Money well spent.

ARRIVAL

It could very easily be my imagination, but I swear every city has a unique odor. Not in a bad way or anything, but they all smell different. Nevada smells like a hot street near the beach if you subtract the smell of the actual ocean. I don't really expect that to make sense to anyone else.

The first order of business after getting to my room was to turn on the TV. I love watching the local news in a new city. Everyone is so ugly and strange!  Look at those weirdos, talking about things happening in obviously fake locations.

The only thing to really catch me off guard was the hotel mini bar. Rather than retail packaging, candy and pretzels were presented in nice little boxes that all matched. It looks nice and no doubt gives the hotel better margins. I'm sure they were taking an absolute bath selling 1.7 oz packages M&M's for $13.

What I wasn't ready for was the "Intimacy Kit" ($32) at one end of the tray. It's a perfectly reasonable thing to sell. The problem was the contents:

More specifically, the order in which they're listed. I can't find an objective pattern to it (total items, alphabetical order, number of vowels, etc.), so I'm left to assume this is the order in which you're to use them. I worry that I've grown this old and still don't understand how sex works.

Desktop Metadata Access

One of the main purposes for this blog is for me to find a way to catalog some of my work. I tend to forget about projects pretty quickly after they're done, so the popular question, "What have you been working on recently?" is usually met with entirely too much vacant staring.

This was a quick project to address a minor (but long-running) nuisance for me. I've been pushing it out here and there in case other people were also annoyed.

I've mentioned before that we're a PBS Member Station. As such, we've got a TERRIFYING BOUNTY of video assets, the bulk of which are full-length programs. Those programs are stored as files, and those files all have numeric names the likes of P123456-001 and L-00001234.

Seeing a folder with several thousand of those can be a drag, so I made this:

When you find what something to identify, right-click the file and select Lookup Program

And an info window will open with more information

Easy-peasy. The backend is straightforward--there's a lightweight web server running PHP and MySQL. The context action (a registry entry and a batch file) stuffs the file name into this:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --chrome-frame "--app=http://ceres/OPS/getprog.php?FL=%~n1"

It can work with anything, but Chrome has the ability to display a page without any address or navigation bars (app-mode). Otherwise, we could just pass the name to this:

start http://ceres/OPS/getprog.php?FL=%~n1

and the default browser would display everything.

This system is a good bit faster than trying to play everything. (Of course I love our content! Just not all at once.)


Privacy PANIC! (or: Corporate Location Services)

Well, it could become a panic.

Being constantly disappointed by the horrific cost of RTLS (think indoor GPS) combined with a recent edict to better track time and attendance in my department has led to this glorious albatross:




Now anyone can figure out what I'm (maybe) doing and (very generally) where I am while at the office! What's to keep me from tracking everyone doing everything, you ask?

Starting at the top we have:

FOUR separate scheduled tasks so that when my computer is locked (or idle for 5 minutes) my PC STATE can be reported as active or not. That involved way more jacking around than I'd imagined, but it could be the most accurate part of my little system.

EIGHT separate Outlook rules that run when I'm notified by our security system that I've swiped a reader to open a door (one for each door). The best their server can do is let me flag my card as "lost/trace" so it sends email every time I use it. Then Outlook updates a text file on the network.

ONE bad SNMP query. Ah, well. Turns out I didn't find the right OID for the hookstate of my phone and I don't really feel like digging it up (Cisco SPA112 if you've got the secret MIBs). I never use the thing anyway, since it's mostly there to be lovely. Query runs when the page loads.

And finally, a very rough cron job running on the machine that manages our WiFi. It posts/renames all of the http/inform connection files from the APs to the server, then PHP tries to find which one mentions the MAC address of my phone. Every single minute the thing runs. Oy.

That result also feeds a tag to load a little map with my current coverage area. One of FOURTEEN little maps.

Fun? Oh, yes! Not so practical, though. I only made it this far because I didn't have to worry about including any logic. I can't imagine trying to scale this to more than just me and my one device.


Funny Story.

I've never told anyone this. Never will, either. So mum's the word, you.

About six months ago I was jumping between some Cisco routers and a Windows XP FTP server. I had several terminals for each going for days.

The Windows server was throwing errors when another system would try to delete a file by sending FTP commands directly. I got in and gave it a shot. No error, but the file remained. I couldn't remember what the 'force' flag was, so I asked:

> rm ?

It took several seconds of looking at the lack of a help file before I figured it out. Which means several terabytes of upcoming television programming got deleted. It was SO embarrassing.

Allow me to explain (and make the Cisco reference suddenly relevant):

In whatever Cisco's CLI is, if you want help on a command, you type it followed by a question mark:

> rm ?

That would tell you more about the command rm (as in 'remove,' aka delete). To get some help in a command line in Windows, you'd type this:

> rm /?

That forward slash is key. What I typed was was interpreted as "delete WHATEVER." And so it did.

(relax. I caught it before it deleted everything.)

Thank you, PBS. That was terrible.

Back in 2012 we got this thing from PBS with video in it. There was some ruckus made, but I didn't really care at the time. It got plugged in and turned on and there it sat. For the next few years I paid it no heed.
The gist of it is as such:
  • We're a PBS station, so we often enjoy playing PBS shows. Makes good sense.
  • The shows we get from PBS? Those get sent via satellite. Satellite plays the show, we record it, and play it back later. Easy!
  • Hey! What if the shows got downloaded from the Internet instead of being recorded in real-time? That'd be pretty neat. No more worries about the ISS clipping a statellite or whatever it is that messes things up.
And so the PBS NGIS program was born. (Next-Generation-Something-Something. Google it.) About two racks worth of kit has been grinding away in our server room, quietly downloading stuff from PBS for the last three years. Meanwhile, we've still been recording everything in real-time like we did in the 70's. (NRT, or Non-Real-Time, is another name/component of the system. They branded the living hell out of it. Logos and acronyms all over the place.)

I stumbled across it while working on another project. It took me about 45 minutes to hate the interface provided by PBS. Silverlight?! Come on, guys. It took a week or two to learn how to talk to the servers directly, and then over a weekend I absorbed it into my own frontend.

The frontend in question is The Monolith, a story for another time as it's terrifyingly deep. This story, however, is about a deliberate lack of depth. Lets say you work here blasting TV-rays out to the masses. What's that, you say? A raccoon birthed a litter in the satellite dish last night and ruined a recording? Whatever shall you do?  I can name that tune in three clicks:


    

Even though PBS provides thousands of pages of (beautifully composed, logo-crazy) documentation, what's listed above is all anyone here will ever to do with it. In fact, it's the only thing we're able to do with it. That mountain of documentation has about a paragraph's worth of functionality that doesn't require a PBS administrator's account (note: creds are all stored in clear text).

Not to toot my own horn, but that Rendition list? If you want to see the show's title, you'll need to use mine. The PBS techs told me that anything other than P123456-789 to identify a program was something they were "working on." Now I just need some sweet logos.



Pseudowork

I made an art:

I've been working on generating my own metadata for our local (television) programs based on closed captioning content. First round of scraping text from CC resulted in just over 2 million words (after a long, dreadful cleanup). I'm about 1/3 of the way through our programming.

The database won't be ready for a while, so I crammed the raw text into one of those word-cloud generators. Not as neat as searching the archive for "Indy 500" and getting a list of every show to mention it (with links that start video playback 5 seconds before it appears), but still pretty neat.

HVAC Thermostat Display

Request:
Is there a way for me to keep an eye on temperatures in the studios without a PC?

It sounded so easy:


HTML table set at 90% width = instant responsive web design.

Never in all my life have I encountered a more secretive shadow-organization that the cult known as Honeywell. Except maybe Sonitrol. I understand Sonitrol's paranoia well enough (it's tough to find security system manuals online, for instance). Honeywell could maybe claim liability fears over having some random goofball messing with building controls. I don't even care anymore.

The controller is a Java-on-chip thing that controls way more than I'd have ever imagined. If you're in a commercial building, know that there's an entirely separate building happening right above that drop ceiling. Flaps and louvers and pneumatic things and many many sensors.

The controller is also crap. ZERO upgrades for it, and I have to remove Java then install version 7.12 from a dev kit if anyone wants to connect to it. Not to mention everything being unsigned. Sloppy work, Honeywell. (thanks, though, for the form/post login page. would have never gotten in without it.)

The above just scrapes a few specific xml docs from the controllers rolling cache and sticks them in an html document.

Jumbo Display Control

A while back a smooth-talking salesman came and sold somebody around here some giant displays for our lobby:



Shortly thereafter, I discovered my boss fiddling around with a control panel to shut the system down at the end of the day. He explained to me that he turned them on first thing in the morning and off again at night every single day.

The process went like this:
A small rack contains a button-covered appliance at about knee-level:
There's a row labeled Input with nine keys labeled 1-9
There's a row labeled Output with nine keys labeled 1-9
There's a little block of other keys off to one side. Cancel, enter, etc.

To shut down for the night:
Press the Program button, press Output 1, press Input 9, then press Commit.
Press the Program button, press Output 2, press  Input 9, then press Commit.
And so on for six outputs (one for each monitor). In the morning, pretty much the same deal.

I wept quietly. Later I went to the back of the cabinet that contained the control panel to find a lovely network interface just waiting for me. So I got the controller on the network and then made this:



No fine-tuning, no fuss. The image is from my phone, but there's also a little window that pops up on the receptionist's PC. In fact, it takes all of two clicks to bring it up on any PC on the network.

I'll spare you the discussion that followed about security and the fear of how, "just anyone on our network could turn off the TVs whenever they wanted."

Process:
Connecting wasn't too bad since the controller's MAC address was on a sticker on the back. Also on the back was whatever the exact model is. A quick Google and I had the controller software, which is pretty boss:

There's a web interface for it as well, but the process was as roundabout as using the front panel. Mind you, it's capable of all kinds of things, but for this one task there was too much nonsense. The links on my little interface just trigger cURL commands to overwrite the controllers settings. Also roundabout, but there's no end-user training required.

Restoration Artist

(ongoing)

As staff turns over, I try to maintain the illusion for new hires that they're not inheriting garbage. People are very gross.



One of my favorites, if only for the mystery of it:

(hint: not a touchscreen)