
dadveloper && productivity nerd. jokes are my own, unfortunately.
Boston, MA
Joined February 2010
- Tweets189
- Following91
- Followers94
- Likes227
TIL: checking something ISN'T present via regex (also that there isn't a NOT operator):
/^((?!nope).)*$/
Replying to @Mailchimp
@Mailchimp's website popup integration is pretty slick! I added it to my @GatsbyJS blog in about 5 minutes; just throw the provided script into React Helmet, then manage the style + functionality within the MC app🔥
3
just realized you can do this:
git pull origin another-branch
instead of:
git checkout another-branch
git pull
git checkout last-branch
git merge another-branch
🥰
I really love React, but man useEffect is dangerous. Using it sparingly and transitioning most "effects" to xState has helped me avoid a lot of rerendering issues.
3
Not sure what babel plugins are being applied by presets? List them in the console:
[ "env",
{
"debug": true
}
]
I think the hardest part of building widely shared UI components is deciding what they will NOT do.
#webdevelopment #components #words
1
what get logged?
function run() {
const a = Promise.resolve("a");
a.then((a) => console.log(a));
setTimeout(() => {
console.log("b");
}, 0);
const c = Promise.resolve("c");
c.then((c) => console.log(c));
}
run();
1
1
don't rely on fetch to handle your response codes
fetch("swapi.dev/api/people/INVALID…")
.then(response => {
console.log("do the important things");
})
.catch(e => {
console.log("caught the error");
});
// do the important things
instead
fetch("swapi.dev/api/people/INVALID…")
.then(response => {
if (!response.ok) {
throw new Error("Oh no!");
}
console.log("do the important things");
})
.catch(e => {
console.log("caught the error");
});
// caught the error
1
Here's an example setup of my task mgmt workflow...heavily inspired by Getting Things Done (GTD). I created this for a panel discussion I was in yesterday around productivity...figured I'd post it before deleting!
#gtd #gettingthingsdone #productivity
1
dev productivity tip: always know exactly what you’re going to do next
#productivity #softwareengineering
1
Are there any @code plugins that will yell at you and/or make you feel bad if you start writing code without tests? Asking for a friend. #softwaredevelopment #softwaretesting #shame
1
2
Separate feature dev, refactoring, and bug fixing work. They require very different mindsets. $0.02
1
2012 seems so long ago but this talk by @substack seems more relevant than ever: youtube.com/watch?v=zgt-jNqb… 💯
tl;dr - write a function to do one thing well, move on.
1



