It’s Friday afternoon for me in London. So I’m making time for a little personal therapy session. Today’s topic — Why is it that I still have a mental block when using Python’s requests or httpx?

I keep getting it wrong. Am I just a numpty?

The nicest Python libraries to work with are those with simple and clear APIs. They are intuitive. They don’t require you to write much code. They just do the job with no fuss.

Some of the best are requests, httpx (an async enabled version of requests), and FastAPI. …

Some time ago we covered one architecture for a trading bot. In this note we go into more detail about the architecture for this bot and why you may want to separate your Setup Bot from your Trade Management Bot.

The Setup Bot

Firstly, a quick definition of what we mean by a Setup :

A Setup is set of market circumstances, triggers and data patterns that together tell us that we should enter a trade. This could be a long or a short trade.

For technical analysis trading, the Setup algorithm may be looking for a certain combination of indicators on candlestick…

I use the Google Drive as my shared drive across my different devices. A Macbook, a Chromebook and a Linux desktop. Whilst it is easy to set up on a Mac, Chrome and PC … on Linux it is not. There is no official Linux Google Drive app that will enable a sync to the Linux drive, so we need to set it up.

There are different ways of doing it and a number of tools. These notes use the command line tool rclone. …

My Chromebook is perfectly good coding machine, but we should make it easier for Chromebook users to get started in programming.

Today’s Chromebook users are tomorrow’s professional coders

2019 Chromebook Google market share

In early 2020, Google was reporting over 40 million users in education, using Chromebooks. This is already a significant segment using these systems.

But Chromebooks seem to be off the radar for coding and data science. It would be a great shame for us all if some young people with tech talent don’t get started on programming or data science because it’s a little too hard on a Chromebook. …

The Python “unsync” library is a very easy way to create async code. This gives a practical example of how to use on a simple trading bot.

There are many ways to skin the async cat

In Python there are many valid ways of parallelising your code, including:

  • The older way — using the threading and multiprocessing libraries
  • The newer way — using async and await from the asyncio library embedded into core Python from 3.7 onwards
  • The easier way (I think)— using the @unsync decorator from the Python unsync library

What is so great about ‘unsync’?

I’ve used all the above methods on different projects and they all work fine. …

Steps for configuring VSCode to play nicely with both ESLint and Prettier for Quasar / Vue.js

The issue

Prettier formats the JS code in a nice opinionated way. However this is not fully aligned with ESLint and therefore the build fails due to ESLint errors.

There are a number of good tutorials on this for example here, but these do not work out of the box and need some tweaks for Quasar / Vue.js

Four steps

1. Install VS Code plugins

  • Vetur
  • Prettier
  • ESLint

… and any other useful plugin. These could include (Bracket Pair Colorizer, Sass, Vue VSCode Snippets)

Enable format on save in VSCode in this project…

How to install Node.js /NPM, Quasar / Vue.js and VS Code on Chrome OS

This is a short succinct guide, to set up a Chromebook for front-end development after a powerwash. It takes about 5 minutes.

Quasar is a powerful front-end framework for building PWA (progressive web app) applications with a Material Design look and feel, on top of the Vue.JS framework. Quasar is particularly powerful when it comes to deploying those apps as webapps, Electron apps, iOS and Android apps.

What this guide will set up

This guide focuses on what needs to be in place for Quasar front-end development. It will:

  • Install Node.js and…

How to get up and running with Python 3.8 on your Chromebook in under 10 minutes.

Step 1— Install Python 3.8 prerequisites

From the Linux terminal app on the Chromebook:

sudo apt-get updatesudo apt-get install build-essentialsudo apt-get install libreadline-gplv2-dev libncursesw5-dev \
libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
sudo apt-get install libffi-dev liblzma-dev

Step 2— Download and extract Python 3.8 source

Note — If you want to use a later version just replace the version number (3.8.1) in all the next steps with the latest version number

cd /usr/srcsudo wget tar xzf Python-3.8.1.tgz

Step 3— Compile and install Python 3.8

cd Python-3.8.1sudo ./configure --enable-optimizationssudo make altinstall

Notes — The altinstall option leaves the original Python…

Photo by Brett Jordan on Unsplash

Today’s new was that Arron Banks’ account was hacked, exposing many private Twitter messages. It is reported that this was a SIM Swap attack.

What is a SIM Swap and how can it be avoided?

The SIM Swap attack

Someone gains access to your account without needing your password. How does it work?

  1. A hacker only needs to know your username (usually email address) and your mobile phone number. This is very easy as both of these are almost certainly freely available on the web or dark web. …

Can I set up a Chromebook for software development? What do I need to install? And is it actually any good for development?

I have been playing with a Chromebook recently. I like how they are small and low power. They are also useful for taking on the road. I have been exploring how well a Chromebook works as the main development machine on the go.

This post covers the installation of the main tools to get the Chromebook ready for development.

2020 update — new scripts

There are now some scripts available you can use (at your own risk) that automate many of the…

Matt Gosden

Insurance meets tech meets music. #insurtech

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store