21 June 2018

Australasian International Conference on Speech Science and Technology (SST) referencing style for Zotero

Zotero supports the open source Citation Style Language standard and it is really useful for formatting in-text citations and reference lists to the exact specifications of journals that you are submitting your work to. But, it can be a little tricky to find the right citation style for conference papers.

The Australasian International Conference on Speech Science and Technology (SST) is the biennial conference of the Australasian Speech Science and Technology Association (ASSTA). The conference accepts submissions for 1-page abstracts and 4-page papers, the latter of which are published in the conference proceedings.

SST papers use a modified IEEE referencing style.

I have modified the IEEE referencing style in the Zotero Styles Repository to create a custom SST reference style to take the pain out of preparing SST paper submissions.

Download SST reference style for Zotero

22 May 2018

A productive Zotero setup

I was an early adopter of Zotero (my first references were imported on 8 November 2006) and I have been a long time user. Originally released as a Firefox plug-in, Zotero is now available as a stand-alone app with connectors for most popular browsers.

I use Safari as my default browser. I use Chrome whenever Flash is required. I use Firefox as my research browser when gathering references.

I have the homepage and default search engine set to Google Scholar. I have bookmarks pointing to a few university libraries, the Zotero styles page, the NLM Catalog (for looking up journal abbreviations), and the Resolve a DOI page.

You can use Zotero with word processors such as Microsoft Word and LibreOffice by installing the word processor plugin.

Download links:

Firefox - https://www.mozilla.org/en-US/firefox/?utm_medium=referral&utm_source=firefox-com

Zotero - https://www.zotero.org/

Zotero styles - https://www.zotero.org/styles

Journal abbreviations - https://www.ncbi.nlm.nih.gov/nlmcatalog/journals

DOI lookup - https://dx.doi.org/

Zotero word processor plugins - https://www.zotero.org/support/word_processor_integration

04 June 2017

How to find the correct SMTP server settings so that you can Send Mail As from Office365 in Gmail

One of Gmail's (many) cool features is that it lets you check mail from other non-Gmail addresses and send mail from other addresses that you own. This allows you to manage all of your email from a single interface, and extends all of the benefits of Gmail to mail from your other non-Gmail accounts (labels, Google-powered search, etc.).

Set up Send Mail As

Here are Google's instructions for how to set up sending emails from a different address in Gmail:

Step 1: Add an address you own
  1. On your computer, open Gmail.
  2. In the top right, click Settings.
  3. Click the Accounts and Import or Accounts tab.
  4. In the "Send mail as" section, click Add another email address.
  5. Enter your name and the address you want to send from.
  6. Click Next Step.
  7. Enter the SMTP server (for example, smtp.domain.com) and the username and password on that account.
  8. Click Add Account.
Step 2: Confirm the address
  1. Sign in to the account you added.
  2. Open the confirmation message you got from Gmail.
  3. Click the link.
Step 3: Change the "From" address
  1. In the message, click the "From" line.
    (If you don't see this, click the space next to the recipient's email.)
  2. Select the address to send from.

Uh-oh, errors

When it works, it is a thing of beauty. The problem is that for some email addresses, these default steps do not cut it. This is particularly the case for Microsoft Exchange or the newer Office365 email addresses. Users with Microsoft work email addresses tend to run into trouble at step 1.7 when attempting to specify the SMTP server.

I have come across two errors. The first appears when using the default SMTP address without making any changes:
Couldn't reach server. Please double-check the server and port number.

Another error message came up when I used the recommended SMTP server for Office365 users (which is smtp.office365.com):
Authentication failed. Please check your username/password.
Server returned an error: "334 VXNlcm5hbWU6 334 UGFzc3dvcmQ6 535 5.7.3 Authentication unsuccessful [CY4PR16CA0035.namprd16.prod.outlook.com] code(535) "

Some people claim to have come across an error saying Server response: read error code(0), although I have not seen that error, myself.

So, what's the problem?

The problem is obviously that I was not specifying the correct SMTP server. You might think that the first step should be to contact IT support at work to obtain the correct SMTP address. IT Support do not understand what you are trying to do. They might tell you to use the recommended email client (most likely Outlook). You re unlikely to find a solution this way.

For me, this was very frustrating and led to a lot of searching and trawling through forums, trying to find a solution. The issue arises from the fact that the recommended SMTP server (smtp.office365.com) is not the final destination, but rather redirects to another SMTP server address based on your location (similar to how typing in Google.com will redirect you to Google.co.uk in England, but to Google.com.au in Australia).

How to find your Office365 SMTP server

In order to find your SMTP server, you must ping the smtp.office365.com address. And it is really easy to do.

On Mac, open Network Utility, click on the Ping tab, then enter the network address to ping, and click the Ping button. After a few seconds, a report will be generated, and at the top it will output something like this:
Ping has started…

PING outlook-au.office365.com

You could also open a Terminal window and type ping smtp.office365.com and then press Enter. After a few seconds it will start generating output. On the top line will be something like this:
PING outlook-au.office365.com

On Windows, open a Command Prompt window and type ping smtp.office365.com and then press Enter. It will start generating output, and the top line will look something like this:
Pinging outlook-au.office365.com

My particular SMTP server is outlook-au.office365.com. Entering this address as the SMTP server, my full Office365 email address as the username, and password worked when adding my Office365 address to Gmail.

07 April 2017

How to use Pivot Tables in Excel

Excel can be used to conduct some pretty advanced statistical analyses and data visualisations. My favourite, and most commonly used feature is the Pivot Table. The data in a Pivot Table can be restructured very easily and counts, averages and other calculations can be worked out quickly. It is often desirable to enter data from scientific experiments into a Pivot Table so that different conditions can be compared, some conditions or participants or trials can be excluded, and data can be collapsed or combined in a number of ways. But, for all of their usefulness, getting the data in to a format that can be read by a Pivot Table can be time consuming. Some experiment presentation/management programs, such as E-Prime, generate result files for individual participants. In order to generate a Pivot Table report, all data needs to be entered into a single Excel worksheet.

Here are the steps necessary to generate a Pivot Table in Excel:

1. Export the results files into a format that can be imported into Excel
Some experimental software outputs results in plain text format or as .csv files. These can be imported into Excel without any extra work. However, some software outputs results in a proprietary format that must be converted before Excel can read the data.

E-Prime: Open the .edat2 file in E-DataAid, and export to Excel format. For example, you would export participant1.edat2 as participant1.edat2.txt.

Hint: If you have many E-Prime data files, open these in E-Merge and create a merge file containing data for all of the participants. Then open the merge file using E-DataAid and export it to Excel format.

2. Open the text file in ExcelOpen the new .txt files in Excel (you can either select File | Open or drag and drop the file into Excel).

3. Go through the Text Import Wizard

In Step 1, select Delimited and click Next.

In Step 2, check the Tab option from the list of Delimiters and click Finish.

4. Delete Row 1
By default, E-Prime outputs the file path in the first line of the .txt file, which becomes row 1 when you import it into Excel. Delete it. This will cause row 2 to move up. Now row 1 contains your column headings which will become your Pivot Table fields.

5. Create a Pivot Table
Select all active columns. To do this, click on column A (by clicking on the A) and hold down the Shift key and click on the column label of the right most column (mine is HZ). This can be done using the keyboard by pressing Command+Shift+right arrow while column A is selected.

Click on the Insert ribbon and then Pivot Table. When the Create Pivot Table dialog appears, click OK.

6. Build your Pivot Table
Drag the fields that you are interested in into the Rows, Columns or Values areas. Subject/participant normally goes into the Rows area. The measures of interest (e.g., accuracy or reaction time data) usually go into Values.

When you first drag a field into Values, Excel will show you the count of how many data points there are. Click on the "i" next to the field within the Values area to show the Pivot Table Field window.

This gives you options to calculate the sum, average, maximum, minimum, standard deviation and so on. For experimental data, most of the time, we are interested in averages.

Spend time playing around with the fields in the Pivot Table Builder. You can explore your data in powerful ways, such as by isolating particular subjects, conditions, or cases.

Clicking on the inverted triangle next to Row Labels brings up the Row window which permits you to sort the rows, add filters, and exclude individual cases. This can be handy for exploring potential outliers (when looking at subjects), or examining performance for particular conditions or stimulus tokens.

Pivot Tables are great tools for exploring your data. They offer a degree of flexibility that is unmatched. They are very useful for answering "What happens if..." questions, and the calculations can be done very quickly.

25 January 2017

Zotero minimalist referencing style for grant applications

I use a custom Zotero referencing style when writing grant applications. It is designed to save space, and uses the following features:

  • In-text citations are denoted by superscript numerals
  • Reference list has single line spacing
  • No journal article titles
  • Journal names are abbreviated
  • No journal issue numbers
  • ≥ 3 author names are listed as "et al."

After each reference, I have inserted two forward slashes to demarcate separate references. I have also bolded the numeral that precedes each reference.

Once the reference list has been created, you may delete the carriage returns so that each reference does not take a new line.

My grant writing Zotero referencing style can be downloaded here.

19 December 2016

Calculate age in years (and months) in Excel

It is often desirable to calculate a person's age from their date of birth relative to some other date (e.g., the date when they completed some test). This is pretty easy to do in Excel.

Calculating age in years
The simplest way to do this is using the following formula


where start_date is the cell containing the person's date of birth.

Using the above formula for someone with a D.O.B. of 20/3/1990 who was tested on 19/9/2016 will return the value 26.5017238, which may be reduced to fewer decimal points if so desired.

Calculating age in years and months
To calculate age in years and months, rather than using a decimal point, use the following formula

=concatenate(datedif(start_date,end_date,"Y"," years, ",datedif(start_date,end_date,"YM")," months")

Using this formula will return the value 26 years, 5 months. This formula can be modified to return other commonly used formats such as 26;5.

11 June 2015

How to set up Tweetbot iCloud sync across iOS and OS X

Tapbots recently released their much anticipated v.2 update for their Mac OS X Yosemite version of their Twitter client, Tweetbot. One of the most touted features is the ability to sync timeline position across devices using iCloud. However, a quick Google search reveals that many people are experiencing issues with getting iCloud sync to work. Some of the more detailed guides I came across are:

How To Get Tweetbot to Sync to iCloud on iPhone (Fix) via Apptactics

Tweetbot and that f*cking iCloud sync via Coupaman's New Digs

Unfortunately, neither of the above guides solved my iCloud timeline sync issues. In the end, the thing that fixed the problem was signing out of iCloud on my iPhone and then signing back in.


1. In iOS, tap Settings, then iCloud.

2. Scroll down to the bottom and tap Sign Out, and then confirm when prompted.

3. Sign back in to iCloud.

That's what did it for me. I hope that this is helpful for those who are experiencing similar issues.

09 December 2014

How to fix the no sound issue on a MacBook

I have been experiencing some sound output issues on my MacBook Air recently, and a quick Google search revealed that many people have been experiencing the same problem. Here is a short description of the the problem and my solution.

What's the problem?
I like to use ear phones with my MacBook. The sound works fine when I first boot up, however, if I am away from the computer and it goes to sleep (e.g., during lunch), the volume icon is greyed out when I wake the computer. The sound does not work and I cannot adjust the volume. Very annoying.

Sound is affected on a system-wide level. This is not restricted to a single app. Rebooting the computer resolves the issue, but this is not something I want to be doing all the time. Other users recommend flushing PRAM and doing all sorts of weird things in the Terminal that I don't want to be part of my regular workflow. Ideally, I'd like to do something once that fixes the problem for good.

The solution
When the volume icon is greyed out, click System Preferences | Sound | Output and select Headphone port as your device for sound output. That's it.

And there you have it. A simple solution to a persistent and complex problem.

30 October 2013

How to disable Protected View and Enable Editing button in Office 2010

A very annoying feature in Office 2010 is the requirement to click Enable Editing when documents are opened in Protected View from 'untrusted sources'. It raises so many false alarms that it is ignored by most users and therefore fails to achieve the very thing that it was designed to do, namely security. Here is how to turn it off:

Click File | Options | Trust Center | Trust Center Settings... | Protected View, which will bring you to this

click for larger view

Uncheck Enable Protected View for files originating from the Internet, and then click OK.

You will have to do this in Word, then again in Excel etc. to get it to work in each Office app.

31 May 2013

How I handle many projects at the same time

A colleague recently contacted me asking if I could recommend a particular project management software. Here is the question:

Hi Mark, hope all is going well for you in HK. Just wondering if you have tried a project management software? I have so many facets running in my project I need to create something that tracks each aspect. Something that I can share with others would be good. Thought you might have needed something similar?

There are literally thousands of articles devoted to project and productivity systems and apps. This post provides a brief overview of how I work, because the system is designed in such a way that I always know where everything is and what is or isn't up to date for each project.

I keep all of my work within Cloudstor, which is an Australian-based Dropbox alternative for academics. So when I backup that folder, I know that I've got everything. Having moved around the world a few times, trust me it makes a big difference to know that you've got everything after backing up a single folder. Within that folder are the following folders: Comments, Conferences, Employment, Ethics, Experiments, Grants, Papers, Payments, PDFLibrary, Presentations, Reviewing, Software, Supervision, Teaching. There are some others, but those are the main ones. Let's take the two most important as examples: Experiments and Papers. Within Experiments there is a subfolder for each of my research projects. For example, I have a project in which we teach older adults a second language, and it lives in a subfolder called L2AGE. Within that folder are the experiment files and stimuli, and for each project I usually have 2-3 subfolders:
1. I always have a folder called ~archive which stays at the top and contains any old files - I never ever ever delete anything.
2. I have a folder called Results which contains all data and an Excel sheet with the processed data and figures etc. Once data goes into the excel sheet, I usually archive the raw experiment files.
3. For some projects I will have an additional folder called StimDev which contains the files that I used to develop the stimuli and some notes about how I did it which will eventually go in the method section of the paper.

That brings me to writing up papers. I have a folder called Papers in the top level Cloudstor folder, and within it is a subfolder for each paper that I am writing, the names of which usually correspond to the studies in the Experiments folder, but not always (e.g., there might be an L2AGE folder in the Papers folder too). Within that there will be different versions of the paper, e.g., "L2AGE 01ma.doc", where L2AGE is the name of the paper, 01 is the first draft, and ma are my initials. So, if I send it to a coauthor and I get her comments, I will mark that version L2AGE 02xx (where xx are her initials), and then work on L2AGE 03ma and so on. As a general guide, I end up with about 15-25 versions of a paper before it is published. Once it is in press, I move the folder to /Papers/~archive/.

In terms of gathering references for each paper, I use a reference software called Zotero. For each project, I have a folder in Zotero, e.g., L2AGE, and when you click on it, only the relevant references are displayed. This makes adding references in Word easy, or generating a bibliography for somebody else easy as well.

I have a notebook that I take with me to all meetings. I write the name of the meeting and the date and take notes that I will need to remember in future. These include quick jobs and tasks as well as longer term plans and goals. My note taking ability is one of my strengths, I think because I try to include context and information so that I will remember what the note was about even in a year's time when I have forgotten what the meeting was about.

I use Things to track the progress of each project and to manage my daily tasks. I use Things both on my Mac and iPhone. The best thing about Things is that it captures all of the tasks that I need to complete and gets them out of my head. These can be small things such as sending an email, or big things like overseeing a project or preparing a grant application. Things has the ability to set due dates for tasks, but equally crucial is the ability to set start dates so that tasks are brought to your attention before they are due. I have found this to be a very productive setup for staying on top of a large number of projects and responsibilities that constantly compete for my attention.