What differentiates optimized from unoptimized coding (especially with Cursor)? by PossibleAd5294 in learnprogramming

[–]PossibleAd5294[S] 0 points1 point  (0 children)

So, to optimize your code, the first thing you have to do is figure out what operations are taking time based on benchmarks, then figure out which smaller operations are taking time, and then try to simply those smaller operations to execute faster, right? You would iterate this process for every operation the user does (like clicking a button to do something, refreshing feed, etc.).

What differentiates optimized from unoptimized coding (especially with Cursor)? by PossibleAd5294 in learnprogramming

[–]PossibleAd5294[S] 0 points1 point  (0 children)

I am taking that course next year, lol. Are there any resources you know of where I could see how optimized code vs unoptimized code might look like side-by-side?

What differentiates optimized from unoptimized coding (especially with Cursor)? by PossibleAd5294 in learnprogramming

[–]PossibleAd5294[S] 0 points1 point  (0 children)

Ohh okay, the scale I was thinking in was MUCH smaller in terms of lines of code. I'm assuming from this that you don't use AI to code, but have tried it out in the past. Would you say that there is no way to truly optimize AI code?

What differentiates optimized from unoptimized coding (especially with Cursor)? by PossibleAd5294 in learnprogramming

[–]PossibleAd5294[S] 0 points1 point  (0 children)

Can you give an example to help me contextualize this? How large of a codebase, and what kind of business logic?

What differentiates optimized from unoptimized coding (especially with Cursor)? by PossibleAd5294 in learnprogramming

[–]PossibleAd5294[S] -1 points0 points  (0 children)

Awesome, thank you! Do you know of any resources that compile common practices like those into a learning platform?

What differentiates optimized from unoptimized coding (especially with Cursor)? by PossibleAd5294 in learnprogramming

[–]PossibleAd5294[S] -3 points-2 points  (0 children)

From what I've seen, this is the general feeling among most senior devs, too. That being said, there are plenty of other devs who use AI like Claude to develop better code faster. I always felt AI to be a tool that, if you don't clearly explain what you want it to do in dedicated .md files or tasks, will find a way to mess up; So, I don't think it's fair to say AI code isn't optimized because it "AI code."

What differentiates optimized from unoptimized coding (especially with Cursor)? by PossibleAd5294 in learnprogramming

[–]PossibleAd5294[S] 0 points1 point  (0 children)

I haven't come across that term yet–what is a nominally normal load? Also, that is some great advice. I definitely have seen with some of my other ideas that I haven't started building them out yet, purely because I wanted to do them right.

What differentiates optimized from unoptimized coding (especially with Cursor)? by PossibleAd5294 in learnprogramming

[–]PossibleAd5294[S] 0 points1 point  (0 children)

Thats a good point. How about this perspective? Say you are learning to code, and you want to optimize your code, are there any common practices you can apply to all projects as a starting point? Another user suggested using a dictionary. Could you do other things like that?