I know I fixed this bug before. But how?

Gandalf: I have a vague memory of this place

Store in wetware (our brains)

Make the solution public

Remember in-house

> Value for SWIFT_VERSION cannot be emptySolution: Go to `[Target] Build Settings > Swift Language Version` and set it to `Swift 4.2`> Your development team, "______", does not support the Network Extensions capabilitySolution: Use the company developer account, instead of your personal account.> Unlock [device] to Continue.  Xcode cannot launch [project] on [device] because the device is locked.Solution: Leave XCode running.  Unplug the device's USB cable and plug it back in.

Keep private notes

Tip: Track down what the actual solution was

The best time to do a thorough investigation is when you have all the pieces in your mind already.

Tip: Ensure your testing cycle is smooth

Having a fast and automated development-test cycle is important for such investigations.

"start:watch": "nodemon -w src -e '*' -d 2 -x 'yarn run start'",

Tip: When things are fubar, throw an error with a sensible message

// Bad code: If the type is invalid, the caller gets back a null.
// Some time later the null value will cause an error, but the
// source of the problem will not be clear!
function getVehicle(type, opts) {
if (type === 'car') {
return new Car(opts);
} else if (type === 'bicycle') {
return new Bicycle(opts);
}
return null;
}
// Better code: If the type is invalid, the program immediately
// informs the developer, with a clear message and stack trace
// that can direct the developer to a solution.
function getVehicle(type, opts) {
if (type === 'car') {
return new Car(opts);
} else if (type === 'bicycle') {
return new Bicycle(opts);
}
throw new Error(`Vehicle type '${type}' not recognized`);
}

Anecdote: Putting obstacles in front of junior devs

--

--

--

Lover of JavaScript and GNU/Linux

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

[FSearch] Beautiful Flutter search bar

What should companies know before using .NET

Dreamix, custom software development, bespoke software development, dotnet framework, dot net platform, .net core 6, dot net six, .net newest version, dot net newest version

About the Real-Time Operating Systems

Vault HA using Raft

Swallow- A new programming language with python-like syntax but as fast as c(currently under…

Maker’s Schedule

My Third HTML Class : Learning CSS

Microsoft Exam 70–483 — Programming in C#: Overview and Journey’s Setup

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Joey Twiddle

Joey Twiddle

Lover of JavaScript and GNU/Linux

More from Medium

Template Engine (Ejs vs Pug )

8 Node.js Frameworks Every Developer Should Know [UPDATED]

Interact with object

Make meaning of receipt data using JavaScript fetch() and Space OCR API