Overloaded Args

Programming Blog

Dec 5, 2024

Ruby Testing

This is an overview of testing techniques for Ruby, if you’ve not seen them before or if your getting back into testing, don’t worry, but it’s pretty ancient stuff now....

Dec 2, 2024

Rapid Cacheing Search

This post is a very specific combination of two Ruby mechanisms, it will give you more of an introduction into the <=> operator. Search The problem domain for this solution...

Nov 22, 2024

Ruby Cacheing

I’m going to use this post to build up slowly the idea of cacheing in Ruby, I’ve got it wrong in the past and not thought about it properly, so...

Nov 20, 2024

Counter Caches

What are counter caches and how are they useful? Well the general idea is to provide an optimisation to an application which gives you information about the number of records...

Nov 20, 2024

Rails Enums

This is a quick post about the use of enums in Rails. The main point of it is to show that there can be problems if you don’t set them...

Nov 19, 2024

Ruby Profiling

As we know debugging is a skill all in itself, there are many tools to verify and improve the state of your code, including linters, load testing, static analyzers, security...

Nov 19, 2024

De Morgan's Laws for Developers

Augustus De Morgan was a British Mathematician and Logician, known for De Morgan’s Laws used in Computer Science among other fields. His first paper was called “On The Structure Of...

Nov 18, 2024

Revisiting Rails Records

.sole If this post is a TLDR; and you don’t know about the .sole method, all you need to know is that with the .sole method added in Rails 7,...

Dec 4, 2023

Databases and Indexing in Rails

This post is all about databases and your persistence layer, we have to mention the majestic monolith, because if you seperate your apps you will have to manage your migrations...

Dec 3, 2023

Definition of Done

Here is a bit of an intro into the world of Scrum, what it is, and why it matters, I will also touch on Agile and talk a bit about...

Nov 18, 2023

Api Updates

I originally wanted to consider delivering this blog post as a talk, but the belief that it would need to be held to quite high standards has instead transformed it...

Nov 17, 2023

Ruby Interfaces

This post is an attempt to get to grips with the different ways to structure Ruby code. It’s very different to the ways to structure different classes because that has...

Nov 13, 2023

Marshalling and Serialization in Ruby

This is a quick post about a little known feature of Ruby that is extremely powerful. It has it’s roots in serializing data. What it allows you to do is...

Dec 30, 2022

The Magic Of Git Hooks

I wanted to write a post about git-hooks, because I think they are underused. They are very flexible. You can use them to aid your team’s productivity and can use...

Dec 28, 2022

The Other Way To Write Class Methods

There is another way to declare class methods, which isn’t as obvious if you come across it somewhere in the wild. Normally you declare a class method like: class Rotor...

Dec 18, 2022

Struct Inheritance

Here is a quick post to remember the days in Ruby that we used to use the struct inheritance pattern when we didn’t want to define classes with loads of...

Aug 30, 2022

Ruby 2.7 Case Statements & Pattern Matching

The Ruby case statement has been around forever. It’s been used and misused in many situations where a piece of code can be reduced from a long if statement with...

Aug 30, 2022

Proc and Lambda in Ruby

This post is more of a historical post about a feature in Ruby that has some nuances that were talked about a long time ago. They aren’t really that important...

Apr 19, 2022

Exponential Backoff in Ruby

This is a really quick post about the importance of exponential backoff and retry loop. In Ruby sometimes we want to use exception handling to make our programs handle errors...

Feb 22, 2022

Kotlin On The Block

Today I’m going to outline my brief foray into the world of Kotlin. I guess it was brought on by a nagging feeling of what is this data science paradigm....

Aug 15, 2021

Idiomatic Code

||= [] Sometimes whilst writing Ruby code we have to use a pattern that is repeated a lot when building arrays. Idiomatic code to achieve this looks like this: def...

Aug 15, 2021

Attribute Accessor and Assignment

This post is a super simple post for complete Ruby newbies with some interesting thoughts about OOP. It should be suitable to anyone who is interested in OOP. The most...

Mar 20, 2020

Regression Testing Medium Size Applications

Have you ever wanted to do pre-production checks before rolling out a full deployment? Sometimes with increasing team size you may find that your branching model leaves potential for your...

Oct 23, 2019

Ruby Method Argument Types

There are several features of Ruby which take a bit of getting used to as the syntax for them isn’t immediately clear what they do. Some of these are explained...

Oct 19, 2019

Service Objects

Service Objects have been around in the Rails world for a while now. They don’t come as part of the framework, you create them yourself. The general principle in Rails...

Oct 18, 2019

Useful Commands For Navigating The Shell & Psql Sessions

Useful Commands ZShell I use ZShell and today I found cd … which goes up two directories. I am guessing it’s an alias method defined in a shell config file...

Oct 18, 2019

Rails, Whenever, Capistrano & Cron

Cron comes from the 1970s but is still used in Rails apps to schedule jobs on VPS. There are two ways in Rails to set the crontab from your config/schedule...

May 11, 2019

Rails Preproduction Checks

Rails Preproduction Checks Server Check patch levels for whichever OS or software you are using. Are you storing your data in line with Data Protection Directive or GDPR? e.g. Heroku...

Apr 14, 2019

Git vs Https Protocols

Git Protocol for pushing where git protocol is blocked When using the git protocol as opposed to the ssh protocol facilitated by a daemon, does not use any authentication. If...

Dec 23, 2017

Modern Design Patterns

The original Gang Of Four, Design Patterns was released in 1994 and it paved the way for software development methodologies at the time. Modern programming languages contain many syntactic nuances...

Dec 20, 2017

Version Management Tools and Swift Install

Tools like RVM, RBenv, Pyenv, NVM and Swiftenv are invaluable when working with different projects. Wayne Seguin was the guy behind RVM, it literally makes Ruby development using the latest...

Dec 19, 2017

On Pair Programming

Just in case, like me, you have been living under a rock for a really long time, here is a reminder that pure pair programming TDD works like this: “hey,...

Dec 18, 2017

Loops

A little bit of history on loops with reference to Go and Java: The Do While loop is a completely different thing than the While loop, however the Go language...

Dec 5, 2017

Golang 1.9

Some steps for installing Golang in Ubuntu After you: sudo add-apt-repository ppa:gophers/archive sudo apt-update sudo apt-get install golang-1.9-go then you can add this to your ~/.bashrc, ~/.zshrc export GOPATH=$HOME/go export...

This project is maintained by overloadedargs