A human, interested in building products and software.
Testing in Go
Suggest a topic
Testing in Go: Stop Leaking Files
No test suite is perfect. Some test suites are missing good helper functions; others are under-configured or over-custo...
Four Steps to Daemonize Your Go Programs
Hands-on introduction for the best four-step approach to daemonizing your Go programs
Understanding bytes in Go by building a TCP protocol
Learn everything you need to know to work with bytes and slices of bytes (byte) by building a chat TCP-based protocol.
Testing in Go: WebSockets
WebSockets offer duplex communication from a non-trusted source to a server that we own across a TCP socket connection....
Testing in Go: HTTP Servers
Go's a great hammer for a lot of nails, one of the areas where I find it fitting is building HTTP servers. The `net/htt...
Testing in Go: Clean Tests Using t.Cleanup
Go v1.14 ships with improvements across different aspects of the language. Two of them are brand new `t.Cleanup`, and `...
Testing in Go: Golden Files
Hardcoding the expected values in an assertion is a straightforward approach in testing. Most of the time, we know the ...
Make resilient Go net/http servers using timeouts, deadlines and context cancellation
When it comes to timeouts, there are two types of people: those who know how tricky they can be, and those who are yet ...
Testing in Go: Test Doubles by Example
One of the biggest misconceptions is that doubles are a specific implementation of mocks or other testing constructs th...
Testing in Go: Dependency Injection
In software engineering, over the years folks have developed many patterns, techniques and refactoring maneuvers. Some ...
Simple Golang database seeding abstraction for Gorm
One of the most feature-full ORMs for Go that I have worked with is Gorm. If you would like to learn more about it, I r...
Testing in Go: Fixtures
When I was researching the topic of test fixtures, I couldn't find much about their beginnings. My first search was abo...
Testing in Go: Subtests
_Before we begin: The content in this article assumes knowledge of table-driven tests in Go. If you are unfamiliar with...
Testing in Go: Table-Driven Tests
Coming from Ruby, which has excellent testing tools and libraries, the notion of table-driven tests was unusual for me....
Testing in Go: go test
If you're going to remember anything from this article, remember this: `go test` is a command which automates the execu...
Testing in Go: Naming Conventions
Programming languages and tools often have conventions. These conventions help make our work more straightforward. Just...
Testing in Go: Writing Practical Failure Messages
All developers appreciate code that works, yet we spend much of our working hours debugging existing code. When fixing ...
Testing in Go: Failing Tests
In the previous article on testing in Golang, titled [Testing in Go: First Principles](/testing-in-go-first-principles)...
Testing in Go: First Principles
If you have any programming experience, whether that's as a student or a professional, there's a good chance you have h...
Deep Dive in the Upcoming Go Error Inspection Changes
The team behind the language started working on a document titled ["Go 2 Draft Designs"](https://go.googlesource.com/pr...
My First dotGo Conference
This year's dotGo in Paris was awesome. The people were great in general. The organisers and volunteers did a good job....
Tell your team you are running late using Google Home, Google Cloud Functions, Golang and Twilio
In this age of cloud platforms, Internet of Things and SaaS products that are easy to integrate with, the effort of aut...
Barebones model of Spotify's 'Recently Played' screen using a Least Recently Used (LRU) cache in Golang
One of the most used caching schemes is Least Recently Used (LRU). Caches that use this eviction strategy will remove t...
When and Why to use a Least Frequently Used (LFU) cache with an implementation in Golang
Over the years, people involved in computer science and engineering have worked really hard on optimisations of various...
Golang Datastructures: Trees
You can spend quite a bit of your programming career without working with trees, or just by simply avoiding them if you...
OTP in Elixir: Learn GenServer by Building Your Own URL Shortener
Looking at any programming language you will (hopefully!) find a rich and useful standard library. I started my professi...
Understanding the basics of Elixir's concurrency model
If you come from an object-oriented background, you might have tried concurrency in your favourite OO language before. ...
A deeper dive in Elixir's Plug
Being new to Elixir and Phoenix, I spend quite some time in the projects' documentation. One thing that stood out for m...
Validate your passwords using Elixir and haveibeenpwned.com's API
Unless you've been living under a rock for the last couple of years, you probably know what two-factor authentication (...
Data structures in Go: Stacks and queues
In a previous post[^1], we took a look at linked lists and how we can apply them in a hypothetical use-case. In this po...
Data structures in Go: Linked lists
Data structures and algorithms are the bread and butter of computer science. Although sometimes they appear scary to pe...
Create and manage MacOS LaunchAgents using Go
If you have ever tried writing a daemon for MacOS you have met with `launchd`. For those that don't have the experience...
Packing multiple binaries in a Golang package
Recently, while writing a small Golang program for setting reminders I came across a small confusion that I guess most ...
Understanding why and how to add idempotent requests to your APIs
Idempotency is an often used term in computer science. It's meaning to some might not be known, to others it's very wel...
Versioning REST APIs: The Theory and Using Grape in Ruby
Nowadays, having an API on top of your application is considered common. I've often been disapointed when I've been ex...
What happens when you DELETE a resource?
Have you ever found yourself publishing an API, either an internal or a public one? Have your ever heard from the consu...
Sprinkle some HATEOAS on your Rails APIs
REST as a concept was introduced by [Roy Fielding](https://en.wikipedia.org/wiki/Roy_Fielding) in his doctoral thesis, ...
The practicality of designing and describing your APIs
Learn your tools: Navigating your Git History
Starting a greenfield application everyday is nearly impossible, especially in your daily job. In fact, most of us are ...
How Rails handles status codes
Recently, I have been building an API as part of my day job. Rails is a great framework to build APIs in, and it has be...
A bit about decorators and presenters
Object-oriented programming and design is (or, was?) a revolutionary way of thinking and designing programs. It introdu...
Git history is underrated
Most of us use Git on a daily basis. We have all read a book (or part of a book) about Git, we learned how to do commit...
Write your first Rubygems plugin
I don't think that at this point Rubygems needs any introduction. Except if you have been living under a rock for the l...
You Can't Rescue Them All
Imagine you just woke up, took a shower and you immediately go to your coffee machine to make that strong, large, morni...
Refactoring in Ruby: Primitive Obsession
We've all been at this point where we have bloated our classes with primitive values all over the place. Usually, we dr...
PostgreSQL Indexes: B-Tree
Indexes in relational databases are a very imporatant feature, that reduce the cost of our lookup queries. In the last ...
PostgreSQL Indexes: First Principles
We have all heard about indexes. Yeah, that thing that it's automatically added to the Primary Key column that enables ...
Building a Weather Widget using RxJS
Reactive Programming is a very interesting programming paradigm that I started pondering with last week, which ended up...
Understanding Reactive Programming with RxRuby
Reactive Programming is a relatively new and interesting programming paradigm that has picked up quite a bit of popular...
Refactoring in Ruby: The right place for a Builder?
Recently I started tackling refactoring in Ruby with my blog posts. It seems that it's one of the most popular topics t...
Running a Rails Application on Deis
In the last couple of years, we have seen a lot of development in the devops field. It’s becoming much easier for devel...
Refactoring in Ruby: Smelly Parameters Lists
Ruby is a really clear and expressive language, but we developers sure know how to make a mess. Even when you think you...
Refactoring in Ruby: TDD your way through Extract Class
There are a lot of refactoring patterns available out there for us. I assume that most of us use these patterns, at cer...
Rails, Secure Cookies, HSTS and friends
Ruby on Rails as a framework does a lot of things for us developers. We get a very customizable middleware stack, great...
Why and how to test Rake tasks in your Rails application
Most of us write some Rake tasks and completely forget about them. In fact, we rarely give any love to our Rake tasks. ...
Writing command line apps with Elixir
Elixir is a really cool language. Although I do not have much experience with it (yet), I am always trying to build int...
Getting Started with Minitest
Learn how to integrate Minitest into your Ruby project and reap the benefits of test-driven development. Read the arti...
Testing Ruby Mixins with Minitest in isolation
Mixins in Ruby are a very powerful feature. But knowing how to test them sometimes is not so obvious, especially to beg...
Filter request params from Phoenix logs
Phoenix is a really powerful and customizable framework. One of it's small but important configurations is filtering cu...
How to set tests as pending in your ExUnit suite
Elixir's built in testing library is called ExUnit. It's a proper testing framework, which, although simple, gives the ...
Write and publish your first Elixir library
As some of you have heard lately, [Elixir](http://elixir-lang.org) is the new hotness. Is it just hype? Well, I though...
Variable hoisting in Ruby
Have you ever heard of hoisting? Well, regardless if you have or you have not, Ruby has an interesting hositing mechani...
TDD Patterns: Humble Object
We all know that there are different design patterns. They are all quite trivial to learn, but, the trick lies in apply...
Test Doubles: in theory, in Minitest and in RSpec
Those of us that do **T**est **D**riven **D**evelopment have heard about doubles, mocks, stubs, fakes and spies multipl...
Exception handling and testing it with Minitest
When testing our code, we usually go for the happy path (TM). We are awesome developers, we test our code, we are caref...
Testing Ruby's floats precision
Float precision in Ruby is a well known quirk. But when testing floats, not many of us bother to remember this and make...
Migrating a test suite from RSpec to Minitest
I have always wanted to have some fun with [Minitest](https://github.com/seattlerb/minitest) but until this weekend I n...
How to write Rails middleware
In my last two posts about Rack, I wrote about [the basics of Rack](/rack-first-principles) and [how to write middlewar...
There has always been a lot of noise about Test-Driven Development (TDD), best practices and it's pros and cons. I don'...
Rack: Writing middleware
Last time I wrote about [the basics of Rack](/rack-first-principles) and writing a tiny Rack application. If you are un...
Rack: First Principles
About three years ago, when I started working with Ruby and Rails, I noticed that the term "Rack" always came up in my ...
In and out of PostgreSQL using COPY
I am pretty sure everyone of us has been in a situation where you needed to generate a report and/or extract some data ...
Implementing "the lovely" Singleton Pattern
In every software, there are some things that have to be unique. For example, a Rails app has only one logger. Also, ap...
POV: Startup Weekend Skopje
Startup - in my opinion it's the most ear-catching word nowadays. It represents growth, energy and, of course, billions...
How to: YourGem.configure
Really cool gems, like Carrierwave for example, have this neat feature of configuring the gem in runtime. It allows you...
RailsConf 2015 talks that you should watch
Recently Confreaks uploaded a ton of RailsConf 2015 talks on Youtube. Although I haven't watched all of the talks, thes...
How to write RSpec formatters from scratch
Recently I did an experiment with RSpec's formatters. Turns out, the output that RSpec returns when you run your specs ...
Pattern to pattern: Template Method & Strategy
Recently I wrote about the [Template Method pattern](/template-method-pattern-in-ruby/) and how it's implemented in Rub...
Exploring new methods in Ruby 2.2.0
For those late to the Ruby 2.2.0 party like me, aside from the changes (and updates) the core team made under the hood ...
Using multiple sources in a Gemfile
Gemfiles require at least one gem source, in the form of the URL for a RubyGems server. Although it's not recommended, ...
Template Method Pattern in Ruby
When working as a software developer, knowledge of some design patterns is always welcomed. If you've never heard about...
AngularJS Services Part 4: Value and Constant
So far we saw the magic of creating AngularJS services using [Provider](/angularjs-services-part-1), [Factory](/angular...
AngularJS Services Part 3: Service
So, Service is basically the same as Factory, it just has one key difference. Service treats the function as a construc...
AngularJS Services Part 2: Factory
If you don't know the basics of AngularJS service, I recommend you read the other article I wrote on [AngularJS Service...
AngularJS Services Part 1: Provider
I started using AngularJS couple of months ago, when [we](http://siyelo.com#team) got a new client that wanted us to he...
SOLID Principles in Ruby
Regardless of your knowledge level, as a programmer you love to write awesome code. It's what we do. We like it and we ...
2020 Copyright © Ilija Eftimov |