Earlier quoted context omitted.
Have we been using the same models? Claude 3.5 Sonnet writes me excellent code in a variety of different languages. I have a bunch of examples here: https://simonwillison.net/tags/claude-3-5-sonnet/
For Python it's bliss. For non-std C++ it's hit-and-miss. For CUDA C++ it's terrible.
Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet
71–80 of 83 posts
Re: Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet
#72Earlier quoted context omitted.
> I never wrote boilerplate code in my life. You either have not written very much code, don’t know what boilerplate means, or are intentionally operating under an overly broad definition
You’re right. I don’t write a lot of code. It’s always very specific C++ stuff that does not need to be repeated a hundred times, or if it is it can be a virtual method declaration that I copy in a subclass. No need for a LLM for that. I’ve only seen boilerplate used by web developers, but I’m not doing that.
Graphics programming, data science, anything involving handling user input and probably many more classes of software require ceremony and boilerplate to get going.
Vulkan famously takes 1000 lines of C++ boilerplate before you can draw a triangle.
Look into writing a X or Wayland compositor and you’ll see a mountain of boilerplate involved in handling input loops, displays, and communicating with the kernel.
Re: Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet
#73Earlier quoted context omitted.
How would you compare GPT-4o with Claude 3.5 Sonnet?
For my prompting style and the languages I work with - Python, JavaScript, SQL - I think Claude 3.5 Sonnet is slightly better.
Re: Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet
#74Re: Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet
#75Re: Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet
#76Earlier quoted context omitted.
I tried getting Claude to help me model an event-based store with moderate type safety and it was a total disaster. It was randomly trying to convince me to turn it into a state machine using a library in Python (I was working in TypeScript). This is so far from awesome as far as productivity goes. I do find cursor suggestions useful here and there, but it’s typically filling in the simpler details of an implementati…
>>I tried getting Claude to help me model an event-based store with moderate type safety and it was a total disaster. That's just not how you work with a LLM. You don't give LLMs problems to solve. You do the thinking part and solve problems, and ask the LLM to implement small blocks of code, like the smallest possible, and you incrementally go from there. This really is some what like asking the whole question in th…
The issue occurred specifically when I was pointing out that type inference wouldn’t work as expected for typing the store and its corresponding events. I’d feed it some types that were close to what we needed and it would give up and show me how to do it with Python. I gave up after (I wish I was exaggerating) around 2 hours of experimenting with convincing it to believe it was possible to build and type the store correctly.
The store is built and working properly at this point so who knows, maybe the meta layer of typing things really throws LLMs.
Re: Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet
#77So this cursor is a fork and not an extension? Could anyone tell me why? What was not possible to achieve when implementing these features as an extension?
Re: Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet
#78Something that's been amusing me about Cursor is that I feel a lot of the excitement about it isn't so much about Cursor, it's people realizing that LLMs have got REALLY good at writing code now. GPT-4 was good for the past year, but the latest models (especially Claude 3.5 Sonnet) are spectacular. Those of us who've been copying and pasting LLM-generated code back and forth from ChatGPT and Claude.ai for the past ye…
I must be living in a different universe, every single LLM I've tried are shit at the details/nuances of writing code.
Also have you tried shorter blocks ? "Write a function like this" instead of "write the app"
Re: Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet
#79Earlier quoted context omitted.
I don’t share the sentiment that it’s “very good”. It’s strongly mediocre at basic tasks and regularly fails at anything complex.
That's a failure of imagination. If I can architect and describe my interfaces and have Claude write the current component, then I can repeat with every other component and write minimal code / corrections. At the same time, I've minimized complexity in my codebase. It's a win-win, and honestly probably the next paradigm of software engineering.
Re: Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet
#80Earlier quoted context omitted.
I absolutly dont trust it blindly at all. Where did you get that from? I kept asking it questions and stepping through the debugger until I understood its implementation. How do I know it's implementation is correct? Because I can see the results, I can see the data sturctures in memory, I can step though it and understand it - I know what electron densities around atoms look like, and I kept iterating on the code af…
> I absolutely don't trust it blindly at all. Where did you get that from? Not consulting a 2nd source or just looking at the results, as in.. > Because I can see the results Which, yes, it's correct in that sense but as per the other comments you can copy and example and get that same result. In development a lot of things are correct but have different implications, e.g. bubble sort vs quick sort. > I'm saying is t…
I do continuously check multiple sources : reality, our material simulations and predictions are lab verified, and spectographic analysis shows our predictions are correct - I have large experimentally generated datasets that our predictions and code are verified against.
We even have a system called "reality server" who's job is experimental parity, it runs continuously checking predictions (which are all totally produced by our code - code we are writing with the help of Cursor) against experiments.
> Which, yes, it's correct in that sense but as per the other comments you can copy and example and get that same result. In development a lot of things are correct but have different implications, e.g. bubble sort vs quick sort.
All of us approximate to "good enough". This is good enough. Results, Big-O, Integration ease, good enough is multivariate, but good enough is good enough, I'm a startup, and I'm not searching for divine correctness, good enough on the multiple variables is good enough.
> Assuming it has led you on the right / correct path. It's often times led me on to the wrong path instead.
It led me down the wrong path many times, that just means you are not yet finished. Then with more work, we found the correct solution together.
Even in our materials simulations we fail 100 times and win once, the win still enormously outweighs the fails.
Nobody is claiming it's perfect, nobody is claiming it doesn't get stuff wrong, nobody is claiming it doesn't lead you down the wrong path. It's about keeping experimental momentum up, because discovery is a factor or productivity - and my discovery is 5x because my productivity is 10x.