Feanorian

Sublime Text and CoffeeScript

Tuesday, December 20 2011

I admit it. I have Text Editor compulsion. I have played around with many text editors on my Mac including vim, emacs, BBEdit and TextMate. So its no surprise I encountered Sublime Text 2 .  Its a neat little editor in its infancy.

But as all neat little editors in its infancy go, it is a little premature.  For example there is no out of the box CoffeeScript support.  Since I have been hacking some CoffeeScript, I needed to correct this.  So with some googling and the fact that Sublime Text supports TextMate bundles, I discovered how to start CoffeeScript development with Sublime Text.  The following are my findings.

Syntax Highlighting

We will make use of Jeremy Ashkenas CoffeeScript TextMate Bundle to add syntax highlighting support.

Build System

To setup the Sublime Text Build System to work with CoffeeScript you just need to create a file (CoffeeScript.sublime-build) with the following contents and place in ~/Library/Application Support/Sublime Text 2/Packages/User/

{
    "cmd": ["coffee", "$file"],
    "selector" : "source.coffee",
    "path" : "/usr/local/bin"
}

Note that I have CoffeeScript installed in /usr/local/bin on my Mac.  Edit the above path appropriately to match your system.

Script

Obviously the above is aching to be automated so I hacked up a quick bash script and associated sublime build file.  They can be found here in my git sandbox repo.

Credit

Credit where credit is due.  Much of the info from this post was garnered from the following sources:

http://soenkerohde.com/2011/11/coffeescript-with-sublime-text/
http://www.sublimetext.com/forum/viewtopic.php?f=4&t=2022

Xcode 4 preview

Friday, July 23 2010

Apple released a developer preview for the new Xcode 4. In many ways its just catching up to Visual Studio but the new Jump Bar looks very useful.

All Apple needs now is a VM and maybe even a new language.

Josh Smith gets schooled by an MVVM practitioner

Monday, May 24 2010

The latest post by Josh Smith gave me a chuckle: The MVVM Twilight Zone

DevelopmentComments (1) • Permalink

Backup is a go go go

Thursday, March 25 2010

The background

There is a saying that a piece of data does not exist unless there are three copies of that data. I have always agreed with that principle, but always came short of actually adhering to it. I used local backup solutions to make two copies of my data, but making that third copy was always deferred for later. Well in part because its been sitting in my OmniFocus todo list, my vacation starting this week, and also being inspired by Lab49 colleague Martin Harris’s post Diary of a cloud backup I have finally decided to make that third copy with a offline backup solution. Lets first see what the current setup looks like.

The setup

So I have three macs in the household that has important enough data to be backed up:

Mac Pro – The Mac Pro is my main desktop machine. It has ~300GB of files consisting of documents, music, RAW photos, and AVCHD video (this is the big one) that needs backing up. It is currently setup with Time Machine backing up to an attached Drobo with 1.8TB of space. The Drobo gives it it a bit more safety since the data will survive one HD going bad.

iMac – The iMac is my wife’s desktop machine. It has ~400GB of files mostly consisting of AVCHD video (taking video of your daughter is quite expensive indeed!). It also has Time Machine backing up to external HD enclosure with 2 1TB drives in a RAID 1 (mirrored) configuration.

MacBook Pro – The MacBook Pro acts as an extension to the Mac Pro. Active documents and files are synchronized using Dropbox. Non active documents and files are synchronized on a demand basis using unison. It has no backup strategy since its basically a mirror of the Mac Pro and the backups get done on that box.

The reqs

As Martin Harris stated a third offsite copy is crucial to be truly safe in case of environmental disaster or theft. Given my current setup I had the following requirements:

  • 700GB of data
  • Run on at least 2 Macs

Some other considerations in a backup service:

  • Versions of files – Allow you to recover previous versions of modified or deleted files. Not really important for me, since my Time Machine backup handle this.
  • Encryption of data – Ensure privacy by securing the session used to backup, and the data in storage.
  • Reliable storage – The online storage storing your data should be reliable. At least make sure the backup service uses RAID to protect against hardware failure.
  • Backup control – Controls to backup data when you want and as fast as your want. Features should include idling during computer usage, caps on upload, and scheduling.
  • Recovery support – Include considerations such as time to recover, availability of physical recovery media, granularity of recovery. Again not super important for me since I am using the service as primarily a disaster recovery service. But even in this case having a physical recovery media option is a nice to have, and time to recover should be too long.
  • Interface – Nice intuitive UI is always a plus but not necessarily crucial for a backup service.

The cost

I checked out the plans for for Crashplan, memopal, Carbonite, and Mozy. It seems if you are in the sweetspot of having 1 computer with about 200GB of data to backup you can find solutions ranging from free to ~$50/yr.

Both Carbonite and Mozy have unlimited storage plans per computer for ~$50. Memopal costs around $380 for backing up 700GB of data.

Crashplan has an unlimited computer and storage plan for $100 a year. Given my storage and computer requirements and since it since it met most of my other considerations above Crashplan seemed to be a good choice for a trial.

The settings

I decided to trial Crashplan with a ~50GB backup (54.1GB to be exact). Crashplan allows you to tailor the backup to put it on a schedule, and control CPU and network utilization. I have a 30/5 Mbps cable connection and for the first test ran the backup with these settings:

  • CrashPlan will run: Always
  • Limit when away: 2Mbps
  • Limit when present: 200 kbps

The checkpoint – 7.75 GB/day

  • 3/21/10 6:45pm – 54.1 GB Backup started
  • 3/24/10 7:00pm – 31 GB backed up, currently going at ~200kbps

So as of the first checkpoint Crashplan is going at a rate of 7.75GB a day which is roughly 720 kbps. Which does fall in between the present limit and away limit of 200kbps and 2Mbps respectively. It seems on the slow side, and extrapolating it would take about 3 months to backup the entire 700GB.

The next steps

At 2 Mbps Crashplan should backup at a theoretical rate of 21.6 GB/day or 700GB in about 33days. Obviously that would require some ideal conditions such as ensuring that no other computers are using the connection and a guaranteed upload bandwidth from your ISP. But I should be able to come close with a 5 Mbps upload connection. As an experiment I am changing the backup settings to the following for the next checkpoint:

  • Limit when away: 2.5Mbps
  • Limit when present: 2Mbps

Hopefully that shouldn’t saturate my connection too much.

TechComments (4) • Permalink

Bloomberg makeover thoughts

Thursday, March 25 2010

Dominique Leca for UX Magazine in The Impossible Bloomberg Makeover describes the challenges in redesigning the Bloomberg terminal. The basic gist of the article being that Bloomberg users do not want a more efficient experience and have locked-in to Bloomberg’s complex interface to maintain a status. The article is worth reading especially since it links to IDEOs proposed redesign from 2007.

The first time I used a Bloomberg terminal, I was taken aback by the interface and its steep learning curve. I am not a UX designer (IANAUXD), but wouldn’t a redesign of a complex system carry a risk of imposing a loss of productivity on its users? The Bloomberg terminal given its warts is extremely powerful and experienced users of the system would have ingrained usage patterns into there brain and muscle memory. Inertia from users does come to play here but a good redesign of a system with an established user base needs to take this into account.

Anyway with some competition from Single Dealer Platforms (SDP) with slick UX, as exemplified by Morgan Stanley’s Matrix, who is to say that Bloomberg is not redesigning there terminal right now?

UXPermalink

Code Bubbles

Saturday, March 13 2010
Modern software programming paradigms and styles introduce layers and abstractions which divide functionality into multiple fragments of code. You no longer have monolithic codebases in which a programmer only needs to deal with only a few code files at a time.

I just ran into the Code Bubbles project, which abstracts aways the file and exposes code and documentations as arrangeable code bubbles on a expandable canvas. Its an interesting idea worth exploring and experimenting with.

Probably will need to check out the beta and play with it a bit.
ToolsPermalink