← All posts

All posts tagged "programming"

Conway's Game of Life: A Functional Approach

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

How I wrote the minesweeper game, Mowing, you can play from the games menu.

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

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

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

How to integrate AlpineJS with Phoenix 1.7

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

Want to see my ElixirConf talk?

Better Go test output

Improving the default `go test` output

Elixir Phoenix and "role postgres does not exist"

Ever hit that error? Let's fix it!

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

Using the cal command to learn some command line mechanics.

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

Four different and differently useful ways you can create functions in Clojure

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

Go famously has a small, simple language spec. That isn't always a good thing.

The Fastest Possible Tests

How fast could programming tests actually be?

Shrink your data into bitfields (and out again)

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

Turning control flows into objects is not only possible it is sometimes more expressive and useful.

Choose Generic Tools

Don't create all of your tools from scratch.

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

Some music albums and some of my own playlists that I find great to listen to while programming.

Connecting Objects with Observable

Using the Observable module from Ruby's standard library

Let's 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

I've written a gem, Hwacha, that wraps Typhoeus for fast, easy, and powerful URL checking.

Customize Your IRB

How to customize your local Ruby REPL to be a more effective tool.

Program Like a Videogamer

Feedback loops are the foundation of learning videogames and learning to program

Gem Spotlight: interactive_editor

Taking a look at the interactive_editor gem and its capabilities.

Rails isn't 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

No need to manage gemset environments per project!

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

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

Ever wanted to write a Ruby gem? Let's do that!

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

Datetime strings are complex. Let's turn them into structured data.

Anonymous blocks as function arguments in Ruby

How you can write your own code to handle blocks passed to Ruby functions