Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.

2011/09/29

Learned some Javascript (and maybe more) (I think)

var filename = get_filename_or_something() ; # !important
if ( !! filename ) {
    # do code
    }
It took me a while, but I think I get this. If you try this and filename is undefined, that could be a problem. One bang forces it into the logical realm, and the other bang reverses it, making positives negatives. In perl, we'd just go if ( $filename ) {} , but we're cool like that.

But, as you might imagine, it is absolutely impossible to look this one up on Google.

How a technical presentation Q&A session turned my head around.

Sometimes you learn something beyond what you expect.

Last night, I attended a presentation at my local LUG of Puppet by Garrett Honeycutt of Puppetlabs. Garrett had evidently been a PLUG guy when I was, but I didn't really recognize him. I did recognize his friend, so it could be my mind going.

Anyway, Puppet, in a nutshell, is a configuration manager useful for keeping hundreds of machines doing what you want, using the same kinds of tools people use to manage software, including moving from Development to Test to Production. Some people I know who ride the big iron are finding their current means to manage their hundreds of machines to be a little too hodge-podge and daunting were there, and it seems they like the taste of that Kool-Aid. I was interested, and thinking it could be useful, but a bit more than anything I need.

That's when it hit me. In our current workplace, we're not really doing that. There's one canonical instance of a thing, be it a Perl program, a Perl library, a Javascript module, a web page, a script, whatever. We have test and production databases, and for some of the modules, we're using tests like in Perl Testing, which I must confess I never really "got". So, while we might be generating decent code, we're not engineering it and maintaining it the way we should.

So, I'm spending much of today trying to wrap my head around that, hoping to establish Dev-Test-Production setup for my code. Thank you, Garrett and Mike and the rest, for kicking me the right direction without even meaning to.

2011/09/26

It Exists!

Turns out that "Bluetooth for Location" has been solved already, with BlueProximity. I'm still looking for a way that a recurring crontab thing can be set up, but a precedent has been set and licensed GPL, so I'm optimistic.

Also, apt-getting bluetooth and bluez-utils made the broken little dongle shine blue. Just that easy.

2011/09/25

How Can My Computer Know I'm At My Desk?

The problem is exactly as stated. I have my computer do certain alerting things, but unless I'm physically near, I don't it to do some of  'em. And it would be nice to be able to use it to enable certain security aspects, less "unlock when I show up" but rather "lock when I leave". But first, of course, we must have that mechanism.

So what are our choices?

  • Motion Sensor - I like it. I used to have one in my den to control the light. It's neat. For work areas, I strongly suggest them for your lights, and have on this blog in the past. But you don't always have motion, especially when you've messed up line-of-sight or have a moment of stillness. So, it's a factor, but not the factor.
  • Light Sensor - That won't tell me everything, but will tell us something, and that something is that the light switch is on at my desk. Not perfect, because often my coworkers turn the light on when I'm not yet there, but it's certainly better than nothing. 
  • Location Sensing - My phone is the very definition of an Every Day Carry, and being a GPS-enabled Android which talks to Latitude, I can query Google to find out where I am. Except, where I am at work is in a subbasement, with no radio and no cellphone, so the location sensing defaults to a switch on the other side of campus, which hardly works. Maybe I should try it for "at home". 
  • WiFi - If my phone is connected to my home network, my switch knows it and with a little coding, I can use it. Which is great, but when I'm at home, I often have WiFi off, and sometimes I use 4G (in the one corner of town where Sprint has 4G). Sometimes I don't though, which makes it a poor indicator at home. But it gets worse at work. My desktop is behind a firewall and my phone would be on the campus WiFi, so never the twain shall meet. I could write something that announces every 10 min or so that I'm on the campus network, should I ever get far enough into coding Android, but it isn't there yet.
  • Bluetooth - This is the one I'm currently dreaming about. My dongle is Class 2, which means I have about 30 feet of range (and possibly less at the office). That's a nice range.
Without the addition of hardware I don't yet own, I'm thinking that the best solution is Bluetooth. I think that I could have fun making a dingus with Arduino that does motion sensing and light sensing (and maybe a thermometer) so I can get all sorts of data I can play with, but I can't play with that at work tomorrow.

Any thoughts I'm missing besides USB dongle and smart card you can think of?

2011/09/15

The Delicious Fruit Has Become Bitter

I just got mail from Yahoo.

It's the opt-out email. YouTube creators Chad Hurley and Steve Chen have bought Delicious from Yahoo! and are going to try to get it going again.

I wish them luck.

I doubt will go anywhere.

I got into Delicious when I was at the clinic, I think. There were two main selling points for the service:
  1. Your bookmarks were saved in one central location, so that you could share them between your work machine, your home machine, your laptop, etc.
  2. You could see what other people bookmarked and found valuable on various subjects.
Point #1 was crucial to me. You start getting computers, you start getting headaches about knowing where your links are. Point #2? I tried it a few times. It never was too valuable to me. When I set up a new computer, one of the first things I did was sign in with Delicious and download the Firefox plugin.

When Chrome came along with their bookmark system, I jumped. Right now, a few games that don't work right in Chrome are all that keep me going back to Firefox, plus the occasional debugging, and I never ever log into Delicious. A few months ago, I downloaded the bookmarks from Delicious and put them into Evernote. I don't think I've surfed from it yet. I doubt half the content is still there.

2011/09/13

Pop Culture Rant, not so much a Tech Rant

George Lucas doesn't give a sh*t about you. It's survival of the fittest, friend, and George has the f*cking editing bay.



 I think we saw what we needed to know about George Lucas in Return of the Jedi. We know that Boba Fett's backpack has jets, but he couldn't jet out of the Sarlacc pit. This song is as cool as Fett seemed in Empire Strikes Back, as cool as he's presented here by MC Chris — he'll chase you "from Endor to Hoth, from Ripley to Spock" — but he dropped into the Sarlacc pit like a sucker and couldn't get out even though he had the tools to. Forget, if you can, that Star Wars begins with Jar Jar and ends with Ewoks and just focus on how the intense human drama at the end of Empire gave way to the fairly ham-handed beginning of Return.


Watch the movies. Enjoy them. But remember that Lucas has lost the script. Don't invest yourself in Lucas, because he doesn't care about you.

2011/09/09

Password Strangeness

I'm in this group. This group has a web tool. This web tool is made with ease of use and trust as cornerstones, so there's one password. That password, for purposes of discussion, is Abc123. Be it noted that I remember the letters and numbers, but not necessarily the cases.
While waiting for the bus to work, another member of the group wanted access to the web tool, and emailed me for the password. I did some checking on my Android phone and told him that the password was ABC123, because that worked with my phone.

When I got to a computer, we did some testing and found that neither abc123 and ABC123 before I checked the password configuration and found the right one.

So, why, when I put the password into this tool, did it take ABC123 as Abc123.


2011/09/08

Configuration Joys

I just got a new remote. I don't suppose I really needed one. I have three in my bedroom (four if you count the wireless keyboard) and I'm more than fine with handling them. It wasn't "Hey, I need a new zapper in the bedroom" that lead me to jump on this.

It was my RSS feed.

I have Radio Shack stuck in there, mostly to see when Radio Shack starts selling the Arduino. What I saw was an announcement of Logitech's Harmony line of remotes. I had heard about them. A friend has a fairly advanced one that has a screen and allows you to combine button-presses for several devices into one action, such as "play movie" starting the DVD player and moving to the composite input.

I got the Harmony 200,  a much less complex and cool remote. Also, at $20, much much cheaper. It can control three devices, which works well for the bedroom (TV, DVD, Cable) but the living room has TiVo too and the four-device Harmony 300 is $10 more.

The selling point, the thing that made me go out and get it, was the programming. Well, the price, too, but that just meant it was possible. You plug it into USB and there's a quick-and-easy screen which lets you tell it this is my TV, this is my DVD player, etc. You can then customize the buttons. Then you sync the settings and you're done. No more messing with the "Press the Mode button for 4 seconds, look for the flashing LCD, then punch this four-digit number in" or the worse "Press Power then Down again and again until the TV goes off".

I'll mess with finding different combinations, but this is a solid, well-made remote whose ROM I flash to bend it to my will.

We live in the future.