Using AI to write code

HoaxEye

Senior Member
Unfortunately the setup isn't reproducible via docker file at least yet. The first setup is a bash script that downloaded one 30x30 arcmin fits file and then attempted to perform analysis with sextractor, Stilts/TOPCAT against Pan-Starrs, USNO‑B1.0 and what not. I had a lot of problems with getting things to run correctly on OSX. Dockerizing that mess won't help anyone.
I'm now trying to create a better version using Python which would be more OSX agnostic. But I'm now facing a lot of new technical challenges e.g. I had to install Conda to get few required sw to work with Python. My time is limited, but I'll keep trying.
Yes, it would have been awesome if authors would have provided a Docker file or just chunk of code in github project. Doing everything from scratch using complex astro-software is not easy although I've been coding since late 1980s :eek:
I'm using AI to assist with code generation, because they seem to be able to convert descriptions in scientific papers to code (at least better than me). I don't have a paid subscription for chatGPT so I run out of prompts fairly fast. There are also apparently some bandwidth limits. This requires a lot of work: you need to write fairly long, very precise prompts. Otherwise free chatGPT is not useable for this purpose.

Today I tried licensed version of Copilot, Microsoft's own "chatGPT" :p It has gpt-5 capabilities. GPT-5 mode does not seem to produce any better code, it's just much slower. But there's an answer limit per discussion, not sure how many. I hit that limit many times and finally learned how Copilot can be asked to remember the context and progress (it doesn't remember everything, though).

Copilot also suddenly refused to continue the discussion, even during code generation. That's pretty challenging because when it stops the chat, all progress and current state is lost. It took awhile to figure out why it stops the discussion. It's more sensitive to certain words and topics. In this case name of SExtractor software seems to trigger to safeguard randomly. SExtractor is quite old, widely used astronomy software, but the name of the executable is "sex" :oops: After several trials and frustrating moments, Copilot seems to work better if I explain this in the beginning of each discussion.

If you have knowledge on how to improve AI assisted coding, or know alternative generative AIs that might work better etc., please let me know.
 
I use Zencoder as a platform, in the JetBrains IDE (PHPStorm). You can pick which model you use, but I generally use it on Auto+. I have occasionally bumped it up to Opus 4.1 Parallel, which did seem slightly better. It is quite expensive if you're not being paid to code.

2025-10-30_12-53-11.jpg


A new version of Cursor was just released, and it looks interesting. Multi-models/agents seem to be the new things. I've been tempted to switch to Cursor or VS Code as JetBrains is a bit clunky.

I've not tried Claude Code, but they all use (mostly) the same agents under the hood.
 
Back
Top