Archive of articles classified as' "mac"

Back home

Note to self on terminal


Sometimes I change a few defaults but then I forget how I did it. First, seek showing all hidden files (both in Finder and Terminal) is easy. Just type in Terminal the following commands:

defaults write AppleShowAllFiles TRUE
killall Finder

The second line kills all instances of finder and restart them. The other issue is to activate color display (for directories, binary files, etc) in Terminal, which implies adding the following lines to one’s profile by using:

echo "export CLICOLOR=1
export LSCOLORS=exfxcxdxbxegedabagacad" >> .profile

man ls describes options for tweaking the color scheme.

Filed in mac No Comments

Using R for genetic analyses


As some people know, visit I have been using asreml for genetic analyses for quite a few years and even keep the ASReml Cookbook§. I was quite happy to see the development of asreml-R, ed a package that makes available most of ASReml’s functionality from R. This made my life easier: I still use plain-vanilla ASReml for very big jobs, but I can access a much more comprehensive statistical system for fairly substantial jobs.

One of my main problems with asreml-R is that is not available for OSX (mac). Yes, I can dualboot or use a virtual box, but both options are a bit of a pain. I rather use my computer with its primary operating system and no strange overheads. I have requested several times to have a mac version. It seems that the code can be compiled without problems, but it is the license management software that is not available for the mac.

I then started looking for options to run genetic analyses. nlme was designed around hierarchical models and fitting experimental designs did not feel right. lme4 is looking good and the main issue was around fitting pedigrees, a matter at least partially solved by the pedigreemm package. I then came across the MCMCglmm§ package, which has some nice features: it makes Bayesian analyses accessible, ready support for pedigrees and a syntax not that different from asreml-R.

After playing with the MCMCglmm library, I found that I could not use pedigrees with parents acting both as males and females. I modified the code (line 26 of inverseA.R) to print a warning rather than to stop and the compiled the library again. Voila! it is working (the beauty of having access to the source).

R CMD INSTALL /Users/lap44/Downloads/MCMCglmm --library=/Users/lap44/Library/R/2.9/library

By the way, ASReml is still my primary tool at the moment, but I enjoy having good alternatives.

Filed in genetics, mac, software, statistics 2 Comments

The pain of moving (computers)


It was the time to retire ‘Mastropiero’§ (my old mac laptop). While software wise it was running well (using Leopard) the building quality of the first series of macbook pros was not stellar. The new laptop—’Abraxas’—is a macbook pro with 320 GB hard drive, side effects 4 GB RAM and 2.66 GHz Core 2 Duo processor.

Despite of all the propaganda, migration assistant is a fairly useless beast (at least in my personal situation). The university buys the computer and sets up a user account that, incidentally, has always the same name for a given user. This means that I can not just migrate my old account because there is already an account with the same name (and a bunch of settings) in place. In addition, migration assistant is pretty much an all or nothing affair, and I wanted to start with a fairly clean installation.

At the end I connected both laptops to the network and moved my data across. I imported all my songs into iTunes and copied the photo library, which was automatically upgraded from version 6 to version 8.

In the transfer process I dropped a number of programs that I was not using much. My current list of programs is in ‘I Use This’§. There is still a small amount of duplication; for example, both Eaglefiler and Devonthink are on the list, although eventually I will only keep the former. Another case in hand is MS Office. I can’t really stand MS Word and PowerPoint, particularly in their mac incarnations. If Office 2004 was slow, the 2008 version is a turd. I am trying to get by using OpenOffice, which I still do not consider completely satisfactory. I also have Pages, which is not quite compatible with Word. I think that OpenOffice still does a better job; it is uglier but more functional.

From a teaching point of view Keynote (presentations) and TeXShop (lecture notes) do the heavy lifting. My calendar is managed in iCal, which is synchronized to Google Calendar and also to my resucitated Palm T3; the latter using Mark Space’s missing sync. I dutifully ignore Palm’s own software.

Statistics are managed through R, although I am still waiting for a mac version for asreml-R a commercial package for genetic analyses. All publication quality plots are done there as well.

The university IT guys setup dual booting for me (20 GB windows XP partition), but I haven’t yet managed to have time to boot into windows. They also installed the developer tools, which I hope to use to do some programming with Python and C++ or Fortran 95 (depending on time availability).

And that is! A simple setup with oodles of space and memory; at least it feels like that now. Let’s wait for a year and see how it feels.

Filed in mac No Comments

Mac update 2008


Nearing the end of the year I keep track of the software that I use the most in my mac. Firstly, valeologist I am a researcher—I always struggle with the word scientist—so the programs I use the most have my own bias:

  • Statistical analysis: R (free). R it is the closest thing to a lingua franca for computational statistics: it is cross-platform, resuscitator flexible and its graphics are great. The mac version comes with a much better script editor than its windows counterpart.
  • Writing: LaTeX, for which I use MacTeX (free). Sometimes I do provide in this blog my reasons for this choice. Initially I was using TexShop as editor, but I have moved to TextMate.
  • Reference management: Bibdesk (free). Some eye-candy on top of the time-proof BibTeX format.
  • Text editor: TextMate (€39). Well, I do pay for good software, and TextMate has the right combination of features, footprint and macness. I do miss one or two features, but clearly not enough.
  • Presentations: Keynote, which is part of the iWork suite ($79). In fact, this is the only part of iWork that I do use. When teaching some subjects (like statistics) I do require a fair number of equations in the presentations, for which I use LaTeXiT (free). Some times I embed Google Earth flyovers in presentations, for which I use iShowU ($20).
  • Keeping it organized: EagleFiler ($40) for project archives, web snippets and email archiving. Good quality software and a very responsive developer.
  • Keyboard goodness: Quicksilver (free) acts as application launcher, search utility, etc.

Concerning web interaction (I do keep a few sites), my list is not that long:

  • Browser: Firefox (free). Safari is nice, but I would miss the following plugins: Firebug, Zotero and Delicious (in that order).
  • FTP: Cyberduck (free). I have fairly simple requirements in this department, so I find it difficult to justify paying for something like Transmit.
  • Blogging: MarsEdit ($30) is a solid and straightforward piece of software; worth the money.
  • Twitter: I use Twitterrific (the ad-supported version) to update twitter, which updates this site’s sidebar and my facebook status.

By the way, Rui Carmo keeps a good list of mac alternatives to windows software.

Important new addition: MoneyWorks.

A cursory web search on accounting software for the mac will lead mostly to disappointment. The big players (Quickbooks and MYOB) have shocking versions for the mac. On the other hand, most small players (like iBank or Cha-Ching) only target the personal finance market. I just started working with MoneyWorks, which is a decent and usable (I have no better adjectives for this category, it is accounting software for God’s sake) program for small businesses. Almost enjoyable!

Filed in mac, software No Comments

Status on writing tools


As far as I know, life 2008 has been my most productive year ever from a writing point of view. Besides the blogging and micro-blogging stuff (aka informal public writing), tuberculosis I have worked in lecture notes and I have been writing an inordinate (for me) number of words in research papers. I still hope to submit a couple of more papers this year.

I have written all blog posts using MarsEdit, which is an excellent simple editor. I used MS Word for quite a few papers because I am working with LaTeX-unaware students and colleagues. However, I have also bee using LaTeX for all my lecture notes and a number of long(ish) research papers where I am working mostly by myself.

Until recently, I was using TexShop + LaTeX, but then I discovered XeLaTeX, which added unicode support–so I can write zúñiga in my files–and font management. I can easily access all my fonts in the mac in a fairly simple way. I am documenting the switch in the wiki side of this site.

During some asreml training I re-discovered emacs during Brian’s explanations. I installed Aquamacs (an OS X emacs version), which comes with ESS (emacs speaks statistics) to interface with R and AUCTeX (a LaTeX editing environment) pre-installed. Overall, I am still finding my way within Aquamacs, but the whole system feels very powerful. Now, if I manage to get an asreml version for the mac that would be total bliss.

Filed in mac, software, writing No Comments

Settling down after upgrade


Following last week’s major upgrade to Leopard and Office 2008 I needed to pick up with a few things.

I have used only the basic features of Office 2008: Word and PowerPoint look OK, urologist although I still prefer Keynote to the latter if I can get away with it (e.g. when I am teaching). Entourage just does not cut it for me. The interface received a liftoff–although it is still far from pretty–but functionality wise is lacking:

  • Email, website like this calendar and contacts synchronise with exchange without problems, but tasks and notes do not.
  • Contact groups are created in a local account rather than in exchange.
  • There is no simple way to add keyboard shortcuts to file messages.
  • The task functionality is still underwhelming.

Given these issues I am still relying on Mail, Address Book and iCal. The former two synchronise with exchange, while the latter does not. I am publishing the calendar in a webdav server so can access it remotely (just in case). Nevertheless, to dos in Mail are not up to scratch either, so I am relying on Things.

I did test a few task management applications and the best designed (for my taste) where Omnifocus and Things. The problem with Omnifocus is that kept pushing me to work in a very specific way, which happens not to fit with my own way of doing things. In contrast, Things let me order task in lots of different ways.

And for long documents

At the moment I am working in three long documents with a fair amount of complexity and (too) many equations. I am using MacTeX (a LaTeX distribution) with TexShop as front end and BibDesk for reference management. The interesting thing is that BibDesk has a much better interface that Endnote 9, which is the version that we are still using in the University.

I can use LaTeX only because I am working by myself on these documents, but if that were not the case, then I would rely on the not so liked standard: MS Word.

Filed in mac, software, writing No Comments

Upgrading mac software


A few days without posting but first I was away in mighty Timaru and then my laptop underwent some serious upgrade. I will write about the latter here.

I have been using Parallels for a while, ophthalmologist but despite all the good press I still find it painfully slow. I tend to use the windows side of things mostly for two things: scientific software (SAS, ASReml and arcGIS) and Quickbooks (cashbook for consulting income). The first category is very demanding on memory and disk space, while the second is just buggy and poorly written, but it works with what my accountant needs.

While I am using the programs under windows I am rarely doing something on the mac side of things. Thus, I think I am better off with dual booting for the few times when I need Windows in my laptop. Given that I was going to have to save all the data, partition the disk, etc. I also used this time for upgrading to Leopard (OS X 10.5) as well. I also upgraded to iWork 08, so I can waste only one day to have the laptop ready.

After a few configurations hiccups (mostly negotiating things with the network) the laptop is performing quite well. Windows XP runs very fast: in fact, faster than in any other laptop that I have used in the past. This afternoon I will install software on the XP side of things.

Filed in mac, software No Comments

Rotating movie in quicktime


I had a few short (under 30 seconds) movies taken in portrait mode, ailment which means that they looked sideways when played. I could not see the point on forking out US$30 to upgrade quicktime to activate that function. A quick search showed that opening ‘Script Editor’, disorder pasting the following code and running it is a simple solution:

tell application "QuickTime Player"
set m to (get movie 1)
rotate m by -90
save self contained m in (choose file name with prompt "save self contained movie")
end tell

This rotates 90 degrees the video that is currently open in Quicktime and asks for a name for the new file. The file looks with strange proportions, but if you close it and open it again it looks perfectly OK.

Filed in mac No Comments

My Approach to Presentations


I give a fair number of presentations per year, remedy some to university students (in classes from 6 to 90 students), rx some to people from industry (in groups from 4 to 20), and others in conferences (100+ people). Despite that I have stage fear for most activities (and I could not save my life by acting) I have to admit that I do enjoy giving presentations (a lot, really, well, most of the time).

Once in a while I like visiting Presentation Zen, which is one of the best resources providing a critical appreciation of different presentation styles and tools. I guess that one of the typical mistakes is to accept one ‘style’ or method as THE absolute truth. I believe that a ‘horses for courses’ approach works best and will shamelessly borrow from different methods as I see fit. Aiming to make clear to myself what works and what doesn’t I decided to write down a few notes about my experience giving presentations. I want to make something clear: this is what works for me that does not pretend to be a one size fits all recipe.

Although many comments on this post refer to presentations using slideware (either Keynote of PowerPoint) it is important to remember that they are only support tools. When giving a presentation one is basically selling an idea (or product) to the audience. One is acting as an intermediary between the idea and the audience, and success will be measured by how people buy (understand, learn, adopt, take ownership) the idea. These people may be students, customers, clients, etc but the elements are essentially the same: the idea, the presenter and the audience. No, PowerPoint is not on the list.

The resources that I use the most are:

  1. Analogy, presenting new concepts relating them to something familiar to the audience. This is an excellent way of presenting complex topics, although it requires some care to avoid stretching the analogy too far and misleading the audience.
  2. Humour, using a lighthearted approach to my topic. I am not talking about the typical opening joke, but of finding ways of making the presentation memorable through the use of interesting associations, the occasional joke and showing that one is having a good time presenting.
  3. Images, lots of them. In my experience, diagrams work better than bullet points and good quality pictures make the presentation stand out. I use some of my own pictures (photography is one of my hobbies), istockphoto, flickr and a few Getty stock photos too.
  4. Slides for questions that I am expecting. At the end of my presentation I normally insert a blank slide followed by two or three slides that explain questions that I think may arise from my presentation. I have rarely used them, but when I have they have been a real bonus.

Things that I avoid:

  1. I avoid as much as possible breaking thoughts on bullet lists. There are very few cases where I think that they are really useful, but diagrams tend to take their place in my presentations.
  2. Corporate templates with logos on every slide, which are a distraction and take too much space. I use Keynote’s ‘Modern Portfolio’ template because it is quite neutral and I can adapt it to many different types of presentations.
  3. Complex transitions, flying objects, etc. However, some times I use transitions for only a few slides just to show off the mac to my colleagues ;-) .
  4. Compressing and dragging/dropping figures, because they are the first casualty when running the presentation in a Windows machine. This is the typical ‘quicktime and a TIFF/JPEG decompressor are needed…’ placeholder instead of the picture.
  5. Equations, unless they really add value. In my job I have to use fairly advanced numerical and statistical approaches, but I always keep in mind that the concepts (rather than the formulas) are what really matter to my audience. I leave the equations for publications in professional journals and endorse the ‘Look Ma, no equations’ approach for presentations.
  6. Using too many slides: I tend to use between 12 to 18 slides for a 45 minutes presentation. I know, some people like Guy Kawasaki advocate ten as the optimum, but once you count overlapping objects he is probably close to 15. I have seen excellent presentations with 50 slides, mostly pictures and diagrams, but one really needs to be an excellent speaker to pull that one off. If in doubt, drop the slide from your deck (another use for those slides is point 4 on my list of resources).
  7. Overestimating the audience: even if you are in a room full of experts they want to hear a good story showing that one knows where the topic is coming from. I first read this advice in ‘A Ph.D. is not enough: a guide to survival in science’ by Peter Feibelman.


Considering the way I prepare my slides, there is no much point on using them as handouts for the lecture. I tend to prepare a handout starting from my notes for the presentation or the presentation notes from a well written handout. I avoid like the pest preparing a deck of slides without having something written first. The length of my handouts varies from two to six pages, depending on the audience and the complexity of the topic.

A typical question is when do you hand out the notes? It depends. If I am talking to students that I will see again over several lectures I will give the handouts either at the start of the lecture or even several days before. On the contrary, when I am giving presentations that are completely self-contained (not part of a course) I tell the audience that I will hand out the notes at the end. I do this to ensure their full attention, particularly considering that I may not see them ever again.

In case you are using a mac

When I am teaching I can always use my own laptop. However, in meetings with industry, conferences and the like all presenters usually have to put their presentations in a machine running windows. For these cases I usually have two additional versions of my presentation exported from Keynote: PowerPoint and PDF. I always test the PowerPoint version in my windows box and if I am not satisfied with its appearance I will use the PDF version. In many projectors, presentations look better using PDF rather than PowerPoint (and there are no problems with missing pictures). Still, Keynote is much better than any of the alternatives with its presenter screen displaying current and next slide, notes (with a few key points to remember) and a clock. No need to mention the remote control that now comes with mac computers…

Odds and ends

I always take with me a cheap ($3) laser pointer that was given to me ten years ago; I have been in many meetings where the pointer runs out of battery. My laptop battery is fully charged before presenting (just in case). I carry copies of my presentation and handouts in a USB disk and, when travelling from work, I also load copies of the files in my web server. If talking to industry I take printed copies of the handouts in good quality paper (with a yellow shade, like Moleskine paper). It is a bit more expensive, but I think it is $10 well spent.

Most times I do not practice my presentation, but I only read my presentation notes a couple of times and go over the slide desk a few times trying to remember key points for each slide. I do not memorise the notes, but try to convey the yeast of them. Thus, if I give the same presentation twice there is a fair amount of variation between versions. I think this is a good thing and I always think of it as a jazz performance: the core is the same, but there is a good amount of improvisation. Anyway, I try to know the presentation material quite well, so I can give my talk even if all audiovisual material fails (it has happened before!). I never apologise if things don’t go perfectly, except if I arrived a bit late by some delay outside my control (this has happened only a couple of times).

Finally, I smile. A lot. I walk quite a bit looking at different persons in the audience as if I were talking only to them. This helps them to pay attention and to me to gauge how I am doing on keeping them awake and interested on the topic. I always tell myself ‘remember to have fun’ before presenting.

Filed in mac, productivity No Comments

Current mac setup


I spend most of my work day in front of a computer. Thus, apoplexy having a reasonable setup is very important. I use a fairly clean mac, visit web with a few add-ons. I tend to work a lot with standard mac software (meaning that came with the macbook pro). Thus, I use Safari for browsing, Mail for email, iCal for appointments, Address Book for contacts, iTunes for music and iPhoto for pictures. One of my favourite things is the high level of integration between the standard software. At work the IT department installed Entourage, Firefox and Thunderbird just in case I wanted to use it but:

  1. I had a short lived love affair with Firefox, but it still did not feel quite right as a mac program.
  2. I could not stand the ugliness of Entourage, although I understand that some people like to have everything in one program.
  3. Thunderbird felt quite responsive compared to Mail (whose IMAP support is not great), but it did not use the standard Address Book, and I dislike entering information more than once.

Of course this software setup does not cover everything that I need to do, so I use a few other programs too:

  1. Keynote feels much better for presentations than Powerpoint. It is more elegant and the themes look much better that anything PowerPoint brings by default. Keynote is one half of `iWork and I have to say that I do not like Pages (the other half), which is slow as hell.
  2. Yep to classify my PDF files. It is by far the simplest and most efficient solution. Through work I have access to Endnote, which is clunky and far less visually appealing. I am not sure what the pricing will be in the future (at the moment is free) but I think it will be worth the money.
  3. I work in a fairly visual way: if I can draw things I can understand them a lot better. Curio is great at allowing me to organise my meeting notes, sketches, I even do some mind mapping with it some times. I can organise text in it too; certainly not as efficiently as in other applications, but it does the job. I use the professional edition.
  4. Did I mention that I am an old fart (forty and counting)? I grew up with keyboard shortcuts, and I rather do that instead of mousing my way around. No sense of superiority here, it is just easier to me. Quicksilver really shines if you like working with the keyboard. If you like playing with the mouse it will not be your cup of tree.
  5. Office. My excuses are that I have to exchange documents with colleagues, and Word and Excel are de facto standards. Overkill, with lots of features that I do not use and appalling graphics. However, I do like tables and comments in Word (it would nice if it included better versioning) and pivot tables in Excel.

I have also tried a few things that did not work very well for me including: Devonthink (I did not get it; I may not be smart enough to do something useful with it), Mori (I do not to like much to use a folder structure for my thoughts: things always fit in to more than one class) and WriteRoom (I use version 1 sporadically, which in my opinion was better than the second version. A clear case of when less is more).

At work I also use a PC, which has Office, Firefox and a bunch of scientific software which is of no relevance to this post. Enough to say that I spend 80% or more of my time working in the mac, which feels so much more welcoming than my PC. Sure, it is not perfect and there are a few things that annoy me — like the lack of control over compression rate in iPhoto when exporting and not being able to sync my phone with the macbook — but they are minor compared to my PC experience.

I switched from PCs only two years ago, but now I feel mostly at home. I do not like mac zealotry and mythology (which confuses consistency with intuitive), but I have been happier with my macs than with any PC in the past. Well, except for the first computer I owned, a brand-less 286 running DOS. But how do you compete with the first time of anything?

Filed in mac, software No Comments