Microsoft Appealing to a New Crowd?

Outlook.com Look

Ever notice the look of Outlook.com? I’m probably just too absorbed in my own Apple products these days that I haven’t really noticed Microsoft advertising, but isn’t it a bit different? Their marketing strategy seems to be directed more at a younger crowd these days. Not that I ever thought Microsoft wasn’t “cool” or something, but it seems like they are trying to appeal to the “hip” crowd (I wouldn’t quite say hipster). I thought Apple was the one with the guy in the hoodie, levis, and sneakers?

At any rate, I like the look. Kinda goes with their new Windows 8 UI theme (formerly called Metro). I dug up some ads from both Microsoft and Apple for kicks. Most of them are pretty lame, Apple and Microsoft alike. Apple seemed to be going for the “we’re cool and Microsoft isn’t” tactic (fail) and Microsoft seemed to be going for “we create life changing, innovative products” with a focus on kids and families (boring). Nothing really stood out to me. The iPod ads were pretty cool back in their day and the Microsoft Surface ad has some nice kick.

Apple

Microsoft

While I’m at it, I can’t leave out the classic fail vids:

To be fair, Apple has had its share of failures too:

Install and Setup Cygwin

I recently started a new job for part-time work while in school. As with any new tech job, I went through the process of customizing my Windows box with all the settings, configurations and programs I like. As part of this process I setup Cygwin.

If you aren’t familiar with Cygwin as a Windows user, I hope you will be some day. Cygwin is basically a command line interface (CLI) and set of tools that emulates a Linux environment on Windows. I prefer Cygwin over the basic CLI that comes with Windows because I can use the programs familiar to *Nix users in addition to the autocomplete functionality with Git. I can customize my shell and thank goodness for that! It definitely makes me more efficient and feel more at home. If you’re still using the command prompt for Windows, it’s time to branch out and try something new. It’s valuable to understand how to navigate and script in the Windows CLI, but it’s also worth looking into Cygwin.

As I was going through the process I took note of all the details for future reference. Here’s a list of the packages I suggest you include in your installation of Cygwin:

  • openssh
  • git
  • vim
  • curl
  • bash completion
  • xinit & X-start-menu-icons (if you plan on using gitk)

Cygwin will tell you to install their various dependencies. Just do what it says :).

Here’s what my .bash_profile looks like. It’s a little bit different from the .profile on my Mac:

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

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

# navigate to C:\
alias cdc='cd /cygdrive/c'

# navigate to C:\Source\Certus
alias certus='cd /cygdrive/c/Source/Certus'

# git commamands simplified
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"'

# ls alias for color-mode
alias ls='ls -lha --color=always'

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

# processes
#alias ps='ps -ax'

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

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

# Update PATH with private bin
export PATH="${HOME}/bin:${PATH}"

# Show clean/dirty state for Git in prompt
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\]$ '

# Display variable for gitk
export DISPLAY=:0.0

#################
### PROCESSES ###
#################

# Run XWin Server
startxwin >/dev/null 2>&1 &

As an aside, while I was using Git I realized there was no color for my git status (aka gstat) commands, so I turned on the color: git config --global color.ui true. For a list of other useful configurations to explore, checkout Customizing Git.

I also installed the Perforce’s P4Merge visual merge tool for resolving conflicts when using Git. You can read about how to set that up with Git from the same link above.

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 + `.

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.

Compare Files Line-by-Line (or Image-to-Image)

Two of my favorite tools for line-by-line text comparison are diff and FileMerge. One reason why I like them so much is because they are lightweight alternatives for word processors like Microsoft Word, which you wouldn’t be inclined to open for coding (that’s one of my primary uses).

diff is a simple CLI-based tool accessible on most *nix systems. The basic format is diff <options> <file1> <file2>. It comes with a lot of powerful options too. To list a few:

  • Ignore tab expansion, blank lines, and other white space
  • Ignore case
  • Ignore matching lines
  • Side-by-side output
  • Compare files in directories
  • Recurse through subdirectories
  • Reporting identical files or simply whether or not differences exist

FileMerge is as simple as it gets for file comparison with a GUI. FileMerge comes with any installation of Xcode so it’s basically free. However, you’ll have to download the whole Xcode package (~1 GB) to get it unless you can find it floating around on the net alone.

FileMerge Screenshot

FileMerge allows you to select the changes you want to keep through a menu at the bottom-right that designates the favored document. By default, the right (as opposed to left) document is selected. Below the two separate documents is the final output that will result from the merge. FileMerge also allows you to edit/add content in this section before merging and saving.

As I was writing this post, I got a referral from Russ to a cross-platform comparison tool called Perforce. The cool thing about Perforce (besides being platform agnostic) is it compares not only files and folders, but images too. Not to mention it’s FREE. I only briefly read about it and watched some sample videos on the site, but it’s pretty powerful. It also can be used in parallel with Git. Read about it here.

After the recommendation to checkout Perforce, I started doing some more research and stumbled upon a couple other tools. First off, free code editor TextWrangler (Mac) includes file comparison. Diffmerge seems like a really cool alternative. It’s also free, available on multiple pllatforms and includes merging of 3 files and integration with Windows Explorer. Kaleidoscope is another option, though you’ll have to pay ~$40. It includes many of the same features as Perforce.

What do you use when you need to compare files? Have any recommendations?

App of the Day: Sublime Text 2

Sublime Text 2 IconThere are a lot of different text/code editors out there. Some people swear by Coda ($99) or TextMate (~$50). Others prefer TextWrangler because it’s free and still has plenty of power to get the job done. If your a PC person, Notepad++ may be your weapon of choice. This post isn’t meant to be a review or comparison of the different text editors out there, but simply an introduction to another awesome alternative that I think is more unheard of than not.

Last summer a close friend referred me to Sublime Text 2. Before Sublime, I used TextWrangler, and I gotta say, the wrangler is great, but I just didn’t connect with it for some reason. I’ll admit, I didn’t really research all its functionality or install very many plugins, but I’ve heard great things. Regardless, Sublime resonated with me instantly.

Sublime is clean; no buttons all over the place. It’s got this awesome “1000 ft” distance view that can be used to scroll fast through code or find a section of your code through pattern recognition in the line structure. I’ve found it very helpful since I often use it to look through error stack traces, which are very pattern prone and are often thousands of lines long. Sublime has syntax highlighting for just about every language possible (much like other editors). You can control the preferences really easily too, changing just about any functionality. For example if you don’t like the “1000 ft view,” you can turn that off. Did I mention autocomplete? Yup…and while this isn’t language specific, it’s surprisingly smart and very helpful. Not nearly as powerful as autocomplete in Xcode, NetBeans or the like, but still a very useful feature.

These are just a few of the features that came to mind first and that I’ve found very helpful. Here’s a list of a few more (This comes straight from the documentation):

Usage

Customization

Miscellaneous

API

Oh and…Sublime is pretty platform agnostic. It’s available on Mac OS X, Linux and Windows (32- & 64-bit). You can also download “portable” versions for Windows that are self-contained so if you just want to try it out or keep it lite, you don’t have to worry about it installing extra garbage in your registry or system folders.

Sublime isn’t technically “free.” Here’s what the author has to say about that:

Sublime Text 2 may be downloaded and evaluated for free, however a license must be purchased for continued use. There is currently no enforced time limit for the evaluation.

So in other words, you can use it indefinitely without any limitations. I think it asks you to buy a license after every 25 saves or something? I didn’t find it very annoying personally. After I realized I really liked it, I just asked my company to buy me a license for work. The downside is that if you can’t work a deal like that then it costs $59 for one license.

Try it out and tell me what you think. What’s it missing? Would you switch?

*UPDATE* You should really check out Tuts+ for a list of very useful tips and tricks for Sublime Text 2. It will blow your mind if you don’t know about these features already.

Sublime Syntax Spell Checking

Syntax Spell Checking

Sublime Syntax Highlighting Javascript in HTML in PHP

Syntax Highlighting Javascript in HTML in PHP? No problem...

Sublime Multiple Selections

Make Multiple Selections

Sublime Find and Replace with Regex

Find and Replace with Regex

Sublime Edit Side-by-Side

Editing side-by-side


App of the Day: Audacity

Audacity Logo

As a follow-up to my post on Soundflower, I thought it would be appropriate to make a post about Audacity. To quote directly from the Audacity website:

Audacity is a free, easy-to-use and multilingual audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. You can use Audacity to:

  • Record live audio.
  • Convert tapes and records into digital recordings or CDs.
  • Edit Ogg Vorbis, MP3, WAV or AIFF sound files.
  • Cut, copy, splice or mix sounds together.
  • Change the speed or pitch of a recording.
  • And more! See the complete list of features.

In the past I’ve used Audacity to edit music for content and quality, convert audio files to different formats, record music and record lectures. I highly recommend it to anyone who loves working with audio for fun. There are a variety of plugins available on the web too.

Audacity Screenshot