HNHacker News
TopNewBestAskShowJobs

vaughan

767 karma · joined August 31, 2011

Programmer

vaughanhackernews at gmail

submissionscomments
vaughan··on TinyBase: A JavaScript library for structured state
Web apps are so over-complicated because of piecemeal client side data stores and the need to sync with the latest fashion in api protocol.

Imagine how simple apps would be if your data model and query interface was exactly the same on the server and client. With automatic caching and fetching logic.

There is such an incredibly complex chain of code to do the simplest of things.

What we lack is a good client-side relational+graph database that has an identical server-side implementation.

vaughan··on TinyBase: A JavaScript library for structured state
I think most dbs, paas, frameworks skip this use case.

For a snappy data-centric app, you pretty much need your entire app logic to run client-side.

Everyone always ends up with this terrible denormalized client-side cache with duplicated Server side logic.

What you really want is the exact same db running server-side and client-side.

I thought for a while this would be an sql db but now I think sql and the relational model is the wrong approach for web app data as they are inefficient for watching queries and syncing.

vaughan··on Ask HN: What do you think about the no-code movement?
I think coding and no-coding should eventually converge.

Software development has become far too complex without the right sensible abstractions keeping things under control.

Every developer would probably want an Airtable control to drop into their app, that they can use to build up their schema and then add custom functionality. But there isn’t one. I think mostly because there were too many technologies coming along at such a rapid pace that integrating became difficult because everyone is using a different tech stack and changing tech stacks all the time. And there are new libraries to do everything. E.g. No one uses Redux anymore. Graphql came along. Everyone is back on SQL. And what’s next?

The pace of tech needs to settle down and then we can build some solid reusable libraries that do the same thing as no code tools.

vaughan··on Ask HN: What Toaster Are You Using?
We had the cheapest 2 slice. Now it started occasionally tripping a fuse.

I use it everyday and feel I underinvested greatly. I would like a 4 slice but a good brand like Breville. I want speed, toasting accuracy, easy to remove slices, easy to clean crumbs.

vaughan··on Microsoft’s Edge browser is now available on Linux
MS owns GitHub which maintains Electron. Core maintainers are MS employees.
vaughan··on Backblaze IPO
I'm stuck on 50mbps up.
vaughan··on Backblaze IPO
Incremental backup + file watching = very fast. See: https://9to5mac.com/2021/05/19/carbon-copy-cloner-for-mac-ov....
vaughan··on Backblaze IPO
I forgot it didn't work the last time, and I needed an offsite backup solution. I was optimistic that I could configure the right excludes so it would work, but the sys pref change made this impossible.

It takes a few weeks to upload everything, and by that time the trial has expired.

vaughan··on Backblaze IPO
I have paid for Backblaze for 4 years, after signing up for two 2 year subscriptions a few years apart.

I have never got it to backup my files ever.

Their settings dialog integrates with macOS preferences and freezes while it scans for files to backup without giving me any status update. It uploads so damn slowly it’s pretty useless. If I was to move/rename things around it would take weeks more to reupload. Every time I try to ignore some files so it’s actually useful, it blocks my system prefs again and takes forever to rescan.

I honestly don’t know how anyone uses it.

Carbon Copy Cloner on the other hand is excellent software. Entire backups of 4TB drive in less than <20mins. And excellent support.

vaughan··on Microsoft’s Edge browser is now available on Linux
Competition is the wrong word. Microsoft owns both projects. Surely there will be a rebrand and resource shift to WebView in the next couple years.
vaughan··on How I made Google’s data grid scroll faster with a line of CSS
> But what happens when you need

My experience is that a lot of these features are more easily implemented than the time taken to handle the edge cases of using existing libraries, getting them to work with your UI framework (React/Angular), and getting them to work with your data service layer.

vaughan··on How I made Google’s data grid scroll faster with a line of CSS
I have never used a data grid control that didn't end up with me having to dig deep into the code to add something custom that I needed, and just hit brick wall after brick wall. Especially React-based ones.

We don't need big libraries, we need to mix smaller libraries together that each do one thing well.

Like starting with a tutorial of how to build a data grid from scratch with suggestions of utilities to add along the way. Most people would avoid this because they see a library that does most of what they want and get a FOMO...but if they could only see the hours they will lose trying to customize it, they would have preferred to start from scratch. This has been such a constant experience for me with almost every framework/library in tech.

vaughan··on Javascript RORO pattern
The goal should be to do whatever makes the code read nicely, instead of forcing a single pattern which won’t work well in very case.

Destructuring where two funcs in the same scope return the same named object key will make your code harder to read for example.

Function options split across multiple lines also make things harder to read and make it less able to fit logic on a single screen.

I prefer less verbose code if I can have my function calls as single lines <80 char wide with self-documenting names that read like recipe instructions as to what is going on step by step.

Prettier’s line splitting makes things less readable a lot of the time. I use prettier-ignore quite a bit.

vaughan··on Javascript RORO pattern
They are not ideal in webstorm. Sometimes they make lines run off the page, and they are a bit jarring the way they appear and disappear.
vaughan··on DuckDB-Wasm: Efficient analytical SQL in the browser
I think local CPU is underutilized in these cloudy days. For many SaaS, the size of all your tenant data minus media is quite small. Most cloud apps have terrible experience with large tables, searching, and general perf. We trade this away for collaboration features.
vaughan··on DuckDB-Wasm: Efficient analytical SQL in the browser
Quite interesting read about how timescaledb turns a row store (psql) into a column store.
vaughan··on How I made Google’s data grid scroll faster with a line of CSS
Frameworks.
vaughan··on How I made Google’s data grid scroll faster with a line of CSS
I wonder if pushing 40k rows to mobile is such a bad idea. Phones have tons of space now. HD video streaming pulls tons of data. I guess mediocre mobiles complicate matters. Usually there are other factors making it implausible. Such as not compressing/compacting the data on the server, and not being able to limit large blob data columns, unable to control the parsing of data, and lack of normalized relational caching on the client. Usually it’s a collection of backend and frontend frameworks that complicate all this. I’m feeling more and more we need thick efficient clients.
vaughan··on How I made Google’s data grid scroll faster with a line of CSS
There is not one set of static requirements for lists. New UX paradigms are being invented all the time, which actually make things more usable.

E.g. Think about Airtable vs Google Sheets.

Also consider data sources and data binding. Do you bind a cell, a row, the entire table? How do you handle real-time updates or infinite scrolling. How is styling done?

It always feels like we should just standardize the current thing because we cannot see what will come next.

That said, there still does not feel like a good data grid for React, and trying to build one makes it feel like React is just getting in the way.

vaughan··on SqueakJS – A Squeak VM in JavaScript
PS. Based on Smalltalk.
vaughan··on Next.js 12
SWC uses napi-rs to talk to N-API. NAPI-RS's convention is to ship binaries as npm packages which should avoid a lot of the pain which came from having to download pre-compiled files from a file server. Compiling other platforms shouldn't be necessary, but if it is it will be slightly more difficult than using traditional gyp or cmake. You would have to setup a Rust toolchain, but after thats its relatively easy.
vaughan··on Next.js 12
The Rust compiler is just swc which has been around as another project for ages. Checkout it’s home page. Many people are using it.
vaughan··on macOS Monterey
The fix is the VRM thermal pad mod btw.
vaughan··on macOS Monterey
Try VRM thermal pad mod.
vaughan··on macOS Monterey
If you want to solve your problem do the VRM mod. And use a small desk fan. It’s easy and reversible.
vaughan··on Supercharge Your Node.js with Rust
NAPI-RS is another option to Neon. It’s faster and has a new feature in beta that automatically does the type wrapping for you.
vaughan··on Ask HN: How would you, a software engineer, spec out a new MacBook Pro?
M1 Max 32 + 64GB.
vaughan··on Ask HN: What Stack for mobile/desktop cross-platform native development in 2021?
React Native is your best bet.

Examples:

- https://github.com/devhubapp/devhub

- https://github.com/mmazzarolo/react-native-universal-monorep...

RN desktop support is weak. But your mobile apps will work quite differently to your desktop apps anyway. And you probably want something that can run on the web too. So for desktop you just put your web app in Electron.

The difference between mobile and web will mean having to implement different routing and components, but you can share a lot of code.

Flutter is the new kid on the block.

vaughan··on Why I Hate Frameworks (2005)
Everyone should try to build their own pluggable framework at least once, to realize how difficult it is, and to realize how small design decisions can cause massive headaches. I think a lot of frameworks are the result of someone shipping something, it gets popular, and then its stuck like that and they can't rethink it.

Having done this helps you to see things in new frameworks that will inevitably lead to pain.

As often as people deride it, the Node.js many-small-package philosophy (inspired by Unix) is what I keep coming back to. If one package doesn't provide the right abstraction to do something, if it's built on top of two smaller packages, I can assemble a new package with these smaller packages to achieve what I want. The smaller the package the better.

From the day the first line of code in a project is written, a desire to rewrite from scratch starts to grow - to return to the productivity of having an empty slate. If you compose your app from small single-purpose packages, rewriting becomes trivial.

vaughan··on Ask HN: GraphQL users for single-page applications, what are your experiencies?
The big draw for me was the built-in introspection. E.g. https://docs.github.com/en/graphql/overview/explorer. An awesome way to access third-party apis.

I can see it being useful at large organizations with many services written in different languages with many distinct teams. But then there is of course performance concerns from giving users so much flexibility, versus offering more limited REST/RPC APIs with more predictable performance.

But for your own APIs where your frontend and backend are tightly coupled, it just gets in the way and is too verbose. You often don't want a big nested response, but rather a flat, normalized response for caching. The JSON:API standard is much more ideal in this regard. Mutations and optimistic UI updates are incredibly painful. Look at this craziness: https://www.apollographql.com/docs/react/performance/optimis.... Most client implementations do not maintain any concept of the underlying relations between the data they return either which makes caching difficult. Code generation of types is annoying to have to run as a separate process, and doesn't result in the best experience. Writing out all the fields you need for every query in full is too verbose and most people don't need to limit the number of fields they need returned, and then hacks like using Fragments feel messy. Writing schemas is painful too. You have to jump through hoops if you want to just return a JSON object.

Also, Apollo was a terrible client with really bad error messages for so long and never seemed to fix things. The caching and optimistic UI updates are terrible as mentioned too. Urql seemed to do the caching a lot better, but it feels like huge amounts of code to patch over a leaky abstraction, just like most ORMs.

In the short-term I would suggest trying out something like trpc.io. It's like the feeling of going from Java to Python again.

My general attitude is that your API should stay as close as possible to your backend data model, otherwise caching and optimistic UI updates become really tricky as you end up with all this mapping code. GQL is forcing a graph structure over a relational data model which doesn't fit.

Keep it simple. Request/response. Then see what you need on top of that.

← PreviousPage 6 of 10Next →