Fractal Banana

Rails Anti-Patterns: How Not to Design Your Database

| Comments

My Talk from Windy City Rails 2017.

When designing a database for your Ruby on Rails application, what looks like the best solution can be a trap. Join us as we expose these database anti-patterns. We’ll model shoes at a fictional shoe store and show both a naive design and more flexible alternatives. We’ll discuss how to represent trees, and see that the simplest solution is the slowest and hardest to query. We’ll explore scenarios where a polymorphic relationship looks like a good choice, but isn’t (and one where it is). Learn these pitfalls before falling into them, and save yourself from sloppy querying and poor performance.

The Arcane Art of Error Handling

| Comments

My Talk from RailsConf 2017, The Arcane Art of Error Handling. Enjoy!

With complexity comes errors, and unexpected errors lead to unexpected unhappiness. Join us and learn how to add contextual data to errors, design error hierarchies, take charge of control flow, create re-usable error handlers, and integrate with error reporting solutions. We’ll talk about recoverable versus irrecoverable errors and discuss how and how not to use exceptions. From internationalization to background jobs, we’ll cover the gamut. Regardless of your Rail proficiency, you’ll learn why expecting the unexpected makes for happier developers, happier businesses and happier users.

My Ruby Story

| Comments

Here’s My Ruby Story, a 45 minute interview where I talk about how I started programming, my introduction to Ruby, California and why it’s special, React.js and it’s pitfalls and more!

My Ruby Story, Brad Urani

Gitfile: A Package Manager for Git Repos

| Comments

I just released the beta version of a new open-source project I put together over the weekend. Gitfile is a lightweight package manager for installing and updating software from git repos. It’s great for installing odd things that live on GitHub and can’t be installed with typical package managers. I built it because there are several things I wanted to include with my dotfiles that can’t be installed with brew, gem, npm, pip or any other common package managers. They’re things like tmux plugins, rbenv plugins, and zsh plugins that I want to install automatically and update with a single command.
Gitfile is written in Go and I’d love contributions and ⭐️s. This was my first experience programming in Go. I haven’t been that interested in learning it because I’m so fond of the newer functional languages, but this type of cross-platform command line app seemed like the right use case. I got started in no time, and became productive more quickly than I ever have with any other language. For me, it’s a limited use case tool because it’s missing a lot of things I rely on when building big production apps. For utilities like this though, I’d use it again.

Active Record vs. Ecto: A Tale of 2 ORMs

| Comments

The video for my RailsConf 2016 talk is up on YouTube

They bridge your application and your database. They’re object-relational mappers, and no two are alike. Join us as we compare ActiveRecord from Rails with Ecto from Phoenix, a web framework for Elixir. Comparing the same app implemented in both, we’ll see why even with two different web frameworks in two different programming languages, it’s the differing ORM designs that most affect the result. This tale of compromises and tradeoffs, where no abstraction is perfect, will teach you how to pick the right ORM for your next project, and how to make the best of the one you already use.

Live Coding Building a Game in Elm

| Comments

I live coded a game recently using my new obsession: Elm

If you haven’t tried Elm, you’re missing out. It’s a purely functional reactive programing language that compiles to JavaScript for front end web development. There are 4 hours of video from on split into 4 parts:
Part 1a
Part 2b
Part 2
Part 3

The finished program is on GitHub. The master branch is the completed program with a computer player AI using the minimax algorithm. branches part-1 and part-2 contain the code I wrote during the livecoding sessions