Archive
Make your Mac more like an iPhone: How to reduce distractions and improve focus
While our desktop computers excel at multitasking due to their multiple cores, the human mind fares much worse. There have been multiple studies showing that multitasking can impair productivity. Often the reasoning is that the brain requires time to adjust between different tasks, due to the switch in context. An analogy for this would be driving on a highway. You’re going to cover a lot more ground in the same amount of time if you can keep a constant speed (focusing on one task) rather than having to constantly take exits and switch to new roads (tasks). While those who multitask frequently might think that switching tasks bears no greater cost to them than switching lanes on the highway, the studies suggest that the cost in focus and time in switching to the new task is more akin to having to take that offramp, find a new highway, and then get back up to speed.
But enough about metaphors and science. I am not a cognitive scientist so I’ll leave that up to the people who do it best. I can only speak for myself, and I find that it’s supremely tempting to pick away at pieces of problems rather than to focus on one thing and make significant progress in that regard. I also know that I am objectively less productive if I constantly am switching tasks.
It is for that reason that I’ve assembled a set of tools that allow me to have a stronger single-minded focus while working on a computer. While there are systems such as Getting Things Done and the Pomodoro Technique which address the human aspect, I’m going to be focusing more on technological solutions with respect to working on an Apple computer. While many criticize the iPhone and iPad for their limited multitasking support, I think having full-screen applications and focusing on one thing at a time is very beneficial. With that thought in mind, the rest of this post will show various ways to make the Mac less suitable for multitasking and closer to the iPhone/iPad model of computing.
Hide the dock
Why
Gain more desktop real estate. Eliminate the visual clutter at bottom of the screen.
How:
Right click on a portion of the dock which does not have an icon, e.g. on the portion where the dock can be resized.
Reduce use of tabbed browsing
Why
I love the ability to open multiple webpages in a single browser. It can be supremely useful when you are researching and need to have multiple pages open to reference. Unfortunately it can also lead to shallow reading and a mild form of A.D.D. wherein the user (i.e. me) keeps opening new links with the intention of reading them later. There is seemingly no cost to opening a link in a new tab, but it does exert a cost – it makes it harder to find the tabs that are actually relevant, and it also uses more system memory.
How
There is a discussion on the Firefox feature request group to limit the number of tabs that one can open at a time, for reasons similar to what I have presented above. The best solution given is to install a TabCounter extension in FireFox which shows how many tabs you have open. It still requires you to monitor the number and prune the number of tabs when things get too bogged down, but it’s better than nothing.
For those using Chrome, there is a Tabs Counter plugin which performs the same task.
Hide your desktop icons
Why
My desktop inevitably is the dumping place for miscellaneous junk. I’d rather just keep it out of sight and search with a program than keep it organized and visually scan through them for what I’m looking for. Computers are a lot better at search than humans; let’s take advantage of that. The icons on the desktop do nothing more than distract me.
How
Camouflage hides desktop icons
+ allows you to double click on the desktop to have a finder window popup for the desktop
+ allows you to change the desktop background
+ free
Desktopple
+ also has option of dimming the menu bar
– paid ($17)
I use Camouflage on both my home and work Mac. I was happy to see that Windows 7 allows you to hide the desktop icons without installing an additional program.
Dim your menu
Why
Eliminate distractions by de-emphasizing the elements on the screen that are not important. For the time you are not actively attending to the menu, make it less visually important.
MenuShade
– doesn’t seem to work in 10.5
MenuEclipse
+ Works fine in 10.5
– abrupt jump between dimmed and not dimmed – the menu dimming in DeskTopple is more gradual / less harsh
Standard brightness
Dimmed
I use MenuEclipse on both my work and home computer. It’s not a life changing application but it does what it sets out to do.
Dim your unused applications
Why
When you have multiple applications jockeying for your attention, you necessarily lose focus
There are some obvious exceptions to this; for instance it is often extremely convenient to have both a calendar program and e-mail program open side by side when scheduling things, or having a web browser next to your programming environment for web search results. There are other times in which such extra programs are a distraction; in this case having a single program as the focal point can allow you to focus.
How
Doodim
+ free
– does not interact correctly with Quicksilver/Alfred quick launchers
– noticeable lag when switching between windows
– no way of specifying the brightness
– seemingly not in active development
http://www.lifeclever.com/doodim-menushade-eliminate-distractions-on-your-mac/
– Ugly icon that takes up a huge amount of space
Think
+ Free
+ Much more polished than DooDim
+ Allows you to customize how dim the background gets
+ System settings stay bright
+ Works with Quicksilver/Alfred
O different interface than Doodim – you have to explicitly choose a new window to focus on via an interface similar to the standard task switcher, rather than being able to shift the focused window by clicking on other windows.
– Does not work with multiple spaces
I use think on a daily basis; in fact I am writing this article with all but my FireFox window dimmed out. The higher your screen resolution, the more useful this program is. When working on a 13″ screen I don’t often tile my windows too much. But when you have a 30″ monitor or something similar, you can end up with many programs onscreen simultaneously. And you might not want to put the program you’re working on full screen, especially if it’s just a text editor. That’s when being able to have your programs the size you want and still be able to dim all the rest can be especially useful
Eliminate interruptions
The final piece in reducing distractions and improving single-minded focus is to remove the interruptions that our installed programs produce.
Turn off Growl notifications
If you’re unfamiliar with Growl, it’s a program which ” lets Mac OS X applications unintrusively tell you when things happen. ” While it is a lot less intrusive than a traditional modal popup window, it still can be distracting. The first thing you should do is close the programs that are creating the popups in the first place, but you might want the program to run, just not keep interrupting you.
I personally haven’t taken this step, but you can remove Growl if you find it too distracting. Instructions are here.
Turn off e-mail alerts
E-mail clients on the Mac seem to think every e-mail that comes in is a matter of life and death, and that you absolutely must see every e-mail the instant it arrives. Those of us who work in an office know that this is far from the truth. As Merlin Mann writes:
Email is such a funny thing. People hand you these single little messages that are no heavier than a river pebble. But it doesn’t take long until you have acquired a pile of pebbles that’s taller than you and heavier than you could ever hope to move, even if you wanted to do it over a few dozen trips. But for the person who took the time to hand you their pebble, it seems outrageous that you can’t handle that one tiny thing. “What ‘pile’? It’s just a fucking pebble!”
While dealing with e-mail is a whole different issue, the least we can do is make sure that each pebble falls silently into the inbox rather than calling attention to itself.
Mail.app
Mail -> Preferences -> New mail sound: None
Entourage
How to turn off e-mail notifications in Entourage
Short version:
Entourage -> Preferences -> General Preferences -> Notification ->
Uncheck Display Alert, Bounce Icon, Bring Application to Front, and New Mail Sound
Thunderbird
Instructions on turning off e-mail notifications in Thunderbird
Conclusion:
This post was started long before Apple’s announcement of its new operating system, Lion, but it was not surprising to me that Apple is going to make OSX work more like iOS, with the addition of full screen applications and an app store. I don’t want the Mac to become exactly like a giant iPhone or iPad, and I certainly wouldn’t want every application to be full screen. However, there are times when I need to focus, and by making the computer less capable, it makes me more.
Synergy – free mouse/keyboard sharing across operating systems
Any sufficiently advanced technology is indistinguishable from magic
-Arthur Clarke
I love technology. I especially love discovering and using technology that makes me more productive. I’m writing about a piece of software called Synergy that allows you to use one mouse and keyboard to control multiple computers, each of which may be running different operating systems. In my case, my primary display is for my Mac, and a secondary display off to the right is connected to a Windows PC. Previously, any time I needed to use the Windows machine I had to unplug the USB cable powering the keyboard/mouse combo and physically plug it into the windows machine. (Alternatively I could have bought an extra keyboard and mouse and had to juggle with the physical hardware.) If I needed to transfer text (e.g. a sourcecode snippet) from one machine to the other, I would have to resort to shuttling files or e-mailing it to myself.
By using Synergy, the mouse no longer stops at the right edge of my Mac display. Instead, the cursor continues to move to the right, onto the Windows desktop. Suddenly both your mouse and keyboard control the PC. If you copy text from a file on Windows and revert to controlling the Mac by moving the cursor back to the left, the text is in your Mac clipboard.
That’s not to say that Synergy is perfect. The main problem is that certain key combinations on the Windows side do not transfer correctly. For instance, Ctrl + Alt + Delete is pretty necessary in Windows land, but pressing those keys does not trigger the corresponding action. The Synergy FAQ page has this issue at the very top, but none of the workarounds work for me. I’ve noticed the following keys do not get sent over correctly:
Key combo | Description |
Ctrl Alt Delete | Bring up task manager |
Print screen | Take a screen shot of desktop |
Windows + Any other key | (Windows L = Lock, Windows D = show desktop/hide all windows) |
Other limitations I’ve seen are as follows:
- Pasting is limited to plain text (e.g. you can’t copy an image from one computer to the other).
- You can’t drag and drop files between the screens (this would be awesome); instead best workaround I can find is to have a networked folder accessible to both computers and use it as a dropbox to ferry around files. It’s a bit kludgy but it works.
Each computer will need to install the software and be accessible on the same network. The computer into which the mouse and keyboard are plugged should be the Server. Each of the computers that you wish to control via the mouse and keyboard need to be running the Client software and connect to the server, and the server needs a configuration file which tells it how the screens are physically located (which computer is to the left of which, which is above, etc.)
Finally, there’s a bit of work you need to do to get it to work on windows vista/ 7 – see here for the details.
This is a really great piece of free software, and it allows me to do my job more effectively. I hope you find it useful as well.
NetBeans Platform – how to customize the title bar and remove datestamp
Problem:
Right click on the project node, and choose Find. In the dialog box, search for {0}.
In the results, double click on the first Bundle.properties, in branding/modules…




Updated title bar
Frame f = WindowManager.getDefault().getMainWindow(); f.setTitle("My title");
These are modified instructions based off of a thread found here. See instructions on how to change the versioning number, if that’s what you desire, here.
EDIT:
If you are attempting to change the window title programmatically from an Installer instance, you’ll find that this doesn’t work. The problem is that you are changing the title too early in the lifecycle. Instead, you need to do the following:
// Only change the window title when all the UI components are fully loaded. WindowManager.getDefault().invokeWhenUIReady(new Runnable() { @Override public void run() { WindowManager.getDefault().getMainWindow().setTitle(windowTitle); } });
Bash: How to redirect standard error to standard out
Problem:
You have a program which is outputting information to standard error that you wish to search through. When commands are chained together in Unix via the pipe operator, standard out is connected to standard in. Thus you cannot easily search the contents of the standard error. How can you find what you’re looking for?
Solution
The first solution is to save the standard error as a file, and search through the file.
command_producing_standard_error 2> stderr.txt; grep "search string" stderr.txt; rm stderr.txt
This works but you have to remember to remove the text file that’s created in the process.
A better solution, and one that allows you to use the standard error in an existing pipeline is to instead redirect standard error to standard out.
command_producing_standard_error 2>&1 | grep "search string"
Recall that 2 refers to standard error and 1 refers to standard out; those familiar with C/C++ should recognize ‘&’ as the address operator, and it serves a similar role here. After this command, both the standard out and standard error are in one stream, standard out, and can be connected via the pipe (|) symbol to other programs, such as grep.
This tip is modified from information found in the Bash Cookbook, in the recipe “Saving Output When Redirect Doesn’t Seem To Work”. Additional solutions and discussion can be found on unix.stackexchange.com.
NetBeans Platform – How to handle the working directory problem
I have written previously about NetBeans Platform, but as a refresher or an introduction to my new readers, it’s a Java based framework for developing rich desktop applications. A NetBeans Project is comprised of one or more modules. The code in Module A cannot be accessed by Module B, unless Module B declares a dependency on Module A, and Module A explicitly declares that its code is public. In this way, code is segmented and encapsulated into logical blocks.
The project can be run either from the main project node,
# Application launched from the View module:
Why is this a problem?
File f = new File("resources/example.properties");
How do can we handle this?
The best way I’ve found is through the use of the InstalledFileLocator class, provided by the Netbeans Platform Module APIs.
First, we need to move the .properties file from View/resources to View/release.


File f = new File("resources/example.properties");
with
File f = InstalledFileLocator.getDefault().locate("example.properties", "net.developmentality.view", false);
where “example.properties” is the path to the file you’re trying to load, relative to the “release” folder, and where “net.developmentality.view” is the package name of the file in which you’re working. The last argument is described in the Javadocs as:
localized – true to perform a localized and branded lookup (useful for documentation etc.)