Refactoring Strategies For Ugly Code The Does Everything

Refactoring: Ugly Code That Does Everything

Gabe Schmidt Articles, Development Technologies & Tools, JavaScript, Node.js, Programming, Tutorial Leave a Comment

If you’ve been writing code for a significant amount of time, you’re sure to have seen the—anything but godly—“God Method.” It’s a method that performs way too many processes in the system and has grown beyond all realistic logic to become “The Method That Does Everything.”

This single unsightly method can span dozens, if not hundreds, of lines. Sometimes even over 1,000! This type of “ugly code” is an unbearable beast to maintain. This is why it’s considered a “code smell” or anti-pattern.

In this tutorial, we walk through a tangible “God Method” and step through the process to refactor it into something more manageable and human-readable. Our code is written in JavaScript for a Node.js service, but the principles apply to any language.

Testing React Native with Jest and Testing Library

Using Jest and Testing Library with React Native Part II: Our First Test

Justin Leach Articles, Development Technologies & Tools, JavaScript, React, React Native, Testing, Testing React Native Series, Tutorial Leave a Comment

This is Part 2 of our series, Using Jest and Testing Library with React Native. This post will cover the steps you’ll need to take to write your first test. We will also break down the code line-by-line, so you have a clear understanding of the process.

Using Jest and Testing Library with React Native Part I: Setting Up

Justin Leach Articles, Development Technologies & Tools, JavaScript, React, React Native, Testing, Testing React Native Series, Tutorial 1 Comment

In this post, Part 1 of Using Jest and Testing Library with React Native, I’ll give a brief introduction to Jest, Testing Library, and React Native. Then, we’ll walk through how to set each of them up. This will prepare us for Part 2, creating our first test.

How and Why to Containerize Your Development

John Hoestje Articles, Development Technologies & Tools, Docker, Opinion, Python, Tutorial Leave a Comment

This is a tutorial for how to use the VS Code Remote-Containers extension to containerize your development environment. First, I will discuss my reasons for separating my programming environment and why virtual machines didn’t work. Then, I’ll show a simple example using a containerized Python development environment. Finally, I’ll give you my reasons why containerizing the development environment fits what I’m looking for in a solution.

First Robotics Competition

Lessons in Programming Java Robots

Brad Mongar Articles, Community, Opinion 3 Comments

This year, I was a programming mentor in a robot building competition for high school students. Specifically, one of 11 mentors assisting 40 high-schoolers of the Park Hill Trobots team in the FIRST Robotics Competition.

In this blog, I discuss key lessons I learned as a programming mentor of high school students building a Java-based robot that could run, climb, balance, aim, and release projectiles.