All posts tagged "programming"
Conway's Game of Life: A Functional Approach
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/game-of-life-functional-programming
In this post I describe how to implement Conway's Game of Life using functional programming to be able to transform a set of cells into the next iteration.
Writing an Elixir/Phoenix based multiplayer Minesweeper game
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/an-elixir-phoenix-based-multiplayer-minesweeper
How I wrote the minesweeper game, Mowing, you can play from the games menu.
Rewriting Strange Leaflet in Phoenix and LiveSvelte
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/rewriting-strange-leaflet-in-phoenix-and-livesvelte
Another rewrite of Strange Leaflet? Yes! Still with the power of Svelte but now with Phoenix on the backend.
Rebooting this blog in Svelte and SvelteKit
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/rebooting-this-blog-in-svelte-and-sveltekit
In which I explain a bit of why and how I'm writing my personal blog in SvelteKit instead of a backend like Phoenix.
Things I've learned deploying a Phoenix 1.7 app using Bandit to fly.io
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/deploying-phoenix-1.7-using-bandit-to-fly-io
Some issues I ran into deploying a Phoenix app using Bandit to fly.io and what I learned from them.
Getting AlpineJS to work with Phoenix 1.7
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/getting-alpinejs-to-work-with-phoenix-1.7
How to integrate AlpineJS with Phoenix 1.7
Maintainable Code
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/maintainable-code
Writing code that is easy to understand and well documented so it is easy to maintain.
ElixirConf 2022 Talk: Livebook Smart Cells are Amazing
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/elixirconf-2022-talk-livebook-smart-cells-are-amazing
Want to see my ElixirConf talk?
Better Go test output
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/better-go-test-output
Improving the default `go test` output
Elixir Phoenix and "role postgres does not exist"
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/elixir-phoenix-and-role-postgres-does-not-exist
Ever hit that error? Let's fix it!
From awk to a Dockerized Ruby Script
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/from-awk-to-a-dockerized-ruby-script
Taking a script and wrapping it up into a Docker image that can easily run anywhere!
Finding leap years with the cal command
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/finding-leap-years-with-the-cal-command
Using the cal command to learn some command line mechanics.
The Problem of State
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/the-problem-of-state
State is a hard problem to deal with. I say functional languages make it easier to handle because they force you to deal with it deliberately rather than have it happen accidentally.
Clojure Functions in Four Ways
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/clojure-functions-in-four-ways
Four different and differently useful ways you can create functions in Clojure
Basics of Clojure
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/basics-of-clojure
See how Clojure's syntax works, how functions work, and some basic data structures.
A simple language spec isn't a feature when you're building applications
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/a-simple-language-spec-isnt-a-feature
Go famously has a small, simple language spec. That isn't always a good thing.
The Fastest Possible Tests
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/fastest-possible-tests
How fast could programming tests actually be?
Shrink your data into bitfields (and out again)
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/shrink-your-data-into-bitfields
Some applications want to save every byte. Every last byte! Maybe they have memory constraints, maybe they're sending data over the network, maybe they just like saving bytes. This post goes into how bitfields allow us to shink complex data down into very small representations starting from arbitrary JSON and gradually transforming it down into a bitfield.
Every if statement is an object waiting to be extracted
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/every-if-statement-is-an-object-waiting-to-be-extracted
Turning control flows into objects is not only possible it is sometimes more expressive and useful.
Choose Generic Tools
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/choose-generic-tools
Don't create all of your tools from scratch.
Programming with jq
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/programming-with-jq
jq is not only a powerful JSON command line parser, it's a full featured programming language
Music for coding - October 2019
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/music-for-coding-october-2019
Some music albums and some of my own playlists that I find great to listen to while programming.
Connecting Objects with Observable
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/connecting-objects-with-observable
Using the Observable module from Ruby's standard library
Let's write a shell script
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/lets-write-a-shell-script
In which we walk through writing a simple shell script and do some shenanigans with the declared executable.
Let's Use Hwacha to Scan URLs
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/lets-use-hwacha-to-scan-urls
I've written a gem, Hwacha, that wraps Typhoeus for fast, easy, and powerful URL checking.
Customize Your IRB
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/customize-your-irb
How to customize your local Ruby REPL to be a more effective tool.
Program Like a Videogamer
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/program-like-a-videogamer
Feedback loops are the foundation of learning videogames and learning to program
Gem Spotlight: interactive_editor
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/gem-spotlight-interactive_editor
Taking a look at the interactive_editor gem and its capabilities.
Rails isn't for beginners
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/rails-isnt-for-beginners
In which I attempt to declare that Rails was never meant to just be a beginner'ss introduction to web programming.
How to use bundler instead of rvm gemsets
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/how-to-use-bundler-instead-of-rvm-gemsets
No need to manage gemset environments per project!
A Taste of Ruby Metaprogramming
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/a-taste-of-ruby-metaprogramming
Ruby metaprogramming is not only a powerful feature, it's easy to use as well.
Let's Write a Gem: Part 2
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/lets-write-a-gem-part-two
In which we wrap up writing a gem and in particular delve into ensure our gem is well tested.
Let's Write a Gem: Part 1
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/lets-write-a-gem-part-one
Ever wanted to write a Ruby gem? Let's do that!
Increase Rails Performance with Database Indexes
- Author: Travis Williams
- Published:
-
- Permalink: /blog/increase-rails-performance-with-database-indexes
If you need to frequently query a database table by a specific column, you should probably index it.
Parsing Dates and Times from Strings using strptime
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/parsing-dates-and-times-from-strings-using-strptime
Datetime strings are complex. Let's turn them into structured data.
Anonymous blocks as function arguments in Ruby
- Author: Stephen Ball
- Published:
-
- Permalink: /blog/anonymous-blocks-as-function-arguments-in-ruby
How you can write your own code to handle blocks passed to Ruby functions