AI Coding Assistance

Thread Starter

Futurist

Joined Apr 8, 2025
721
Look at this, I'm adding code that can dump all of the NRF24L01+ registers, to aid in debugging:

1746373858707.png

I typed the start of line 112, after typing "pri" it suggested what you see, so I just pressed tab and it completed line 112 for me. Then I pressed return to get to line 113 and it has suggested what you see (in grey) so I just need to press TAB again.

It has inferred what I'm doing by observing the previous lines and now this is a doddle, far less work than doing it all by hand.
 

Thread Starter

Futurist

Joined Apr 8, 2025
721
Wow, now look what it suggested:

1746374524056.png

That is VERY impressive, it realized that this is best printed as HEX and inferred all of that code itself!
 

WBahn

Joined Mar 31, 2012
32,704
AI tools, in the right hands, can be very effective productivity boosters. Unfortunately, as with many tools of all kinds before them, their use very quickly becomes dominated by people that exemplify the wrong hands. People that will just accept whatever the tool offers up, regardless of how absurdly preposterous and blatantly wrong it is, because they are either too lazy to even bother to consider if what it is spewing forth is correct, or even close, or because they lack the ability to make that consideration because they became reliant on those tools to do their thinking for them in the first place.
 

Thread Starter

Futurist

Joined Apr 8, 2025
721
I also just added some function prototypes and then moved down to write the implementations, it beat me to it and suggested an entire function (mostly correctly) and this really was a huge time saver.

It got this one 100% correct in fact:

1746397108410.png

It was able to infer that from the rest of my code, even choosing that Write.RX_ADDR_LONG function, huge time saver. It obviously sees patterns in my code and knows that I use terms like "Long" in a certain way and it recognizes that I used a 5 byte array as an arg type and drew conclusions from that.

I guess the more disciplined and consistently one codes the better it can make these kinds of inferences.

I've been regarding these suggestions as mere annoyances for months (for some of the reasons you guys raise) but I'm now finding there's a lot of value in them.
 
Last edited:

nsaspook

Joined Aug 27, 2009
16,251
I also just added some function prototypes and then moved down to write the implementations, it beat me to it and suggested an entire function (mostly correctly) and this really was a huge time saver.

It got this one 100% correct in fact:

View attachment 348439

It was able to infer that from the rest of my code, even choosing that Write.RX_ADDR_LONG function, huge time saver. It obviously sees patterns in my code and knows that I use terms like "Long" in a certain way and it recognizes that I used a 5 byte array as an arg type and drew conclusions from that.

I guess the more disciplined and consistently one codes the better it can make these kinds of inferences.

I've been regarding these suggestions as mere annoyances for months (for some of the reasons you guys raise) but I'm now finding there's a lot of value in them.
If doesn't understand or make inferences that require understanding about your code, so be careful. The statistical possibles of this type of program can assist a good and experienced programmer because it's got trillions types of code examples from good and experienced programmers on this subject and likely a huge number of bytes on this well used and known device.
 
Top