Better HN
topnewbestaskshowjobs
Log inSign up

philliphaydon

7,580 karma · joined Dec 17, 2012 (13y ago) · 3,282 submissions

[ my public key: https://keybase.io/philliphaydon; my proof: https://keybase.io/philliphaydon/sigs/XM7xJbSYbUseBU04HxZ_e5o7Z5N2Zpbtm5swo2yNXhI ]
Submissions

comment 3y ago · link · parent

Sure. Sometimes it’s wrong. But I spend less time finding an answer on ChatGPT than Google. For example I’m not a c++ developer but I’ve inherited some c++ code work to do. So I’m like wow this vector thing is only ever looking for this 1 value. It would be better to use a dictionary or hash map or something. So I ask ChatGPT and it recommended unordered_map, and I asked why the existing code snippet I gave it had a lock around it, and it explained the thread safety with read/write etc. So fixing that all up shaved off 700ms in processing time in my test scenario.

I can ask it what’s the difference between 2 lists. I asked it about concurrent_unordered_set and it told me that it only exists in VisualC++ but if I want it cross platform I can look at Boost or TBB.

None of this information is easy as a non C++ developer to find on Google.

comment 3y ago · link · parent

I partially agree.

The only thing I've used google for in the last 2 weeks is to quickly search for a wikipedia page or imdb page for an actor and movie.

Everything else is in ChatGPT now. The information from ChatGPT, even tho sometimes wrong, is far FAR superior to google now.

comment 3y ago · link · parent

There's nothing inherently stopping people from writing clean react projects. But I've never seen one. But watching people fumble around trying to find where they need to make a change when things are so overly abstracted, and STILL try to justify that react is good, is baffling.

People break tables up into ~50+ files. It's crazy, and everyone does this, and its an absolute nightmare to maintain. Its 100% engrained into react culture that this is the right path forward.

React will never get better if people accept over abstraction as the right path forward.

comment 3y ago · link · parent

> This is just an example, obviously you can write this better in React.

The issue is people write SO much conditional logic into their react templates. Not that disabled is boolean and can be written better.

comment 3y ago · link · parent

> The saving grace of JSX is that it allows the creation of multiple small components inside a single file.

That's definitely not the saving grace of JSX. As I said, every react project is soooooooo overly abstracted into the tiniest little components. It's no wonder people /think/ react is slow.

comment 3y ago · link · parent

JSX forces you into small tiny components because anything of any decent size becomes unmanageable. There's way too much mixing of JS into the template.

Vue you can do

    <button :disabled="!isFormValid">Submit</button>
In React I've seen people do:

    if (!props.isFormValid) {
        return <button>Submit</button>;
    }

    return <button disabled="disabled">Submit</button>;
This is just an example, obviously you can write this better in React. My point is there's /always/ so much conditional markup like this in every react project I've come across or worked on.

Edit: I donno how to format code on here sorry. (oh figured it out, bunch of spaces)

comment 3y ago · link · parent

There's 2 things that I hate about react.

1) JSX - It's terrible. Svelte, Vue, Riot... they all got it right. JSX, mixing a weird syntax of HTML and JS together is just inferior to HTML with additional markup.

2) I don't know why but every react project has crazy levels of abstraction. Everything is 15 layers deep and making any sort of change requires way too much effort to navigate 15 files and code reading to make the most mundane changes. Other libraries seem to suffer from this to a far smaller scale.

comment 3y ago · link · parent

See what I mean, you care more about saving face than the people suffering. "none of its true, I can dispute it, its you who is wrong"

Look, I don't know why you keep replying to me. No one buys your propaganda and conspiracy theories and whataboutism. You can keep getting upset all you want but it doesn't change the fact you're doing nothing more than attempting to protect the CCP.

comment 3y ago · link · parent

I use insomnia after the stunt postman pulled with pricing.
12345
110