Cats and Code » productivity http://blog.gorwits.me.uk by Oliver Gorwits Sat, 29 Mar 2014 23:28:44 +0000 en-US hourly 1 http://wordpress.org/?v=3.6.1 Evolution of Technology http://blog.gorwits.me.uk/2012/09/02/evolution-of-technology/?utm_source=rss&utm_medium=rss&utm_campaign=evolution-of-technology http://blog.gorwits.me.uk/2012/09/02/evolution-of-technology/#comments Sun, 02 Sep 2012 13:03:37 +0000 Oliver Gorwits http://blog.gorwits.me.uk/?p=786 Continue reading ]]> As a free software developer I come into contact with a wide variety of opinions on what development process makes for a good end product. I don’t believe the answer is straightforward. Here’s an excellent quote from Linus Torvalds which sums things up nicely:

“Don’t underestimate the power of survival of the fittest. And don’t ever make the mistake that you can design something better than what you get from ruthless massively parallel trial-and-error with a feedback cycle. That’s giving your intelligence much too much credit.”

My point being: evolution is a tremendously powerful system which creates some very functional products. Don’t over-engineer what you’re doing. Keep it simple, try to avoid second system syndrome, and accept that one day someone may come out of the woodwork with a competing product which is either only incrementally better, or blows yours away.

I’ve had this happen to me. It doesn’t upset me, or put me off trying out more ideas, because the itch I wanted to scratch by writing the software in the first place is now being scratched better. I might join in with the competitor, borrow and build upon their ideas, or simply retire from that scene. It’s all good. It’s simply evolution.

]]>
http://blog.gorwits.me.uk/2012/09/02/evolution-of-technology/feed/ 0
Simple Tools for Describing Rack Layouts http://blog.gorwits.me.uk/2012/08/09/simple-tools-for-describing-rack-layouts/?utm_source=rss&utm_medium=rss&utm_campaign=simple-tools-for-describing-rack-layouts http://blog.gorwits.me.uk/2012/08/09/simple-tools-for-describing-rack-layouts/#comments Thu, 09 Aug 2012 11:22:46 +0000 Oliver Gorwits http://blog.gorwits.me.uk/?p=779 Continue reading ]]> Often when a system at work is having a problem I won’t actually know where it is. I can remember where most of the network kit is located, but not all, and certainly not all the servers connected.

Two tools we already use can help: Netdisco shows which switch port a device is connected to, and a good cable and patching database indicates the room or even cabinet location of the device. However I wanted a more visual understanding of just where cabinet “CX1″ might be located on our campus, and particularly in our large data centre halls.

There are a few options, in terms of web-based, Linux-hosted, open source tools:

RackMonkey is a simple bit of Perl CGI with an easy to use web interface. It’s no longer actively maintained, but is hosted on sourceforge. Good features include easy installation, numbering U (position in the rack) from top or bottom, and supporting SQLite3 storage. Missing features include specifying front/back position or facing-direction of the device.

RackTables is, I think, PHP and MySQL and in addition to rack layout includes IP address and VLAN registries. These latter features we don’t need, and would be a distraction or confusion to my colleagues if I couldn’t disable them. What I do like is that devices can occupy front/mid/back zones in each rack unit. Sadly racks can’t be numbered from top or bottom, and we have a mix of both. Update: From version 0.20.4 RackTables will support numbering in either direction.

RackSmith is new and has some good ideas, such as being able to place the racks on a tiled floor plan in a room, in a building. There seems to be sufficient flexibility in how devices are placed in racks, but I notice several user interface bugs, which are understandable as RackSmith is still under development. Update: It seems public development of RackSmith is “on hold” and it’s being rewritten under a SaaS model.

Both RackTables and RackSmith have demos on-line. RackMonkey is really easy to install so there’s less need there, anyway.

At first my choice was going to be RackTables, because of its front/mid/back device positioning, and clear hierarchy of location/room/rack. Sadly because we can’t reverse the U numbering, it’s rejected. RackSmith would be lovely but just isn’t ready. So, I’ve installed RackMonkey and seeing as it’s only providing additional information to that in Netdisco and our cable database, it being lightweight and unmaintained is probably not an issue.

Update: So, RackTables it is! Its continuing development has leap-frogged the competition,

(p.s. given sufficient tuits, I’d rather take the network inventory tool I once worked on, and extend that to support these features, instead. I don’t like duplicating information between systems.)

]]>
http://blog.gorwits.me.uk/2012/08/09/simple-tools-for-describing-rack-layouts/feed/ 2
Living with Windows 7 http://blog.gorwits.me.uk/2012/08/07/living-with-windows-7/?utm_source=rss&utm_medium=rss&utm_campaign=living-with-windows-7 http://blog.gorwits.me.uk/2012/08/07/living-with-windows-7/#comments Tue, 07 Aug 2012 16:25:11 +0000 Oliver Gorwits http://blog.gorwits.me.uk/?p=770 Continue reading ]]> Recently at work I migrated from a Linux desktop to a Windows 7 desktop. This is an account of how I then configured the Win7 system.

First I should mention that working somewhere where they actually have an official, managed Linux desktop is awesome. However for the way I do things, it’s just not too pleasant an experience. On Linux I got tired of never being able to print something in the appropriate orientation. I also used to spend at least 50% of my time in the Windows VM anyway, working in MS Word/Excel/Visio.

The rest of my time is spent in Chrome and SSH in a terminal. So the first things to install on Win7 are Chrome and PuTTY. I created a directory called Applications in my home folder and saved apps such as PuTTY, which do not come with automated installers, there.

I pinned a shortcut to my home folder to the taskbar. This is trickier than it sounds, as you have to do a two-level right click to get to the pinned folder properties window, then edit the Target: field (and possibly the icon if desired). I still don’t fully understand the Win7 “Library” system.

To make PuTTY sessions more manageable, I installed two three additional apps. First is PuttyTabs, which despite its age works just fine, and allows easy firing-up of a shell to one of our servers, and management of the windows once open. Rarely I might also use PuTTYTabManager for staged system maintenance when I need to work on several similar systems at once (KDE’s terminal app is a superb tabbed experience which I do miss).

Update: The PuTTY Session Manager is another useful app to manage the session list; it can copy attributes/settings between session configs, and backup/restore session configs in bulk.

Once a few windows are up and running I long for focus-follows-mouse. It’s not available on my iMac at home, but Win7 does have a registry key one can poke. Well done MS! Good luck with the process, which I think could benefit from improved official documentation (pay attention to the comments on that page, as well).

The next little gem to install is AutoHotKey, as I have an Apple keyboard and like to remap some keys (for example the # sign which I use a lot). Here’s my current config:

#singleinstance force
§::Send {RAlt Down}3{RAlt Up}
LWin::LCtrl
::Remy::Rémy

This maps #-sign onto the unused section-sign (§) key. It also remaps the left Windows key, which on the Apple UK keyboard is of course the Command key, to be a left Control key. This means at home and at work my left thumb can take care of cut/copy/paste. Finally the last line means I always use the correct spelling for my manager’s name :-)

By the way, I did also install the Apple software drivers for Win7 from their Boot Camp installer on the OS X install disk. This sets the correct keymap for my Apple UK keyboard, as well as enabling the special function keys such as volume control.

The next app, in no way less awesome, is Dexpot, which provides true, full-featured virtual desktop support for Windows. I have four desktops, and use the application pinning feature so that everything in my startup folder is put in the right place when I boot (which isn’t that often, to be honest). Plugins enabled include Dexcube (3D switching effects), MouseEvents (hot corners), and SevenDex (shortcut buttons in taskbar).

In case you’re not familiar with Dexpot, there are loads of features included (for instance context menu items on window taskbars, to allow moving them between desktops or show-on-all). One thing I’d like built-in is using the scroll-wheel on the desktop background to change virtual desktop; apparently it’s possible with an AutoHotKey script.

That’s it for the main tweaks. Here’s a list of some of the other applications I’ve installed:

Overall, after a couple of months now with the Win7 desktop, it’s a vast improvement on Linux. I know some of you may argue all of the above is possible with Linux. I don’t disagree, except to add that it isn’t easy. A well-configured desktop is a means to an end, not an end in itself. The Win7 experience is beautiful and slick, and makes me happier in my work – what more can I say?

(I’ll tell you what else I can say…. I’d still prefer an iMac!)

]]>
http://blog.gorwits.me.uk/2012/08/07/living-with-windows-7/feed/ 0
Understanding Stored Passwords in Chrome on OS X http://blog.gorwits.me.uk/2012/06/09/understanding-stored-passwords-in-chrome-on-os-x/?utm_source=rss&utm_medium=rss&utm_campaign=understanding-stored-passwords-in-chrome-on-os-x http://blog.gorwits.me.uk/2012/06/09/understanding-stored-passwords-in-chrome-on-os-x/#comments Sat, 09 Jun 2012 16:06:10 +0000 Oliver Gorwits http://blog.gorwits.me.uk/?p=757 Continue reading ]]> When my Mac’s hard disk died, I replaced it with an SSD and reinstalled OS X. At the time I also restored my user’s “login.keychain” file from backup, because I knew that’s where Chrome had stashed all my stored web site passwords. Well, it turns out I only half-knew what was going on.

After the restore, Chrome seemed not to know about any of the credentials. It was quite frustrating because Safari was working fine with the restored Keychain. As a test I entered some credentials in Chrome and they appeared in its own Saved Passwords list! I was expecting that list to be empty because documentation suggests Chrome uses the Keychain on OS X.

After some digging, what I found is that Chrome is quite sensibly engineered, but the user interface is just a little confusing (especially to those with inquiring and suspicious minds!).

This page of Chromium developer documentation explains that Chrome needs to store more metadata about a set of credentials than is supported by the Keychain attributes. Therefore, even though Chrome does use Keychain for credential storage on OS X, it still uses its own built-in (“non-secure”) LoginDatabase. My mistaken belief was that the LoginDatabase would be empty once Keychain is in use.

This can be confirmed by poking around in the local user’s Chrome application data, and opening the SQLite database called “Login Data“. On OS X this contains a row for each stored password but crucially, not the password itself (the username is there, though). Yet in the Chrome Settings user interface, you click “Managed saved passwords” and up pops a list of usernames and passwords as if Chrome was storing them. In fact it’s merging data from both LoginDatabase and Keychain.

The next confusion arises over the lack of Chrome’s awareness of Keychain entries. As explained in the same developer documentation page, until LoginDatabase has a matching entry, the credentials in Keychain are untrusted by Chrome and hence not displayed.

To be fair to the Chrome developers, it’s not an easy thing to get over to the user that the attributes of a set of credentials are split between two stores, and that you can delete or read back from one, but possibly not the other. At least now I know what’s going on, and I can also make sure always to restore the Chrome application data in future.

]]>
http://blog.gorwits.me.uk/2012/06/09/understanding-stored-passwords-in-chrome-on-os-x/feed/ 0
Hacking # in OS X http://blog.gorwits.me.uk/2011/11/30/hacking-in-os-x/?utm_source=rss&utm_medium=rss&utm_campaign=hacking-in-os-x http://blog.gorwits.me.uk/2011/11/30/hacking-in-os-x/#comments Wed, 30 Nov 2011 20:57:05 +0000 Oliver Gorwits http://blog.gorwits.me.uk/?p=717 Continue reading ]]> To get a # sign on an Apple keyboard you use the Option (or Alt) key + 3. This seems terribly klunky to me, and # is of course used quite a bit in programming and sysadmin work.

This hack remaps another key on the keyboard to produce the # character. I chose the funny squiggle that’s to the left of the number 1 key (§). This is the Section sign, used in document formatting. Just create a file at ~/Library/KeyBindings/DefaultKeyBinding.dict which contains the following:

{
    /* this will make all § turn into # */
    "\UA7" = ("insertText:", "#");
}

Any app that uses Apple’s Cocoa interface widgets for text input will pick this up after being restarted. There are some that don’t (perhaps TextMate? Not checked that one so if you know, please comment).

A lot more information about this is available at this excellent page on the Cocoa Text System, including some other neat hacks. Enjoy!

]]>
http://blog.gorwits.me.uk/2011/11/30/hacking-in-os-x/feed/ 0
Is it silly that tmux is fun? http://blog.gorwits.me.uk/2011/08/15/is-it-silly-that-tmux-is-fun/?utm_source=rss&utm_medium=rss&utm_campaign=is-it-silly-that-tmux-is-fun http://blog.gorwits.me.uk/2011/08/15/is-it-silly-that-tmux-is-fun/#comments Mon, 15 Aug 2011 15:08:00 +0000 Oliver Gorwits http://blog.gorwits.me.uk/?p=575 Continue reading ]]> No, I don’t think it’s a bad thing to get a zing of excitement when you find a new tool that improves your life. Maybe you know what I mean – that feeling of happiness at saving time, remembering more easily how to do things, and satisfaction with a new workflow.

Recently I migrated from the venerable screen, to tmux, and whilst it’s one of those changes where the old tool had no real show-stopping problems, tmux immediately feels much cleaner and well thought-through.

I’ll leave you to read the docs and list of features yourself, but please do check this tool out if you’re an avid screen user. I’ve already got many more tmux sessions/windows/panes open than ever felt comfortable with screen, saving me a lot of time and effort when working remotely.

]]>
http://blog.gorwits.me.uk/2011/08/15/is-it-silly-that-tmux-is-fun/feed/ 1