One-Key Format Presets in Scrivener
I am writing a lot of business documents in Scrivener, and even though it’s the wrong way to do it, I use Scrivener’s format presets (think paragraph styles) to quickly format headings, bulleted lists and paragraphs in each sub-document. This way I minimize post-processing (and the business format is intentionally boring so I do not need any fancy layouts). But it’s a hassle to have to take my hands off the keyboard to click through the Format / Apply Formatting / Apply Preset menu tree or hit the tiny format preset dropdown ¶a to set the current paragraph style.
Merge Asana Projects into OmniFocus (Updated)
A long long time ago in a galaxy far far away, I wrote a script to import Asana tasks into Omnifocus. If you ran it again, it would update the tasks in OmniFocus. See Merge Asana Projects Into OmniFocus. I recently updated the script to work a smidge better with Asana and Omnifocus 2. The main changes are: Date formats can be changed (for those of us not in the USA) The Non-Project tasks now load Setup First, follow the instructions from the original post to set up Omnifocus and get your API keys.
Seeing the Bigger Picture
It is quite astounding to me that an astonishing amount of work is done and code written without any knowledge, view or understanding of the bigger picture. And yet no-one seems to have taken the time to consider just how remarkably ridiculous this common situation is. How can people be expected to perform at their best and create the best products when they have no clue as to what the big picture or goal is?
Eliminating Google Analytics Referral Spam
It seems that the Google Analytics use of a public tracking code was a mistake. Anyone can use your tracking code on their site, which adds to your traffic, or they can create ghost visits and spam referrals by hammering Google Analytics with your code while never visiting your site. Oh, and the codes are easy to guess, so they do not even need to know about your site.
StackOverflow Programming
StackOverflow Programming happens when much of the functionality of an application is copied and pasted from the code examples found on StackOverflow. Unfortunately, it’s becoming the most popular and common programming paradigm amongst younger programmers, leading to (1) shockingly shoddy, bug laden, slow, incomprehensible, unmaintainable programs that work only once, and (2) to programmers who do not understand what they are doing, their work and how to solve problems. For example1, one of my interns came into my office this week to see if there was a way to do dates and times easily in C++.
Write Timestamps containing Milliseconds to MongoDB in C++11
It took me several hours today to figure this one out, so I thought I’d write it up lest I forget. I have a C++11 application that rapidly writes new documents to a MongoDB instance and I need high-resolution timestamps to determine the order things were written. The problem is that the C++ standard time_t structure reports in seconds, so builder.appendTimeT("updated_at", std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()) ); creates an ISODate without milliseconds in MongoDB.
CodeRunner 2
Nikolai Krill released a major update to CodeRunner today, and I highly recommend it to all programmers no matter what languages you use. In my case I write a lot of code in C++, Objective-C, Ruby, Javascript and HTML as part of large, complex projects. Often I am unsure how best to write a snippet or function. One way would be to create a branch in the project, run and experiment, deal with compiling, branch again to try another solution, compile some more and work it out.
What to write about next?
I was asked in a blog comment today how I decide what to write about. And once decided, how do I go about doing it. In this case, the answer was easy, I decided to try to answer the question. And deconstruct the process I go through as it happens. Instructions: Read this post in black font first, then come back and look at the gray which deconstructs my thinking.
Lose the WWW
I have finally removed the www from hiltmon.com. The 1990’s have passed and www no longer makes sense in URL’s. Maybe it’s time you did the same to your site too. What triggered this change was that, as of 14 October 2014, Google Analytics started throwing an error if you had links to www.yoursite.com and yoursite.com. This is because it treated links with www and without as different. Removing the www was easy.
Simple C++ Testing with Catch in Xcode
Catch is a simple, open-source, dependency-free unit testing framework for C++ projects. In this post I show you how to use it in a Simple C++ Project from Xcode. Why Catch? I am writing fast C++ libraries for work and need to wrap them in unit tests to ensure that they continue to operate and perform as they evolve. My number one constraint is that these libraries must be dependency-free.