- We found a Node.js bug. When
Object.defineProperty
was monkeypatched, in certain situations other things would break. For example, usingconsole.log
after the monkeypatch but not before (ifconsole.log
also appeared before the monkeypatch, it would work).- which was triggered by that kind of monkeypatch mistakenly being attached due to a syntax error in the Ruby uglifier gem’s
es5.js
shim (v2.7.1 - fixed by https://github.com/lautis/uglifier/commit/31a53a92da537af3776711471d6e9582d96dc49d, released in uglifier v3.0.0) - which was used as the js compressor for our static jekyll blog - luckily a direct dependency, and upgrading had no dependency conflicts - easy fix.
- which was triggered by that kind of monkeypatch mistakenly being attached due to a syntax error in the Ruby uglifier gem’s
- Introduced in Node 11.12.0 by: https://github.com/nodejs/node/commit/c14aa07b94d684de8e2a23a54d0e6a3c25a2e460
- Fixed in Node 12.0.0 by: https://github.com/nodejs/node/commit/908292cf1f551c614a733d858528ffb13fb3a524
- [I was running Node 11.14.0.]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package secret provides encrypt/decrypt functionality with a string-oriented API. | |
// | |
// The design choice to use strings is purely for ease of API use, almost certainly not a good idea. | |
// To be clear, this thing is not intended for production use, just for poking around the Go ecosystem. | |
// In particular, there are performance implications with all the stringification, and I wouldn't trust the error handling. | |
// There may be additional / worse issues too! | |
// | |
// Uses `golang.org/x/crypto/nacl/secretbox` for the actual cryptography, and `encoding/base64` to round-trip into strings. | |
package secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[colin:/tmp] $ node --version | |
v11.14.0 | |
[colin:/tmp] $ node /tmp/sample.js | |
internal/process/stdio.js:164 | |
stream = new tty.WriteStream(fd); | |
^ | |
TypeError: tty.WriteStream is not a constructor | |
at createWritableStdioStream (internal/process/stdio.js:164:16) | |
at process.getStdout [as stdout] (internal/process/stdio.js:33:14) |
TL;DR: what was the bug? (spoilers!): https://gist.github.com/trptcolin/6039cd454acfe6e820d13cbdce5e4064
- Minor text change for the company blog; let’s get it done!
JEKYLL_ENV=production bundle exec jekyll upload -e staging
Liquid Exception: ExecJS::ProgramError in /_layouts/default.html
- execjs, hmm, do i have node installed?
node --version
- yes, v11.14.0
bundle open jekyll-s3-upload
to read code & see this command is doing- looks like it builds before uploading (
Jekyll::Commands::Build.build(site, jekyll_config)
) - https://github.com/8thlight/jekyll-s3-upload/blob/60dd52f937db21d1265cb9a7fdcdf438730e32d2/lib/jekyll/commands/s3_upload.rb#L51
- looks like it builds before uploading (
bundle exec jekyll build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.Router do | |
use MyApp, :router | |
use Plug.ErrorHandler | |
use Sentry.Plug | |
alias MyApp.ScrubError | |
defp handle_errors(conn, %{kind: _kind, reason: _reason, stack: _stack} = error) do | |
updated_error = ScrubError.call(error) | |
super(conn, updated_error) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
For all exercises, let’s make sure we’re collaborating, not just submitting as quick as possible. We are a community of professionals - let’s learn from each other!
While we need working software, we also want well-crafted software. So once we’ve got a working solution, let’s see how we can improve it for flexibility and maintainability, rather than jumping right to the next one.
- Driver: Lean on your team! Talk through your reasoning! Pass the keyboard in 5 minutes or less!
- Navigators: Ask questions! Suggest improvements empathetically!
- Narrator: Nudge folks as needed! Stick with the Easy difficulty setting!
Example Exercises, with extra credit ideas/prompts
NewerOlder