January 9th, 2009, by aaron
There are five developers here at The Frontier Group and four of us have partners. That’s nine people, between them there are eight Apple laptops of various vintages. Five of them are our own Macbook Pros. If you were to say that we are impressed with Apple products and enjoy using them daily then I’d say you are dead right!
Apple have recently released their new 17″ Macbook Pro and have given it an embedded, non-removable battery pack. On initial impression this seems to be quite a limitation. In reality given that they are touting 8 hours of battery life and 1000 recharges the battery could quite legitimately last 2-3 years of even the most heavy use.
Their video detailing why they went with an embedded battery and how the battery pack is manufactured is pretty interesting. It explains how the batteries are manufactured and where they saved space and weight as well as the improvements they made to increase the lifespan of the battery pack.
My assumption is that the battery is replaceable, it’s just that you’ll need to take it to a service centre to have it done. They don’t seem to mention this on the website though so I may be wrong.
If the battery is truly and completely irreplaceable then I think their claims of environmental friendliness and so on would be debunked. I guess we’ll hear about it in a couple of years time.
All in all though I’m pretty excited about the new Macbook Pro and after having seen one in the flesh at work I’m keen to see one in my own hands some time this year or next.
UPDATE : According to Gizmodo the battery is replaceable after all for US$179. To me that seems like an entirely reasonable price if the battery life lives up to the claims.
We are a web development company and this is our blog. We specialize in building web applications with the Ruby on Rails framework. You can read more about our Ruby on Rails development or contact us.
Tags: Apple, Batteries, Mac, Macbook
Posted in Product Reviews | 1 Comment »
January 6th, 2009, by mlambie
For as long as I can remember I’ve used vim (or vi) as my editor of choice when on Linux or UNIX systems. I’ve also used bash as my shell, except in circumstances where it wasn’t available. We’ve been using Macs for a long time now, and one of the things that I only recently learnt was that you can use CTRL-a to take you to the beginning of a line in a terminal. This meant I no longer leant on the left arrow key to get me back to the beginning of a long command.
I use screen to maintain remote, active connections to our various servers, and with my setup the CTRL-a trick didn’t work. I’ve just found that setting vi mode in bash will allow me to hit ESC then shift-I and take me to the beginning of a line. ESC engages vi mode, and you can navigate around the command as you would inside vi. For example, shift-I or 0 takes you to the start of the line, shift-a or $ to the end and h, l, k and j act as cursor keys.
You can engage vi mode by executing the following code, or adding it to your ~/.profile (or any other dot file that is executed upon login).
set -o vi
I always like finding new shortcuts, even if there’s some minor annoyance at my former lack of awareness. It’s like how we discovered syntax highlighting in vim after completing our uni degrees… very bittersweet.
We are a web development company and this is our blog. We specialize in building web applications with the Ruby on Rails framework. You can read more about our Ruby on Rails development or contact us.
Tags: bash, linux, Mac, terminal, vi, vim
Posted in Tips and Tricks | No Comments »
November 16th, 2008, by mlambie
Like most programmers, I don’t like to repeat manual tasks, well, manually. We use Ubuntu Server almost exclusively on our servers and whilst package management is very simple (login, aptitude update, aptitude dist-upgrade, all done) when you have to look after many (fourteen and expanding) servers it can get repetitive.
I use Terminal (or is it called Terminal.app?) on Mac OS X as my terminal emulator, and I’ve messed around with using Applescript to open multiple tabs before, so I figured this was a problem worthy of a Sunday-morning.
What I envisaged was iterating over a list of servers and having Applescript manage a Terminal instance, opening new tabs where appropriate, and executing the upgrade command in each tab for each server. Sounds simple enough.
And it was. I used Martin Ström’s excellent article as a base for my script, and ended up with the following:
set tab_count to 0
set servers to {"astrotrain", "bumblebee", "grimlock", "ironhide", ¬
"jazz", "laserbeak", "mirage", "prime", ¬
"prowl", "ratchet", "ravage", "rumble", ¬
"soundwave", "wheeljack"}
-- Update the package list, dist-upgrade and remove the downloaded
-- packages so they're not included in the backups
set dist_upgrade to ¬
" 'sudo aptitude update &&
sudo aptitude dist-upgrade &&
sudo aptitude clean'"
-- Make our settings globally available
global tab_count, servers, dist_upgrade
-- Mainline
on main()
tell application "Terminal"
activate
repeat with server in servers
set cmd to "ssh -t " & server & dist_upgrade & " && exit"
my open_tab(cmd)
end repeat
end tell
end main
on open_tab(cmd)
tell application "Terminal" to activate
my create_new_window_or_tab()
tell application "Terminal" to ¬
do script with command (cmd) in last tab of window 1
end open_tab
on create_new_window_or_tab()
if tab_count ≤ 0 then
tell application "Terminal" to do script ""
set tab_count to tab_count + 1
else
tell application "System Events" to ¬
tell process "Terminal" to ¬
keystroke "t" using command down
end if
end create_new_window_or_tab
-- Run the mainline
main()
Apologies for the highlighting – the plugin doesn’t understand Applescript.
We are a web development company and this is our blog. We specialize in building web applications with the Ruby on Rails framework. You can read more about our Ruby on Rails development or contact us.
Tags: applescript, automation, dist-upgade, Mac, server, terminal, ubuntu
Posted in Code, Tips and Tricks | 4 Comments »
November 11th, 2008, by aaron
I came from a Microsoft background, when I was there I complained about some aspects of it, but in hindsight one thing I miss a lot is a good IDE for SQL and database related development. SQL server didn’t have anything amazing, but it did the job and was stable.
I’m a big believer in visualisation and easy visualisation when working with data. It’s there to be used and if you can’t visualise it simply, if you can muck around with it and fiddle and massage it into various shapes and sizes easily then it’s more likely to be left alone. Data that’s left to rot is like leaving gold to rust. If gold rusted.
In short data is valuable, but only if it’s used.
In my quest for tools I’ve tried a few and found none that I would actually pay for, except the one I’ve been using now for a couple of months without a problem. DBVisualiser Free edition, I’d pay for that. It’s lucky too because they make a paid version with a bunch of extra features.
I’m always on the lookout for better applications to improve my performance and more importantly my enjoyment at work. So far this has been the closest application I’ve found to make MySQL a joy to use on the Mac. The free version does 99% of what I want to do, the pro version just seems to add features to make life even easier.
I’d urge people working with a database on the Mac to give DBVisualiser a try.
We are a web development company and this is our blog. We specialize in building web applications with the Ruby on Rails framework. You can read more about our Ruby on Rails development or contact us.
Tags: Database, IDE, Mac, OS X, SQL
Posted in Product Reviews, Websites or Tools | 1 Comment »
October 15th, 2008, by aaron
Lately there has been a fair amount of chatter within the office concerning how to more efficiently spend our time on projects. Given that most of the time the best place to start when solving a problem is learning more about what is causing the problem, we’ve unearthed a couple of tools that aim to help us better manage our time and to-do lists.
The first application is Things. The basic idea here is that you have things to do and you generally schedule them into stuff that has to be done today or very soon, and other things that can be done some time in the future but aren’t that urgent. This idea isn’t anything particularly new but the way that it integrates with mail and mobile devices is great. It’s free for the time being so give it a try.
The second application that I found just today is called Slife. It records what you do in a stack of different applications and then gives you a report as to how much time you spent in an application and what you were doing. For instance it can tell you that you spent 2 hours today in Firefox, however it can also tell you at what times you were in Firefox, for how long you were in there and even the name of the tab you had open. You can group applications into ‘activities’ and then set goals for these activities such as “read email for less than 10 minutes per day” or “do work for more than 5 hours a day” and so on. Again, this application is free.
So if you own a Mac and are looking to spot any innefficiencies in your working habits or to improve the way you handle your to-dos then check these applications out!
We are a web development company and this is our blog. We specialize in building web applications with the Ruby on Rails framework. You can read more about our Ruby on Rails development or contact us.
Tags: Mac, OS X, Slife, Things, Time Management
Posted in Websites or Tools | 3 Comments »
Follow Us