Matt Smith on when to use map() vs. forEach() in JavaScript. Just one of those things I can imagine asking or being asked in a coding interview. Some interesting comments below the article as well.
::selection is cool, but scoping it to selectors like :nth-child(5n+2) is even more fun, especially on a love filled ay like Valentine’s Day.
I think it’s fun to take stock of the tools we use as developers. You know, so we can look back and laugh at our primitive setups. And actually, to inspire you to share yours so I can steal all your better tools. Here’s a rundown of stuff I use, focused mostly on literal apps […]
All sorts of great stuff coming up for all our members. Intermediate React, Complete Go, CSS Basics, TypeScript Monorepos, and so much more.
There is some low-hanging web performance fruit with images. Serving them in the right format, from a CDN, with the right HTML can be a big perf win.
The & is a powerful addition to CSS, allowing us to craft selectors without repetition and helping organization and understanding.
The typical approach for these inputs is using multiple HTML inputs, one for each character. But is that a good idea?
Matt Smith on when to use map() vs. forEach() in JavaScript. Just one of those things I can imagine asking or being asked in a coding interview. Some interesting comments below the article as well.
If you’re designing something for kids, you’ve always got Comic Sans as a typeface choice. We make fun of it, but it really is playful and nice and quite readable. It’s not nearly this egregious. I’m sure you can find other good options out there too, but big high fives to the gang at Underware for their new Kermit font (saw via Microsoft who has put it into Office). It’s friendly looking, dyslexia friendly, and wonderfully variable. Little on the pricey side, but most great fonts are.
What is the difference between ESLint and TypeScript? Perhaps that feels like a strange question as ESLint is a, uhm, linter, and TypeScript is a language that compiles to JavaScript.
Josh Goldberg writes how there is some overlap:
While ESLint and TypeScript operate differently and specialize in different areas of code defects, there is some overlap. Specific types of code defects straddle the line between “best practices” and “type safety,” and so can be caught by both tools.
I could imagine asking (or having to answer) this in a job interview.
The two catch different areas of code defects and come with different philosophies around configurability and extensibility.
- ESLint checks that code adheres to best practices and is consistent, enforcing what you should write.
- TypeScripts checks that code is “type-safe”, enforcing what you can write.
text-wrap: balanced; dropped first but text-wrap: pretty; wasn’t too far behind and they are both useful. The pretty value is now coming to Safari and Jen Simmons calls it “an unprecedented level of polish to typography on the web.” If you’ve already seen pretty and think of it as the thing that prevents short last lines in paragraphs, that’s old thinking now, so read up. That particular feature, if that’s all you want, is now text-wrap: avoid-short-last-lines; (not kidding). The pretty value does lots of different stuff to improve typography in subtle ways. Jen says:
… we want you to be able to use this CSS to make your text easier to read and softer on the eyes, to provide your users with better readability and accessibility. And simply, to make something beautiful.
If you’ve got Safari Technical Preview going, try the demo. I’ve seen one small bit of valid criticism.
Developer news, information, and advice — right to your feed reader of choice.
RSSHere's our page on guest writing. It's a win-win-win!
Frontend Masters donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.