1. X
  2. @chance.dev 🦋
Log inSign up
@chance.dev 🦋
14.7K posts
Image
user avatar
@chance.dev 🦋
@chancethedev
404
San Diego
chance.dev
Joined February 2018
4
Following
9,124
Followers
RepliesRepliesMediaMedia

New to X?

Sign up now to get your own personalized timeline!

Create account

By signing up, you agree to the Terms of Service and Privacy Policy, including Cookie Use.

Terms·Privacy·Cookies·Accessibility·Ads Info·© 2026 X Corp.
Don't miss what's happening
People on X are the first to know.
Log inSign up
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Feb 15, 2021
    I will never forgive JavaScript for this
    Web console showing two lines of code creating date objects with different arguments. The arguments clearly express the same date but instantiate different values.

Code reads:

new Date('2021-02-24');
> Tue Feb 23 2021 16:00:00 GMT-0800 (Pacific Standard Time)
new Date('2021', '02', '24');
> Wed Mar 24 2021 00:00:00 GMT-0700 (Pacific Daylight Time)
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Oct 21, 2023
    Love our little language 🥰
    JS snippets from Chrome console:

let items = [1, 2, 3]
> undefined

items[0.5] = 1
> 1

items
> (3) [1, 2, 3, 0.5: 1]

items.length
> 3
    476K
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Nov 23, 2022
    Do not write software with bugs. Instead, write software without bugs. That way your software will have no bugs!
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Apr 26, 2020
    Life hack for when you’ve got too many docker containers running
    My laptop propped up on my knees against the air conditioning unit while I work
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Dec 2, 2022
    Tough but fair
    ChatGPT prompt: how do you center a div in CSS?

ChatGPT answer: You can't. Sorry.
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Oct 20, 2019
    I have the hardest time quitting work for day if I’m working something tough and haven’t solved it yet. But if I write code after 6ish I can’t sleep because I’ll replay the problem in my brain all night. Is this a common phenomenon in our field or am I just losing it?
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Jan 17, 2022
    Did you know about the CSS image-set function? Let the user's device/browser choose the best image for them, similar to srcset for <img>!
    .hero-image {
  /* fallback for browsers that don't support image-set */
  background-image: url("/hero.jpg");
  /* UA will choose an image based on support + resolution */
  background-image: image-set(
    url("/hero.avif") type("image/avif") 1x,
    url("/hero-lg.avif") type("image/avif") 2x,
    url("/hero.jpg") type("image/jpeg") 1x,
    url("/hero-lg.jpg") type("image/jpeg") 2x
  );
}
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Oct 24, 2021
    I’m real close to quitting web tech and launching a new stud-finder startup, because there is absolutely no way this is the best we can do here
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Mar 21, 2020
    I just realized I probably have to learn how to reverse a linked list now NOOO
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Jun 23, 2020
    Million dollar idea: a recipe website that isn’t a huge pain in the ass to use
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Dec 21, 2020
    "Always has been" meme:

Far left: Earth from space: "React Server Components"

Center: Astronaut looking at Earth: "Wait, isn't that like PHP?"

Right: Astronaut behind the other astronaut's back with a gun pointed toward them: "Always has been."
    Data Fetching with Server Components
    user avatar
    React
    @reactjs
    Dec 21, 2020
    As 2020 comes to an end we wanted to share a special Holiday Update on our research into zero-bundle-size React Server Components. The demo is available now whether you want to play with it during the holiday, or when work picks back up in the new year. reactjs.org/server-compone…
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Dec 20, 2023
    dying inside
    Zoom-in shot of two newly designed Chrome tabs where the border radius of one tab is ever-so-slightly off in relation to the other
    117K
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Feb 17, 2022
    Possibly hot take: feels like a lot of JS devs just like TypeScript for the intellisense but treat proper type guards as a burden
  • user avatar
    @chance.dev 🦋
    @chancethedev
    Aug 21, 2021
    Most expensive key I’ve ever bought
    Me holding a key in front of my new house
Advertisement
Advertisement