Open in app

Sign in

Write

Sign in

Sean Shaughnessy
Sean Shaughnessy

9 Followers

Home

About

Jul 20, 2021

Extract Till You Drop

Recently, I watched a video from Uncle Bob where he talked about writing clean code. One of the most striking suggestions that he made is that functions should be very small. He called it “Extract Till You Drop”. …

2 min read

Extract Till You Drop
Extract Till You Drop

2 min read


Jul 6, 2021

Don’t Have Two Problems

Jamie Zawinski once posted this on a message board: “Some people, when confronted with a problem, think ‘I know, I’ll use regular expressions.’ Now they have two problems.”. He wasn’t the first to use this quote, but his use of it seems to be the most famous. Jamie was lamenting…

3 min read

Don’t Have Two Problems
Don’t Have Two Problems

3 min read


Jun 24, 2021

IF-less Programming

There are several alternatives to IF statements in JavaScript. Today, I will be looking at a few of my favorites. These are very useful when working in React as there are limitations to what can be put in a component’s return statement. They are: Ternary Operator (? :) Short Circuit…

3 min read

IF-less Programming
IF-less Programming

3 min read


Jun 9, 2021

Don’t Write CENTS-less Code When Calculating Money

In my last blog: Avoid Magic Numbers in Writing Code | by Sean Shaughnessy | May, 2021 | Medium , I wrote about a number that you shouldn’t be using in you code. This blog, I have another number, or more accurately, a number format, to avoid: expressing money in…

2 min read

Don’t Write CENTS-less Code When Calculating Money
Don’t Write CENTS-less Code When Calculating Money

2 min read


May 20, 2021

Avoid Magic Numbers in Writing Code

Let’s say you wanted to write an algorithm for shuffling a deck of cards in JavaScript. You might start with something like this: for (let i = 0; i < 52; i++) { // … } Notice anything wrong? Someone reading your code may not know how many cards are…

2 min read

Avoid Magic Numbers in Writing Code
Avoid Magic Numbers in Writing Code

2 min read

Sean Shaughnessy

Sean Shaughnessy

9 Followers

Part-time poker dealer and aspiring software developer

Following
  • Nicholas Cancelliere

    Nicholas Cancelliere

  • Dylan Martinsen

    Dylan Martinsen

  • Skylar Buffington

    Skylar Buffington

  • Dylan Paschall

    Dylan Paschall

  • Kelly L. Marcucci

    Kelly L. Marcucci

See all (11)

Help

Status

About

Careers

Blog

Privacy

Terms

Text to speech

Teams