Advertisement · 728 × 90

Posts by Graceful.Dev

Preview
String Format Sometimes Kernel#puts and string interpolation doesn't give us the level of control we want over our program's output. When we need to control numeric formatting and field widths, we need to understand string formats. And that's what this episode is all about!

Sometimes Kernel#puts and string interpolation doesn't give us the level of control we want over our program's output. When we need to control numeric formatting and field widths, we need to understand string formats
graceful.dev/courses/tapastry/modules...

5 days ago 0 0 0 0
Preview
"Historically is like six months ago" In which Jessitron and Avdi discuss the merits of larger and smaller LLMs, and the challenges of code review in codebases with a lot of history.

In which Jessitron and Avdi discuss the merits of larger and smaller LLMs, and the challenges of code review in codebases with a lot of history.
graceful.dev/podcast/historically-is-...

6 days ago 2 2 0 0
Preview
Pathname While the File methods are great for occasional use, for programs that deal extensively in filenames we need to bring out the big guns. Today we'll get an overview of Pathname, Ruby's swiss army knife for path manipulation.

While the File methods are great for occasional use, for programs that deal extensively in filenames we need to bring out the big guns. Today we'll get an overview of Pathname, Ruby's swiss army knife for path manipulatio
graceful.dev/courses/tapastry/modules...

1 week ago 0 0 0 0
Preview
"I've often wished I could fork myself…" Jessitron and Avdi discuss defining AI "Feature Owners" in order to avoid accidental breakage.Watch the video versionShow notesJessitron's

Introducing... "Machines of Code and Grace" - the official Graceful.Dev podcast! In this inaugural episode, Jessitron explains how she's using AI Feature Owners to avoid accidental regressions.
graceful.dev/podcast/ive-often-wished...

2 weeks ago 0 0 0 2
Preview
Filenames Ruby provides a lot of tools for breaking filenames into their component parts, but they aren't always well documented. Today's episode combines goes over some basics as well as a tip you might not be familiar with.

Ruby provides a lot of tools for breaking filenames into their component parts, but they aren't always well documented. Today's episode combines goes over some basics as well as a tip you might not be familiar with.
graceful.dev/courses/tapastry/modules...

2 weeks ago 0 0 0 0
Preview
Virtual Proxy When loading domain objects from an external service, it can be expensive to load up associated objects with them. Today's episode takes a look at a pattern for transparently lazy-loading such associations.

When loading domain objects from an external service, it can be expensive to load up associated objects with them. Today's episode takes a look at a pattern for transparently lazy-loading such associations.
graceful.dev/courses/tapastry/modules...

3 weeks ago 0 1 0 0
Preview
Gsub Today we look at the humble String#gsub method, and learn that it has some surprising tricks up its sleeve.

Today we look at the humble String#gsub method, and learn that it has some surprising tricks up its sleeve.
graceful.dev/courses/tapa...

1 month ago 0 0 0 0
Preview
Assisted Refactoring In today's episode, we'll examine how the availability of tools to aid refactoring can change how we write code.

In today's episode, we'll examine how the availability of tools to aid refactoring can change how we write code.
graceful.dev/courses/tapa...

1 month ago 0 0 0 0
Preview
Fail And Raise Today's episode is about a semantic convention for error handling that I learned from Jim Weirich.

Today's episode is about a semantic convention for error handling that I learned from Jim Weirich.
graceful.dev/courses/tapa...

1 month ago 2 0 0 0
Advertisement
Preview
More Keyword Arguments Today we go a little deeper into keyword arguments in Ruby 2.0/2.1, covering a few use cases we didn't cover in the last episode.

Today we go a little deeper into keyword arguments in Ruby 2.0/2.1, covering a few use cases we didn't cover in the last episode.
graceful.dev/courses/tapa...

1 month ago 0 0 0 0
Preview
Keyword Arguments Today's episode is a guide to transitioning various hash argument idioms to Ruby 2.0/2.1 keywords.

Today's episode is a guide to transitioning various hash argument idioms to Ruby 2.0/2.1 keywords.
graceful.dev/courses/tapa...

2 months ago 0 0 0 0
Preview
Two Refactorings Today's dish is a refactoring approached from two different perspectives. Enjoy!

Today's dish is a refactoring approached from two different perspectives. Enjoy!
graceful.dev/courses/tapa...

2 months ago 0 0 0 0

Graceful.Dev stands in solidarity with immigrants and migrants - our friends, colleagues, students, vendors, and heroes without whom coding work would be immeasurably poorer. I'll be donating the first month of all subscriptions started today to the MICA project here in St. Louis. - Avdi

2 months ago 3 1 0 0
Preview
Sequel, Postgres, JSON Recently we looked at the Sequel library for interacting with SQL databases. Today, we'll use Sequel again to play with the native JSON support in PostgreSQL 9.3.

Recently we looked at the Sequel library for interacting with SQL databases. Today, we'll use Sequel again to play with the native JSON support in PostgreSQL 9.3.
graceful.dev/courses/tapa...

2 months ago 1 0 0 0
Preview
Extracting Ghost Load We've used the "ghost object" pattern to lazily load attributes of a model object. And we've made a macro to easily declare "ghost-loadable" attribute accessors. Today we complete the generalization of ghost loading by extracting a module that makes it easy for any model object to declare lazily-loaded attributes.

We've used the "ghost object" pattern to lazily load attributes of a model object. And we've made a macro to easily declare "ghost-loadable" attribute accessors.
graceful.dev/courses/tapa...

2 months ago 0 0 0 0
Preview
Macro When is it appropriate to metaprogram? Today's episode looks at one situation in which it may be a good choice.

When is it appropriate to metaprogram? Today's episode looks at one situation in which it may be a good choice.
graceful.dev/courses/tapa...

2 months ago 0 0 0 0
Preview
Schwartzian Transform Today's episode demonstrates a technique for speeding up the process of sorting some collections.

Today's episode demonstrates a technique for speeding up the process of sorting some collections.
graceful.dev/courses/tapa...

3 months ago 0 0 0 0
Advertisement
Preview
Ghost Load In today's episode we learn at how to implement lazy loading using the "ghost object" pattern.

In today's episode we learn at how to implement lazy loading using the "ghost object" pattern.
graceful.dev/courses/tapa...

3 months ago 0 0 0 0
Preview
Sequel ActiveRecord has become practically synonymous with SQL database access in Ruby, but it's not the only way to talk to SQL stores. Today we'll explore Sequel, a wonderfully rich tool for interacting with many different SQL RDBMSes.

ActiveRecord has become practically synonymous with SQL database access in Ruby, but it's not the only way to talk to SQL stores. Today we'll explore Sequel, a wonderfully rich tool for interacting with many different SQL RDBMSes.
graceful.dev/courses/tapa...

3 months ago 1 2 0 0
Post image

Since Ruby 3.1 you can find out all of a class' subclasses dynamically--no extra metaprogramming required!

3 months ago 3 0 0 0
Preview
Identity Map In the last episode we looked at the problem of "aliasing", here there are multiple objects representing a single row in a database. Today, we'll look at one possible solution to that problem. Notes: DataMapper: http://datamapper.org/ Ruby Object Mapper (ROM): http://rom-rb.org/ Perpetuity: https://github.com/jgaskins/perpetuity

In the last episode we looked at the problem of "aliasing", here there are multiple objects representing a single row in a database. Today, we'll look at one possible solution to that problem.
graceful.dev/courses/tapa...

3 months ago 1 0 0 0
Preview
Aliasing Today we look at a perncious problem that sometimes plagues code which uses an Object-Relational Mapper (ORM). Documentation of the ActiveRecord inverse_of option mentioned in the episode can be found here: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html

Today we look at a perncious problem that sometimes plagues code which uses an Object-Relational Mapper (ORM).
Documentation of the ActiveRecord inverse_of option mentioned in the episode can be found here: http://api.rubyonrails
graceful.dev/courses/tapa...

4 months ago 0 0 0 0
Preview
Dotenv In this episode we look at a tool that I've found invaluable for managing configuration in my applications.

In this episode we look at a tool that I've found invaluable for managing configuration in my applications.
graceful.dev/courses/tapa...

4 months ago 0 0 0 0
Preview
REPL-Driven Development In today's episode I cover a classic development technique that doesn't get enough press these days. Interactive, exploratory development was and is common in the Lisp world, and Ruby's dynamic nature is aptly suited to take advantage of this style of programming. Today I'll show you how I used REPL-driven development in Pry and Emacs to begin to build a video export tool. By the way, right after I made this episode I discovered that Conrad Irwin had done a RubyConf talk on REPL-driven development. You can watch it here: https://www.youtube.com/watch?v=D9j_Mf91M0I

In today's episode I cover a classic development technique that doesn't get enough press these days. Interactive, exploratory development was and is common in the Lisp world, and Ruby's dynamic nature is aptly suited to take advantage of this style of programming.
graceful.dev/courses/tapa...

4 months ago 3 0 1 0
Advertisement
Using Ruby Struct
Using Ruby Struct For basic mutable data structures, you can't get much quicker and easier than Ruby's "Struct" class!Get these tips in your inbox: https://avdi.codes/devseeds/

For basic mutable data structures, you can't get much quicker and easier than Ruby's "Struct" class! But do you know everything it can do? Full screencast, now free to all!
youtu.be/0fei3uDkjNE

5 months ago 1 1 0 1
Preview
Site News #26: Policy, Structure, and Memoization Hi there, graceful devs! Here’s what’s new in the garden…Content UpdatesThere are two hefty new episodes since the last update! The first one, Pol

Hi there, graceful devs! Here’s what’s new in the garden… Content Updates There are two hefty new episodes since the last update! The first one, Policy as Structure, introduces a powerful approach to architecting your code for flexibility and change.
graceful.dev/site-news-26...

9 months ago 1 0 0 0
Preview
Site News #26: Policy, Structure, and Memoization Hi there, graceful devs! Here’s what’s new in the garden… Content Updates There are two hefty new episodes since the last update! The first one, Pol

We've been busy in the Graceful.Dev garden. Here's what's new!
graceful.dev/site-news-26...

9 months ago 0 1 0 0
Pluggable Selector Pattern in Ruby
Pluggable Selector Pattern in Ruby Originally captured in Kent Beck's classic book "Smalltalk Best Practice Patterns", Pluggable Selector is an under-used strategy for making methods more flex...

Originally captured in Kent Beck's classic book "Smalltalk Best Practice Patterns", Pluggable Selector is an under-used strategy for making methods more flexible. Learn how to use it in Ruby, in this classic Graceful.Dev episode now free to all!
youtu.be/rMsL3ZH4A2s

9 months ago 1 0 0 0
Resist Memoization (Teaser)
Resist Memoization (Teaser) Memoization of a complex object can seem like a free optimization... but there are always trade-offs. Full episode now up for members: https://graceful.dev/t...

Memoization of a complex object can seem like a free optimization... but there are always trade-offs. Full episode now up for members: https://graceful.dev/topic/resist-memoization/
youtu.be/t5UjASNKChQ

10 months ago 1 1 0 0
Post image

Class @@variables are conventionally avoided in modern Ruby. Refine your #Ruby style with Graceful.Dev courses!

11 months ago 4 1 0 0