Category Archives: Computing

Regular Expressions with RegExr

RegExr Screenshot

RegExr Screenshot (Sunil Rodger)

Regular expressions are incredibly useful when programming for pattern matching against strings, but they can be quite confusing when you’re first getting started with them. I’ve been using them intermittently for several years (scripting is not my day job) and certainly cannot claim to have mastered their use.

RegExr is a fantastic tool for checking that your regular expressions work as intended, or just playing with them to see what you can do. Although there are apps dedicated to this which are more fully-featured, such as Oyster for the Mac, RegExr is a very good starting point.

On Apple Macs

Apple Command Key by Fi20100, on Flickr

Apple Command Key by Fi20100, on Flickr

In late 2009, I finally purchased my first Mac. My five-year-old self-built PC was on its last legs, and I had coveted a Mac Pro for some time. Alas, this was somewhat out of my budget and I settled for a Mac Mini (since passed on to my parents when I purchased a MacBook Pro the following summer).

I had intended at the time to document the transition from Windows to Mac but never got round to it, so this will be a series of occasional retrospective posts on the practicalities of that transition.

Moving from a PC to a Mac did take some getting used to. As a power user, I found that re-learning keyboard shortcuts was most challenging – I continued to use a PC at work, and still do, which probably didn’t help. Most common shortcuts were pretty much the same, substituting  (Command) for Ctrl in shortcuts such as Ctrl + C (copy), Ctrl + P (print) and so on.

More challenging to commit to muscle memory were those that were more significantly different. The trickiest was getting used to ⌘ + O for open, rather than Enter/Return, closely followed by ⌘ + Tab to change between applications being distinct from ⌘ + ` to change between windows within an application. This is quite unlike Microsoft Windows, which makes no such distinction with Alt + Tab to cycle between all open windows, regardless of application. Other things such as the inability to cut files (only to copy/paste them) also initially threw me.

After a few months, this ceased to be an real problem – I guess my muscle-memory just adapted to using both systems on a daily basis. There are still moments when I curse that MacOS X doesn’t have something Windows has, or that Windows does something illogical when the equivalent is very straightforward on MacOS X. But generally I am well settled into the Mac world, which I generally prefer to battling with Windows, and when the time comes I suspect that this MacBook Pro will be replaced by a MacBook Air…