DEV Community

loading...
Cover image for Not Captain Obvious

Not Captain Obvious

Nick Taylor (he/him)
Lead software engineer at Forem. Caught the live coding bug on Twitch at livecoding.ca
Originally published at iamdeveloper.com Updated on ・2 min read

I've been reading @swyx 's book "The Career Coding Handbook". It launched on July 1st. Although I am not finished the book, I have thoroughly been enjoying it so far.

I'm at a point in the book where the focus is about writing. One of the references is to the chapter Obvious to you. Amazing to others. from Derek Sivers book "Hell yeah or no".

I related to this, because like many, I debate whether I should write about something that is probably obvious, or that I think is obvious.

So of course I Tweeted that out.

Hint, it may be obvious to a subset of people, but not everyone, so there is definitely an audience.

This sense that things are obvious is so prevalent, that hotels.com created the character Captain Obvious, a hilarious character in their commercials. Also, it helped me make a great title for this post. 😎

@ben has posted about this before as well.

With so many concepts, patterns, tech stacks and new stuff popping out all the time as well as all the tech and business jargon out there, everything is not obvious and that's OK. We just need to learn from each other and keep spreading the knowledge.

For example, did you know that in JavaScript you can get an array with unique entries by using a Set?

const arrayWithDuplicateValues = [1, 2, 3, 3, 1, 5];
const uniqueArray = Array.from(new Set(arrayWithDuplicateValues);
Enter fullscreen mode Exit fullscreen mode

or

const arrayWithDuplicateValues = [1, 2, 3, 3, 1, 5];
const uniqueArray = [...new Set(arrayWithDuplicateValues)];
Enter fullscreen mode Exit fullscreen mode

Side note, check out Have a Handy JS Snippet You Want to Share?.

As a fun exercise, I thought it would be cool if people commented with stuff they think is obvious. It can be anything. A trick/tip in a programming language, something about a tech stack, a concept, jargon or whatever comes to mind.

Who knows? Maybe what you post in the comments could be your next blog post?

Go!

Discussion (6)

Collapse
darkwiiplayer profile image
DarkWiiPlayer

One of the most obvious things developers seem to forget on a daily basis is that... We all forget things. Even things we discovered outselves. Even things we did ourselves. In a year nobody will remember why that <script> tag shouldn't be deferred.

Collapse
sebbdk profile image
Sebastian Vargr • Edited

This is so contextual, obviously, the more obvious you have, the more obvious it is, since you have more obvious to draw from.

2+2 is obviously 4.
But it is only obvious because most people memorize it an an early age.

We could also just call obvious, experience. :)

Collapse
raspberrytyler profile image
Tyler Smith

The trick you did here for getting unique array elements was a godsend at work today. I remembered that I saw it in this article, looked it up and everything worked perfectly!

Collapse
raspberrytyler profile image
Tyler Smith

Whoa, that unique from array trick is super nifty!

Collapse
nickytonline profile image
Nick Taylor (he/him) Author

Here's one that I think is pretty obvious, so I'll drop it here.

Collapse
thedaveamour profile image
David Amour

The book sounds interesting, thought I might take a look but $59 is a bit steep!