HN user

maynman

157 karma

https://mitchum.blog

Posts28
Comments34
View on HN
www.askhnwisdom.com 4y ago

Show HN: Hacker Wisdom

maynman
4pts0
www.askhnwisdom.com 4y ago

Show HN: Hacker Wisdom

maynman
1pts0
flashdrivesforfreedom.org 5y ago

Flash Drives for Freedom

maynman
4pts0
mitchum.blog 5y ago

Minimum Viable Dice Wars

maynman
2pts0
www.wsj.com 5y ago

Parler Sues Amazon

maynman
3pts0
news.ycombinator.com 5y ago

Ask HN: How do crowdsourcing apps protect against bad data?

maynman
8pts0
mitchum.blog 5y ago

It’s Time to Revisit Minesweeper

maynman
1pts0
solana.substack.com 5y ago

Gilded Rage

maynman
2pts0
mitchum.blog 6y ago

How to Store JSON in an Environment Variable

maynman
1pts0
mitchum.blog 6y ago

Building a Crossword Puzzle Generator with JavaScript

maynman
42pts8
mitchum.blog 6y ago

Show HN: A simple ear trainer for identifying music intervals

maynman
2pts0
mitchum.blog 6y ago

How to Build an Ear Trainer with JavaScript

maynman
3pts0
mitchum.blog 6y ago

Null Values in SQL Queries

maynman
137pts152
mitchum.blog 6y ago

A Web Developer’s Attempt to Make Pong with Unity in One Night

maynman
2pts0
digistatement.com 6y ago

Twitter app not working on android

maynman
1pts0
mitchum.blog 6y ago

Landing and Excelling at Your First Web Development Job

maynman
2pts0
mitchum.blog 6y ago

Programming Languages for Beginners

maynman
1pts0
news.python.sc 6y ago

Pythonic News

maynman
3pts0
mitchum.blog 6y ago

What Is an Algorithm?

maynman
1pts0
mitchum.blog 6y ago

What Is an Algorithm?

maynman
2pts0
www.washingtonexaminer.com 6y ago

YouTube may have suppressed videos of Tulsi Gabbard following Clinton spat

maynman
15pts1
mitchum.blog 6y ago

Basic Computer Literacy

maynman
1pts0
mitchum.blog 6y ago

How to Build Hangman with JavaScript

maynman
2pts0
mitchum.blog 6y ago

How to Build Snake with JavaScript

maynman
2pts0
mitchum.blog 7y ago

How to Build Minesweeper with JavaScript

maynman
79pts59
mitchum.blog 7y ago

How to Build Minesweeper with JavaScript

maynman
3pts0
mitchum.blog 7y ago

Show HN: I Built Tic Tac Toe with JavaScript

maynman
2pts0
mitchum.blog 7y ago

Show HN: I Built a Simple Matching Game with JavaScript

maynman
1pts0
Graphics for JVM 6 years ago

I use IntelliJ for work every day and I agree, so many of its features make work so much better.

That sounds pretty cool. I also found it difficult to optimize for both performance and word density with the approach I took. Maxing out on one seemed to negatively affect the other. I'm sure there have to be some better algorithms out there to do this sort of thing.

That's a fair point. I guess the main argument in favor of single return statements in modern programming languages is ease of debugging and logging. Like most things in programming, you have to consider the trade-offs. A few return statements isn't the end of the world, but after too many you might just want to make some more functions.

Yep, that's why I chose to implement it that way. I generally prefer single return statements. Plus my day job enforces it as part of the coding convention, so force of habit too haha.

Thanks for the kind words, and thanks for sharing! That is a cool pattern. I definitely have a little too much nesting going on in that function, and it could use some refactoring.

I've always felt funny about multiple return statements though, which is probably one reason why a pattern like this doesn't usually come to my mind when considering how to refactor code. I've always liked having one exit point at the end of functions because programmers naturally expect a function to return at the very end. I think minimizing the number of return statements is generally a good thing, but perhaps I have been too strict about applying that rule.

Good call! I agree, I think that would be better. Unfortunately the WordPress theme I'm using wouldn't let me do that by default. I'll have to do some research to see if there is a good plugin for that :)

I think this observation applies to software development generally, not just open source projects. In "The Mythical Man Month", Fred Brooks talks about the concept of "the surgical team". One thing he stresses is the idea of having a single, overarching vision of what the architecture should look like. This becomes harder to achieve as more people are added to a project. More opinions are tossed around and debated. Lots of people have lots of good ideas, but not all good ideas are compatible with each other.