Linux on Surface Pro 3

Sat Sep 10, 2016 by brett

I just bought myself a second-hand Surface Pro 3 and installed Linux on it. It runs Ubuntu extremely well, with almost everything working out of the box. It’s lovely having an light-weight machine that I can use as a tablet, but also do development on.

Installing PostgreSQL from source on my Mac

Tue Jul 26, 2016 by brett

In order to build PostgreSQL from source on my MacBook Pro running El Capitan, I first downloaded the git repo:

git clone git://git.postgresql.org/git/postgresql.git

I then built it:

``In order to build PostgreSQL from source on my MacBook Pro running El Capitan, I first downloaded the git repo:

git clone git://git.postgresql.org/git/postgresql.git

I then built it:

``

This will install the binaries to the default location of “/usr/local/pgsql”.

I already had a user called “_postgres” in my /etc/passwd file, so I configured to run PostgreSQL as this user:

```In order to build PostgreSQL from source on my MacBook Pro running El Capitan, I first downloaded the git repo:

git clone git://git.postgresql.org/git/postgresql.git

I then built it:

``In order to build PostgreSQL from source on my MacBook Pro running El Capitan, I first downloaded the git repo:

git clone git://git.postgresql.org/git/postgresql.git

I then built it:

``

This will install the binaries to the default location of “/usr/local/pgsql”.

I already had a user called “_postgres” in my /etc/passwd file, so I configured to run PostgreSQL as this user:

```

I added a file called “org.postgresql.server.plist” to the directory /Library/LaunchDaemons. The content of the file is below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>KeepAlive</key>
  <true/>
  <key>Label</key>
  <string>org.postgresql.server</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/local/pgsql/bin/postgres</string>
    <string>-D</string>
    <string>/usr/local/pgsql/data</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>UserName</key>
  <string>_postgres</string>
  <key>WorkingDirectory</key>
  <string>/usr/local/pgsql</string>
  <key>StandardOutPath</key>
  <string>/usr/local/pgsql/log/server.log</string>
  <key>StandardErrorPath</key>
  <string>/usr/local/pgsql/log/server.log</string>
</dict>
</plist>

Make sure to modify it’s ownership to be admin:

sudo chown root:admin /Library/LaunchDaemons/org.postgresql.server.plist

Then the server can be started using the “launchctl” command:

sudo launchctl load /Library/LaunchDaemons/org.postgresql.server.plist

Facebook and the Algorithmic Curation of Content

Fri May 27, 2016 by brett

Facebook has recently got into trouble over an accusation that they are suppressing conservative news stories in the trending news categories. Facebook have an algorithmic system that promotes trending topics to a human curation team, who make the final decision about what gets promoted. Obviously human beings have bias. One of the interesting things that has happened in finance is that banks are using algos more and more to ensure that humans aren’t involved in situations where there can be a conflict of interest. One example is the 4pm FX fix which are now required to be handled algorithmically. There’s a trend here - algorithms are being used to ensure fairness. Will media companies be forced to have algorithmic editors to remove bias from reporting?

Hacked!

Fri Apr 22, 2016 by brett

It looks like my blog got hacked. I noticed that there were some weird posts related to an essay writing service, which I’ve now deleted. I’m not sure of the attack vector. I had a relatively weak password for my WordPress user, which could have been the entry point. I’ll have a look at the server this weekend and see what I find. At least it’s prompted me to do some work on improving the security on the server and to do some software upgrades. I need to set up the letsencrypt certificates as well.

Prediction and Change

Sat Mar 19, 2016 by brett

I’ve been thinking a lot recently about the mistakes I make in predicting things. Often I will just observe a trend, and then extrapolate that trend into the future. This will be my prediction. The world doesn’t work like that though. Trends will last for a while, but then something changes, and before you know it the world has changed direction.

I want to think more about how and why a current trend could change direction. For example - what would it take for the trend of rising property prices in London to change direction?

At the moment I can think of three things that would cause this to happen:

Firstly if interest rates were to rise a lot, this would cause a lot of over-leveraged people to fail to pay back their mortgages. Which would force a lot of people to try and sell, which would cause house prices to fall. This scenario seems unlikely currently with interest rates at the zero lower bound. Mortgage rates may rise however, if credit risk starts to rise - if people are perceived as being less likely to pay back their mortgages.

Secondly, if telecommuting were to become the predominant way of working, the populus may prefer to live outside the city - especially if the cost of buying property was too much for the average person. It does seem as though companies are starting to embrace telecommuting a bit more, so this scenario may come to pass.

Thirdly, if cities become unattractive for another reason, such as the rise of terrorism, or an epidemic of some sort.

Our Work and Aging

Wed Nov 11, 2015 by brett

As Helen and I get older, I think that the way we work will have to change. At some point we will probably find it difficult to get contacts because of ageism, and also we will be too expensive in comparison with graduates  with a few years experience. We will be forced to work entirely on our own projects. This is going to mean a few changes to the way we think. Both Helen and I have been ingrained with a strong work ethic, which struggles when we work on our own more nebulous projects. We both find it hard to stick with projects that don’t have a certain income stream. In the future we will need to change both the way we work, and the way we think about our work.

Day 3 of no caffeine

Fri Oct 23, 2015 by brett

I decided to give up caffeine the other day. I haven’t been sleeping that well, and my caffeine intake has been steadily increasing over the last few months, so I thought I’d better get it under control. Yesterday was a nightmare! I was feeling really zonked. Today I an feeling pretty good though, so I think I am over the worst. I am interested in measuring two things now - my quality of sleep and my blood pressure. It will be interesting to see if giving up caffeine has any impact.

Podcasts

Wed Oct 21, 2015 by brett

I’ve been listening to some great podcasts recently. I’ve long been a fan of the Economist podcast, and I’ve recently started to listen to the FT Alphaville podcast. They had an episode in which they talked about podcasts, and they mentioned a podcast called “Serial”, which is a true story about a journalist investigating a murder. It is completely absorbing!

The last podcast I’ve been listening to is called “Talking Machines”, and is a podcast covering machine learning.

Another long period between posts

Wed Oct 21, 2015 by brett

Well, despite resolving to blog more, it’s been another long period between blog posts. It’s not like I haven’t been thinking deep thoughts, or pursuing interesting projects. It’s that I’ve been worried that my thoughts have been too nascent to post. It’s silly really. I should be using the “Lean Startup” philosophy of releasing early and often. Still, at least there’s a lot of room for improvement!

Greece and the EU

Wed Jul 8, 2015 by brett

If there’s one other casualty of the current crisis in Greece, its my Euro-optimism. Over the past couple of weeks I’ve transformed from being optimistic about the Euro, to being totally pessimistic about it.

The only way the Euro can work is if there is a transfer of wealth from the richer members of the zone to the poorer members. In return, the richer members get a lower exchange rate, which is massively beneficial to their exporters. If this transfer doesn’t take place, then the Eurozone will collapse.