Installing PostgreSQL from source on my Mac

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: cd postgresql ./configure gmake sudo make install 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:

Continue reading “Installing PostgreSQL from source on my Mac”

Facebook and the Algorithmic Curation of Content

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!

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

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?

Continue reading “Prediction and Change”

Our Work and Aging

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

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.

Another long period between posts

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!

Python OAuth2 failing with X509 error

I've just spent about 20 minutes trying to authenticate with Twitter using the Python OAuth2 module. I kept on getting an X509 error, specifically:
ssl.SSLError: [Errno 185090050] _ssl.c:343: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib
The solution to this is that the cacerts.txt file in the Python installation is only readable to the root user / wheel group. In order to fix that up, first find the cacerts.txt file:
find /Library/Python/ -name cacerts.txt
Then modify the permissions on the file:
sudo chmod 644 /Library/Python//2.7/site-packages/httplib2-0.7.7-py2.7.egg/httplib2/cacerts.txt
Note that the URL endpoints for twitter on the python-oauth2 Github page are currently wrong. To use the "Twitter Three-legged OAuth Example" change http://twitter.com/oauth/request_token to https://api.twitter.com/oauth/request_token, etc.