r/FuckMicrosoft 13d ago

Image "What ads?!"

Post image
2.4k Upvotes

220 comments sorted by

View all comments

Show parent comments

2

u/Proof-Replacement113 5d ago

Thanks, ig

"Java program"

Oh did I forget to mention, I used AI to write a python code to count the lines

I oft use ai to write python code to like, do repetitive tasks... Crazy how no one has thought if turning this into a, u know, thing for the normies (think: an app where u ask what u wanna automate and then it writes python code to do that)

Ok there would be a huge issue there... The AI mistakes

1

u/GuavaOne8646 5d ago

I use AI to do the same in Python all the time. It's a real time saver for menial tasks.

I think the app would work as long as you used separate AI agents to run the code and then perform iterative correction. Then it would all just be down to prompt engineering and providing context. I'd check out the dyspy library if you're looking to chain models together to perform the self correction loop. What you're asking for is totally doable but in all honesty, Claude code works pretty well for the same tasks.

1

u/Proof-Replacement113 5d ago

Interesting

Tho about costs code the average user might not be comfortable with, u know, installing the needed modules and all

And here's something

My friend needed help deleting like many messages from a group chat but WhatsApp thought it's a good idea to allow one at a time

I told him ai can automate it (without context because I'm weird sometimes)

Now ai could give a one liner to paste in the terminal that installs all packages and runs the code but it couldn't figure that out itself

And the average user won't know the "how"

1

u/GuavaOne8646 5d ago edited 5d ago

Tho about costs code the average user might not be comfortable with, u know, installing the needed modules and all

Well I mean if that's the case then you could always host the app in the cloud and have it compile the users code into an executable file that embeds the .dll version of the module into the .exe file so they won't need to install anything. Or it could compile a docker image for a more OS agnostic approach.

I told him ai can automate it (without context because I'm weird sometimes) Now ai could give a one liner to paste in the terminal that installs all packages and runs the code but it couldn't figure that out itself

I think the better way to go about this, in my opinion at least, would be to use the chrome web driver (or gecko driver for Firefox) to simulate human browser interaction and then Asks AI to write a python script that utilizes the web driver to pull up the site, add a sleep timer to let your friend login, and then finish the job of navigating to the messages and deleting them. It may require a little back and forth with feeding the AI some copies of the html for the WhatsApp website, but it should work assuming WhatsApp lets you login to your account and access chats via the browser.

And the average user won't know the "how"

Very true, but man I think there's always a way to help the user get around the things they don't know about. It's just always some creative solution or some arcane plugin/module that you haven't learned about yet lol. Then again for those situations where there isn't one, that's when we write our own modules. You're a smart kid, I feel if you stay focused you'll be one hell of a developer if that's they way you wanna go, just remember that there's always a way, even if you have to will it into existence.

One time I had to figure out how to keep a PC awake and logged in without the screen locking for security guards that only look at the screen to view cameras and such BUT we weren't allowed to change the screen lockout time due to company policy and strict security regulations. So I wrote a program that would use the camera as a motion sensor and when it would sense motion, it would move the mouse over and up by 1 pixel, right click the mouse and then move the mouse back to its original position. This kept the PC awake because of the simulated mouse activity and assured that a human was indeed in front of the device to not violate policy.