Got a ton of old side projects, disk spice getting tight? NPKILL is the tool for you! Just run npx npkill and it will scan your system for node_modules folders, list them by age and size and then you can nuke them with a single keystroke. To clean up your old Python virtual environments just run npx npkill --target .venv and off you go.
This is my minimal devcontainer for playing around with AI stuff, using Codex. It includes Python, uv, Node, gh and the Codex CLI. Running in a devcontainer gives me a clean environment to mess with and further sandboxes the coding agent. To use create a .devcontainer directory in your project and add the following devcontainer.json file: { "name": "Minimal Codex And Dev Container", "image":…
If you want to develop Manim animations easily the a Jupyter notebook makes as great working environment. However it can be fiddly to get set up. Luckily there is a pre-built Docker image that can get you up and running with two simple commands: cd <your working directory> docker run --rm -it -p 8888:8888 -v "%cd%:/manim" manimcommunity/manim jupyter lab --ip=0.0.0.0 In the console you will then…
If you are messing with data then, you can’t beat a Jupyter notebook as a working environment. Not only are they super easy to use but they are effective ways of sharing your workings and findings. Even better, the Jupyter project have a created a bunch of Docker containers that contain all the tooling you need which, makes getting up and running as simple as running a two simple commands:
I was asked by a customer to give a talk about right-sizing user stories. Below is the summary I gave them. This is by no means an original bit of thinking but ideas pulled from a number of sources (1, 2), however it made a nice little summary so I thought I’d post it. Form A User Story typically takes the form of: As <type of user> I want <some goal> So that <some reason> So what is the…
I’ve been doing a lot of work with Docker of late mostly for creating easy dev and test environments. One of the problems you come across when doing this, is that you land up with all sorts of orphaned images and containers which chew up disk space and systems resources. The following commands will give you a clean slate. Stopping all running containers, removing them and deleting any…
Last month Google held it’s annual Google IO conference. Not really a surprise but it was chock full off conversation and AI based tech which is all the buzz of late. Three bits in particular stood out for me. The first is the demo of Allo, their new chat app. The app itself wasn’t particularly groundbreaking but the embedding of their new digital assistant tech (the Google assistant)…
After much delay I’ve finally started recording a series of videos on creating a 2D game using Unity. Here are the first two videos. If you want to play the game then check out the Run Bunny, Run! website Watch all the videos in the series here
Built this with the kids last weekend, using the Lego Mindstorms EV3 set they bought be for my birthday. It was the first project we have built without a set of instructions.
To create a private key to sign your Android apps with, you need to run the keytool command (installed when you install a Java development kit) as follows. keytool -genkey -v -keystore myandroid.keystore -alias myandroidkey -keyalg RSA -keysize 2048 -validity 10000 -dname "O=Acme Ltd" Replace Acme Ltd with your company name. When the tool runs it will prompt you for a password and then generate a…
Got myself on the radio again last week talking about “scrubbing yourself from the Internet”. Here is the audio clip: And here is a link to Daily Mail article about the Oblivion tool
This script uses qshape to print out the details of deferred emails in Postfix. Useful when monitoring delivery issues. #!/bin/sh while: do sudoqshapedeferred sleep30 done
23114, 584, 46931, these three numbers were used to create the entire universe for Elite. Released in 1984, Elite featured cutting edge 3D graphics (with hidden line removal no less) and a rich universe of 2048 planetary systems, spread across 8 galaxies, each with a unique name, offbeat description, technology level, government type and even an economy. It was an instant hit and it set the…
This is a quick, step by step guide to creating a simple app for Android using Unity. This tutorial is for windows but other then the install instructions it should work for other platforms. By the end of this tutorial you will have created an app that displays a red spinning cube on a blue background running on your Android device. Setup the Android SDK To create an Android app you need to…
After watching this fantastic interview with Sean Murray about No Man’s Sky I’ve been inspired to write a bit about procedural content generation. I’ve been tinkering with procedural content generation for years, using it for everything from creating games levels to generating sample data for testing and it is a fascinating subject. So what is procedural content generation?…
Last Friday I got to do live radio for the first time! Since I didn’t come across as a complete idiot I thought I’d share the clip with everyone. The subject was hacking and the clip was recorded during the breakfast show on Radio Hauraki. Unfortunately I miss-heard the question about the Whaleoil hack and landing up talking about the likely attack vector for The Fappening (the August…
Years ago I was given a shiny, silver Robosapien. It’s an awesome humanoid robot controlled and programmed with an infrared remote. Unfortunately with 90+ commands and functions the remote is pretty cumbersome. So I always intended to see if I could put something together to control him from a PC, but I never got around to doing it. My 5 year old is in his first year of school and since he…
Python ships with a handy little web server that will serve up the files in the folder from which it is run. This is really handy for development. Run the following command to start the server: python -m SimpleHTTPServer Or if you are using Python 3, run: python -m http.server
YouTube has changed the way we watch and shared videos so I thought that I would collate some fun facts about YouTube for this post. First off YouTube was created by 3 PayPal employees: Chad Hurley, Steve Chen, and Jawed Karim. The site was officially launched in 2005 and this was the first video ever uploaded to it (a video of Jawed at the zoo): A year later YouTube was purchased by Google for…
In the mid 80’s my tweenish self was introduced to something that blew my mind and that was Robotech. I (and most of the western world) had not encountered Japanese animation or Anime before. With it’s complex story arc, the alien Zentraedi intent on wiping out humanity, cool transforming robots and awesome mass battles, I was hooked. When the story started to span generations of…
If you want to make games, Unity is a tool you should look at. It allows you to easily create games (both 3D and 2D) for a variety of platforms including Windows, Linux, Mac , Web , iOS, Android and Windows Phone. It also has a free version and if you ever need the pro version it is reasonable cheap to buy or subscribe to. Check out some of the features in the upcoming version:
Physics based games, especially on mobile devices have become de rigueur. It’s pretty amazing what can be done with some simply math. I recently came across this game mechanics site which provides short examples of different game mechanics, algorithms and effects. Many of these are of course physics based and involve velocity. Some of my favorites: Basic spaceship motion Lunar lander…
It turns out X is for quite a lot of things: In mathematics, ‘x’ is commonly used as the name for an independent variable or unknown value. ‘x’ is used to signify the multiplication operation when a more appropriate glyph is unavailable. As a result of its use in algebra, X is often used to represent unknowns in other circumstances (e.g. Malcolm X). In the Cartesian…
Been working on my taxes so have been a bit slack in posting However I thought that I would share this graph which shows where all your tax money was planned to go for 2013⁄2014 (if you are New Zealander that is): Source http://www.interest.co.nz/news/64515/budget-2013-summary-all-spending-plans Pretty much what you’d expect, Social Welfare: 27%, Health: 17.7%, Education: 15.3% which…
I use public transport religiously. It means we are a one car family which saves a bucket of money and helps out the environment to boot. Even better I get to walk about 40 minutes a day which helps with the waistline! But there is an added “bonus” and that is: strange conversations with strangers. Over the years I have had some seriously good ones, point in case, two days ago I was…
Well, I was going to blog about Quaternions and how Unity really makes it easy to do 3D stuff without you having to have a deep understanding of math but I ran out of time! So instead here are a list of things starting with Q that I had no idea existed Quassin Quassin is a white bitter, crystalline substance extracted from the quassia tree. It is one of the most bitter substances found in nature…
Traylix waited, he wasn’t nervous but he was pretty sure that something was about to go wrong; it always did. He glanced over to the prince and the two marines standing further down the alley. They all wore long, shapeless cloaks with the hoods up, as did he. Hopefully this subterfuge would deprive any would-be assassins an obvious target. From up the street Traylix heard the sound of a…
It costs 40c to produce every dollar in New Zealand which, is pretty astounding figure. A report released this week by the New Zealand Productivity Commission tries to determine why New Zealand’s GDP per capita is generating over 20% below the OECD average when (based on it’s broad policy settings) it should be generating 20% above the OECD average. It identifies a number of causes:…
Today I thought I’d go through some of the Open Source software that I regularly use. The Open Source movement is a interesting one, basically it calls for the source code of software to be released alongside the software. This allows anyone who can (or needs to) to modify the software and pass these changes back to the community thus benefiting all. Traditionally Open Source products have…
I do a heaps of Android development and whilst it appears straightforward there are quite a lot of subtleties, particularly when dealing with threads and UI updates, that generate all sorts of app crashes. Unfortunately these race conditions are often very hard to reproduce. Thankfully (and evilly) we have the monkey testing tool. Set it loose and it frantically taps and swipes away, switching…
Logo was one of first programming languages (after BASIC) that I really learned in depth. The most famous aspect of Logo is its turtle graphics which simulates a tiny turtle to which you can give commands such as forward, backward, left turn and right turn. As the turtle moves on the screen it draws a line behind it. With its graphical feedback, turtle graphics is an ideal way to introduce people…
I’d thought I’d give the Kinect Fusion demos a try. Kinect Fusion allows you to take 3D scans of things by waving your Kinect around. It’s designed to work with the desktop/Windows version of the Kinect but I’d thought I’d give it a go with the Kinect from my old XBox 360. Turns out it works pretty well. The resolution is pretty low but if you were using one of the…
So I bought a Raspberry Pi a couple of months ago and I’ve been having all sorts of fun trying out different things. I’ve created a wifi packet sniffer to track mobile devices and turned it into an arcade game machine, all sorts of interesting things. Jasper is going to be my next weekend project. It basically lets you build your own J.A.R.V.I.S (from the IronMan movies). Here is a…
Insel is a fantasy setting I’ve been working on for a role playing game. Imagine a island covered by a crowded, renaissance city surrounded by a vast ocean. In all of history no one who has left the island has ever come back. Metal is plentiful and intricate “clockwork ” machines power the society. Food and “wood” is grown from fungus and giant mushrooms which are…
Windows 7 and above has a neat feature called hosted networking. This allows you to turn your laptop into a wireless access point. This is very useful if you want to share your laptop’s Internet connection with other wireless devices or (the reason I use it) for testing. To set up a network open a command prompt and run the following commands netsh wlan set hostednetwork mode=allow…
The last decade has seen a renaissance in board gaming. The Internet and crowd funding platforms such as Kickstarter have made it particularly easy to publish a game and 1000s of new games are released each year. For this post I thought I’d go over my collection and talk about the games I own. Battlestar Galactica This game is based on the recent TV series. The players are the humans trying…
Feature Driven Development (FDD) is my favorite Agile methodology. I have been using it for a number of years and it works really, really well. Here is a quick intro to FDD that I wrote a while back. An introduction to Feature Driven Development Feature Driven Development (FDD) is an Agile software development methodology. It provides a simple 5 step process that focuses on the delivery of quality…
My eldest (currently 5) is big on “making” inventions” and experiments. Last weekend he desperately wanted to invent something with engines. Not having any engines handy I figured we could perhaps do something with elastic bands. Googling didn’t turn up anything too exciting but I did come across a picture of something from my childhood: a cotton reel with and elastic band…
Alright, I thought I’d do a quick blog on the DNS or the Domain Name Service? Why? Well because without it the Internet as we know it would not work and subversion of the DNS system is how Turkey recently blocked access to Twitter, Facebook and YouTube so it’s very topical! First off you need to know that every computer connected to the Internet has a unique numeric address, kinda like…
I believe that everyone should be able to program a computer! Now I can see you all rolling your eyes but bear with me for a moment. We live in the Information Age, computers are everywhere and computer literacy is a skill everyone needs. Unfortunately most people stop short, learning to drive a computer but not really learning to use its full potential. Now don’t get me wrong, I’m not…
I have tinkered with 3D graphics for years, using POV-Ray in the mid nineties and later Hash Animation:Master. However these tools were pretty limited or not widely supported and commercial tools costed (and still do) a small fortune which put them out of reach of hobbyists. So I was very excited when Blender was released in 2002 . With its commercial features and it being free (open source) the…
I started this blog way back in 2001, the 2nd of October 2001 to be exact (according to the Way Back Machine) However in the last year or so I’ve been very slack at posting anything (other then my automated tweet logs). This is a shame because my blog does get a fair bit of traffic (about 5000 unique visitors a month) and contains popular posts such as my Creating your first Unity Android…
I have recently been doing some development with the Bottle Python web app framework. Unfortunately it’s simple template system uses the same template delimiters as Angular (“{{” and “}}”). Worse you cannot change these delimiters in Bottle. Fortunately you can change them in Angular using the following: var myApp = angular.module('talkpoint', [],…