Archive for 'Productivity'

Home » Productivity

How I Learned to Tolerate White on Fuscia

Posted in: Productivity, SysAdmin
  |  by: ScottPack
Tags: Linux

(Today’s post is by information security analyst Scott Pack!)

One of the worst problems I have with tabbed consoles is knowing exactly which console I’m working in. Sure, I can simply look at either the shell’s title, or the prompt, but I still inevitably will type a command into the wrong console. Normally this will result in something more akin to “file not found” because you catted the wrong file, rather than “Now running koan on all servers” because you did something in mcollective prod instead of test. While chatting up a guy at work about this problem we threw around changing the background color depending on which system you’re on.

This is one of those things that’s a little trickier than one might think at first blush. For instance, my first thought was to overload the ssh operator and make the changes client side. This works for me since I use cygwin as my ssh client and proxy through an aggregator (see this ServerFault answer about proxying</shill>). My coworker, however, uses puttycm which pretty much excludes any kind of local overloading. In the end, I opted to have the colorization occur on login. This made the process more portable, but it also meant that I have to make changes to my ~/.bashrc on every system.

In the end, I wanted this setup to work for both of our environments. So for my uses I wanted the background to get reset whenever I logged off a remote system, so that if I *did* manually ssh from one system to another, the background color should always be correct no matter what else I’ve been doing. So the colors needed to be set on login, which is easy, and also whenever ssh exits (I suppose I should also account for telnet/rsh but I really don’t want to). To that end, I decided to make the colorization a separate function so it could easily be reused.

It’s also worth noting that this was designed for a system running bash-3.x. If you’re in an entirely bash-4.x environment we can use an associative array, which works like a perl hash. Since I still deal with a lot of RHEL5 systems, which still uses bash-3.x, I had to code to it. To account for this I had to do some odd stuff with the array that basically amounts to magic.

Without further ado, below is everything you’ll need to add to your ~/.bashrc file to make this garbage work. With any luck, the comments are sufficient to explain.

function setcolor {
# Set up the colormap using hex codes for the colors
  colormap=( "node1:#330000"
             "node2:#003300"
             "node3:#330033"
             "node4:#333300"
             "node5:#FF0000"
             "node6:#0000FF" )
# Generate my own short hostname, i.e. turn node1.example.com into node1
  short=`echo ${HOSTNAME} | sed "s/\..*$//"`
color="#000000" # Set default color to black
# Iterate through the colormap looking for the hostname. Also, some bash magic.
  for host in ${colormap[@]}; do
    if [[ ${host%%:*} == ${short} ]]; then
      color=${host##*:}
    fi
  done
# Wrap the color in the xterm escape sequences to set the background color
  echo -ne "33]11;${color}07" # Set the background color
}
# Only run the setcolor function if we are using xterm or xterm-color as our termtype
if [ $TERM = "xterm" ]; then
  export TERM="xterm-color"
  setcolor
elif [ $TERM = "xterm-color" ]; then
  setcolor
fi
# Replaces the shell title with the name of the host we are sshing to
function ssh {
echo -ne "33]0;${1}07"     # Set the terminal title to the host we are sshing to
  /usr/bin/ssh $1 $2 $3
  setcolor  # Once ssh exits, reset the color back to what it should be
}



3APR
0
Tweet

The Failure of a SysAdmin – Continued Self Loathing and Why You Should RTFineM

Posted in: Productivity, SysAdmin
  |  by: Wesley David

If traffic statistics are any indicator, my previous post “The Failure of a SysAdmin – A Tale of Laziness, Good Fortune and Self Loathing” seemed to resonate among my fellow technologists. Perhaps each of us can share a story or three about some self inflicted near-catastrophe being spryly avoided by mere happenstance. I suspect that many a SysAdmin, below the oft feigned bravado and BOFH platitudes, suspects that he’s lagging several steps behind everyone else’s level of competence. As a result, there seems to be something cathartic in listening to the failures of another admin. Or maybe those of us who feel that way are just slackers after all and enjoy listening in on confessionals just to salve an aching conscience. I really don’t know. Perhaps I’ll explore it more in a later post.

Nonetheless, I received some good responses on Twitter about my tale of woe. One of the responses I received about the post was by Shane Madden via Twitter:

@Nonapeptide Why not just have KeePass automatically keep backup copies of modified entries, instead of managing them manually?

I thought about it for a minute. “KeePass? Keep backups?” Puzzled, I did a Google search for KeePass backups. I didn’t find exactly what Shane was talking about, but I did find plenty of things that I was not aware of. Did you know that KeePass has plugins? Lots of them? There are plugins to help backup the database, automatically reorder entries, extend the forms to accept other information like credit cards, enhanced search capabilities and much, much more. Oh, and apparently I’ve been using a three year old version of KeePass Classic and I wasn’t aware of the Enterprise Edition that allows for all sorts of new features, one of which is syncing password files!

Okay, all of that info is great, but it really wasn’t helping me understand what Shane was telling me. I mentioned it to him directly and he pointed me to the advanced options of KeePass under “backup”. Technically mine is under “General (2)” because I’m using KeePassX on Linux. To understand the rest of the post, you’ll need to know a bit about KeePass itself. In KeePass, there’s a folder at the bottom of the Groups pane called “Backup”.

I’ve seen that folder, and even poked through it on occasion. The problem is that I did not understand that folder. I did not know what its function was. I’ve been using KeePass for so long that I grew astigmatism against seeing that backup folder. From KeePass’s own help files on version 2 of the software:

Each entry got its own history. Each time you change an entry, KeePass automatically creates a backup copy of the current, non-modified entry before saving the new values. These backup copies are listed on the History tab page. You can delete backup copies if you are sure that you won’t need them anymore, or you can restore any of the backup copies.

While that’s the documentation for KeePass Professional and not KeePassX, it appears that the behavior is the same. So everytime a change is made, the pre-change entry is copied and dumped in the backup folder. My own actions for backing up my entries was redundant and inefficient (am I the only one that sees humor in putting those two words side by side?).

I. Am. Brilliant.

I wondered if my recent panic in this previous post was even warranted. Remember what happened? I went pitched a fit because I thought I had mishandled the domain admin password. Well, in reality, I did mishandle the password and apparently the suicide-bomber levels of cortisol that the incident must have triggered in my body were completely warranted. Why? When I opened up that KeePass file, even though I was able to see a historical list of all the times I modified the domain admin entry, I still did not see a fourth domain admin password (I’ve had to change it five times since deploying that domain, and the fifth time was as a result of losing the fourth password).

Here’s what I think happened and why it still ties back to not knowing enough about KeePass. I have a bad habit of keeping KeePass open all the time, and specifically I keep individual entries opened and don’t close them. My habit is to open an entry, copy and paste the password into where I need it and then go about work, completely forgetting about the open KeePass window. Hours later I’ll see that there’s an open window for an entry. I won’t trust myself that I might have accidentally changed the information, so I merely click the close box. However, there are some times when I have no recollection if I’ve made legit changes to an entry or not. Am I closing a window with a change that really needs to be committed? I usually take my chances and just close the window since so far most of the time I just open an entry to retrieve info and not change anything.

(I do believe that KeePass has a small shortcoming in this: If you have edited an entry and “X out” of the entry’s window, there is no confirmation dialog box if the entry has changed. No “are you sure you want to close this windows? Information has been changed!” I am willing to believe that my unfamiliarity with the program is biting me once again, and perhaps there’s an option somewhere to change this behavior.)

Ultimately though, the fault is mine in two areas. First, my workflow and discipline are broken. I need to just make a small tweak to how I behave and close the darned entry window after I’ve either modified the entry or used the password. That way I’ll never have to worry about being able to remember if I’ve modified an entry legitimately, modified it errantly or just forgotten to close the window. To quote “Nick Burns, Computer Guy” – “IS THAT SO HARD?!”


The second mea culpa is that my worries about errantly modifying entries is a moot point if KeePass makes copies of an entry as you modify it. Even if I twiddled some characters around in the password by accident it not a huge problem! KeePass makes a copy of the pre-twiddled entry. Of course, the better option is to pay more attention and not twiddle things, but just in case, KeePass has my back. I just didn’t learn enough about the program to know that my worries about wrongly modifying entries as well as concerns over keeping my own history of passwords were completely foolish.

The Takeaway

I’m stuck in a dilemma. I’m the kind of person who when opening a book for the first times feels an obsessive need to read the copyright and edition printing information. I read the dust cover, all forewords, dedications, introductions, the table of contents, table of images, index, appendices and if I could do it I’d analyze the paper stock to see what mill it was manufactured at. Oddly, those compulsions are exactly why I can’t seem to get much out of books because I’m obsessed with minutia and can’t sew sentences into larger fabrics of thought. Part of the reason I get that obsessive is a long standing desire to know everything. Over the years, I’ve had to calm myself down and realize that I can’t know everything about everything and that I need to be content with not knowing some things. The problem is, I think I’ve had too much success with reigning my obsessions in and now I’m too content with ignorance.

Just like the many reports that say humans only use a small part of their brain (although the science behind those claims is sketchy), most of us sysadmins only use a very small percentage of the apps we use each day. How much is a responsible amount to know about each of those apps? Are we supposed to know as much as the developer? Should we be able to teach advanced classes in them? It seems to be humanly impossible to be able to teach advanced classes in more than a handful of applications and topics. That’s why such a premium is put on certain people who are known to be gurus. They have intimate knowledge of a thing that can only be gained by much use and learning. But that takes time and a person can only know so much.

Each app that we launch is much larger than we really know. Maybe in some cases we can know the app front to back, but when you consider its possible interactions with other apps suddenly it becomes almost infinitely complex. What is the limit to our responsibility to know an app? How can we gauge just how much we need to know? What determines which apps we should learn about since being deeply knowledgeable in virtually any app that we come in contact with can have amazing benefits?

Here’s what I’ve come up with as I’ve grappled with this dilemma:

Sort all of the applications you use in the course of a week by the time you spend using them. Pick the top three. Even if one is just an email app. That can also mean web apps (Constant Contact, PeopleSoft, Joomla, WordPress, whatever). To make that list, you might want to use a program like RescueTime that automatically tracks active apps or use something more manual like kTimeTracker or even one of the time tracking tools I listed out in this post. Once you know the top three apps you spend time with, you can move on to the next part.

This one is a little trickier. Make a list of the top three most important apps based on the value of the information you are interacting with. Maybe KeePass isn’t opened for a long time on my computer so it won’t show up high on the list that I made above, but it is by far one of the most valuable tools I use since some of the most important professional and personal information I have is in there. Another app that could be of high importance to me is either phpMyAdmin or MySQL Workbench. I don’t often crack open a MySQL database, but when I do it’s for either backup or restoration purposes. I’m touching very important data, and I need to understand the tool I’m working with better. For example, I really have no idea what 90% of the options are on the export tab of phpMyAdmin and yet that’s what I use most often when needing to get data.

If you’ve done what I suggested above, you’ll have a list of six apps that are of great importance to you. Now you know what to do. Get to learnin’. Perhaps make a plan to spend an hour a day simply reading about it. Get some books, do some Google searching or maybe get a subscription to Lynda or Safari. One of my favorite things to do is intentionally hunt down menus and drop down boxes that I’ve never seen before or always wondered “just what does that do anyway?” and learn about them.  One hour on each program six days a week. That’s not a heavy investment for the amount of benefits you could reap.

So how do you handle the apps that you use everyday? Do you dive into them or are you content to skate on the surface? Have you ever been bitten by not knowing enough about an app? Oh, and if you decide to take my advice about organizing and learning your most important applications or you make your own spin-off of it, let me know how it works out for you!

P.S. For my next confessional post, does anyone want to hear about the website that I help out with that went down last week without proper backups?



21MAR
0
Tweet

Speed Reading; Week 6 Finished!

Posted in: Productivity
  |  by: Wesley David
Tags: Speed Reading

This week saw a regression and an epiphany. The regression was that I lost some of my ability to focus on the text at higher speeds and had to step back to lesson 9. I also missed several lesson times. The epiphany was that fatigue and burnout changethings.

While trying to work two jobs, start my own business, deal with insurance issues as well as general housekeeping (did you know that cockroaches in Arizona can reach sizes so big they’re protected under the Fourth Amendment?) I forgot that the body has a tendency to need rest. Not just the body, but the mind. My brain has achieved escape velocity and left a note scribbled in cerebrospinal fluid raving about Maggie’s farm and that this is bat country.

I hope it comes back sometime before I have to talk to take a support call. Then again, that might be amusing enough to be worth it.

  • Monday:
    • Morning: Lesson 10
    • Evening: Missed
  • Tuesday:
    • Morning:  Lesson 10
    • Evening:  Lesson 9
  • Wednesday:
    • Morning:  Lesson 9
    • Evening:  Lesson 9
  • Thursday:
    • Morning:  Lesson 9
    • Evening:
  • Friday / Saturday: FAIL

I think I’ll take extra care to factor in fatigue, start back at lesson 7 or 8 and gradually regain and hopefully surpass what I had previously attained.

Instead of posting mostly unedifying laundry lists of my weekly speed reading process, I’ll suspend regular updates in favor of occasional check-ins. I’ll try to research speed reading a little more and post some critical and supporting arguments for it.

Does anyone else have experience and opinions concerning speed reading that they’d be willing to share?



23MAY
0
Tweet

Speed Reading; Week 5 Finished!

Posted in: Productivity
  |  by: Wesley David
Tags: Speed Reading

I was going good this week, hitting lesson 10 which is the last lesson in the first part of this Speed Reading system I’m using. However, I lost steam on Saturday. Not much to give as an excuse. I just gave up that day.

  • Monday:
    • Morning: Lesson 8
    • Evening: Lesson 8
  • Tuesday:
    • Morning: Lesson 9
    • Evening: Lesson 9
  • Wednesday:
    • Morning: Lesson 9
    • Evening: Lesson 9
  • Thursday:
    • Morning: Lesson 10
    • Evening: Missed
  • Friday:
    • Morning: Lesson 10
    • Evening: Lesson 10
  • Saturday:
    • Morning: Missed
    • Evening: Missed

I’m struggling with developing new habits in my vision as I read. It’s mostly coming together, but I’m in an awkward stage where I understand the change that needs to be made, but get tired of consciously having to implement it. That merely takes time to develop the habits.

I took a speed reading test on the web and was clocked at 377 WPM. I was taking my time and I was also tired. I’m not focusing on a number very much. Only on results. I’ll stick to lesson 10 for a few more days before moving on.



16MAY
0
Tweet

Speed Reading; Week 4 Finished!

Posted in: Productivity
  |  by: Wesley David
Tags: Speed Reading

The first full month of my attempt at staying faithful to my chosen speed reading curriculum is now finished. This was the most consistent week so far. I only missed one lesson. That might be overstating my success a little since some lessons were done hurried or were interrupted, but at least the habit of performing the lessons is more ingrained in me.

  • Monday:
    • Morning: Lesson 6
    • Evening: Lesson 6
  • Tuesday:
    • Morning: Lesson Lesson 7
    • Evening: Lesson Lesson 7
  • Wednesday:
    • Morning: Lesson 7
    • Evening: Lesson 7
  • Thursday:
    • Morning: Lesson 8
    • Evening: Missed
  • Friday:
    • Morning: Lesson 8
    • Evening: Lesson 8
  • Saturday:
    • Morning: Lesson 8
    • Evening: Lesson 8

I’m continuing to work against the habit of speaking words in my mind. I’m having more and more success at comprehending the text I read. The last three weeks has been focused more in reading technique and less on comprehension. Now I’m getting comprehension much better.

All of these efforts are to help focus my mind on reading, which is something of a challenge. My mind tends to wander and overanalyze what I’m reading while I’m reading it. Speeding up my reading forces me to focus on the text alone. After absorbing the material, I can then go back and mull over its contents better than I could before since I have the whole picture of the text.

Does anyone have any experience with speed reading? Have you found the scams? Found any gems?

Onward to week 5…



9MAY
0
Tweet

Speed Reading Week 3 Finished!

Posted in: Productivity
  |  by: Wesley David
Tags: Speed Reading

My third week of speed reading lessons wasn’t too bad.

  • Monday:
    • Morning: Lesson 4
    • Evening: Lesson 4
  • Tuesday:
    • Morning: Lesson 4
    • Evening: Lesson 4
  • Wednesday:
    • Morning: Lesson 5
    • Evening: Lesson 5
  • Thursday:
    • Morning: Lesson 5
    • Evening: Missed
  • Friday:
    • Morning: Lesson 5
    • Evening: Missed
  • Saturday:
    • Morning: Lesson 6
    • Evening: Missed

I got off to a great, consistent start! Thursday, Friday and Saturday were busy, I accept guilt that the last half of Friday and Saturday was a failure of time management. However, all in all it was a great week.

I made a major vision breakthrough. Instead of focusing my eyes on a single point in the sentence, I am now capable of focusing on the general area and taking in multiple words at a time. This is helping to break the habit of speaking the words in my mind.

My lesson bundle goes up to lesson 10. To go from Lesson 11 to 20 I’d have to purchase the second bundle. If this improvement keeps up, I might have to consider buying the second bundle.

My technique for reading is improving rapidly, but my comprehension is improving more slowly. It’s just plain fatiguing to suck that much info in. However, it is improving so that’s good. I’m still skeptical about 1000+ WPM speeds with 100% comprehension.

Anyone out there have speed reading experience? Any insights to share? Week 4, here I come…



2MAY
0
Tweet

Advertisements

Speed Reading Week 3 Finished!
Speed Reading Week 3 Finished!
Speed Reading Week 3 Finished!
Speed Reading Week 3 Finished!

Follow This Blog

Want to have these posts emailed to you? Enter your email address here. Google Feedburner takes care of the rest!

Delivered by FeedBurner

About Me!

Contact Me!

The Nubby Archives

  • [+] 2012 (43)
    • May (7)
    • Apr (11)
    • Mar (10)
    • Feb (8)
    • Jan (7)
  • [+] 2011 (73)
    • Dec (4)
    • Nov (7)
    • Oct (6)
    • Sep (11)
    • Aug (9)
    • Jul (6)
    • Jun (3)
    • May (1)
    • Apr (8)
    • Mar (5)
    • Feb (5)
    • Jan (8)
  • [-] 2010 (71)
    • Dec (6)
    • Nov (3)
    • Oct (4)
    • Sep (14)
    • Aug (2)
    • Jul (4)
    • Jun (14)
    • May (19)
    • Apr (5)

Be Social!

Circle me!





profile for WesleyDavid on Stack Exchange, a network of free, community-driven Q&A sites

Copyright © 2011
Top