Hiltmon

On walkabout in life and technology

Priming the Pump

When it comes to stocks, priming the pump works like this:

  1. Release a very negative article on a stock, citing rumors and anonymous sources (none of which is verifiable).
  2. Wait for the stock price to drop because your readers trust your credibility.
  3. Buy loads of the stock cheaply at the new lower price.
  4. Wait for the next earnings report to prove you wrong (which you knew already).
  5. Profit.

Despicable. Yet legal.

It’s a practice you expect from shady web sites like Business Insider. But not from professional news organizations like the New York Times, Washington Post or Wall Street Journal.

Today in “Apple Cuts Orders for iPhone Parts” (I refuse to link this), the Wall Street Journal just primed the pump on AAPL. The WSJ knows that “channel checks”, where analysts ask the suppliers of a company what order levels are like, are extremely unreliable. Manufacturing is seasonal, starting stock levels are unknown, future needs are unknown and most big companies have multiple supply channels.

But no, WSJ went there today. They know the next Apple earnings report is coming up on January 23, 2013. They know that both AT&T and Verizon have reported blockbuster sales of iPhones in the USA, both Japan and China are nuts for Apple products, and Apple has reported insane volumes of app sales over the last quarter. They know that Apple’s earnings are going to be the best ever.

But the WSJ primed the pump today and pushed Apple’s shares below $500 in pre-market trading. We can only trust that the market is smart enough to ignore this despicable behavior (AAPL is down at the open, but above $500).

So shame on the WSJ for priming the pump. You’re better than that!

Update: Looks like Nikkei and Reuters are also reporting this. Both imply that the change is in response to weaker demand (which is the author’s opinion and is not supported by facts). Both also mention the source is only one company, Sharp, and yet they both forget to mention that Apple also sources its displays from Samsung and others.

Update 2: Turns out, WSJ had some pretty horrendous made-up numbers in the article, but removed them some time this morning, leaving just the anonymous sources. Unable to find a link to those either.

Update 3: Jim Dalrymple points out Apple can’t respond to rumors of iPhone 5 cuts even if it wanted to because of a mandated SEC quiet period leading up to the earnings call. Something WSJ also knows, and they still published! That’s even more despicable.

Follow the author as @hiltmon on Twitter or @hiltmon on App.Net.

Workable Social Network Connection Heuristics

I’m not sure how other people decide these things, but I have created my own heuristics as to whom I connect with on different social networks. In case you wish to blame me for your decisions — you’re welcome — here they are:

  • Family and Friends: These are blood relatives, friends I see socially on a regular basis, and old friends from way back — basically the people who accept me for who I am and I can share my more embarrassing and private moments with. Since our relationship is personal, I use these social networks for personal interaction, for staying in touch with a global group and I maximize the privacy settings. For personal, find me on:
    • Facebook
    • Foursquare
  • Professional Relationships: If we have ever met face to face, or had a phone conversation related to work (or you are family or friend), then I am happy to interact with you on a more professional social network where I limit my personal exuberance, and just conduct some business. Lets connect on:
    • LinkedIn
    • Skype
    • Instant Messaging
  • Internet Friends: If either of us follow each-other on a popular social network, or we connect via email, comments or this web site, I’d love to connect with you on public social networks. I maintain my public persona there (and leak some of my personal tastes and quirks), am not afraid to express myself, but try to remain polite, humorous, responsive and not too chatty. So lets connect on:

But, like all of us, there are some people I prefer not to connect with on any social network. For that, there is always email. I do not hide my email addresses (see the About page), and prefer work email to Noverse, personal emails at gmail and public emails at hiltmon.com (but not to all three, see Email Etiquette). I do enjoy receiving emails from anyone, even PR folks, recruiters I know and mailing lists I signed up for. I believe you cannot go wrong contacting me via email, it works great. And when it comes for me to reach out, I prefer to email or tweet first.

I have no patience, however, for spammers, bots, or people who invite me to join annoying games via social networks, they just get muted and nuked.

As for social networks not mentioned above, I am probably on them as I tend to sign up and try everything. But, I tend to ignore them, and have already turned off all mail notifications so I will never see if you do try to connect with me.

I’m not sure these heuristics will work for you and your network. I choose to use Facebook for close friends, LinkedIn for work and love using Twitter and App.Net to connect with everybody. And if in doubt, there is always email.

Follow the author as @hiltmon on Twitter or @hiltmon on App.Net.

Ruby Tempfile Aggressive Unlink

I often use Ruby’s Tempfile class when generating files in Rails for download. But something went wrong in the Rails 3.2.11 update.

Here is the code I normally use (as per the Tempfile documentation):

1
2
3
4
5
6
7
8
9
10
11
...
begin
  temp = Tempfile.new(temp-file-name.xlsx)
  report = ReportClass.new(temp.path, params)
  report.generate
  send_file temp.path, :filename => #{user_file_name}.xlsx", :type => "application/xlsx"
ensure
  temp.close
  temp.unlink
end
...

In short, create a temp file, stream the data to it in the report class, then send the file to the user. Ensure the file is closed and deleted after. Prior to Rails 3.2.11, this worked fine.

The problem after the 3.2.11 update is that the temp.unlink was happening before the file got sent (or maybe while it was being sent), leading to blank or corrupted files.

It turns out, the temp.unlink is not necessary any more. As long as you close a Tempfile using temp.close, Ruby’s Garbage Collector will delete the file for you, once it no longer needs it. Which means that the send_file will have a file available to send. I monitored my temp folder and it does indeed do this.

So, remove the temp.unlink line in Rails 3.2.11 projects, and ignore the documentation. You can now generate and send files from Rails again.

Follow the author as @hiltmon on Twitter or @hiltmon on App.Net.

Reprogramming My Brace Style Mind

Each and every programmer has their own style of coding, their own preferences for how code should look, and are generally happy to argue the case for their preference. Somehow these discussions became heated, and the most fights happen over spaces vs tabs (See Tabs versus Spaces: An Eternal Holy War. and Death to the Space Infidels!), the 80 column rule (See In defense of the 80-column rule) and brace indent style.

Recently, I have had to change my choices, they were wrong. But a bit of history first.

The 1980’s/1990’s Compact Style

When I started programming, we use tab characters because it kept files smaller, limited code to 80-columns because we had to print out code a lot on 80-column dot-matrix printers and we followed Kernighan and Ritchie’s original C Programming Language book’s convention of braces on the same line. Code looked like this:

1
2
3
4
5
6
7
8
9
int main(int argc, char *argv[]) {
        int a = rand() % 100;
        if (a > 25) {
                call_a_function();
                call_another_function();
        } else {
                call_b_function();
        } // end if
} // end main

This style worked. Tabs in those days were always 8 stops wide, which meant that you could not indent much before slamming into the 80-column limit, forcing you create lots of smaller functions, a good thing. And braces on the same line meant more code would appear printed on each page.

But there were some bad things too. We started using shorter variable names to gain additional indent levels within files, making the code harder to read and maintain. We did not put any whitespace between lines of code to cram more on the printed page, making the start and end of blocks harder to find (and so we would comment block ends so we’d know what they were). And we lost a lot of limited coding space because the indents were so wide.

2000’s Expansive Style

In the 2000’s, we all seemed to switch to Microsoft’s C and C# conventions, namely 4 spaces instead of tabs, unlimited line length and all braces on their own lines, like so:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
int main(int argc, char *argv[])
{
    int a = rand() % 100;
  
    if (a > 25)
    {
        call_a_function();
        call_another_function();
    }
    else
    {
        call_b_function();
    }
}

Spaces for indents meant we did not have to deal with different editors’ tab sizes (or their fickle users’ preferences). And since we had stopped printing code, we could focus on trying to make it more readable using white space, longer variable names and braces on blank lines to make our blocks stand out (so we could see the start and end of block by matching columns).

But that too led to problems. With unlimited line lengths (and larger screens), we no longer felt the need to limit the number of indents in a function and started to create larger monolithic functions. And since editors at that time did not wrap code very well, programmers would often find themselves unable to see the code on the left while horizontally scrolled and working on the end of a long line to the right. Code became harder to read, and side-by-side comparisons became impossible.

So in the early-2000’s, I chose my side in these arguments: I agreed with 4 spaces because it took editors out of the equation, kept the 80-column rule to force-limit indenting and changed to braces on their own lines to improve readability.

I stuck with it, argued it like all geeks do, and thought I’d never change.

2010’s Canonical Style

Until now. Or really until I started using Xcode 4’s intelligence and snippets.

You see, Xcode defaults to 4 space indents, so that stays the same. I think it handles limited line lengths rather well with intelligent wrapping, which means the scroll to the right issue and the 2-up issues are resolved. But it started to drive me nuts that it’s default brace style in snippets seemed inconsistent. Sometimes braces would be on the same line and sometimes on their own. What? No! I need consistency.

Take the default initWithNibName code snippet:

1
2
3
4
5
6
7
8
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.title = NSLocalizedString(@"Detail", @"Detail");
    }
    return self;
}

The function block braces are on their own line, ala 2000’s C#, but the if block braces are not, ala 1990’s C style. Surely this is a royal screw-up! From Apple! The style gurus!

It turns out that no, it’s not a screwup, the hybrid brace style that they are using is the original Kernighan and Ritchie style which was messed up in the early printings of the C book to save space. The brace style rules, as per K&R are:

When adhering to K&R, each function has its opening brace at the next line on the same indentation level as its header, the statements within the braces are indented, and the closing brace at the end is on the same indentation level as the header of the function at a line of its own. The blocks inside a function, however, have their opening braces at the same line as their respective control statements; closing braces remain in a line of their own, unless followed by an else or while keyword.

It turns out, that this true K&R style is the canonical form for braces for all C derivative languages, including C++, C# and Objective-C. That’s from the designers of the languages themselves.

Guess I’ve been doing it wrong and arguing it wrong all these years.

So I have changed my brace style mind. I am still a 4 space man. I still run a 80-column page guide, and try to keep within it, but now rely more on the editor to smart-wrap long lines. But I now adhere to the true K&R brace style:

1
2
3
4
5
6
7
8
9
10
11
int main(int argc, char *argv[])
{
    int a = rand() % 100;
      
    if (a > 25) {
        call_a_function();
        call_another_function();
    } else {
        call_b_function();
    }
}

I’m still getting used to it.

Follow the author as @hiltmon on Twitter or @hiltmon on App.Net.

The Entirety of Information

I possess a device in my pocket that is capable of accessing the entirety of information known to man.

I use it to look at pictures of cats and get in arguments with strangers.

In answer to:

If someone from the 1950s suddenly appeared today, what would be the most difficult thing to explain to them about life today?

Source: @Bill_Gross

Assembly Notes

Assembly Notes are documentation that a programmer creates to record all the steps they go through when crafting an application, setting up a new server or configuring a new device. The idea is to log all the things they do and all the commands they type in so that they can reproduce the process again later. Assembly Notes are personal or project internal, not shared.

I started writing these when I launched Noverse, and use them on all projects. I have notes for each step I performed when creating each application, more notes for how all servers are set up and configured and even notes on how the development environments are set up. In my case, I break these up into weekly files by project, store them in my standard project folder’s Notes folder and use these logs as the source when reporting progress to clients as well.

By noting everything, you miss nothing. And you have a script to reproduce what you did.

Assembly notes are different to to-do’s (although they often contain to-do notes). It is a record of what was tried, what was done, what worked, what did not, and how it all can be reproduced.

Project Assembly Notes

Here is a sample of the top of one of my Assembly Notes for Kifu (scroll down as it’s quite long):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Title:    Kifu Assembly Notes  
Subtitle: Week 38 (Week 45 of Project)  
Author: Hilton Lipschitz  
Affiliation: Noverse LLC  
Web:    http://www.noverse.com  
Date:   March 2, 2012  

# Optimization 

Now that we have a large dataset, need to speed things up. Running performance stats to find the bottlenecks.

BRANCH: optimize-1

- Add TEST to project so I can run benchmarks and profile tests

Here goes

    rails generate performance_test aging_by_event_summary
    
And added the `DevelopmentProfiler` class

Use as

    DevelopmentProfiler::prof("<profile_file_name>") do
      # CODE TO PROFILE
    end
    
## Improvements

Start @36.02

- `aging_by_event_summary`/0.4s: Fewer billings calls and assed `this_bill_` variants
- `aging_by_account_detail`/2.0s: No include phones and emails in query (this will slow down the collections report)
- `import`
    - No validations after saving an allocation /2.0s
    - No validations on creating an attending/1.0s
    - No validations on others/0.8s
    - Move some observers into classes/0.06s @27.31
    - Move more into classes/0.16s @27.15
    - Move more into classes/-.--s @26.44
    - Move all into classes/-.--s @26.20

## TODO

- ✓ Use `this_bill_` variant when getting `Billing` outstanding, payable or allocated
- ☐ `aging_by_account_detail` PDF is 62 seconds after changes (all in the PRAWN module!)

## More

- Fix billing messages
- BUG in parse_date on Event -> all observers need a self tag

- Cleaned up models, removed old observers
- Starting on Controllers

MERGE: develop

## Rename things

BRANCH: rename-1

- ✓ Rename review account and make it more RESTful
- ✓ Rename roll event
- ☐ Rename billings

IN VIEWS:

- ✓ Disable editing on closed events
- ☐ Sort events and some sub-tables in review

About these notes:

  • They are written as Markdown files (using MultiMarkdown extensions).
  • I have BBEdit running all the time with the current project and week’s Assembly Notes file open.
  • I use Markdown Metadata headers to record the project, week and date of the notes (always a Friday).
  • I often copy and paste command lines in to record what was used. And sometimes the data and output too.
  • I usually log the branch name in case I need to go back.
  • I use TextExpander shortcuts to create the unchecked ☐ and checked ✓ marks against to-do notes. I often create a plan, note it, then check each item off as I go. These are tactical plans, what I want to achieve in the next few hours.
  • I write release notes in here too, then copy and paste them out into the application and release emails.

Server Build Notes

Here is an except from another project’s Server Build Notes:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
## Step 3 - Postgres

As per `http://yum.postgresql.org/howtoyum.php`, edit the repo to exclude their postgres builds.

  cd /etc/yum.repos.d
  
And edit the file appending `exclude=postgresql*` to _[base]_ and _[updates]_

Download the RPM from the above link

On local, from _downloads_

  scp -p pgdg-centos91-9.1-4.noarch.rpm root@client.com:/root/
  
On server

  rpm -i pgdg-centos91-9.1-4.noarch.rpm
  
  yum install postgresql-libs
  yum install postgresql postgresql-server
  
  service postgresql-9.1 initdb
  
NOTE: No need to add IP access as its local only. This will change when we move it to another server.

  service postgresql-9.1 start
  chkconfig --level 345 postgresql-9.1 on
  
  su - postgres
  createuser noverse
  createdb -O noverse reportingdb_production
  
In `/var/lib/pgsql/9.1/data/pg_hba.conf` replace _ident_ with _trust_. 
  
Test after restart to make _trust_ work (as root)

  service postgresql-9.1 stop
  service postgresql-9.1 start
  psql -d reportingdb_production -U noverse

Database is UP!

## Step 4 - Web

### Ruby 1.9.3

On server, as root

  yum install openssl-devel zlib-devel gcc gcc-c++ make autoconf readline-devel curl-devel expat-devel gettext-devel
  
Download [Ruby 1.9.3-p194](http://www.ruby-lang.org/en/downloads/)

On local

  scp -p ruby-1.9.3-p194.tar root@client.com:/root/
  
On server

Install libyaml as per [http://collectiveidea.com/blog/archives/2011/10/31/install-ruby-193-with-libyaml-on-centos/]()

  wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
  tar -C /tmp -xzvf yaml-0.1.4.tar.gz
  cd /tmp/yaml-0.1.4
  ./configure --prefix=/usr
  make
  make install

Make ruby 

    cd
  tar -C /tmp -xvf ruby-1.9.3-p194.tar
  cd /tmp/ruby-1.9.3-p194/
  ./configure --enable-shared --enable-pthread --prefix=/usr
  make -j4
  make install
  
Test
  
  ruby --version
  gem --version
      
OK

On build notes:

  • I include all dependencies and their installation commands.
  • I include all version numbers so I can ‘clone’ the server easily and get the same environment back.
  • I explain all decisions, even ones that will change later.
  • I include tests to ensure the component works.

Benefits

One gets a lot of benefit from these including:

  • The ability to build a new server quickly as you have a working script to follow.
  • The ability to report clearly to clients all the work done in a period.
  • The ability to go back and see why certain decisions were made.
  • The ability to go back and see how things were done, so you can do them again better.
  • Documentation on how things were done in other projects so you spend less time doing them in this project.

Tips and Tricks

I use a lot of snippets to make these. The Assembly Note header is a TextExpander snippet ;mma that uses fill-ins and a form as follows:

1
2
3
4
5
6
7
Title:          %filltext:name=Project:default=Kifu% Assembly Notes  
Subtitle:       Week %filltext:default=2:width=10% of Project  
Project:        %filltext:name=Project:default=Kifu%  
Author:         Hilton Lipschitz  
Affiliation:    Noverse LLC  
Web:            http://www.noverse.com  
Date:           %B %e, %Y  

Which gives:

I also use a TextExpander snippet to break it up into days ;mmd:

1
2
3
---

**%A %B %e, %Y**

Which gives me:

1
2
3
---

**Thursday January 3, 2013**

Finally, I track who reported what using a set of key marks (also TextExpander snippets), and use them in release notes:

  • β/HL - ;bm : Bug Mark (Bug reported by HL)
  • ⨍/HL - ;fm : Feature Mark
  • ‽/HL - ;im : Inquiry Mark (when doing research to answer an inquiry)
  • ∁/HL - ;om : Other Mark (when doing other work for the client or their users)

It Just Takes Discipline

Creating Assembly Notes and keeping them up to date requires discipline and habit. I habitually open BBEdit and the current project’s Assembly Notes file when I start on a task, just as I habitually kick off the Billings Pro timer. And I am disciplined enough to use the open notes file to record what I want to get done, paste any notes and thoughts and check them off as I work. It did take a while to get used to working this way, but the benefits of having these process scripts lying around are just too great.

Try creating Assembly Notes from now on, one file a week, and ensure you ALT-TAB to this file when you are between tasks, or thinking or planning or running commands and write what you do. Before you know it, it will become habit and you will have an excellent log to work with.

Follow the author as @hiltmon on Twitter or @hiltmon on App.Net.

1GHz Titanium PowerBook

It was about this time 10 years ago that I purchased my precious, a 1GHz Titanium Powerbook from a back street store in Akihabara (Electric Town) in Tokyo, Japan. I bought it based on a single viewing of another PowerBook because it ran UNIX with a GUI. Oh and it was thin and fast and beautiful.

It surely is the best device I ever owned.

I had been a Mac user in the early 1990’s, but, like most, I moved over to Windows for work. The Mac hardware had been falling behind, the operating system was sluggish, and the Dell/Microsoft combination was cheap and cheerful and necessary.

But by 2002, the Dells were just awful, plasticky and slow. And as a UNIX-head, Windows had driven me insane. I was running early Linux distributions on the Dell instead, dual booting for needed Office and other work applications. And I hated it.

And then I got this TIBook. OS X 10.2, and soon after 10.3. A lickable GUI. It ran Microsoft Office so I could work on it. I purchased all the Macromedia tools so I could create graphics and web sites on it. And it was UNIX. I could program on it, design on it, write on it, work on it and play on it. It was perfect, an all-in-one.

The 15" screen was crisp and bright, and still is 10 years later. The computer’s performance was (and still is) amazing, a 1GHz PowerPC was a killer back then, and I had loaded it up with 1GB of RAM which gave loads of overhead before swapping. The audio from the two speakers was excellent and not tinny at all. And maybe the best feature was the keyboard, well sized, properly laid out, springy, no rattles with great keycaps and press depth. This old keyboard is so much better than the newer “chicklet” keyboard on the MacBook Pro.

It was not all perfect. The IO ports were at the back and covered with a back flap. Not a problem really, unless you were using the ethernet plug. You had to rotate the entire laptop, open the flap to insert the cable. So far so good. But try, just try to get it out again. The top lock tab on the RJ45 plug was jammed into the socket as it should be, but could not be reached by normal human fingers because the display hinge was jutting out directly above it. You needed a pen to reach in and push the lock tab down to unplug.

This TIBook was in daily use for six and a half years. Very few laptops make it to three. And it kept on getting faster and better as Apple improved OS X up to 10.5 which I am running on it right now. And when I pulled it out of storage today, it booted up first time. The battery is toast, but the TIBook is still fast, still very useable, still the best. I am even writing this post on it.

What I find interesting is that you can see the evolutionary design of the modern MacBook Pro in this TIBook. The keyboard layout has not changed much, the power button, speakers and trackpad are all in the same place. Metallic color and black keyboards has become the norm for laptops. But the hinge and bezel has changed, as has the location of the CD and ports. Clearly though, the newer MacBook Pro is an evolution of this TIBook.

I enjoy the mid-2009 MacBook Pro that I now use daily, but I love this TIBook. It was far ahead of its time, both in hardware and software. To the Apple designers and engineers all those years ago who made this, I thank you.

Mind Hacks

A lot of people, including myself, talk a lot about organization, productivity and life hacks that make things run better for us, and share it with others. But on a more personal note, some of us also need additional hacks just to function normally in normal situations.

I call these mind-hacks, tricks that enable people like me to function and get through the day. Without them, our minds just spin off in a hundred directions and we get nothing done.

You see, my brain operates in the same way as Dr Who, namely it is all over the place, “a big ball of wibbly wobbly… timey wimey… stuff”. I’m too old to know what ADHD is, means or stands for, and I’m too distracted to get properly diagnosed.

It’s not that I can’t focus my mind, its just that it takes some serious effort for me to do so. And then it takes even more effort to stay focussed.

So in order to get through school, university, work, social situations and other “normal” life activities without drifting off into space or spinning off in a hundred directions, I needed mind-hacks, mind-tricks that would enable me to function “normally” in these situations.

Simple mind-hacks

Mind-hacks can be simple to the big nasty, focus, which I’ll get to next. For example, some that I use:

  • Ensuring I say the name of a person I just met for the first ten or so sentences I utter to them. “Hello, Michael. Nice to meet you, Michael. That’s a nice watch, Michael.” It forces me to engage with people, to focus on the conversation with them and try to remember their names and something about them. I still fail at this if I meet more than three people at the same time.
  • Asking three questions when presented with a problem to be solved instead of spinning out a bunch of solutions. That simple mind-hack happened after training myself to wait until a person actually stopped talking (one I still struggle with). By forcing myself to ask three good questions before continuing the conversation, I focus my mind on the problem and in clarifying it versus racing off to solve my many interpretations thereof.
  • Training myself to ignore distractions in the real world. In past jobs, I was a programmer on a trading floor, one of the noisiest, distraction filled bear-pit environments of all time. Tuning out the phones, TV news, yelling, people jumping up and down was hard work, it even stretched my focus mind-hacks to the limit. These days I can still work with the TV on and people around, but music still distracts me.
  • Forcing myself to stop working or studying at a certain time, to spin down. To “turn off” by watching mindless TV or reading pulp sci-fi novels. If left alone when my mind is spinning, I just keep going. I don’t get hungry and I don’t notice when I get tired. If I don’t spin down, it becomes hard to rest and function the next day. So I forced myself to stop studying at 8PM every night before exams and watch TV, enabling my brain to process short term learning memories into long term knowledge that would be available the next day, and I would be rested and able to function at the test.
  • Creating to-do lists so I do not forget to do that which I promise. With a wobbly mind, it is easy to forget what you need to do, when it needs to be done, so the first mind-hack was to remember to write to-do’s down. The second mind-hack was to go back and actually read the to-do list. The key to this mind-hack is to create good habits that do not rely on fickle memory. I started with a chores list pinned to a cork-board, moving the daily pin each day after doing the chores, and evolved it to a weekly rewritten to-do list in an omnipresent notebook. To this day, I still get surprised to find to-do items magically appearing in these lists even though I know I am the only one who could have added them. But it does mean that I am usually good at coming through when I promise to do things now.

Mind-hacking focus

But the biggest mind-hack of them all was mind-hacking focus. I needed to mind-hack an ability to do one thing at a time and to stay the course to get that one thing done. School classes were too long and boring, conversations took too long to get to the point, games took too much time to play, new toys became old within minutes, it was easier and more fun to look out the window, let the mind spin up and drift away. In contrast, my younger brother could spend hours and hours doing the same thing. For pre-mind-hack me, that was weird.

Luckily for me, I realized early that it was my lack of focus that was hurting me, whether with grades or people. And that it was my brother’s ability to focus and keep doing the thing he was doing that made life easier and better for him. I also, luckily, figured out early that if I did not do anything about it, I would never get through school or have friends or be “normal”.

So I started to find ways to find focus. This was before medication and shrinks. I tried forcing myself to do things I did not like, but that did not last, it was not enjoyable at all. I tried to find better ways to get things done, but that just encouraged the mind to spin, and nothing got done.

Finally I tried to trick (or hack) myself, by inventing goals and rewards, and turning each thing into an adventure. It started by setting small, yet unachievable at the time, goals like “do all the maths homework before doing something else”, or “listen to the whole song to the very end”, or “play to the end of the current level of the game”, or “build a larger component of a model”.

The adventure part was to let the mind spin on what the end would look like versus what it turned out to be. The trick part was that achieving the set goal in a single sitting was the actual goal.

But it was not enough, the goals were boring and the adventures repetitive. So I expanded the trick to seeking reward from the enforced focus, like better grades in the next test, higher scores in the next game, having longer conversations or fewer missing pieces at the end of a model build. Or, most importantly, getting noticed by people that something I should have gotten done and previously ignored, actually did get done. I think it was the external rewards, grades and recognition, that made this mind-hack stick.

The personal goals and rewards mind-hack got focus started, I could finally focus on something long enough to get it done. But it still was not enough. Some things were improving, some not. And then I figured that the how things got done could be just as important as the what got done. So instead of “finish the maths homework”, it became “finish the maths homework correctly”. I added accuracy and correctness to the goals of the focussed task, forcing myself to extend the focus time to do things right, not just quickly. As a result, the external rewards got bigger and better, so this mind-hack got even better.

These days, I’m still as all over the place as ever, but the years of mind-hacking focus have enabled me to achieve professionally and be moderately successful. I got through school and university by hacking focus, and did well enough to get a good job. I kept jobs and got better jobs through achievements by hacking focus. I still design and program by hacking focus. I could even write the first draft of this post in a single sitting by hacking focus.

I have no idea whether other people function “normally” because it is natural to them, or if they are like me and needed conscious continuous mind-hacks to do the same. I just know that without these mind-hacks, there is no way I’d be sitting in my own home office with a wonderful wife and great friends running my own business developing amazing software in New York. I’d be sitting alone in a corner staring blankly out a window, mind spinning.

Be Organized and Productive

The theme of 2012 was all about getting organized and productive using software. I may have spent 2012 developing Kifu and some internal applications for clients, but I spent a lot of time this year getting better organized and more productive on my Mac. It’s ridiculous how much this has paid off.

So, instead of a cool-products-of-2012-year-in-review post, here are many of the things I do and tools I use to be organized and productive, with thanks to those to shared the ideas with us. Maybe these ideas, tools and folks can help you too.

Getting Organized

To me, being organized is for everything to have its place and for it to be easily found in that place.

  • All todo’s in OmniFocus: I have been using OmniFocus since it came out on all my devices. This year I reinvented how I use it twice, and I am still working on improving it. Everything I need to do goes in to OmniFocus, everything, an action, a reminder, a bill, a software feature. With a single F11 keystroke, I get the quick entry box from anywhere to capture a new to do.
  • All time in Billings Pro: Every minute I spend working on anything gets tracked in Billings, even my own personal project work. It gives me a great baseline for estimating future work, as well as tracking and billing real client work.
  • All projects in standard folders: All current projects are now organized in my Project Folder Layout so it’s easy to navigate to files when needed, easy to know where to find files and easy to know where to save them.
  • All text documents are in Markdown: All contracts, reports, notes, documentation, knowledge base articles, blog posts, anything that gets written on all my devices is in Markdown (actually MultiMarkdown) format. It’s plan text, cross platform, very searchable, extremely readable and ubiquitous. See The Markdown Mindset.
  • Project reference data is in VoodooPad: All contacts (client and third party), IP addresses, server names, logins, passwords, and other project level information are stored in a single VoodooPad document in the project root. I no longer struggle to come back to projects and figure out who to call and how to get things done.
  • All non-project notes are in nvAlt: Any other non-project related notes, call logs, ideas, and scratchings are edited in BBEdit and stored in nvAlt’s folder in Markdown files, shared using Dropbox, using standard file names. I can find a note using nvAlt’s built-in search quicker than anything. And I can edit notes on any device seamlessly.
  • All bills are electronically filed and named: I have moved to paperless billing everywhere and file all bills in their correct folders using Hazel. The filer also creates a to do in OmniFocus so I never forget to pay a bill.
  • All passwords are strong and in 1Password: I moved from a single simple password for all sites and applications to unique strong passwords for each, easily accessible using shortcuts from 1Password. Safer too, and synced via Dropbox.
  • All social interaction logged in Day One: Using SLogger I capture all my tweets, posts, instagrams, facebooks, web stats and stock prices into Day One. It’s a live journal of what happened every day, without me having to write it.
  • All source code in GitHub: I moved all source code from svn to git this year, and back it up on GitHub in private and public repositories. And I am in the habit of git push origin all the time in case things go wrong.
  • The big backup to Backblaze: I took backup to the next level this year moving beyond Time Machine and manual disk clones to an offsite backup using Backblaze. It just works.
  • Key files are saved and replicated using Dropbox: My notes, passwords, journal, BBEdit settings, and key encrypted files are all kept in Dropbox folders for anywhere access. It’s the first application I install on any new device, followed by 1Password.
  • Key processes and big data are now on the Server: I have an old Mac Pro running OS X Server, hosting SLogger, my production server backups, old files, and all my music, photos and videos on RAID drives, so that they no longer need to be on my Laptop. And I don’t need to leave it running all the time either.

Getting Productive

To me, productivity is all about doing less to get more done.

  • Keystroke based automation using Keyboard Maestro: Keyboard Maestro gives me the ability to do a lot of things with a single keystroke, from launching a set of contextual applications to creating markdown links. The longer I use this, the more macros I create, the faster I work.
  • Background file organization using Hazel: Hazel keeps my desktop clean, files my bills from Downloads, and archives old data. It handles all the maintenance tasks I used to do manually, and without the human error.
  • Typing repetitive text with TextExpander: I must have over a hundred of my own expansions in TextExpander, from terminal commands, file names, email text, symbols, macros to names, numbers and addresses. I save hundreds of keystrokes a day using it.
  • Scripts and Macros for Terminal: Since I have been spending a great deal of time in the UNIX terminal this year, I now have a bunch of scripts and bash functions to speed things up. It’s amazing what you can do when you start writing scripts to automate stuff.
  • One-key todo creation in OmniFocus: F11 and OmniFocus is there. And I now never forget what I need to get done.
  • Quick calendar management using Fantastical: I hide most menu-bar extensions using Bartender, but not Fantastical. I can launch it with a keystroke and start typing the appointment details in plain text. Fantastical magically interprets it and creates the event.
  • Quick launch and search with Alfred: I started using Alfred to just launch apps, the same as I used to do in QuickSilver. But now I also use it to quickly get a Google search, or log in to a site using stored 1Passwords, or search notes using a file filter, or navigate to a file. As a result, my dock is now hidden.
  • Spatial layouts with Moom: I love working spatially, I find myself much more productive if my windows are where I expect them to be. I have set up Moom with keyboard shortcuts to place my windows where they need to be.
  • Automatic file sync using ChronoSync and ChronoAgent: As soon as the desktop computer wakes up, ChronoSync wakes up too and ensures that the files on the Laptop and Desktop are the same. It’s easy for me to switch between them and trust the files are all ready to go when I run out of the office.
  • Better programmer editing with Sublime Text: I started to do more and more programming in Sublime Text 2 this year, its plugins and productivity gains are amazing. However the past few weeks, I have been going back to TextMate 2, it just feels more Mac-like. But Sublime Text 2 runs on all platforms, and so I do not lose anything when jumping over to Windows or Linux to code there.
  • Faster calculations using Soulver: I used to either reach for the HP-12C or launch Excel to perform calculations too complex to be done in the old noggin. Nowadays, unless it’s a single calc, I use Soulver. Yup, even for project estimates.
  • Faster artwork generation using Slicy: I switched to an Adobe Creative Cloud subscription this year so I am back on the latest Photoshop, Illustrator and InDesign, these already improve my productivity. But setting up all my artwork using the right folders in Photoshop and using Slicy to generate the application art files has saved me days of work.

Lesson Learned

It turns out that building the habits to be organized and more productive are easy. In a way, maybe we all have been using computers incorrectly all these years, relying on ourselves to do things that the computer can do perfectly well. It takes no time to get into the habit of starting a timer before working on something, jotting to do’s into OmniFocus, leaving BBEdit running for note taking, and saving files in standard locations with standard names. It takes no time getting used to the shortcuts needed to kick off Keyboard Maestro macros, access things quickly in Alfred, save keystrokes using TextExpander expansions or start trusting Hazel to take care of things.

There is some investment of time and money to get organized and productive, but the payoff is huge. You will get to spend more time focussing on the task at hand and getting it done, offloading interruptions to tools, speeding through automated repetitive processes and letting the computer do some actual work for you. You will quickly get used to having everything available at your fingertips, in the way you need it when you need it. And you’ll free yourself up to spend more time creating or reading or away from the computer without losing any productivity.

Thank You

A lot of these ideas were not my own. This year I started reading and following a lot of very good people who are also into organization and productivity, and who share their ideas freely. So thank you, in no particular order, for inspiring me to:

With special mentions to:

Note: The links above to the App Store are affiliate links, so if you purchase any of these products, I get a few pennies. The rest are direct to the developers home pages or Twitter pages, please support them however you can.

Follow the author as @hiltmon on Twitter or @hiltmon on App.Net.

2012 Year End iPad Essentials

I posted my 2012 iPad Essentials (excluding games) in March this year when the iPad 3 came out. Since then, the iPad 4 and the iPad mini have launched. Surprisingly enough, the early 2012 essentials (excluding games) have changed very little:

New Additions

  • The Magazine - Technically not an app, The Magazine is a brilliant new take on how a magazine should work, with great writing on a wide variety of interesting topics.
  • NetBot - Joins TweetBot at the top of my most popular apps page. I trust you will all join App.Net and follow me there as @hiltmon. I find the level and depth of conversation on App.Net so much better than Twitter.
  • 500px - to show off my very best pictures. Better go out and take some more.
  • Paper by Fifty Three - has become my go-to drawing and scratchpad app, it’s unique take on pens and color is amazing. I find myself spending more time in design just because this app creates such good looking sketches.
  • Tweet Library - to save old tweets that did not make it into DayOne via Slogger.
  • Pinbook - to access my links saved on Pinboard.
  • Diet Coda - for writing code and fixing up static web sites, replacing Textastic.
  • Pythonista - to help me learn Python programming.
  • iStat 2 - To remotely view the performance of my servers.
  • Quotebook - For quickly saving great quotes I find while reading.

Updates

  • Day One - has become more important as I now use Slogger to record daily social network interactions, site stats (my own plugin) and stock prices.
  • 1Password - great makeover of the best password manager in existence.

Old Favorites

  • OmniFocus - for all my to-do and project needs. One of my top-5 must have tools.
  • Reeder - For RSS.
  • Instapaper - for offline reading of saved articles.
  • Soulver - A better calculation tool, using it more and more for project estimation.
  • Elements - (back to it) to view and create notes, and write, replacing Byword.
  • TextExpander - I just wish more apps used its expansions.
  • iBooks - I still read almost everything in the iPad.

Still There

Removals

Note: The links above to the App Store are affiliate links, so if you purchase any of these products, I get a few pennies.

Follow the author as @hiltmon on Twitter or @hiltmon on App.Net.