// This might be a glass
Glass* glass = dynamic_cast<Glass*>(container);
- 0 Posts
- 6 Comments
TheMightyCat@ani.socialto
Programming@programming.dev•Rebuilding a social platform – how to use an AI agent as a pair programmer, not a black box?
6·1 month agoIt depends, do you want to learn or do you want to get something fast and don’t care how?
If you want to learn don’t let AI write anything. Ask it questions if you don’t understand, ask it to explain, but wrte everything yourself.
If you want to get something that works and don’t care how, make extensive tests. Use a minimum test coverage. Automaric AI reviewing the PR of the AI, And keep the agent going until it passes the CI.
To awnser your question specifically read the plans very carefully. Most of the time the agents execute the plan fairly faithfully, you don’t need to correct the code much if you make sure to read the initial plan very carefully and make changes on where it made a mistake.
This does build on the fact that you can actually understand what its writing, if you can’t, go with the first approach and don’t use AI at all for writing code.
TheMightyCat@ani.socialto
Programming@programming.dev•Why do native UI frameworks suck so much?
1·3 months agoEither the UI is defined in some DSL, that’s loaded (or compiled) and then you spend most of the time writing getElement(pathToElement) and wiring it up, or you have to boilerplate create each element and parent.addChild(element).
Im saying “there are no elements” because of what OP says here, the system i’m using now doesn’t have that.
You have a panel+border+text “primitive” drawing functions. Nothing is stopping you from creating a single function that calls all 3 of those. You probably should, since it’s probably a common pattern. You could call it DrawBoxedText. There is no difference between a DrawBoxedText function and a BoxedText element with a draw() method.
yeah i could make a function for that, but i would argue that “here is no difference between a DrawBoxedText function and a BoxedText element with a draw() method.” there is a big difference between these. Personally i find using a function like
DrawBoxedTextmuch easier.
TheMightyCat@ani.socialto
Programming@programming.dev•Why do native UI frameworks suck so much?
5·3 months agoI had my own library for UI that tried to have a element model, but it was bloated and didn’t scale well. Now im drawing everything via vulkan compute shaders and its fast and looks great.
I think the philosophy needs to switch from elements back to pixels, atleast that is what worked for me.
i dare to say its as easy as webdev
snippet from my game:
DrawMenuButton(buf, btnExit, "Exit to title", exitHover, exitHover && window.mouseLeftHeld, false, font, topFontPx, exitCol); DrawMenuButton(buf, btnSave, "Save changes", saveHover, saveHover && window.mouseLeftHeld, false, font, topFontPx, saveCol); PushPanel(buf, titleRect, panelBgColor, 6.0f * s); PushBorder(buf, titleRect, borderColor, 6.0f * s, 1.5f * s); DrawText(buf, "OPTIONS", titleRect.x + titleRect.w * 0.5f, titleRect.y + titleRect.h * 0.5f + topFontPx * 0.32f, font, topFontPx, textUnfocusedColor, TextAlign::Center);this is in the draw function, and along with the other code produces this menu:


I don’t like python personally, but saying its useless is quite far detached from reality considering all the python projects.
You can argue its slow and i would agree, but if people make alot of stuff with it its clearly not useless.
A programing language cannot be better than another one because its personal opinion.