Technical Lead based in Manchester, UK
Install Consul on Debian 11
Consul is a service networking tool and a distributed service mesh solution developed by HashiCorp. It is designed to simplify the process of service discovery, configuration, and segmentation in modern, dynamic, and cloud-native environments.
As part of my Journey into discovering more about Nomad I also wanted to learn more about Consul.
Prerequisites
Install Go:
apt install golang
Install Make:
apt install make
Install Consul
Close the repo.
git clone https://github.com/hashicorp/consul.git
cd consul
Run the Make command
make dev
Why API Gateways are Important
I’ve recently took on a new role as Technical Lead on an Integration Team within a large organisation. I was asked by a semi-technical friend what the team’s products were. I covered them, and recieved the response… “What is a API Gateway?”. So here’s a quick blog post for future reference.
An API gateway is the software layer that sits between an API client and an API server. It acts as a proxy, routing requests from the client to the server and returning responses back to the client.
…Optimizing Java for AWS Lambda
AWS Lambda is a serverless computing platform that lets you run your code without provisioning or managing servers. Java is one of the supported programming languages for AWS Lambda, which makes it a great choice for many applications. However, to get the best performance from your Java-based AWS Lambda functions, you’ll need to follow a few best practices. In this blog post, I’ll go over some of the most important optimisation techniques for Java on AWS Lambda.
…Disable tests when using AWS SAM Build
Before I start, disabling tests as part of your build pipeline is bad - I don’t recommend it. However, in this scenario, sam builds, especially when running sam sync --watch can take a bit of time, and the feedback loop (write some code, and quickly see it running) can be several minutes, rather than seconds (which you would normally see when running unit tests etc).
So, when running sam sync --watch you may want to disable running of unit/integration tests to make things faster. I’d recommend ensuring unit tests and integration tests are ran somewhere else in your build pipeline.
Install GraalVM and Native-Image on an M1 Mac (Java11)
This is a quick guide on installing GraalVM on your M1 Mac - this guide also works for x86_64 Macs also.
This will install GraalVM for Java11 - different Java versions are available here: https://github.com/graalvm/graalvm-ce-builds/releases
Install GraalVM using Homebrew
brew install --cask graalvm/tap/graalvm-ce-java11
export JAVA_HOME=$HOME/Library/Java/JavaVirtualMachines/graalvm-ce-java11-22.0.0.2/Contents/Home
Give GraalVM permission to run
xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-ce-java11-22.0.0.2
Install using sdkman
SDKMAN is a brilliant tool, you can install it here: https://sdkman.io/install
sdk install java 22.0.0.2.r17-grl
export JAVA_HOME=$HOME/.sdkman/candidates/java/22.0.0.2.r17-grl
Install native-image plugin
Firstly update your path
Brew version:
…Install CloudFoundry on an M1 Mac (arm64)
Install Rosetta 2
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Install Homebrew under Rosetta 2 (/usr/local/Homebrew)
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Tap Cloudfoundry
arch -x86_64 /usr/local/Homebrew/bin/brew tap cloudfoundry/tap
Install CloudFoundry
arch -x86_64 /usr/local/Homebrew/bin/brew install cf-cli@7
Further thoughts on pairing during software development! (Part 2)
While being a Lead/Senior Developer on several agile development teams, I’ve seen the ups and downs of pair programming. I’ve tried to introduce pairing into new teams with different levels of success - so I thought I’d write down some of the experiences I’ve had - and the potential was of working that can make pair programming less painful.
In August 2020 I wrote an article about Some thoughts on pairing during software development. Where I talked about :
…NPM: Maximum call stack size exceeded
You may have cloned a project and tried running ’npm install’ only to find the following error message:
error Maximum call stack size exceeded
There’s multiple ways I’ve found to fix this:
The Safe ways:
Force clear the NPM cache:
npm cache clean --force
npm install
Rebuild:
npm rebuild
npm install
Remove node_modules:
rm -r node_modules
npm install
The Nuclear way:
rm package-lock.json
rm -r node_modules
npm install
As always, I hope this fixes your problem!
…Some thoughts on pairing during software development! (Part 1)
Over the past few months, I’ve been pairing (pair programming) with other Software Engineers when working on stories during our sprints. It’s been fun, and the first time in a while I’ve enjoyed and felt rewarded while ‘pairing’. While I’m sitting in the sun, on a beach in Wales enjoying our holiday with my family, I look back and consider it hasn’t all been plain sailing…
My first exposure to pair programming came as I was working on a team that was writing API’s for some of our business services. It was a relatively new formed team with a range of mid to junior level Software Engineers, a Business Analyst, a Product Owner, a QA tester and a Scrum Master.
…Penny Saving Challenge using Starling Bank, Lambda and Node
I came across a money-saving Challenge called the ‘1p Challenge’. Basically you save an amount of money based on the day number in the year.
For example, on January the 1st, you would save 1p. Towards the end of the year, say day 365, you would save £3.65
As you can imagine, this starts saving small but eventually ramps up so you will save around £667 over the year.
The problem is, it’s incredibly hard to manage yourself. Finding the time or remembering to transfer funds into another account every day is a challenge. So, like most things in my life, I decided to automate it.
…