ryanbigg

ROM and Dry Showcase: Part 4

This is the 4th (and final) part of a 4 part series. Part 1: Application + Database setup Part 2: Validations + Transactions Part 3: Testing In this last part, we're going to make it so that our application can receive and respond to HTTP requests. So far, we've been seeing how to use gems either from the dry-rb suite of gems, or the rom-rb suite of gems. In this part though, we're going to be using a gem from a different suite, a...

ryanbigg

ROM + Dry Showcase: Part 3 - Testing

This is the 3rd part of a 4 part series. Part 1: Application + Database setup Part 2: Validations + Transactions In this 3rd part, we're going to look at how we can test the application that we've built so far. In particular, we'll test three classes: The contract -- to ensure it validates input correctly The repository -- to ensure we can insert data into our database correctly and that we could find data once it is inserted The...

ryanbigg

ROM and Dry Showcase: Part 2

This is the 2nd of a 4 part series. You can read Part 1 here. In Part 1, we built an application called Bix and made it so that the application could talk to a database. We did this by using some gems from the ROM suite of gems, namely rom and rom-sql. In this part, we're going to look at how we can tidy up our code by using two additional gems, this time from the Dry suite of gems: dry-system and dry-auto_inject. You might be...

ryanbigg

The 2018 MacBook Pro Keyboard Drives Me Crazy

I recently upgraded from a 2015 MacBook Pro to a 2018 MacBook Pro. And by "recently", I mean back at the start of June. I wanted a new MacBook Pro because of the faster performance that a new computer would give me. Work (Culture Amp) was also upgrading their fleet of Macs and I was one of the lucky people to get a new one. So I've been using this computer as a work computer for almost 3 months now and, my god, the keyboard...

ryanbigg

Culture Amp Junior Engineering Program Discontinued

For the past two years, I have ran not one but two successful Junior Engineering Programs (JEPs) at Culture Amp. The official number of developers that I have trained there is 19. But I trained a bunch more developers from time-to-time as well. So the proper total would probably be in the range of 30-40 developers at Culture Amp that I have helped train, support and grow over the past two years. I am really proud of this work that I...

ryanbigg

Working Towards Integration Testing Duolithic Applications

I've been revisiting Twist v2 recently. It's my book review tool that I've rebuilt multiple times over the past 8 years. Its latest incarnation is what I'm calling a "duolith": a very light Hanami backend application with a GraphQL API, and a frontend built with React and Apollo. The backend and the frontend codebases are kept in separate directories in the same codebase. This allows for separation between the Ruby and...

ryanbigg

Junior Engineering Program: Resources

This post is part of a series of posts about the first cohort of the Culture Amp Junior Engineering Program (JEP). You can read the first two posts here: Junior Engineering Program: Launch Junior Engineering Program: Onboarding In the last post I covered the process of what we did in the weeks immediately following the juniors starting, but didn't talk too much about what we taught them during those or subsequent weeks. That is what...

ryanbigg

Web Directions Code Leaders: Hiring Juniors

Here are my raw speaker notes for my Web Directions Code Leaders talk, titled "Hiring Juniors". The video will be online later. The slides for this talk are available here on Speakerdeck Intro [slide] Hi, I'm Ryan. You know that part already. What you might not know is that I've been mentoring juniors on-and-off for close to a decade now and I've had varying rates of success. I've mentored juniors who have gone on to become...

ryanbigg

My thoughts on Hanami

(This was originally posted as a comment on Reddit) This blog post has been translated into Japanese, thanks to @hachi8833! I've been toying around with Hanami for a few weeks now and imo it feels better than Rails. If you want to see some code rather than text, here's my little example app I've been building with Hanami. Here are the top three things that I like about Hanami, in long form: Repository pattern instead of Active...

ryanbigg

How require loads a gem

In modern versions of Ruby, you can use the good old require method to load a gem. For instance, if you've got the gem activesupport installed, you can require everything inside of activesupport (including the kitchen sink) with this line: require 'active_support/all' You might've just tried to open up irb and run that line, and it might've worked for you... assuming you have activesupport actually installed. It works on my machine,...