Version 0.2.6 of Braindump Released

I am excited to announce the release of version 0.2.6 of Braindump. I have taken a short break from Braindump at the beginning of the year, but I am still committed to making it the best note platform out there!

New Features

  • Note Archives
  • Ability to Completely Empty the Trash

Removed Features

  • Oauth[1]
  • Tasks[2]


  • Note is kept active once it has been updated
  • Return to Same Notebook when adding a new note from within a Notebook

[1] Oauth has not been working for a while, and I want to dig into it more so I have removed it for now.

[2] Braindump is a Note tool first, I reworked Tasks in a previous release, but decided to remove it completely for now. I want to focus on making the best possible Note Platform before moving on to additional functionality.

I am planning on updating the docs to make it easier for people to contribute. In addition, I am planning yet another UI overhaul. I want to make the app simpler and more appealing.


Types and Roles If Not Exists in PostgreSQL

For certain operations such as creating types and roles in PostgreSQL you are not able to use the handy IF NOT EXISTS parameter. This makes creating reusable scripts a bit more challenging, especially if you are going to be running these scripts more than once against the same database. On solution to this problem is to Just Do It™. DO allows you to execute anonymous code blocks. For example, suppose we had a simple task table with a custom type called task_status along with a readerrole that has only select permissions. Using the pg_type and pg_roletables we can write a DO expression that will check to make sure that the elements do not exist before attempting to create them, which will prevent your script from erroring out in the event that they do exist. First we will create the custom type.

DO $$
    IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'task_status') THEN
        CREATE TYPE task_status AS ENUM ('todo', 'doing', 'blocked', 'done');
    END IF;

Then we can create our table.

tasks (
  id           integer PRIMARY KEY,
  title        varchar(200), 
  status       task_status NOT NULL DEFAULT 'todo',
  created_date timestamp

Next, we can create our new role called reader and grant read only rights on the tasks table.

DO $$
    IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'reader') THEN
        CREATE ROLE reader;
    END IF;
GRANT SELECT ON tasks TO reader;

The entire script is shown below.

You can run this script as many times as you wish and it will just work™, which means that if you are running full migrations then you do not have to do any manual overrides or comment anything out. Note that the reason why we do not have to wrap up the GRANT in a check is because if you duplicate a grant, PostgreSQL will return a notice but not an error.


Hooked on Fonics, and the Tragedy of Domain Name Driven Business Naming

I have long thought that it was slightly ironic that some of the most successful tech companies of our generation have been created around misspelled names. The reason for this of course, is due to limited amount of English words that can be used in a domain name, and the continued belief that if your company does not have a .com domain name then you may as well close shop right away.

I am guilty of this myself of course, since is a made up name that is a misspelling of “status” (and I did not even have the benefit of snagging a .com).

I wanted to bring special attention to this gem. is a startup that is supposed to help kids learn how to read through the use of phonics. I find it utterly ironic that even in the world of education technology which is arguably the last bastion of hope for an educated future society, there is yet another misspelled name for a company.


Windows 10 is Awesome

Last week I got a new Dell Inspiron laptop from the Microsoft store for a great price. I did a bit of research while looking for a new laptop, and despite the fact that this computer still has a spinny disk, the 8GB RAM, i5 Processor, and Full HD Screen make it one of the best bangs for you buck at a price of $549.00.

Naturally, this laptop came preinstalled with Windows 10. I tried my best to give it a fair chance. I really only need this computer to write code and look at the results of said code in a web browser, so my requirements are pretty low.

  1. Text editor
  2. Usable Shell
  3. Google Chrome
  4. Virtualbox/Vagrant
  5. Git

Pretty much every operating system these days from Windows to Solaris support those basic features, so what could possibly go wrong?

To be honest for the first few days, I cloned all my current projects and started hacking away. Life was good, and for the most part everything was fine. Installing Git for Windows includes all sorts of goodies like bash, vim, ssh which makes the computer pretty usable for development work. Using the chocolaty package manager makes installing all sorts of software like python, npm a breeze. In addition, the command prompt in Windows 10 finally supports window resizing, non-block text selection, and regular copying and pasting. Overall, after being away from Windows for quite some time I was pretty impressed with Windows 10.

Trouble in Paradise

But then, as usual, the little minor annoyances add up to a death by 1000 tiny cuts when it comes to doing development work in Windows.

No Full Disk Encryption without “Pro”

Microsoft still believes heavily in creating arbitrary feature differences between versions. So using BitLocker is not possible unless you are running Windows 10 Pro. This seems pretty sad since full disk encryption comes by default in OS X and any GNU/Linux Distribution for the last several years.

Weird Key Bindings

I don’t run a key logger, but if I did I think my most used commands would be ctrl+a and ctrl+e to go to home and end when editing anything. This kind of works sometimes in some programs, but its kind of a deal breaker since the home and end keys on this keyboard are above the numberpad and impossible to reach.

Unable to See dotfiles

I guess dotfiles (i.e. .gitignore) are Unix things? In Windows Explorer the file shows up as blank.

Unable to Rename files that are currently in use.

This was the deal breaker. I was editing some code for a new project. I wanted to rename the project from ‘test_project’ to something else. This feature is apparently impossible, even on the Pro Edition of Windows 10. If you try to rename a folder it will complain that it is currently being used. No problem, I closed out every explorer window and text editor window. Still no dice. In addition to not being able to do this seemingly trivial task, Windows does not even tell you where the file is being used so you are basically stuck either closing every single program you have open, or rebooting your computer just to rename a directory.

That is madness. Pure madness.


In conclusion, Windows 10 lasted about 4 and a half days on my laptop. Windows 10 is awesome, until it’s not. I installed Ubuntu 15.10 and it is working perfectly. Maybe in another 10 years Microsoft will figure out how to rename folders that are currently in use.