DEV Community

Timothy Rice
Timothy Rice

Posted on

I'm Moth, and this is my first post!

Hi, I'm Moth. A husband and father of two, I enjoy fishing, hiking, DIY projects, playing Fortnite with family, OSRS, restoring a 1991 Nissan 300zx. I'm an overly optimistic jack of all trades.

I'm just beginning my journey. One of the tasks in this course is to participate in the community. This is how I found DEV, and I'm grateful for the opportunity to meet and learn from each of you here.

This section of the pre-course work has a practice for pseudocode, here is my write up, let me know what you think! :
//Algorithm: Make the bed

// Tasks:
// Spread Fancy Yellow Comforter
// Fold Gray comforter
// Stack White pillows
// Stack Fancy pillows

// Pattern recognition:
// Yellow comforter goes on first
// Grey comforter gets folded
// Fancy pillows are stacked on top of white pillows

// Abstraction:
// Ignore pillow cases
// Ignore white sheet

// Sequence:
//1. Event 1: Spread the comforters:
// Conditional: If (a comforter is yellow) {
// Spread it on top
// } else {
// Gets folded
// }
//Debug: A comforter has a stain on it - what do we do?
// Conditional: If (a comforter is stained) {
// Put it in laundry
// } else if (comforter is yellow)
// Spread it on mattress
// } else if (comforter is gray) {
// Gets folded
// }

//2. Event 2: Stack the pillows:
// Conditional: If (pillow is stained) {
// Put it in laundry
// } else if (pillow is white) {
// Put it on bottom
// } else if (pillow is fancy) {
// Put it on top
// }

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay