@StatelessCode
  @StatelessCode
Stateless Code | Codecast: Create a RubyGem 81: Refactor ConvenienceMethods - Part 3 @StatelessCode | Uploaded October 2021 | Updated October 2024, 2 hours ago.
This is the 81st video in the NerdDice create a RubyGem series. In this video Mike picks up where he left off in the previous video and finishes refactoring the ConvenienceMethods module.

This video covers:
00:00:12 Introduction
00:00:25 Continue troubleshooting of remaining failures caused by consolidating
00:07:46 Get regular expression case statement down to 2 when statements and an else
00:09:32 Consolidate total_ pattern like roll_ pattern
00:12:49 Finish regular expression case statement consolidation
00:13:32 Clean up puts statements and unused methods
00:14:39 Address basic Rubocop violations
00:16:21 Write private method to return sides, number_of_dice, and number_to_keep as an array and use destructuring to make variable assignment a one-liner
00:18:32 Split define_total_nndnn into a subroutine to determine whether to use total_dice or roll_dice
00:23:53 Refactor get_number_of_dice_from_method_name
00:26:00 Try to reduce remaining 2 lines of module length by eliminating get_bonus_from_method_name and get_penalty_from_method_name to get below RuboCop threshold. Creates Assignment Branch Condition size violation
00:28:24 Attempt to solve modifier problem a different way. It works and all RuboCop violations are cleared
00:32:37 Commit, push, update backlog


This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Codecast: Create a RubyGem 81: Refactor ConvenienceMethods - Part 3NerdDice.com Retrospective 4 - It is a Long Way DownCodecast: Create a RubyGem 54: Write roll_ability_scores Spec and MethodCreate a RubyGem 93: Refactor RuboCop to Enable New Cops by Default for the GemCodecast: Create a RubyGem 63: Create 0.3.x Stable Branch and Prune Old BranchesCodecast: Create a RubyGem 88: Add Ruby 3.1 to GitHub Actions and Update BundleGet Devise Working with Turbo in Rails 7Codecast: Getting Started with Rails 7 26: Fix Rich Text Fixtures and ValidationsInstall Ubuntu 24.04 LTS DesktopMediocre Karaoke - Dust in the Wind by KansasCodecast: Create a RubyGem 86: Retro on Version 0.4.0 (Now with Mediocre Karaoke)Write and Debug Happy Path System Tests for Devise Reset Password

Codecast: Create a RubyGem 81: Refactor ConvenienceMethods - Part 3 @StatelessCode

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER