Raoul - Web Application Developer
  • home
  • Imprint / Privacy
  • github
  • npmjs

magic numbers

A collection of 2 posts
viewport sizes device pixel ratio
frontend

viewport sizes device pixel ratio

Today I was device testing a website and at some point I realised that I don't have a clue what viewport size, the device I was testing on has. device pixel ratio The manufacter tells 2560px times 1600px, but do these values matter in web design? Quick answer
Oct 17, 2024 3 min read
javascript - choosing the right timeout is easy
plain js

javascript - choosing the right timeout is easy

Every once in awhile I see code that debounces expensive events like resize or scroll: someTimeout = window.setTimeout(debounceScroll, 10); and I wonder about the magic numbers, developers choose. magic numbers In the example the dev thinks 10 milliseconds is a good time to debounce this event. The whole code
Oct 4, 2017 2 min read
Page 1 of 1
Raoul - Web Application Developer © 2025
Powered by Ghost