console.log(
['foo'] != ['foo']
&& ['foo'] <= ['foo']
&& ['foo'] >= ['foo']);
// -> true
This post is for people using a bash shell. I'm assuming you know about bash aliases and Sublime Text snippets. They make your life a lot easier. I'm also assuming you're like me: you're too lazy to set them up--at least the old-fashioned way. Let me show you how to make setting these up easier.
You can set up a bash alias with a command as easy as:
als gitpfom git\ push\ -f\ origin\ master
Bam. Your alias is made and ready to go:
All code is in JavaScript, but the technique discussed is applicable to many languages.
50% of "else" statements are unnecessary. Not only that, they also increase bugs and decrease readability and maintainability. A coding technique to counter this is "guard clauses". Using them has the following benefits:
- Thinking in terms of guard clauses instead of if/else puts you in a frame of mind where you are more likely to catch bugs.
- This pattern increases code readability (and thus maintainability)
- It Keeps Code Left, which again increases readability
const assert = require('assert'); | |
class Descriptor { | |
set(instance, value) { | |
instance[this.name] = value; | |
} | |
} | |
class Grade extends Descriptor { | |
set(instance, value) { | |
if (!(0 <= value && value <= 100)) throw new Error(`Value must be between 0 and 100 but was "${value}".`); |
Table of Contents generated with DocToc
Why this article? "The engineer interviewing process is broken." One reason is that the assessments most commonly used predict much worse than the best assessments. This post discusses common assessments and their better alternatives.
When interviewing someone, you want to:
- predict if they would be a fit,
- predict if they meet your hiring bar, and
- give them a positive experience.
Giving them a positive experience is important even if you decide against offering them a position. However, this article focuses on how to predict if they meet your hiring bar.
- Do not enable encrypted home directory, as you will be in a world of hurt. It's also going away...
- First time you run
sudo apt-get update
you will experience a SEGV from "appstreamcli".- https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/1579712
- You can ignore this and run
sudo apt-get dist-upgrade
seemingly without further issues (as of 2017-01-12)
- A tool called
fwupd
can peg your CPU at 100%, likely due to some combination of GNOME / Ubuntu software apps. sudo killall fwupd