69 karma · joined June 17, 2023
Copilot seems to have vacuumed up all the “quick hack to make this work” code from blogspam and bootcamp-final-project type open source repos, but I’m in an area absolutely flooded with that kind of code (typescript/react) so maybe it’s better with other kinds of code. Typescript/react is so bad now that google searches often return blog posts full of confidence and issues.
A few times it’s generated bugs that I couldn’t even catch by reading but it blows up spectacularly when scaled up even a little bit.
I assume you’re using some sort of remote dev server?
Airbnbs, on the other hand, usually come with the nightstand lights pre-unplugged in my experience, sometimes with the cables all coiled up neatly because everyone knows they’re only there for the listing photos and nobody will ever use them.
It took me about two mins, and most of that was because I typed a minimal html page on my phone using vi.
My phone has an apple logo, and the whole point of the article is that android is the one which blocks you from doing this without jailbreak. But on an iPhone it takes like one minute and zero configuration. (I literally just ran `python3 -m http.server 80` with no issues in ish).
The whole point of properly developing web apps is that html/css indicates a certain level of semantic understanding which allows for different interpretation in different contexts.
If you build a web app well, you build it to be a good experience on a computer for a power user with a huge screen and a keyboard for shortcuts, good for a user on a tiny touch screen, good for a blind person who doesn’t use a screen, and good for robots to parse and index. It should even be good for someone on an iPad with a mouse or a pencil which interprets the whole concept of the mouse differently from the desktop user’s mouse.
The agreed-upon semantics of HTML and the separation of visual styling into CSS is what allows you to take a step beyond just building an app and add a layer of “say what you mean” such that human and non-human users can re-interpret it into their own devices, use cases, and specific needs.
Web frontends are at their best when you don’t expect to perfectly control the end user experience, but try to convey the semantic meaning as perfectly as you can so it can be interpreted into good experiences even in situations where the display is wildly different than originally intended.
Airbnb is pretty much the only option for the gap between “stay a few nights” where a hotel makes sense and “stay for 4+ months” where renting a place makes sense.
With a slow motion camera I can prove that alacritty is faster / more responsive, and I think I can feel it, but it also has slightly more bugs and uses massively more battery. One funny issue is that I can’t screen share alacritty in zoom.
I use tmux/neovim so I’m in the terminal 100% of the time I’m working.
So almost no matter how much ram you get, in multi-application day to day workflows it’ll still use swap sometimes just because it can.
If your workflow involves something like giant objects in python or huge data structures that need to be in ram for performance, then you need the ram. But for use cases like 2,000 browser tabs plus photoshop plus Lightroom plus ten electron apps, mac osx “feels” like it has way more ram than an equivalent windows machine.
Derived state should be eliminated! If it can be derived, it’s not state.
If you aren’t trying to do derived state patterns, you don’t need to access the previous value. That’s a huge red flag. Likewise, “state” in useRef is a huge red flag. useMemo() is often a signpost pointing to bugs. If the useMemo cannot be removed without getting a different behavior in the application, that’s wrong—it might be slower, but the result should be the same with or without it.
It’s not a side effect free rendering model. Mouse interactions, requests, etc, are side effects; the pattern is side effect sets state and state defines the render. The problem happens when people try to “outsmart” this pattern and try to jump from side effect to outcome by subverting the state pattern, which makes them lose most of the advantages of react.
Any discussions around “triggering renders” or “preventing renders” before the component is behaving correctly are also big time red flags.
And the iPad is less of a general market device than a MacBook with cellular would be!
So if you’re using it, you aren’t really using typescript, you’re disabling typescript and saying “I want to write this part in plain JavaScript.”
So as soon as you have two developers on one project, you have two different opinions about it.
The throughput is way, way higher, so it’s using less cpu per transaction. If this were showing equal numbers of transactions the CPU usage would be lower.
Ideally, in a benchmark, I think we’d be seeing basically 100% cpu usage because that would mean the test hardware is being fully utilized and the software being tested isn’t being bottlenecked in some way.
Also swimming pools, rivers, rain, snow… you can go lots of places where a phone would most likely or definitely get soaked or submerged, and it’s useful to have a phone with you for payment, maps, messages, everything you normally use it for. Water is the only thing that has killed/broken phones for me in years.
Worrying about your phone when you go to the beach and similar activities is super annoying.
In large part because it’s really bad practice to have separate desktop and mobile sites, it’s generally better to just have one responsive site.
However, some badly designed sides achieve “responsiveness” by hiding functionally, which is bad because phones have no way to “zoom out” (emulate a larger screen size) to get the buttons to show up.
Instead of using svg files, just include them in the html, and make them simple. Each svg sparkline only needs to be two elements (the <svg> tag and one <path>), which is crazy efficient.
Canvas uses one element, instead of two, but you have to create a custom implementation of path rendering and do all that work in JavaScript instead of native browser APIs.
Canvas pulls ahead with drawing complex images where you have a single pixel buffer representing thousands of individual “shapes” because the DOM itself is optimized for interaction, not just drawing pixels, but I think that’s a different use-case from sparklines.
I have traditional autocomplete and copilot mapped to separate keys in my editor and have learned to treat them separately.
Copilot seems to be best for things like refactoring boilerplate within the same file, where it grabs patterns and can expand them, or if you are working “backwards” like you use a variable and then move up in the file to define it (where the LSP would see the error but won’t help you).
I never let copilot complete more than the end of my current line because I’ve been burned by very sneaky bugs way too often. It’s easier and less error prone to write code than read it.
LSP understands your project but has no idea what you want to do, copilot is like a helpful coworker looking over your shoulder at what you’re doing and suggesting things based on patterns they’ve seen in the past in different projects.