Discussion ChatGPT Can help writing Code for Orbiter

We are now apparently entering the 3rd stage of AI development: The AI Agent, which should also be capable of coding.
One cautionary tale amused:
A coding agent deleted a developer's entire database, later saying it had "panicked".
 
Sorry fro bragging, but All these AI chats are total bsht and waste of time. If you are not coder (I am not) you'll accept any bsht from AI without understanding. C++ and Orbiter is not that hard. For example, I learned C/C++ basics when learned how to program Arduino. So, now I can read understand (mostly) and edit existing C/C++. Even more with some patience it is possible to compile Orbiter from source. Then you can experimenting with small editing and testing results.

Instead of wasting time with AI bsht, use your time for learning!

Over and out!
 
As far as learning goes I'd certainly be cautious currently. But coders will always want to save time and others will want to replace coders...
 
I have Claude Code Pro + Cursor Pro subs. It's $40/month and sets me up pretty nicely....
Don't sleep on agentic code editors... Whether good or bad, the world is changing, and choice is to go with the change or resist it.
I don't think resisting it is feasible. The genie is out of the bottle.

I use coding agents everyday both for personal use and for work. It's scaled me immensely.
 
I have Claude Code Pro + Cursor Pro subs. It's $40/month and sets me up pretty nicely....

So, you just pay a noticeable amount of money ($4800 per seat and year. Or in my case, approximately the 1% of my gross salary before taxes, that I pay for union membership) for a programming language, that translates your non-human language (Ever tried talking to an coworker like you talk to an AI prompt? Please don't! * ) inputs into a (not really precise) representation of the target language....

And no, I don't think AI is really worth it (compared to the union membership). If you are a good developer, you don't need AI because it wastes time to explain a prompt what you already know. If you are slightly less good, a classic web search will always work better than an AI prompt. If you are a bad developer, AI only makes you worse. There is a small spot in the middle, where AI can really make you a better software developer, but that requires enough skill to notice if AI is bullshitting you (and it does. Always). If you jump from project to project and programming language to programming language, an AI could partially offset the lack of familiarization if you have no coworkers, that would otherwise give you the important knowledge (and architecture principles!) that you need for contributing to the next sprint. And once you outgrow this sweet spot (and you will), you will leave AI behind. And in my case, I am too specialized and too experienced in my tiny niche already for any AI to be helpful. Its like asking an AI how to maintain a steam engine. Too few people care about the topic as much as you do.

So, yes, I resist. I don't want to let corporate jerks streamline my job to the point, that any monkey could make money for them (and they will never let themselves be replaced by AI. Despite their decision processes being so drilled in, that they are a deterministic algorithm.) But does resistance mean, that I don't use it? No. I use it sporadically for summarizing what happens in bureaucracy, so I at least know a bit more about the emails I usually ignore, I take all AI training for some time investment that my company approves. And make AI solutions for customers, if they really want them...I learn. If you know yourself and know your enemy....

But... Is it feasible? I don't know. If you fight, you can lose. If you don't fight, you have already lost. I have around 20-25 years left to retirement, maybe AI will beat me first, maybe it will just outlive me. It won't go away. It will get better. It will make less errors. Know more industries. Get more insight in customers domains. One day, CEOs can create all the software of their companies by AI. Including the simulated applause of yes-man. And at that time, I will hopefully already (mentally, don't worry France!) have retired to a tiny gaulic village. And better have some skills left in me that I can use.

* For the fun of it, we just got informed via company mail that we shouldn't use more words than necessary for AI prompts, especially no politeness, since it wastes energy and might lead to (more) inaccurate results. Or course, less politeness by the users will eventually result in less politeness by the AI....
 
Last edited:
AI is a tool, and it will transform software development. Like any other tool, those who learn how to use it effectively will be of more value than those who don't. What I have found is if I treat AI like a dumb intern, it can be a very powerful productivity enhancer. But always check its work, and don't allow it to get so far ahead of you that you can't. As AI develops, I imagine this will change.

I speak to it as I would speak professionally to an human intern (this is more about me, then the AI). I tell it what I need without a lot of superfluous verbosity. That said, more meaningful tokens produce better results, this is what I have heard, and it seems to be true in my experience.

As an exercise I had it (ChatGPT) help me write an 6502 emulator. Rather then just telling it to 'write me a 6502 emulator', I started with a C++ class for managing the state of the registers. It did that and got it correct. 'Write a map containing opcodes to mnemonics'. Check. Correct. Write the handler for the LDA command, all memory models. Correct. Write unit tests for those handlers. Correct. It removed a lot of the tedium and let me focus on the bigger picture. It was a revelation of how powerful AI (vibe) coding can be.

I'm within a year of retirement, having done software development for over 35 years. My take right now is that AI is a good thing for corporate developers who can, and are willing to see themselves working closer to the 'client', or 'problem' space, and less 'code slinger'--real world problem solving. If you prefer the nose-down, bit-banging, professional software development will not be a good fit going forward.

I appreciate the different perspectives here, interesting discussion.
 
I'm within a year of retirement, having done software development for over 35 years.

I'll hit the 30th anniversary as professional in 4 years, when I'm 51. The only other job I know, except software development, is mechanized infantry. Will get interesting when software development and I part ways...
 
AI is a tool, and it will transform software development.

Will. Has not yet.

At the moment, AI is able to speed up actual typing, but it's not able to creatively solve problems. It may take a few more years and AI programmers, able to do my job better than me are coming. But at the moment, a person that isn't better than the AI just laying down a bunch of code creates a lot of crap code :P
 
I use "vibe coding" only for boiler-plating. For that it is barely usable. Everything else is still an entangled mess of code. If a co-worker puts in a merge-request, I can usually spot pure AI code pretty quickly, because it shows that it is a bunch of snippets bundled together without any knowledge of the overall product whatsoever. While it can bring a product forward, it is quite often just introducing another technical debt, and cause much pain later on. That's why I normally suggest to refactor it heavily, resulting in more time invested than doing the work up-front without fiddling with a prompt. But hey, somebody needs to burn away all those gigawatts, lest it'll just enrich yet another Bitcoin wallet.
 
I use "vibe coding" only for boiler-plating. For that it is barely usable. Everything else is still an entangled mess of code. If a co-worker puts in a merge-request, I can usually spot pure AI code pretty quickly, because it shows that it is a bunch of snippets bundled together without any knowledge of the overall product whatsoever. While it can bring a product forward, it is quite often just introducing another technical debt, and cause much pain later on. That's why I normally suggest to refactor it heavily, resulting in more time invested than doing the work up-front without fiddling with a prompt. But hey, somebody needs to burn away all those gigawatts, lest it'll just enrich yet another Bitcoin wallet.

And consume water. Lots of it. Hard to believe that they compete with small thermal power plants already.

 
IN most cases googling helps better than AI code, because you find whom where AI took code, read that stackoverflow, google litle more and solve your problem. For example, right now I am working on external HUD for Simpit. No idea how to use SDL under linux, but... Few hours and here is result! Working on number (aka text) drawing now. How AI can help me better than reading SDL wiki, some good tutorials on web and Orbiter source code? Part of code is copy/paste from hud.cpp with some modifications.

1753980530183.png
 
Can AI generate SDL code, what prevents memory leaks? Learning and reading prevents memory leaks... AI helps to become more stupid.
 
AI, in my experience, is very good at some things like generating lots of words that describe things I don't like to write by hand.
For late ISO certification for example I used it to create a procedures (a.k.a. Processes) for upgrading "IT Assets" and many other processes....
Nothing new it generated, but it was way more text than I would ever have written (and much less spelling errors, too :p)
...and that's very nice and keeps the auditors reading :LOL:

For other things it is very bad:
For our interns, which usually do some Arduino projects interfacing with different hardware sensors and actuators, the AI has learned from all the Arduino-Sites where newbies posted their (non working) code - so the "answers" an AI gives them is almost 99% BS :LOL:
 
Last edited:
Remember when asked to AI: generate template with 255 cases and break...It answered:
switch (myVariable) {
case 0:
break;
case1:
break;
// and so on
case 254:
break;
case 255:
break;
}

After that I got an idea: "Kill IT with fire!"

And I am not started talking about Earth geoid compression algorithm from World Magnetic Module or about converting equatorial star coordinates into local coordinates. Total waste of time.
 
1754108843312.png
AI code editors have come a long way since the days of GPT-3.5-turbo.

Above MFD was coded entirely by Cursor. I don't know any trig.
The cool thing is you can now code while watching tv, you can run 5 instances of these code editing agents at once.

The fact that they allow me to randomly at whim create the above in < 1h of vibing with music in chill mode is nothing short of amazing. As someone who has been coding for a long time with a good bs sensor and intuition for development, these things have allowed me to scale myself to a ridiculous degree.

I gave it commands like this:
perfect!

one more issue. When I bank hard you can see that the pitch lines drift from the center? Not sure why. They need to be centered, you can see the pitch lines are appearing well below the nose indicator
 

Attachments

I use "vibe coding" only for boiler-plating. For that it is barely usable. Everything else is still an entangled mess of code. If a co-worker puts in a merge-request, I can usually spot pure AI code pretty quickly, because it shows that it is a bunch of snippets bundled together without any knowledge of the overall product whatsoever. While it can bring a product forward, it is quite often just introducing another technical debt, and cause much pain later on. That's why I normally suggest to refactor it heavily, resulting in more time invested than doing the work up-front without fiddling with a prompt. But hey, somebody needs to burn away all those gigawatts, lest it'll just enrich yet another Bitcoin wallet.

What model are you using? What code editor are you using? Try Claude Code Pro plan ($20/month) or Cursor with claude sonnet 4.
You have to properly ground the model with context/conventions about the project. Having the model scan the code base and having it generate a .cursorrule/CLAUDE.md files is the way to go. For new projects, you can design them from grounds up to be optimized for code generation by using small modular file structure and convention over configuration.

You can do mass refactors by using the models, you can scan code base to determine areas of opportunities. You can generate automated units, behavioral tests, integration tests. You can use a bunch of static analysis tools to surface issues to the coding agents.

It's good times!

Edit:

BTW, the writing is on the wall. If you notice the sheer pace of progression. Less than 5y ago the models were incoherent. As much as we are prone to moving the goal posts, we have to realize that at some point these models are going to become super human coders. It's sad :( Because we are on the cusp of great change. And scary.
 
When I bank hard you can see that the pitch lines drift from the center? Not sure why.

The problem is that you not understand code. And it not your code. You need to dive into trigonometry to understand what is written. When you understand the idea how it should work, coding in easy and no need for AI. If somebody add AI code, then nobody else will understand what code is doing.

Another extreme: maybe we need to ask AI to write Space simulator from scratch? AI will write for you. So AI lover can start their own space simulator project right now. Or... Somebody can ask AI to write whole operating system from scratch? Why not? Only one small thing: it does not work like that.

If AI lovers desperately like AI code (vibe coding) then why they call themself "coders" or "programmers" instead of "vibers" or "question askers"? Programming (or coding) is much more than monkey generated symbol sequence feeded into compiler.
 
Why not call them "Artificial programmers"? :ROFLMAO:

And the real fun begins when you enter testing and bugfixing. And suddenly need to fix code you never had to understand. And where AI can't help you, because it doesn't understand it as well. It just produced it.
 
The problem is that you not understand code. And it not your code. You need to dive into trigonometry to understand what is written. When you understand the idea how it should work, coding in easy and no need for AI. If somebody add AI code, then nobody else will understand what code is doing.

I don’t need to know the trig though. I can study up and read it and I SHOULD do that long term but I can create working software right now.

I would have to spend energy and read in the previous world. Now I can at my whim create the above mfd in minutes by just asking it and turning off most of my brain and relying on fast intuition.

Another extreme: maybe we need to ask AI to write Space simulator from scratch? AI will write for you. So AI lover can start their own space simulator project right now. Or... Somebody can ask AI to write whole operating system from scratch? Why not? Only one small thing: it does not work like that.

What do you mean it doesn’t work like that? AI democratizes intelligence. If you want to build your own OS from scratch now is the best time to do it if you truly want to learn. Use AI, it now has become easier than ever to do these sort of experiments for learning.


If AI lovers desperately like AI code (vibe coding) then why they call themself "coders" or "programmers" instead of "vibers" or "question askers"? Programming (or coding) is much more than monkey generated symbol sequence feeded into compiler.

Call it whatever you want. I love coding myself. There is a time and a place for everything including manually coding something by hand to learn something. But code is also a means to an end. What really matters is what you create and whether it solves a problem and whether people find it valuable.

Why not call them "Artificial programmers"? :ROFLMAO:

And the real fun begins when you enter testing and bugfixing. And suddenly need to fix code you never had to understand. And where AI can't help you, because it doesn't understand it as well. It just produced it.

Testing and bug fixing is easier than ever now for me. I have the AI do the testing for me. And I disagree cursor/claude code can do a remarkable job scanning the code, finding bugs, explaining the code, even documenting to make it easier for others to onboard.

To the naysayers just give Claude code a chance.
 
Back
Top