Use Preview, Not Adobe Reader or Acrobat

One of the beauties of owning a Mac is Preview. Preview is a simple application for viewing images and PDFs in Mac OS X. Preview uses Apple’s implementation of Adobe’s PDF specification.

The crazy thing is I’ve found a lot of people either don’t know it exists, don’t know it works with PDFs or they are using Adobe Reader/Acrobat instead. Probably mostly the latter. Personally, I’ve always found the Adobe PDF products to be really bloated and heavy-weight for such a simple task as reading and highlighting PDFs.

I’ve also heard a number of people complain about how they can’t copy/paste text from some PDFs using Reader/Acrobat because the PDF is locked. I’ve heard a couple students in my classes say this about Harvard Business Review cases they’ve paid for and downloaded. I downloaded the same cases and had no trouble with copy/paste when using Preview. I have run into trouble before on other PDFs that were locked with a password, but none of my HBR cases have given me any grief when I use Preview. Tip of the day: Stop using Acrobat or Reader. USE PREVIEW.

There are a lot of other nifty things you can do with Preview that I think are worth mentioning. One of the most important using Preview to preview documents and images without actually opening the application. Novel idea, right? All you do is navigate to the text file, Word doc, Excel spreadsheet, PowerPoint/Keynote presentation, image or whatever it is you want to preview and press SPACEBAR. Preview will render the file in pop-up. Press SPACEBAR again to kill the pop-up. Pure genius.

Another one of the most basic use cases is to use the Rectangular Selection tool to outline the section of an image you want and then crop it (Cmd+K OR Tools >> Crop). Most of the time you probably don’t need to open Photoshop to do that. And instead of cropping screenshots, just use Cmd+Shift+4.

You can use gestures to zoom in (pinch-in and -out). You can also rotate images or pages (rotate your finger + thumb). One of my cases had horizontal text, so instead of turning my head or my computer, I simply rotated the page.

You can manipulate the brightness, contrast, saturation, exposure and other elements of photos (Cmd+Alt+C OR Tools >> Adjust Color…). Granted, Preview isn’t as powerful as Adobe Lightroom or Photoshop, but it gets the job done for simple projects you don’t care about getting professional with (e.g. publishing a picture to the web for a blog post or sending a photo in an email to the fam).

Adjust Color in Preview

Adjust Color in Preview

Preview will also allow you to view all the Exif data/information about a photo through the Inspector tool (Cmd+I OR Tools >> Show Inspector). This is perfect for comparing aperture f-stop, shutter speed and ISO for the photos you just took. Just whip out the SD card in your camera, plug it into your MacBook, launch Preview and compare the photos. Or maybe it’s been a while since you took the shots and you want to see what made the difference between two photos of the same scene.

Inspector in Preview - Exif Data

Inspector in Preview - Exif Data

Another cool trick you can read about is creating a digital signature based on your written signature for digital documents using the camera on your Mac. You can read about how to create signatures using Preview from the Mac Observer.

One final thing worth noting is that with the release of Mac OS X Lion (10.7), Preview saves files in versions and the “Save As…” functionality no longer exists strictly speaking. Instead you have to duplicate a file and then save it with a new name. This might seem confusing and silly, but versioning is actually kind of cool, once you get the hang of it. I won’t discuss how to get around it, but you can read more about how to bring back “Save As” in Lion from Mac OS X Tips.

Leverage Git Config & Autocomplete Git Commands

Git Logo

I’ve already discussed customizing your shell and command prompt. To me, it is equally important to leverage Git configuration and autocomplete Git commands. You should also check out how to show the current Git branch in your Bash prompt.

Git Config

There are a lot of cool things you can do to customize Git just the way you like it. Most of these ideas are personalized versions of the git config customizations found at the Git website.

To create succinct, efficient commands in Git, create aliases for both the shell and for Git. Add the following code snippet to your .profile or .bash_profile:

alias gst='git status'
alias gco='git checkout'
alias gci='git commit'
alias grb='git rebase'
alias gbr='git branch'
alias gpl='git pull'
alias gpu='git push'
alias gad='git add -A'
alias gmt='git mergetool'
alias bdf='git diff'
alias glg='git log --date-order --all --graph --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"'
alias glg2='git log --date-order --all --graph --name-status --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"'

Next add the following code to your ~/.gitconfig file:

[alias]
st = status
co = checkout
ci = commit
rb = rebase
br = branch
pl = pull
pu = push
ad = add
mt = mergetool
df = diff
lg = log --graph --name-status --oneline

Now reload your shell and you’re good to go. I’d also recommend you configure the following settings:

  • Color UI. Adds color to commands like git status so you can read the output more easily. It’s as simple as git config --global color.ui true.
  • Code Editor. I like to use vim, but Sublime would be a great alternative. git config --global core.editor vim.
  • Diff & Merge Tool. I downloaded the DiffMerge app for my MacBook Pro and the P4Merge for my Windows box. These tools allow me to compare code or resolve code conflicts when I run into them. This is worth the time it takes to set up before hand. Read how at Customizing Git – Git Configuration: External Merge and Diff Tools.

Below is what my .gitconfig file looks like now (Updated 2012-09-28):

[user]
        name = John Doe
        email = johndoe@doe.com
[alias]
        st = status
        co = checkout
        ci = commit
        rb = rebase
        br = branch
        pl = pull
        pu = push
        ad = add
        mt = mergetool
        lg = log --graph --name-status --oneline
[core]
        editor = vim
        #autocrlf = true
[color]
        ui = true
[merge]
        tool = kdiff3
        ff = true
[mergetool "kdiff3"]
        path = /usr/local/bin/kdiff3
        #path = C:/Program Files (x86)/KDiff3/kdiff3.exe

        guitool = kdiff3
[difftool]
        path = /usr/local/bin/kdiff3
        #path = C:/Program Files (x86)/KDiff3/kdiff3.exe

Autocomplete Git Commands

To add autocomplete for your Git commands, download the git-completion.bash file. The easiest way I know to do it is by using the following curl command in the shell:

curl https://github.com/git/git/raw/master/contrib/completion/git-completion.bash -OL

The -O options tells curl to output a local file with the same name as the remote file. Thus, the name of the file is extracted from the given URL.

The -L option allows curl to redirect if the appropriate location is indicated with a Location: header and a 3XX response code. curl will redo the request using the new location.

Once you get the the git-completion.bash file, find a place to store it permanently. I put mine with the rest of my shell scripts in ~/bin. Then add the following code snippet to your .profile or .bash_profile file:

source ~/git-completion.bash

Switch Between Application Windows

I learned how to switch between applications with Alt + Tab as a young Windows user long ago. As soon as I got my Mac, I quickly realized Command + Tab did the same thing. But it wasn’t until recently I learned how to switch between application windows in Mac OS X:

Command + ` (Backtick)

There’s no flashy menu that pops up, but it works like a charm for cycling through application windows instantly. Before now, I always used the gesture on the trackpad for show all application windows (it’s also a functional button), which is still nice if you have many application windows to choose from and you don’t want to cycle through them, or you just want to see what’s open.

I wouldn’t be surprised if the same functionality existed in Windows 7 as Alt + `.

No Interfaces Available in Wireshark

If you can’t see any interfaces in Wireshark on your Mac, it’s probably a permissions issue. Try running Wireshark from the command line as root:

su root
open -a "Wireshark"     # assumes app is in Applications folder

If you don’t have the password to root but you are an admin user and (hopefully) you know your password, try editing the permissions on the appropriate Wireshark network sniffers:

cd /dev
sudo chown `whoami`:admin bp*
ls -la | grep bp

I didn’t have the root password so this last one worked for me.

Customize Your Shell & Command Prompt

As mentioned in a previous post, we received some new MacBooks and a Mac Mini at work. Since most of my team prefers using PCs, I was able to get my hands on one. I immediately noticed how different it was from the one I use at home, so I started customizing it right away. I found I had forgotten how to do a couple things and it took me longer than I would have liked to search the web, so I’ve decided to dedicate a short post on how to customize your shell and command prompt in Mac OS X.

If you use Linux or Windows (think cygwin or git bash) this may apply to you too. If you don’t use any sort of shell, well, then you might just want this for future reference.

Apps

Terminal is the default app that comes with Mac OS X. Another great app is iTerm 2 (Free). It adds a lot of functionality that some users find lacking in Terminal.

General Preferences

Some programs that run the shell allow you to set the window size and buffer (essentially scrolling inside the limitations of the window). This is really helpful to setup before hand since lines that are too long will word wrap if you don’t have a large window buffer. This will inevitably happen at some point and it’s really annoying when it does, so take steps to prevent it now.

If you find you navigate to a specific directory every time you open the shell, it may be a good idea to tell the app to navigate to that directory when you open the shell. In Terminal, this can be found at Preferences >> Settings >> Shell; in iTerm 2 this can be found at Preferences >> Profiles >> General. There are a lot of other cool features (like window groupings) that you should checkout.

Appearance

The next thing you’re going to want to do is customize your shell’s color. I like the traditional black background with white or light gray text and some colorful highlighting like green or even just a plain grey.

For my shell’s font, I like to use Monaco 10pt.  Smaller text let’s me see more on the screen since I usually only let my shell take up one half of the screen. I enable bold fonts and bright colors for bold fonts, but I disable anti-aliasing (smooth edges) because I like that raw hacker feel ;).

.profile, .bash_profile or .bashrc

Some of the most important customization takes place in the .profile file. Every time your shell loads, it will run the commands found in the “profiles.” There are a number profiles some system-wide (e.g. /etc/profile), others personal (e.g. .profile). The bash man page provides useful information about the differences under the “INVOCATION” section:

When bash is invoked as an interactive login shell, or as a non-
interactive shell with the --login option, it first reads and executes
commands from the file /etc/profile, if that file exists. After
reading that file, it looks for ~/.bash_profile, ~/.bash_login, and
~/.profile, in that order, and reads and executes commands from the
first one that exists and is readable. The --noprofile option may be
used when the shell is started to inhibit this behavior.

When a login shell exits, bash reads and executes commands from the
file ~/.bash_logout, if it exists.

When an interactive shell that is not a login shell is started, bash
reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if
these files exist. This may be inhibited by using the --norc option.
The --rcfile file option will force bash to read and execute commands
from file instead of /etc/bash.bashrc and ~/.bashrc.

Then at the bottom of the man page:

FILES
       /bin/bash
              The bash executable
       /etc/profile
              The systemwide initialization file, executed for login shells
       /etc/bash.bashrc
              The systemwide per-interactive-shell startup file
       /etc/bash.bash.logout
              The systemwide login shell cleanup file, executed when a login shell exits
       ~/.bash_profile
              The personal initialization file, executed for login shells
       ~/.bashrc
              The individual per-interactive-shell startup file
       ~/.bash_logout
              The individual login shell cleanup file, executed when a login shell exits
       ~/.inputrc
              Individual readline initialization file

In essence, .bash_profile is read upon login and .bashrc is read for each new shell opened since you can have multiple shell sessions running at once without logging in again. In Mac OS X, the .bash_profile overrides the .profile. I’ve run into some problems with .profile in the past, so I’ve actually switched everything to .bash_profile.

The next four sections will discuss:

  • How to change prompt escapes (bash)
  • How to change prompt color (bash)
  • How to create your personal “bin”
  • How to create aliases

Change Prompt Escapes

First, I like to customize the prompte e. I can’t stand it when the prompt is white and blends in with the rest of the text in the shell. The appearance of the prompt is stored in the environment variable $PS1. Try typing echo $PS1 in your shell. The text you see is a string coded with the display setting for your shell’s prompt. It might look something like this:

\h:\W \u$

In this example, the \h represents the host computer, \W the working directory and \u the current user. All this information makes sense if you were to use the CLI a lot. “Back in the old days,” people would interface between various servers or computers over a network (esp. in business scenarios). When you’d change to a different server, you’d want to know the host computer you were accessing. Not all the computers had GUIs. Thus \h would let you know which computer you were on; whether you were on yours or another.

The \u is common for similar reasons. Sometimes you use the su command to substitute user and you’ll want to know which user you are acting as.

The \W should be self explanatory. You don’t want to have to type pwd or ls all the time to know where you are at in the file hierarchy.

In my prompt, I’ve gotten rid of the host symbol (I don’t switch hosts often and when I do, the other prompt is usually different enough that I can tell I’m on a different machine) and replaced it with the history number prompt escape (\!). This escape let’s you know which number in the command history you have just typed. That way if you see a previous command that you’d like to repeat a couple lines up you just type !<number>. To view your complete command history, type the command history. A simplified version of my prompt looks like this:

\! \u:\W$

Here’s a comprehensive list of prompt escapes to add to your prompt:

\a         # an ASCII bell character (07)
\d         # the date in "Weekday Month Date" format (e.g., "Tue May 26")
\D{format} # the format is passed to strftime(3) and the result
           # is inserted into the prompt string an empty format
           # results in a locale-specific time representation.
           # The braces are required
\e         # an ASCII escape character (033)
\h         # the hostname up to the first '.'
\H         # the hostname
\j         # the number of jobs currently managed by the shell
\l         # the basename of the shell's terminal device name
\n         # newline
\r         # carriage return
\s         # the name of the shell, the basename of $0 (the portion following
           #   the final slash)
\t         # the current time in 24-hour HH:MM:SS format
\T         # the current time in 12-hour HH:MM:SS format
\@         # the current time in 12-hour am/pm format
\A         # the current time in 24-hour HH:MM format
\u         # the username of the current user
\v         # the version of bash (e.g., 2.00)
\V         # the release of bash, version + patch level (e.g., 2.00.0)
\w         # the current working directory, with $HOME abbreviated with a tilde
\W         # the basename of the current working directory, with $HOME
           # abbreviated with a tilde
\!         # the history number of this command
\#         # the command number of this command
\$         # if the effective UID is 0, a #, otherwise a $
\nnn       # the character corresponding to the octal number nnn
\\         # a backslash
\[         # begin a sequence of non-printing characters, which could be used
           #   to embed a terminal control sequence into the prompt
\]         # end a sequence of non-printing characters

Change Prompt Color

To color code your prompt on a Mac, use the following template:

\[\033[COLOR_CODE_HERE\]PROMPT_ESCAPE_OR_TEXT_HERE\[\033[0m\]

Most Linux distributions use a little different format:

\e[COLOR_CODE PROMPT_ESCAPE\e[0m

The first portion before the desired prompt escape or text only begins painting the chosen color (e.g., \[\033[1;34m\]). To stop painting a color, you have to reset to another color or turn color off (e.g., \[\033[0m\]).

Here’s a comprehensive list of color encoding:

# Regular Colors
\[\033[0;30m\] # Black
\[\033[0;31m\] # Red
\[\033[0;32m\] # Green
\[\033[0;33m\] # Yellow
\[\033[0;34m\] # Blue
\[\033[0;35m\] # Purple
\[\033[0;36m\] # Cyan
\[\033[0;37m\] # White

# High Intensty
\[\033[0;90m\] # Black
\[\033[0;91m\] # Red
\[\033[0;92m\] # Green
\[\033[0;93m\] # Yellow
\[\033[0;94m\] # Blue
\[\033[0;95m\] # Purple
\[\033[0;96m\] # Cyan
\[\033[0;97m\] # White

# Background
\[\033[40m\] # Black
\[\033[41m\] # Red
\[\033[42m\] # Green
\[\033[43m\] # Yellow
\[\033[44m\] # Blue
\[\033[45m\] # Purple
\[\033[46m\] # Cyan
\[\033[47m\] # White

# High Intensty backgrounds
\[\033[0;100m\] # Black
\[\033[0;101m\] # Red
\[\033[0;102m\] # Green
\[\033[0;103m\] # Yellow
\[\033[0;104m\] # Blue
\[\033[10;95m\] # Purple
\[\033[0;106m\] # Cyan
\[\033[0;107m\] # White

#Replace any leading leading 0; with 1; for bold colors
#Replace any leading 0; with 4; to underline

Once you’ve decided on the appropriate prompt add export PS1=”<custom prompt>” to your .profile. For example, this is what the line in my .profile looks like:

export PS1="\[\033[1;34m\]\!\[\033[0m\] \[\033[1;35m\]\u\[\033[0m\]:\[\033[1;35m\]\W\[\033[0m\]$ "

Add Personal “bin” to the PATH Variable

Every now and again you may want to create your own custom commands, scripts or programs for the CLI. Instead of mixing these in with the rest of the OS’s, just create your own personal “bin” folder and add it to your PATH variable so that you can run those commands from any folder in the shell.

export PATH=$PATH:/Users/Taylor/bin

Create & Use Aliases

Aliases are really nifty. They can save you a lot of extra effort for frequently used and/or lengthy commands. For example, I found that I liked to use ls -lhaG a lot more than just ls as follows:

alias ls='ls -lhaG'

Alias long commands that you’d forget or never want to type. I use Git to version my code. The git log command is very powerful and can include a lot of options. Instead of typing the various options every time, I use an alias called glg:

alias glg='git log --date-order --all --graph --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"'

Conclusion

At the end of the day, this is what my .bash_profile looks like:

UPDATED 2014-04-02

##################
### MY ALIASES ###
##################

# git command autocompletion script
source ~/bin/git-completion.bash

# git commamands simplified
alias gst='git status'
alias gco='git checkout'
alias gci='git commit'
alias grb='git rebase'
alias gbr='git branch'
alias gad='git add -A'
alias gpl='git pull'
alias gpu='git push'
alias glg='git log --date-order --all --graph --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"'
alias glg2='git log --date-order --all --graph --name-status --format="%C(green)%H%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"'

# ls alias for color-mode
alias lh='ls -lhaG'

# lock computer
alias lock='/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend'

# hibernation and sleep settings
alias hibernate='sudo pmset -a hibernatemode 25'
alias sleep='sudo pmset -a hibernatemode 0'
alias safesleep='sudo pmset -a hibernatemode 3'
alias smartsleep='sudo pmset -a hibernatemode 2'

# up 'n' folders
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'

# simple ip
alias ip='ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2'
# more details
alias ip1="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'"
# external ip
alias ip2="curl -s http://www.showmyip.com/simple/ | awk '{print $1}'"

# grep with color
alias grep='grep --color=auto'

# proxy tunnel
#alias proxy='ssh -D XXXX -p XXXX USER@DOMAIN'
# ssh home
#alias sshome='ssh -p XXXX USER@DOMAIN'

# processes
#alias ps='ps -ax'

# refresh shell
alias reload='source ~/.bash_profile'

###############################
### ENVIRONMENTAL VARIABLES ###
###############################

# Add homebrew sbin to PATH variable
export PATH=$PATH:/usr/local/sbin

# Add personal bin to PATH variable
export PATH=$PATH:/Users/Taylor/bin    # May be redundant; check ~/.bash_profile, /etc/profile, /etc/paths, /etc/bashrc

# Show dirty state in prompt when in Git repos
export GIT_PS1_SHOWDIRTYSTATE=1

# Change prompt
PS1_OLD=${PS1}
export PS1='\[\033[1;34m\]\!\[\033[0m\] \[\033[1;35m\]\u\[\033[0m\]:\[\033[1;35m\]\W\[\033[0m\] \[\033[1;92m\]$(__git_ps1 "(%s)")\[\033[0m\]$ '

What have you done to customize your shell or change your command prompt?

Magic Mouse, Meet BetterTouchTool

Apple Magic Mouse

I’ve already talked about how BetterTouchTool is a must have for any Macbook user. But I never went on to discuss how BTT integrates with a Magic Mouse (since I don’t have one). This always intrigued me.

Since we are doing some iOS development at work, HQ sent us a Mac Mini with a Magic Mouse. Naturally, I volunteered to setup the Mac for my team with good software (BetterTouchTool, Caffeine, Sublime, etc.) and the like so that it would run beautifully.

The effect of marrying Magic Mouse to BTT is just as breathtaking as Magic Trackpad + BTT.  You get the ease of a mouse and no more tired fingers when you’re using Photoshop, Visio or anything involving a lot of clicking and dragging. iMacs, Thunderbolt displays and other widescreen monitors have an exceptional amount of screen real estate, which make using a trackpad really tiresome. It’s even a bit tiresome with a mouse. Thus, by using gestures on a Magic Mouse, you still benefit significantly.

For those of you who haven’t read the aforementioned post about BTT, let me just say that I’m not talking about the default gestures that Apple gives you with Mac OS X. I’m talking about custom gestures with 1, 2, 3 and 4 fingers on the Magic Mouse–though limited 4 finger usage.

Using gestures on a Magic Mouse in contrast with the trackpad on a MacBook does take some getting used to. Notably, the Magic Mouse has less surface area than a trackpad. But since you can get both a mouse and gestures, I’d get a Magic Mouse and skip the extra Magic Trackpad any day. I guess that’s kind of a no brainer though. However, now I can say I’ve experienced the ease of making multi-touch gestures on a Magic Mouse. If you haven’t, you’re missing out.

Can’t Sleep? Blame Your LED Backlit Screen

Blue Lightwaves Disrupt Sleep But Improve CognitionA lot of studies have explored the potential negative effects of light pollution and overexposure to light. Some studies suggest excess exposure is related to insomnia (this might come as a shock…not) and diseases like Alzheimer’s or Breast Cancer. With regard to light wavelengths, the blue wavelength is one of particular interest, especially for those of us who use mobile electronics on a daily basis.

Melatonin & Blue Light

The New York Times published an article that quotes researchers who discuss some of the effects blue light has on our eyes and the chemical imbalance of melatonin. Melatonin is a hormone that responds directly to any kind of light. As night approaches and the amount of light decreases, the body releases melatonin, which “promotes sleep and alerts a variety of biological processes to the approximate hour of the day.” However, when light strikes the retina, or back of the eye, melatonin is suppressed.

…there lies the rub. In this modern world, our eyes are flooded with light well after dusk, contrary to our evolutionary programming. Scientists are just beginning to understand the potential health consequences. The disruption of circadian cycles may not just be shortchanging our sleep, they have found, but also contributing to a host of diseases.

Scientists like George Brainard, a neurologist at Thomas Jefferson University in Philadelphia, have observed that blue light is especially effective at suppressing melatonin. Why is this relevant? Many backlit electronic screens implement LED technology that uses blue wavelength emitting diodes.

The Experiments

A group of researchers at the University of Basel in Switzerland conducted a study using 13 men that were asked to sit in front of different types of computer screens before retiring to bed. During one week, they spent five hours in front a fluorescent, red-based screen that emitted little blue light. During another week, they spent five hours in front of a LED, blue-based screen that emitted twice as much blue light. Notice the first screen emitted barely any blue, so twice as much blue light is significantly more, but it doesn’t mean the screen was screaming blue. This is significant to me because it seems to indicate that the study was more realistic and not taken out of context from the kinds screens people actually look at. So what were the results?

Melatonin levels in volunteers watching the LED screens took longer to rise at night, compared with when the participants were watching the fluorescent screens, and the deficit persisted throughout the evening.

And this is the most intriguing part:

The subjects also scored higher on tests of memory and cognition after exposure to blue light, Dr. Cajochen and his team reported in the May issue of The Journal of Applied Physiology. While men were able to recall pairs of words flashed across the fluorescent screen about half the time, some scores rose to almost 70 percent when they stared at the LED monitors.

My first impression after reading that was that I’ll continue to study for tests using my computer. Maybe that explains higher tests scores when I do use my computer? I haven’t looked into it but it’s an interesting thought.

Takeaways

Again, why is this relevant? Because we are readily replacing old red light technology like incandescent bulbs with new energy-efficient blue light technology like LEDs. Most of our new electronic screens use LED technology (TVs, laptops, flat screen monitors, mobile phones, etc.).

Research isn’t absolutely conclusive since this is a relatively immature field of study, but the findings are starting to lead scientists to more concrete conclusions. Health agencies are starting to make statements. The World Health Organization concluded that irregularities in biological clock patterns “can alter sleep-activity patterns, suppress melatonin production and disregulate genes involved in tumor development.” The Journal of the American Medical Directors Association made conclusions regarding the boost in cognitive processes made by subjects exposed to blue light as opposed to red light.

Technological Solutions

If you’re a little paranoid about your health, or maybe you want to ensure you’re sleeping your best, there are some technological solutions. f.lux (Mac, iPhone/iPad, Windows & Linux) is a free program that automatically adjusts the amount of blue light emitted by your screen depending on the time of day. So in the evening the screen changes to redder tones. During morning hours, screen color is designed to emulate natural sunlight. Don’t worry, your whole screen won’t turn red; you’ll just notice a it feels a bit warmer with regard to color temperature. You can also customize it for the best experience by adjusting how fast it transitions, how much the color changes and what kind of lighting you are surrounded with.

I suggest you give f.lux a try as today’s mini-app of the day. I’ve found it rests my eyes a bit more in the evening if nothing else.

Another Mac only alternative is a prefpane app called Shades.

f.lux Screenshot

Examples of Other Light Related Studies

If you’re interested in learning a bit more you can check out the articles listed on Stereopsis’s research link (the group that developed f.lux) or read some of the studies listed below.