did I mention I’m an idiot?

Oh, so the reason for my last post? I’m ashamed to admit this, but here goes…

One of the things that really irked me about Windows® was that there seemed to be no respect for what the user was doing. Popup windows or dialogs always took focus. This annoyed me to no end. Once I started using the Mac, I felt respected. Usually dialogs would pop up, but not take focus. Of course, this has its drawbacks, but it kept with the “OSX stays out of your way” concept that I appreciated.

Unfortunately, not all apps behave this way (Colloquy, I’m looking at you). So this morning, I’m logging in to IRC, and Colloquy pops up a dialog for my password (and it keeps *not* saving it – ugh). so I start typing. I’m not quite a touch typist, so I don’t always look at the screen. Next thing I notice is that an IRC window is up, and I’ve just typed my password into the IRC channel. Gah!!!!

So, I had to go and change passwords and update them in my passwords file. Let the comedy of errors begin.


grep saves the day…

first off, I’m a total idiot. I was updating my passwords file that I keep encrypted. However, when I went to remove the old file, I typed in the new file’s name and deleted it instead. D’oh!

well, as you might know, unix-like systems do not have an “undelete” facility. When you delete a file, it’s gone. Or so they say.

When you create a file on a unix-like system, or more specifically, an indexed file system, there are entries stored somewhere on disk that tell you (and the rest of the system) how and where to find those files. When you delete a file, that information is gone (depending on filesystem). Now, to the standard user, there is no way of knowing where that file is. In fact, parts of that file could be strewn over different parts of the disk. Things are sounding pretty grim, huh? To make matters worse, when new files are created, there’s the possibility that old files are being overwritten with new data.

“grep” is an old, old unix program that allows you to search for specified strings or regular expressions (e.g. any line containing the word `idiot`) in files. Well, those unix guys were pretty smart when they decided that “everything is a file”, including hard disks. So, you can ask grep to search the file that represents the hard drive in question and search for known strings.

The end result is that I retrieved my passwords (and thus, saving my marriage). It doesn’t change the fact that I’m a total idiot. In fact, knowing that I can recover data this way is probably going to ensure that it happens again. Oy.!


‘C’ is for Cookie…

‘C’ is for Cookie

Who doesn’t love credit card rewards points? By spending money, you receive "money" back. We’re being rewarded for our rampant consumerism and being encouraged to increase the madness. Ah, the smell of commerce. Anyway, I noticed that our CC has a program by which you can get bonus reward points for each dollar spent. Now, to receive these bonus points, you cannot merely spend your money at the places with which our Fine Institution® has made agreements. Oh no. You have to start your shopping session in their "special" mall.

So, I got to wondering how this was done. And so, a geek challenge was born. I suspected that they set cookies to achieve this tracking. So, I first set my browser to prompt me whenever a website wants to set a cookie. I then cleared all my cookies (you may not want to do this unless you’re really curious. You’ll find yourself setting preferences at each web site you frequent if you clear your cookies). With that done, I left the window that views cookies open, so I could inspect them as they are set.

10 page views and about 50 cookies later, I finally saw the cookie that tells the vendor to notify our Fine Institution® that the purchase was made after visiting their special mall.

This raises a serious problem. Let’s say I’m a paranoid user, and I don’t like cookies being set. In fact, I disable cookies for all sites. I don’t even want to see them. No cookies, no way for the vendor to see that I started off in the special mall. Hmmm. That’s not good. I want my points. So, does our Fine Institution have anything to address this issue? I didn’t see anything on their site, so I’m assuming they do not. I’ll call their customer service when I have a chance and am feeling particularly self-loathing.

Also, what happens if I have a link to said vendor that is specific to myself or my organization? Do I not qualify for the bonus points?

In reality, it’s pretty rare that someone completely disables cookies. It would be very difficult to survive on the modern web without them. I mean, in the few page views within the site of our Fine Institution®, I must have accepted at least 20 different cookies from no less than 5 different IP addresses.

Gone are the days of the stateless web. Yes, HTTP is still a stateless protocol, but the experience sure isn’t anymore.


Drupal Camp NYC 3 wrapup

Whew, Drupal Camp was like taking a drink from a waterhose. I met all kinds of folks from all levels of expertise. There were even Rails people there (gasp!). Anyway, I caught the tail-end of the performance discussion, attended an advanced theming session, and debated the downsides of server-side browser sniffing.

Overall, it was a great experience, and I’m pretty psyched about developing some new features for my own Drupal-based sites. In fact, I’m in the midst of redesigning therac25.net in Drupal. So, wiredgeek and I came up with a little rhyme that really succinctly states how I feel about Drupal:

Rose are red,
Drupal is blue.
PHP sucks,
but what can you do?

Session 2

1:21PM – Beginning modules. Finally some meat. I have been interested in developing my own modules for a while, but never knew where to get started. Here we go:

  • use api.drupal.org
  • hooks – create a dir for the module
  • create module_name.info file
  • create module_name.module file (no closing php tag, start with it, but don’t end with it)
  • if you’re creating something that makes new tables, you need a .install file. When you install and enable a module the first time, Drupal runs the hooks in the install file. The hook name is the name of the module file
  • in the uninstall file, free any variables you create
  • hook_nodeapi – operations on nodes that your module does NOT manage (on pre-existing node types) you can change weight to change execution order
  • hook_form_alter – cool

First Session

12:00 PM – CiviCRM – a few guys sitting in a room talking about CiviCRM, led by a guy who works for a competing CRM product. No one really knows a lot about CiviCRM, but we’re talking about various features and “what is it?” kind of stuff.

Drupal Camp NYC 3

10:19 AM – This is my first “unconference”. So far, we’ve had bagels and are now signing up/creating sessions for the day. It’s pretty chaotic, but that’s the beauty of it. Ken and I were thinking of doing this for a Rails Camp. Call it RuBarCamp or something.

lightbulb moment about iPhone and Safari for Windows ®

So, I watched the WWDC keynote, and I was like, “Why is Safari for Windows such a big deal that it is the ‘one last thing’ in Steve’s keynote?”

Well, it just hit me as I was reading this. Safari on Windows isn’t there to draw users to the Mac experience, it’s there so that people developing web apps for the iPhone have something to test with. The iPhone uses a “full version” of the Safari engine. Of course this needs to be tested, since each browser has its own quirks. There was no other way to test for safari than to buy a Mac. Until now.

Okay, now I can relax.


the “wow” starts now ™

The other night, I was chatting with Ken, and he mentioned that he was considering a purchase of Vista to run under Parallels on his new MacBook Pro. Being the loving friend, I naturally went into intervention mode. A few days later, I checked in with him. This is what Vista will do to a man…

KEN: still didn’t buy the license for Vista
it turns out that parallels has this setting to disable the pc clock
so XP never thinks it has to activate itself

MF54: nice!

KEN: still might buy it anyways
just to get some experience with vista

MF54: haha
you’re a glutton for punishment
tell you what
you give me $20
I’ll kick you in the nuts a few times
should be about the same experience

KEN: if I give you more money, will you give me the “ultimate edition”?

MF54: totally

programming ruby

I’ve been hearing about Ruby for some time now (at least 4 years). It wasn’t until Ken got into it that I started thinking about it more seriously. It’s an object-oriented language and appeals to my academic side. It’s also pretty well thought out, and has some really great features (blocks!). Anyway, I’m working on building up my coding chops. It’s been a while, and right now ANSI C is my strongest language (C is a nice language, though).

Anyway, I purchased the PDF version of “Programming Ruby” and am reading through it. Good book. Well laid out and is getting me to the code ASAP. Anyway, I’ll post my progress!

My first real project is going to be a web-based prayer request app. I know, a CMS would probably give me what I need, but I want to design something I can use.