HNHacker News
TopNewBestAskShowJobs

terandle

359 karma · joined March 14, 2011

submissionscomments
terandle··on Understanding React Compiler
React Server Components are async/await. Suspense works with async/await to show loading indicators (it is not a replacement as you are implying). They said they have plans to bring async await to Client Components but they need the AsyncContext tc39 proposal to come to JS first.

The worst part of react is all the FUD hacker news creates about it every time they try to innovate to make the web's defacto framework better.

terandle··on React 19 almost made the internet slower
"This gives us the best performance characteristics when you're following best practices (i.e. hoist data fetches to Server Components or route loaders), at the expense of making an already bad pattern a bit worse." [1]

Their rational was pretty solid in the PR, but seems they overestimated how ready the community is to embrace newer best practices and they are back tracking.

[1] https://github.com/facebook/react/pull/26380

terandle··on React Compiler
This is a great thing for the web. Like it or not react seems like it is here to stay as the primary web framework for the foreseeable future. There are so many react websites out there that are not well optimized, this is basically like a magic wand that will speed up a huge amount of existing websites/apps without major code changes.

The ROI of this compiler when you consider applying it to the whole ecosystem is mind blowing. Great job react team.

terandle··on Show HN: DualShock calibration in the browser using WebHID
Helped out with the drift on my DualSense, now I don't have to trash it, thanks man!
terandle··on LiveView Is Best with Svelte
Yeah I wish this article had covered how this solution compares to React Server Components as it kind of looks like spaghetti of different techs compared to how next.js streamlines the same problem space into one consistent mental model.
terandle··on .NET 8
The new array literals seem to supersede some previous syntaxes like new[] { 1, 2, 3 } goes to [1, 2, 3] in a lot of cases. But overall they are a _great_ addition to the language playing around with them now so bravo.

Still not really sure how I feel about class primary constructors on the other hand, will give them some time to marinate.

terandle··on StyleX: The Power of Inline Styles. The Speed of Atomic CSS
The best part about tailwindcss is not having to come up with names like "container" or "nav-wrapper" that are basically useless/meaningless outside of styling. I don't see this putting a dent in tailwind's continued market domination TBH. But props to you guys for trying to innovate in this space, good luck.
terandle··on Expo – Open-source platform for making universal apps for Android, iOS, and web
As a solo dev simple apps are probably the only thing you can maintain two separate versions of? Complex LOB apps at businesses as a solo dev I could never imagine not using a cross platform toolkit of somekind. RN w/ expo is the best I have found out of all the cross platform kits by far.

If you have react experience I really suggest giving modern RN & expo a try.

terandle··on Windows 11 Insider Preview Build 25905 brings a bit of Rust in the kernel
My favorite bit was they fixed Zune support

"In celebration of Marvel Studio’s Guardians of the Galaxy Volume 3, we temporarily re-launched Zune.net last month. We also took the opportunity to fix an issue that was causing some challenges in getting the original Zune drivers to install in Windows 11 with this build in the Canary Channel. So now it should be easier to use your (totally unsupported and still discontinued) Zune on Windows 11."

terandle··on Next.js App Router Update
I think what you are getting at is what the new nextjs is. Everything is just plain server rendered HTML by default and you opt into client side react on a per-subtree basis depending on if you need it or not.

Some other neat bonuses are:

- Page transitions still use client side routing so it still feels fast like a SPA, and it automatically preserves state on your outer layouts during page changes.

- And something I find mind blowingly impressive is you can refresh the server rendered HTML at any point while the user is on the page while still preserving all of their client side state and scroll position etc. A simple call to `router.refresh()` is all you need to do that, something that would have taken a good amount of API code and shoving stuff into some state management library etc to do before.

terandle··on Next.js App Router Update
As a long term user of old school server side frameworks like PHP I very much "got" what the app router is trying to do once I used it, being able to reach into your database from any component without having to build an API layer is incredibly productive. It feels refreshingly old school and new school at the same time. My guess is the majority of the people that don't like the app router are just very used to the modern SPA only way of building websites and will come around over time. I think the idea of server components themselves are incredibly solid and expect to see other frameworks adopt them as well.
terandle··on UseHooks – A Collection of Server Component Safe React Hooks
Not a dumb question. I think calling any hooks server component safe is going to mislead and add confusion to a lot of developers for this very new tech. Hooks are not allowed in server components. This library is SSR safe which has been a concern since before server components were ever a thing.
terandle··on Microsoft is busy rewriting core Windows library code in memory-safe Rust
I don't think MS sees a growth for .net at this point

1. Back in .net 6, mere *days* before the final release they yanked a hot reloading feature from the dotnet CLI that is typically used by the massively more popular, but free, VS Code, and making the feature exclusive to flagship VS. To me this spoke of a leadership who didn't care about growing .NET with new developers but only to prop up their old creaky VS $50/mo from their established customer base that is locked in to C# from legacy code. They rolled that mistake back but it was a big warning sign / wake up call for me.

2. Speaking of hot reloading, their much touted hot reloading feature SUCKS. It has nothing on the JS guys. Hot reload is a massive deal. How is Blazor ever going to compete with the JS frameworks with a horrible hot reload story. Not to mention Blazor is way heavier in terms of KB and also is way slower rendering performance to boot. Can you even use tailwindcss with Blazor since the compiler relies on your framework being able to hot reload the css changes?

3. .NET MAUI by all accounts is just a massive disaster at this point.

4. Their latest Teams 2.0 UI rewrite is in *drum roll* react.

I dunno it all just speaks of an underfunded / understaffed group at this point whose top brass doesn't care about them beyond the meager, dwindling, VS pro subscriptions they get from them.

terandle··on Microsoft is busy rewriting core Windows library code in memory-safe Rust
I very much worry about how invested MS is in .net. After programming in .net for 10 years I'm switching to node. Much to my coworkers dismay.
terandle··on Ask HN: Which React framework for a new project?
nextjs has the react team fully behind it, and even some of the most important core react team members are now working at vercel. Also the new server components in the /app dir are amazing[1]. Nextjs is the easy recommendation for most projects these days.

[1] https://beta.nextjs.org/docs

terandle··on Common Beginner Mistakes with React
React's new server components (only in next 13 at the moment, coming soon to other framework) addresses this problem. Of course react and node both have performance work they need to do also.
terandle··on Column order in PostgreSQL does matter
Not sure they really need to complicate the system with different physical/logical identifiers. Just an easy way to move physical columns around if you're willing to do a full table lock would be nice.
terandle··on Paginating Requests in APIs (2020)
Wish this article would have gone into details about how cursor based pagination is actually implemented. Like they did for the other options by showing SQL. Is this something the database engine has to provide support for?
terandle··on Vue3/Nuxt3 poor adoption compared to React
Check out valtio if you want to do proxy based state management in react.

https://github.com/pmndrs/valtio

https://codesandbox.io/s/bitter-night-mm4xes?file=/src/App.j...

    // a.js

    import { proxy } from "valtio";

    export const a = proxy([]);
    a.push(1);

    // App.jsx

    import { useSnapshot } from "valtio";
    import { a } from "./a";

    const add = () => a.push(a.length + 1);

    export default function App() {
      const snap = useSnapshot(a);
      return (
        <div>
          <ul>
            {snap.map((value, index) => (
              <li key={index}>{`${index}=>${value}`}</li>
            ))}
          </ul>
          <button onClick={add}>Add element</button>
        </div>
      );
    }
terandle··on UseEvent RFC: Hook for event handlers with an always-stable function identity
They are working on a compiler (React Forget) that will automate all of the memoization stuff for you. So at some point down the road I expect we'll be able take our current components and just delete all of the useCallback/useMemo code.
terandle··on Flutter 3
Just trying to be honest here, but using this as an example on my iPad Pro with magic keyboard... flutter apps do not feel great on iOS IMO. Animations have an initial low fps/jerkyness to them. Lot of weirdness when trying to use an the iPad trackpad, horizontal directions seem to be inverted. Scrolling inertia and feel just feels off in general to me. I'm sure flutter is great on Android and all but it still feels like they have a bit of work to do on iOS in order to really cross that uncanny valley gap.

Regardless I'm sure what you have is a great app here so hope you don't feel like I'm targeting you or your app directly here, and at the end of the day if flutter allows you to make your customers happy more power to you and hope it works out the best for you.

terandle··on Flutter 3
Highly recommend trying expo.dev sometime they have come a long way in providing support for native modules and take care of all that underlying "mess" for you.
terandle··on The baseline for web development in 2022
Although preact is about par with Vue and that has the same model/API as react right?
terandle··on Migrating to Next.js from Create React App
What were the benefits you saw after moving to next.js? Personally I'm still using CRA unless I need SSR as I prefer react-router to file based routing.
terandle··on App Store Connect has been in “scheduled maintenance” for nearly 24 hours
It has been working fine for me, uploaded and submitted an app for review. Got it approved.
terandle··on Why you can’t buy a thermapen on Amazon (2016)
Article is from 2016. Searching Google/Amazon these complaints seem to have been resolved since this was posted.
terandle··on Rob Pike's Rules of Programming (1989)
Am I wrong to avoid writing O(n^2) code if at all possible when it is fairly easy to use hash tables for a better time complexity? Sure when n is small the O(n^2) one will be faster but when n is small /anything/ you do is fast in absolute terms so I'm trying to not leave traps in my code just waiting for n to get bigger than initially expected.
terandle··on Apple Silicon: The Passing of Wintel
Apple already did #4 - massively raise the base cost of the 2019 Mac Pro, so it could be that this is priced in already.
terandle··on Ask HN: What's the best piece of software you use every day?
YouTube, supports delivering 8k video on a massive scale and a recommendation engine that is probably too good.
terandle··on Bootstrap 5 alpha
Have you looked at next.js? It allows you to write your server side database access code/etc in the same place as your react client side app. Pretty neat, however I personally would rather write my backend code in something better than JS so I don't go that route.
← PreviousPage 2 of 4Next →