What is science fiction

What is science fiction Was listening to KQED and the program City Arts & Lectures, they had Bjarke Ingels talking about architecture. The program is always interesting and causes thinking and thought. One quote stood out to me as a fan of science fiction. There are times when it’s hard to explain to people why SF is interesting, but this is a great view. While this isn’t taken from the program directly, it matches what he said on the air.

Read more

Share Comments

Using autoenv

Autoenv for greatness This is really just a short post saying I discovered a really handy MacOS/Linux tool I hadn’t seen before. Autoenv is a very handy tool for managing environments. Why would you need this? If you’ve ever done any quantity of Python or Go work you’re probably using virtualenvwrapper or gvm to manage all of the different environemnts that you have. The challenge is that you want to quickly switch from one to the other when you enter that project workspace.

Read more

Share Comments

React and GraphQL, plus GoLang

GraphQL DateTime Scalar Value Strings are not your friend when it comes to date time types. The problem is that with the naive definition you’ll get the wrong value. For starters the naive definition looks like this: // GraphQL // type Object { // updated_at String // } // // The Go structure definition struct { // …. UpdatedAt time.Time json:"updated_at" sql:"NOT NULL" } // GoLang GraphQL definition oType := graphql.

Read more

Share Comments

React and GraphQL, plus GoLang

This is some useful inisights I’ve gained, that are worth noting. The code examples are from a gist clone that I’m playing around with, it’s easier to have a “known” problem and target to experiment with software than trying to do both at the same time. React What’s clear is that with appropriate use of PropTypes, you really have a well structured “strict” environment for building components. It’s nice to see that when you pass the wrong parameter into a directive that it fails fast.

Read more

Share Comments

Wordpress to Hugo

Upgrades might be the bane of modern life. Everything needs upgrades, reboots and changes. Sometimes it’s under your control and sometimes it’s not. My linux box is reporting 948 days of uptime and still running version 3.7 of the kernel (4.4 is curently out). So it might be time for an upgrade, that’s about 2 years and 7 months since the last upgrade. In the process I got to upgrade PHP and that’s always fun to make sure all of the web servers, FPM modules and other things still continue to work.

Read more

Share Comments

Spark and Avro – in a Docker

These are really cliff notes for the next person, but quite useful. Was working with Spark in a local Docker using the very useful jupyter/docker-stacks, these are really nice to get a fully working Spark installation on your Mac without messing with lots of packages on your local machine. I’m now a big convert of working from Docker since I don’t have to keep on installing and installing things. Basic Jupyter functionality —

Read more

Share Comments

From Angular to React

If you ever looked at my github – public or private you can see that I have settled on a personal template for Angular applications. While I’m sure that there are things that are against some blog post of conventions, it works and gets lots of jobs done. After digging into the performance of our SPA at Tubular I found that we were spending 1.5 seconds rendering the results of an XHR (Ajax) requests to fetch some data.

Read more

Share Comments

Writing S3 Sync in GoLang

One of the great challenges in software engineering is that you don’t know what the problem is until you’ve worked through it one. Sometimes this is the idea that you need to top down design a program which is a great start, but what’s interesting is when it comes to the language itself and what it makes easy and hard. My latest project was a making a Go version of the python s3cmd, there is now the golang s3-cli which supports most all of the basic file oriented commands that s3cmd has.

Read more

Share Comments

HTTP status for API Responses

In designing an API it’s a challenge to understand when to use HTTP error responses and HTTP OK (200) responses. As with many organizations it’s something that can be subject to lots of passionate debate. Let’s look at a bunch of different scenarios. Let’s take an OAuth 2.0 API that looks something like this, with an assumed HTTP Authentication header. /api/v1/data.search?query=EXPRESSION&count=INTEGER Imaging responses look something like: { ok: BOOLEAN, error: STRING, .

Read more

Share Comments

FizzBuzz of the day

Like many pieces of code, there is always a story behind it. Your FizzBuzz solutions of the day – using operator precedence to get a result for num in xrange(1,101): print ‘Fizz’ if not num % 3 else “ + ‘Buzz’ if not num % 5 else ” or num Or on one line. print ‘\n’.join(‘Fizz’ if not i % 3 else “ + ‘Buzz’ if not i % 5 else ” or str(i) for i in range(1,101))  

Read more

Share Comments