Hi,
I would like to hear of some experience when using AI for coding. I work at an American software company and we use AI quite a lot which in this case makes life easier. This is mainly because in our main product the architecture sucks and everything is way to complicated, but thanks to AI some tasks get done pretty fast whereas others take at least the same amount of time as doing it by hand.
Some month ago I had some AI budget left at the end of the month so I had it improve my Dustbin Shader (see "Project Announcements" forum) which gave some nice results.
So who else has experience coding with AI?
Anone here used AI for coding?
Re: Anone here used AI for coding?
I mostly use it like a search-engine. Give me some idea and then I filter through which are useful. And it often beats ddg or google when used like that (well both have their own ai by now - but I mean compared to their default results). But I prefer writing the code then myself.
Not a fan of letting it write the code. AI tends to have lot's of "ideas" - some good, some bad, some accidentally working. It's sometimes good when I'm stuck hunting for a bug. Simply because it delivers ideas what it could be so fast. The downside is - it always delivers so many ideas and going over those can take sometimes more time than doing it yourself. And it keeps on delivering ideas even if it has no idea whatsoever - like when there is simply no solution for something it will still keep on making proposals which solve "related" (but for me completely useless) stuff.
Company where I freelance at uses it a lot with php. It's become pretty good at that stuff - even rather complicated tasks tend to end up solved well.
I suppose it will also get better at c++/shaders and I'll be struggling more and more to explain why I still refuse letting it work on that instead of doing it myself. Can't really say I like that - just adds more pressure and we all will continue working the same amount of hours for the same amount of money (yeah occassionally a guy will get rich - but on average...). And we will understand our code less and less. And then there's the environmental impact... yay.
Not a fan of letting it write the code. AI tends to have lot's of "ideas" - some good, some bad, some accidentally working. It's sometimes good when I'm stuck hunting for a bug. Simply because it delivers ideas what it could be so fast. The downside is - it always delivers so many ideas and going over those can take sometimes more time than doing it yourself. And it keeps on delivering ideas even if it has no idea whatsoever - like when there is simply no solution for something it will still keep on making proposals which solve "related" (but for me completely useless) stuff.
Company where I freelance at uses it a lot with php. It's become pretty good at that stuff - even rather complicated tasks tend to end up solved well.
I suppose it will also get better at c++/shaders and I'll be struggling more and more to explain why I still refuse letting it work on that instead of doing it myself. Can't really say I like that - just adds more pressure and we all will continue working the same amount of hours for the same amount of money (yeah occassionally a guy will get rich - but on average...). And we will understand our code less and less. And then there's the environmental impact... yay.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Anone here used AI for coding?
I use it alot. It's really stupid but it writes so much faster then I do that it's still faster to have it do it 3 times then correct what it won't do correctly then writing code manually
Re: Anone here used AI for coding?
At work it's a great help as the big project I'm working on is imho way to complicated from the architecture. Generally I'm also not a big fan of just having code written and just using it - it must properly be reviewed. And I have to agree, you don't really understand the code if you are using AI too much.
Plus they want to build a huge datacenter for AI near my home town, and I don't like the idea
Plus they want to build a huge datacenter for AI near my home town, and I don't like the idea
-
chronologicaldot
- Competition winner
- Posts: 709
- Joined: Mon Sep 10, 2012 8:51 am
Re: Anyone here used AI for coding?
Could've used AI for the op. lol
I used AI to do a few things that I didn't want to do, like figuring out font rendering with FreeType and creating a transform class that does rotations limited to 90-degrees using a four-valued int. Saved me *some* work, but I still had to modify what I got to give me what I wanted.
There's tradeoffs. You just can't lean on AI to do *everything* for you, but it can be useful for some things. Futurists thing it's magic that will solve all our problems. Realists know it's just a tool of "advanced algorithms trained on pattern matching and filtering" prone to err, not really "artificial intelligence".
99% of my coding still ends up being done myself.
I used AI to do a few things that I didn't want to do, like figuring out font rendering with FreeType and creating a transform class that does rotations limited to 90-degrees using a four-valued int. Saved me *some* work, but I still had to modify what I got to give me what I wanted.
There's tradeoffs. You just can't lean on AI to do *everything* for you, but it can be useful for some things. Futurists thing it's magic that will solve all our problems. Realists know it's just a tool of "advanced algorithms trained on pattern matching and filtering" prone to err, not really "artificial intelligence".
99% of my coding still ends up being done myself.
Re: Anone here used AI for coding?
I can read code, but writing it is impossible for me. Every now and then I practise and read books, but only up to a point, until I come across something I know nothing about… for example, I came across this example(C++ - The Complete Reference - Herbert Schildt (4th ed.)):
In my silly head, this didn’t make sense, but it worked. Who would have thought you could read a set of characters individually, one by one, from a pointer (it’s very strange – a pointer should only point to one if you only declare one)... I don’t really remember clearly, but artificial intelligence helped me understand that example better...(I need to go back and look at this example again because I’ve already forgotten what actually happened)
In fact, I argued, saying, ‘But this doesn’t add up – why is it like this and not like that?’ and in the end the conclusion is clear: C++ can have lots of hidden mechanisms if you don’t practise writing code... (Björne, the creator of C++, mentioned something similar in his books: that you don’t learn just by reading, but that you have to practise… But bloody hell, I hate reading books that start off using the standard library or any other library; it would be great if they started by using C++ natively. They skip over a lot of things, starting with `int main` without explaining what a function is, why it returns a value, why it still compiles even if you don’t write `return 0;`, and so on.)
Another example:
The expression `y++ * 3` returns 9, whilst `++z * 3` returns 12
These very basic examples really baffle me; artificial intelligence is a huge help with its elaborate explanations, and it has improved a great deal. It also tends to lie a lot, so sometimes you have to be wary and ask for sources, or test things out for yourself, and so on.
Code: Select all
int is_in(char *s, char c)
{
while(*s)
if(*s==c) return 1;
else s++;
return 0;
}
In fact, I argued, saying, ‘But this doesn’t add up – why is it like this and not like that?’ and in the end the conclusion is clear: C++ can have lots of hidden mechanisms if you don’t practise writing code... (Björne, the creator of C++, mentioned something similar in his books: that you don’t learn just by reading, but that you have to practise… But bloody hell, I hate reading books that start off using the standard library or any other library; it would be great if they started by using C++ natively. They skip over a lot of things, starting with `int main` without explaining what a function is, why it returns a value, why it still compiles even if you don’t write `return 0;`, and so on.)
Another example:
Code: Select all
#include <iostream>
int main () {
int x = 3, y = 3, z = 3;
x++;
++x;
std : : cout << x << std :: endl;
std : : cout << y++ ∗ 3 << std :: endl;
std : : cout << y << std :: endl;
std : : cout << ++z ∗ 3 << std :: endl;
std : : cout << z << std :: endl;
return 0;
}These very basic examples really baffle me; artificial intelligence is a huge help with its elaborate explanations, and it has improved a great deal. It also tends to lie a lot, so sometimes you have to be wary and ask for sources, or test things out for yourself, and so on.
Irrlicht is love, Irrlicht is life, long live to Irrlicht
Re: Anone here used AI for coding?
These are nice examples that C++ is built upon C, and these are rather C examples. C pointer arithmetic is both a blessing and a burden, you can do nice things with it, but when you get it wrong it's often hell to figure out why. That's also a point which reminds me that I am an old man programming computers, because "back in the day" (and times were not better) you have done things this way to speed things up (66 Mhz AMD 486) and save memory, because on DOS you normally just had 640Kb (it was called "real" if I remember correctly).
I also updated my programming languages gradually from C-64 Basic to Amiga Basic to Turbo Pascal and then C, and some time later C++, so basically I had a lot of stuff I already learnt when I got to C++, but I still learn new things - and not just C++ C2x updates but basics.
Using AI this way can really help a lot, but it may sometimes lead to the wrong way which I had to learn as well.
In your first example it's pointer arithmetic, no matter what the pointer points to you, when you use "++" on the pointer it always points to the next element, that's why an array in C is always just a pointer to the first element.
The second example is also nice, I know this but I barely use "++z", I prefer "z++". but in my daytime work the coding guidelines claim that we need to use "++z" in for loops, and I hate it.
I learnt a lot from books, but even more from examples, playing around and reading examples. And google even before AI, but with google AI you save a lot of time
I also updated my programming languages gradually from C-64 Basic to Amiga Basic to Turbo Pascal and then C, and some time later C++, so basically I had a lot of stuff I already learnt when I got to C++, but I still learn new things - and not just C++ C2x updates but basics.
Using AI this way can really help a lot, but it may sometimes lead to the wrong way which I had to learn as well.
In your first example it's pointer arithmetic, no matter what the pointer points to you, when you use "++" on the pointer it always points to the next element, that's why an array in C is always just a pointer to the first element.
The second example is also nice, I know this but I barely use "++z", I prefer "z++". but in my daytime work the coding guidelines claim that we need to use "++z" in for loops, and I hate it.
I learnt a lot from books, but even more from examples, playing around and reading examples. And google even before AI, but with google AI you save a lot of time
Re: Anone here used AI for coding?
I used it to port over the old bullet physics opencl to irrlicht
https://github.com/grannyte/bullet3/tre ... hysicsDemo
It works with my fork of irrlicht and does some crazy numbers 500k rigid bodies is within range on a 6800xt.
Some of the best usage has been using it to translate code I already wrote to new languages/frameworks. It does way better with a clear example.
In that case it was a translation of the bullet physics kernels and adaptation of the compute api I started implementing
https://github.com/grannyte/bullet3/tre ... hysicsDemo
It works with my fork of irrlicht and does some crazy numbers 500k rigid bodies is within range on a 6800xt.
Some of the best usage has been using it to translate code I already wrote to new languages/frameworks. It does way better with a clear example.
In that case it was a translation of the bullet physics kernels and adaptation of the compute api I started implementing
