October 2014
M T W T F S S
« Mar    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Murphy

Undo is great, right? You can do pretty much anything, hit Ctrl+Z and it’s restored to the way it was before. It would be nice if life had an undo button.

Until they come up with one, we have to create our own.

Mike Plunkett was my first professional mentor. He taught me a lot of things, but the most valuable thing I ever learned was to always leave myself an out. Before I was allowed to do anything, he would ask me, “if this doesn’t work, what are you going to do to undo what you’ve done?”

Most of the time the answer is to make a backup. Editing a text file? Make a copy. Upgrading some software? Back up your database. Getting ready to run a query against a database? Wrap it in a transaction.

It’s a good idea, right? It didn’t really hit home for me until one fateful day as a fledgling sysadmin.

I had a directory full of interface files. They were what allowed the system to dial up the modems in these little Okidata printers and print out the customer’s freshly merged credit report. I had the bright idea one afternoon of creating one big text file with all the smaller files in it. Y’know, as a backup.

The files either all started with the same string or had a common extension; I don’t remember. Let’s say they all ended with .modem. The first command seemed innocuous:

cat *.modem > all-my-modem-files.txt

Boom, I had a big text file with all my modem files in it. Wait, how do I tell where one ends and the next begins. Surely there’s something else I could do. I remember at this point I was a real big fan of using -> as a heading in my plain-text documentation.

What about putting “-> myfilename.modem” in the file just before the text itself?

***DO NOT RUN THIS***
for filename in *.modem; do echo -> $filename; cat $filename; done > all-my-modem-files.txt
***DO NOT RUN THIS***

The command ran silently (no news is good news in unix) and I was rather proud of myself. I opened the resulting file and was a perplexed when I was greeted by pages and pages of dashes, one per line. What the hell?

I listed the files in the directory:

-rw-r--r-- 1 xinu users 2 2010-06-16 00:28 atlanta.modem
-rw-r--r-- 1 xinu users 2 2010-06-16 00:28 boston.modem
-rw-r--r-- 1 xinu users 2 2010-06-16 00:28 lafayette.modem
-rw-r--r-- 1 xinu users 2 2010-06-16 00:28 miami.modem

Two bytes each? TWO BYTES? These files were easily 250Kb each and they weren’t all the same size. My heart sank into my stomach. I printed one of the files.

xinu@xv:~/tmp$ cat atlanta.modem
-
xinu@xv:~/tmp$

Time stopped. I looked at my for-loop carefully. Oh no. No no no no. I just overwrote every file in this directory (100s of them) with a single dash. The ‘-> $filename’ bit trashed them, albeit efficiently.

My phone lit up. Every branch office was getting errors back. They were getting calls from furious customers saying that they were no longer able to get their credit reports. I was never so scared in my entire life. I wish I could say that I took a deep breath, assessed the damage and worked it out. I floundered. I called the backup tape company in a panic. I worked for hours trying to find a good tape with the data I needed. It wasn’t pretty.

Every day since, I’ve never done anything unless I had thoroughly contemplated the consequences. That isn’t to say I’m a pessimist now, but I have a healthy respect for Murphy and his law. Have you given Murphy a professional nod lately?

The Geekery

My good friend Jon Angliss writes about systems administration, programming, and whatever other tidbits he thinks might be tasty over at The Geekery. As I went through my feed today I read his latest article on maintenance windows and communicating your times.

If he’s not in your RSS feeds yet, he should be.

San Francisco Public Transit

In my never-ending quest for new experiences I figured now was a good time to learn all the different public transit options in San Francisco.  I’m here for 2 days taping a segment that’s going to air on TV at some point.  I’ll let you know when so you can set your DVRs.

Without further ado, on to the things that I’ve learned.

BART (Bay Area Rapid Transit)

I picked this up at SFO this morning.  While I was staring at a sign trying to figure out how to get to the BART from where I got off the plane this old man came through and asked me if I needed help.  I think he was a volunteer there.

“Well, I’m trying to take the BART for the first time,” I said cheerfully, smiling like a tourist.

“Come this way,” he said pointing at the escalators that, duh, said BART above them.

He got onto this train and I’m looking around frantically, “I don’t have a ticket – don’t I need one?”

“No, this isn’t the BART,” he said.  Hah, whoops.  Okay, so the train takes you to the G terminal (international?) where the BART entrance is also located.  He pointed me the right direction and then we parted company.

I sidled up to the BART ticket machine.  Credit card, cash, okay – how much?  I hit the button for credit card, put in my CC and was offered a half dozen options – add $1, subtract $1, print $20 card, or BART Plus.  The $20 print seemed to be the path ‘o least resistance so that’s what I did.  I seemed to remember my handy-dandy iBART Live application telling me that it would be $8.10 to go from SFO to Powell station.  $20 would do the trick.

At this point I’m wearing my backpack and I’m hauling my rolling duffel behind me.  The turnstile width was just wide enough for me so I tried to put my bag through in front of me.  It fell down (away from me) so I kicked it through so I could get clear of the gate.  The last thing I needed was for my bag to be through with me still on the other side.

A train showed up and the name on the signs matched what I was looking for.  I waited at the door until one of the attendants came by and used a key down by the door that caused it to slide open.  I sat down, planted my stuff on the opposite seat (which was in my lap by the time my stop arrived).  The first few stops didn’t have any signs and I was getting really nervous.  It turned out it was just the no-name stops (intersections, etc) that seemed to be missing them.

From here I walked up the 4 blocks north on Powell and one west on Post to the JW Marriott at Union Square. Fairly wiped out (it’s uphill from Market) I checked into my room on the 13th floor and dropped all my stuff. I went up to the lounge and drank a lot of water and planned my next moves.

San Francisco Municipal Transportation (MUNI)

David at expensify.com recommended Ike’s Place for the best sandwiches in San Francisco. I mapped out my trip: walk down to Market & Powell to the MUNI. Take the (J) line outbound (away from downtown) until you get to 16th and Church. Walk 2 blocks west to Ike’s.

I’m really glad I stopped at the concierge because it turns out you need to have change in order to catch it at the station. I made sure I had enough ones and started out. It costs 2 bucks to ride in each direction. I got quarters to feed the turnstile, walked down the stairs, and caught the (J) when it came through.

I’m still fuzzy on the whole stop thing, though. I can’t tell if we stopped at 16th and Church because it was a stop or because someone requested it. I think it was a stop because I was able to catch it there on the way back, but I’m not certain he would have stopped unless someone was standing there. The punchline is you have to really be aware of your surroundings. If you miss your stop, you’re either walking back or you have to catch one in the other direction which would be miserable.

Cable Car Powell-Mason

I didn’t expect to take this up from Market, but I figured I’d give it a try. I stopped at the Sketchers store, got some new shoes, and then walked across the street to the H&M to wait for it. This time I used Routesy app on my iPhone to figure out when the cable car would be at Powell & O’Farrell again. It dutifully reported 5 more minutes.

Behind me and to the right there were two older ladies. One of them was a seasoned cable car rider and was explaining to the other how the stops worked. Evidently the double X’s on the ground in front of us mean a mandatory stop for the cable car. Sure enough, in just a few minutes the cable car was there.

I also learned that not all of the little running board areas are created equal. The 3 on the left & right toward the front are fair game – two people per running board. The one toward the middle is the entrance to the interior of the car. After I was told to get out of the entrance and was shuffled into the center of the car we jerked forward and I’m pretty sure I squished the foot of the lady behind me. I apologized profusely but she seemed to be okay.

By the time I realized how far we’d gone we had overshot my hotel by 3 blocks. I pulled on the cord, shuffled passed the other folks on the train and got off. Then began the super steep walk back down to Post & Mason. I couldn’t imagine walking on these streets in the rain. They would be way too treacherous for me.

Good Old Fashioned Busses

No tour of public transportation would be complete without a trip on a good old fashioned numbered bus line from X to Y with stops in between. I decided to take a trip from the hotel to where the shoot will be tomorrow (more on this later). I googled, it told me that I could catch the 30 bus south toward Townsend & 4th which was a hop, skip, and a jump from where I needed to go.

I made sure I had enough cash ($2 per ride) and cut through Union Square to the bus stop. The bus wasn’t too crowded, but I wound up standing for most of the trip anyway. We headed south and then all of a sudden the bus driver decides it’ll be faster to dodge west a bit and then head south again. I looked at the route and this wasn’t it. I guess the bus driver is allowed to get creative with his route whenever traffic acts up?

I hoped I wouldn’t miss my stop and I surely didn’t. We got to Townsend & 4th right outside the Caltrain Station and I walked down to King and over to the building I wanted. So far so good. Now to get back.

I checked out the path back up and initially my iPhone wanted me to take a light rail train ALL the way around to Market & Powell. Uhh, no. I walked away from the light rail and tried again. This time it said I could catch the eastbound 45 bus that would take me within a couple blocks of the hotel. Bingo.

Unfortunately it was leaving in less than a minute. =) I looked right and, sure enough, there was the 45 bus. I got ready to cross the street in front of it and the light turned green for me. Sweet! I got across in just enough time to see it sail up behind me.

I got on the bus, paid my $2 fare and sat down. The next stop more folks got on. The next stop even more got on. I gave up my seat, I moved over, I squeezed in, and I got stepped on. By the time we got to Sutter & Stockton I couldn’t move. There was a woman behind me getting awfully friendly and my belly was mere inches from this older fellow who didn’t seem to notice. They stopped, I got off, and walked back toward my hotel.

On the way I saw a hot dog vendor. I’m a sucker for a hot dog, especially an all-beef one so I patronized his sidewalk establishment. A few onions and a whole lot of mustard later I was on my way with some grain-fed all natural hot dog goodness.

Summary

That concludes my tour of the San Francisco public transit system. So, BART good, light rail good, cable car still needs some work, and the bus is a last resort unless you can be reasonably sure it won’t be crowded. I don’t get claustrophobic, but I was double checking my pockets to make sure no one came up at my expense.

8 Habits Update

I set out with 8 habits that I wanted to cement over the course of 30 days.  The ones that I could check on daily whittled the list down to these six: Wake Up Early, Water on Wakeup, Meditate 30m, 30m Exercise, 5 Fruits/Veg, and Avoid Soda.

I did really well on waking up early, drinking water first thing in the morning, exercise, and avoiding soda.  I still haven’t had a soda since March 26th.  Getting some water in me soonish when I wake up is still pretty consistent, too.  The early morning wake-up is kind of hit and miss, but I’m pretty good about retiring early and getting up an hour or two before I’m expected to be anywhere.  If I don’t have anything going on in the morning I’ll sleep in util 6 or 7am.

It’s time for some new habits.  Tracking things on a day-by-day basis really did the trick.  I successfully kicked the soda habit and have been perfectly happy with lemonade, propel, vitamin water, and of course the straight stuff.  On an unrelated note I also haven’t had any alcohol since those Christmas chocolates were done.  I think I’ll keep both routines going.

So another 30 days, then?  This time I want to nail down the following:

Take Vitamins

Yes, it’s a multivitamin, but I’m also taking this omega 3-6-9 blend (3 gel caps). I used to take flax seed oil pretty regularly and for some reason I just stopped.

Exercise

This is easier to do when I’m home (really easy with Zumba, actually), but on the road I need the oversight. The heart rate monitor is going to help, too. I know that when I’m working out on my own I’m not pushing myself hard enough. If I knew my heart rate I’d know when I was slacking.

Clean Eating

This is also not so hard to do when I’m home, but it’s still a challenge. Saving the “damnit, I gotta have a cheeseburger with fries” impulse for one day a week is hardly a new idea. I just decided I would actually give it a try. Stay tuned for that – we’ll likely cover the results on a GeekFit episode.

Write 1K Words

I started this tonight though I’m not going to keep track until tomorrow morning. When I’m not writing in this blog I’ll be writing in a journal. Who knows, maybe some of my journal content will wind up on the blog. We’ll see how that works. I didn’t realize how many words 1000 was until tonight. I got to about 500 and thought I was there. Always stretching, right?

Clean Slate

Miserably Dirty DeskThis is one that was contributed by the lovely @MrsXinu. It was inspired by a site she used to (or still does?) read on called FlyLady.com. The idea is that you clear away an area that’s constantly getting cluttered and make a concerted effort to clear it down again at the end of the day. My desk is a perfect candidate for this.

I’ve cleaned up my desk a few times.  That’s how the machine under all that stuff got there.  There used to be piles of papers and all other manner of nonsense in its place.  Tomorrow I’ll clean the entire thing off all the way back to the Drobo and this time I’ll check the box each day I actually clear it again.

Move Not

Everyone has had a bad experience as a customer.

Maybe your waiter had an attitude. Maybe you stayed in a hotel with really bad internet. Maybe you kept getting the run-around when you called tech support and only after finally fighting to get to the 3rd level did you actually make any progress.

The question is what you do about it at that point. There’s an imbalance in the universe and right now you feel like you’re getting the short end of it. You could vent to a buddy, sure. That would make you feel better about it, but it doesn’t make things right.

So you’ve decided to do something about it. You’re ready to get on the phone and yell at someone or write a strongly worded letter to send up the chain. What do you say? Of course you’re going to try to explain the essence of the injustice. You might even ask to speak the person’s manager when you don’t immediately get what you want. That’s the key then, isn’t it? What do you want?

Often folks will get on the phone, explain their situation, and then just sit there.  “Your move.” The person on the phone will probably apologize. That’s a start, right? They didn’t cause the problem, but in the absence of an apology from the right person, you’ll take it. What now? Do you hang up? Good job – you got someone to apologize to you. Sometimes they’re sincere, but most of the time it’s an act. They want to get you off their phone so they can move on to the next call.

Move not unless you see an advantage; use not your troops unless there is something to be gained; fight not unless the position is critical.

I keep mixing up Sun Tzu and Shang Tsung. One of them wrote Art of War and the other sucked the souls from the combatants in Mortal Kombat. Anyway, the quote above came from the former. He was preachin’ it too, boy. Why did you bother getting on the phone unless you had a specific gain in mind? Were you looking for an apology? I doubt it. Maybe you wanted a free night at the hotel, or a free meal at the restaurant. They screwed up – you still paid them. That’s not okay.

If you’re going to take the time to get on the phone, do it with a specific objective in mind. Heck, pick 2 or 3 so you have some lateral to play with. If I stay at a Marriott, for example, and the service isn’t great (this only happens about every 12-13 stays) I do a couple things. First, I write down in as much detail what the problems were and I take it to the front desk. Then, I give them as much time as possible to sort it out (I’m usually there a week). If it’s sorted out to my satisfaction, we’re done – no harm, no foul. If it isn’t, I call the customer support line.

Once you’re engaged with customer support they need to know 3 things – what your issue is, if it’s been dealt with already, and what they can do to make things right again. They want your business. Getting a new customer in the door is much more costly than keeping one they already have. With Marriott I have a rewards program. I give them the first two bits of information and then say “throw 10k points on my account and we’ll call it good.”

The moral of the story is, don’t make them guess what you want. Don’t keep screaming until they figure it out. They’re not mind readers. Unless you strive for a specific objective, you’ll never reach it. They say the same thing about goals, huh? Interesting.

Play Nice Mr. FCC


These Midland GXT1050 2-way radios had been on my Amazon wish list for a while. I don’t have any particular reason to have them, but I remember having those little walkie-talkies when I was a kid and figured I needed the adult equivalent. Looking at the other things right around that entry in my wishlist I’m beginning to think that I had just read a book about zombie infestation and I was gearing up. Have to be prepared, right?

So a benefactor hits up my wishlist, drops the cash, and the radios show up. I unpack them, throw in the batteries and turn them on. Channel 1, alright. I remember this from my dad’s CB radio. I clicked through the channels and didn’t hear anything. Alrighty, let’s see if this works. I set the other radio to the same channel and talked into one and heard my voice on the other one. What can I say – I’m easily amused.

At this point I dove into the manual, read up on the difference between the FRS and GMRS channels, privacy codes, group mode, and all the other neat things it would do. Somehow I skipped right past the warning that says “you will be fined and/or tossed in the pokey if you use the GMRS channels without a license.” So off I went to the FCC website to apply for a license. $85 for 5 years? Alright. Paid. Now what?

It’s been a few days and nothing, so I consulted the mighty Google: “how long do I have to wait for my GMRS license?” The first entry that came up was really well written article by Kristopher Linquist that took me through the entire routine. It doesn’t look like I’ll have my callsign by our Kahneeta trip but since the immediate need was a 2-3 vehicle caravan on the way to/from the FRS band will suffice.

So the moral of the story – before you spend the cash on radios (especially if you need them soon) make sure you have the right license to use them.

Muscles

I was at a Zumba class yesterday and chatting with the only other guy there. He was asking about my routine, how many calories I eat, how many I burn, etc. When I mentioned weight lifting as a contributor to weight loss he sort of raised an eyebrow and said, “That helps, huh?”

I’ve read a lot of books on fitness in general and dozen or so on weight lifting of one kind or another. The one thing that’s consistent is that no one seems to agree with anyone else. One expert says weight lifting is the devil, another one says it’s better than spending all your time in a hamster wheel (aka “the dishonor of aerobics“).

I lift weights for two reasons.

Functional Muscle

I have to get through airports carrying a heavy backpack. If I don’t stay strong, by the time I get through security and to my gate I’m pouring sweat. Since I’d rather not have to carry a hand towel with me everywhere I go, I keep up the conditioning so the extra weight doesn’t drive my heart rate up.

When I get into the rental car, I like to put my backpack in the passenger seat so I have easy access to my stuff. Without a healthy diet of lateral raises and shoulder presses I have a hard time with that particular maneuver.

Finally, I’d have to say the squats and lunges keep me taking the stairs without any fuss.

More Calories Burned

Without the muscle it would be tougher to keep the per-day calorie burn high. When I’ve hit the gym and done a Zumba class I can get 4100-4200 calories burned in a day. Without any exercise, I hover right around 3300. That means that when I’m on the road missing workouts I need to keep my intake in the 2800 ballpark if I want that 500 calorie deficit. Some trips I’ll come away with a loss, others I’ll maintain. It beats sliding backwards.

All that being said, weight lifting as an activity burns fewer calories than, say, a half hour on the treadmill at a brisk pace. For me, that is. I put in work, but I’m not dashing from one lift to the next without any rest. The real payoff of weight lifting is the higher calorie burn the other 23 hours you’re not in the gym.

More Better

On the way into work this morning I stopped at a mini mart for something to drink. At the counter I looked for those 5 hour energy shots. It turned out they were behind the counter. As the kid helping me goes for a couple the older guy next to him chimes in.

“We have 6 hour energy for the same price!”

“No, thanks. These are fine.”

“Why would you pay the same price for 5 when you could have 6? You’re getting 2 extra hours (I was buying two) for free!”

“I don’t recognize the brand and I don’t feel like experimenting this morning, but thanks for the offer.”

He looked at me like I’d said unseemly things about his lineage. I thought I heard him mumble something about “what’s wrong with this one?” as I was leaving. He was really put out that I didn’t jump at his clever 6-is-more-than-5 sales tactic.

It’s entirely possible that he was trying to be helpful. It’s more likely that he was trying to push the higher margin item. Ultimately price isn’t always the deciding factor.

Padawan Learner

The mentoring continues. Here’s the breakdown for each day since I started with the networking training mind meld picking up where we left off Monday in the Launching post.

Tuesday

We talked a little about IP addressing the day before when we statically assigned a couple addresses to our laptops so we could ping one another. He understood that because we were in the same network he would be able to ping me. I waived away the netmask explanation saying we would cover that later. I didn’t want to wait very long, but I took @rickstah‘s suggestion and started with the OSI model.

Please Do Not Throw Sausage Pizza Away = Physical, Datalink, Network, Transport, Session, Presentation, and Application. The 7-layer burrito of computing.

He was amused by the acronym but I’m hoping it’ll make it stick a little easier. He caught on quick when I started throwing scenarios at him – “if I mess up your IP address, will you be able to play WoW? what layer did I mess with?” / “if you can’t ping your gateway, what’s the first thing you check?” / “if you can’t get to a website, how do you troubleshoot it? what layer of the burrito does your web browser run on?”

We talked about classful addressing and the ranges that used to be the A, B, and C networks. I showed him the corresponding netmasks. We dove into some binary. I was tempted to jump into classless addressing, but decided to save that for the next day. We rounded out with some high level DNS discussion (client -> caching server -> web server). I decided to save all the root server talk for the the next day as well.

Wednesday

I’d let classful addressing simmer overnight. Today it was time to jump into VLSM and subnetting with both feet. We wrote down 24 ones and 8 zeros – “here’s the /24 network we’ve been playing with…” We borrowed a bit from the host side, made the analogy of a quarter having only heads and tails, and then parlayed that into subnets that got smaller and smaller by half as we went to a /30.

By the end of the discussion he was able to subnet a /24 for 3 departments. He listened to the requirements (math is a big department, but science and English don’t need as many addresses) and gave one of them a /25 and the other two got /26′s.

We circled back to DNS and covered CNAME and PTR records with a quick tangent to talk about email delivery so the MX record had a little more context. I told him about the good old days when Network Solutions ran the world, took him through the break up of the registrars, and then hooked in with root servers and authoritative vs non-authoritative queries.

Friday

We didn’t get any study in yesterday because I had a ton of work to do. Today we dove right in with a discussion about collision domains – why hubs suck and switches rock. We started some talk about how cables are built and how a straight-through differs from a crossover from a rollover.  We covered pin-outs and the colors of the wires and he seemed to have a pretty good concept at this point of transmit and receive.

From there we hit low level half-duplex and hubs as dumb electrical devices – transmit frame, loopback frame, collide or not, CSMA/CD or not, etc. Once we he an appreciation of the suck we hit switches and all their glorious full-duplex multi-collision-domain-per-port goodness.

There was new vocabulary throughout – topology, auto-negotiation, and of course NIC. I tested him on his recollection of the 7 layers of the burrito and with the exception of the session & presentation layers he was able to rattle them off pretty easily. Once I got him to stop contracting ‘do not’ he stopped jumping passed the network layer.

Launching

Everyone is supposed to get one professional freebie growing up.

If your dad was a mechanic, you probably aren’t afraid to swap out your own car battery. Heck, if you really paid attention you may be doing your own brakes in the front driveway. If your mom worked in law, then terms like plaintiff, deposition, and judgment don’t send send you scurrying for the dictionary. You still probably need to seek some counsel if you’re about to get sued.

It’s a light competence—a familiarity with the profession that lets you dovetail with your own experiences later. If you want to follow in either parent’s footsteps you have an idea of what that work tastes like already. Maybe that’s why parents are always insisting you at least try the new food. If you don’t at least try it, you won’t know if you like it.

We’ve had a pseudo nephew living with us for the passed 10 months or so. He’s one class from graduating with the rest of his high school class. He’s considering some college later but in the short term it’s a job. The opportunity is pretty limited – retail, food service, and possibly some temping somewhere. That’s when it occurred to me that I might be able to improve his options a bit.

I’ve been working with him on his soft skills since he first arrived though sometimes trying to exorcise sarcasm from a youth’s repertoire is tantamount to just that – an exorcism. He’s gotten a lot better and even though he lets it slip every now and then he’s almost immediately sorry he did. I’m still working on the finer points of etiquette a la Professionally Polished by my friend Dallas Teague-Snider (a must-read if you haven’t already).

I know a handful of IT disciplines well enough to teach them to someone else – networking, systems administration, programming, etc. I gave it a lot of thought. While the others might be a nice foothold for getting an entry-level job, I figured that networking was the right choice. Even if he didn’t really dig in and keep going with it, I could at the very least bring him up to speed enough to configure small networks and do some basic routing & switching. I’m shooting for him to pass his CCNA.

Today we talked about the basics – 10baseT networks, coaxial cable, BNC connectors, repeaters, hubs, CSMA/CD, collisions, switches, ping, and a little about NAT & DHCP. We’ll see how much stuck tomorrow. We even broke out an old 1900 switch I had laying around and set up a couple laptops on the same network.

I think we’ll move on to IPv4 addressing next, maybe. What do you think?