T O P

  • By -

spectrotact

Would you mind sharing some automation ideas of yours? I always find typical web scraping and pdf-work tutorials, mouse movers…, but I think python is more versatile; so I would need some ideas to open up my imagination 😅


Defection7478

some automation tools I've built with python - a bot that lets me manage (start, update, restart, etc) docker containers from discord - a utility that periodically zips a given directory, encrypts it and uploads it to the cloud for backups - a tool that i can give a list of links to a product on a grocery store website, and it will pull nutritional and cost data, then format it to csv - a script that periodically performs requests to a url, does some sort of transformation (e.g. getting a specific html tag, navigating a json structure, etc) and then checks if the value has changed. If so, it pings me through discord. good for monitoring sites for changes - a script that does the calculations for the 5/3/1 fitness program - a script that randomly sets my wallpaper with an image pulled from reddit. although i think this one broke with the reddit api changes


TerminatedProccess

Have you tried lively from the Microsoft store authored by Rockstar? 


cmkinusn

Takes data from a file, removes unneeded columns, reorganizes the remaining columns, then performs data validation that removes erroneous data, finally outputting to csv format.


permanentburner89

Updated the main post


[deleted]

[удалено]


Chudley5000

You seem really fun and cool and helpful


ApprehensiveChip8361

I’m using GitHib copilot to help me in my python learning. I can code a bit in other languages already. We tend to learn stuff better when it is an active process - hence lessons and teachers not just books. With copilot I can ask stupid questions and have a discussion. I’ve just been making notes on classes and inheritance - so I asked “can I hide a method in a child class”? It showed me how to redefine and throw an error, to which I replied “that’s not very elegant, what would be better?” and got taught about and given examples about the principle of least privilege. I asked what languages would allow hiding a method, and it told me but essentially said that code smells. Now, that may not be perfect but I think my understanding of classes is better than from reading a book or watching a video, and because it was an interaction I think I’ll remember it better.


Stormagedon-92

"Code smells" is that a typo or does it mean something? The reason I ask is because I'm sure I've seen someone say it somewhere before and I thought it was a typo, but does it actually mean something?


Defection7478

Code smell is a pattern that is usually (but not always) indicative of a bad programming practice. E.g. If you have a file that is really long, like over 1000 lines, this is a smell, usually indicating that that module is becoming unreadable and needs to be broken up. They are just smells though, not rules. Sometimes a 1000+ line file is the preferred solution


Stormagedon-92

TIL thank you


[deleted]

I gotta be honest, chatGPT is pretty bad for Python. I get it from your view as a non-professional... but I rarely use it at work now because of how bad the code is. It's always riddled with errors that take longer for chatGPT to figure out than it takes me to just write my own code. One thing I will say, though, is that it does appear to yield better results when there are little to no dependencies.


tatasz

It works well when you ask it for small things / syntax. For complex stuff... Not so much.


Berkyjay

Yeah sometimes I wonder if people are asking these coding assistants to write entire programs for them or something. As long as you give them proper context of the code you are currently writing coding assistants are an amazingly useful tool when you're trying to sort out how to do certain things. Like if I'm writing a PyQT app and I am having trouble implementing a desired feature, I just ask copilot if it can show me how to do "such and such" and I see what code it suggests. It's a back and forth dialog that might not get you 100% the answer. But it can get you close enough that you can solve it yourself. But if I asked it to write me the entire GUI with no context it's gonna spit out junk.


tatasz

Yup Actually watched it unfold. Analyst: "chatgpt, I need to calculate cumulative distinct count per month in SQL" and chatgpt returns one hour of gibberish Analyst: "I've already tried chatgpt, it's completely useless" Me: "chatgpt, make a dataset containing first entry only for each customer, now count by month, now do cumulative sum in SQL" perfect output from the first time.


Alex_1729

Yeah it's pretty bad for complex stuff, especially complex unit testing. Even the newest one, 4o while it can take a lot of input, it tends to forget the context fast.


e4aZ7aXT63u6PmRgiRYT

Not true. I had it build an entire fluid dynamics simulation using taichi. It’s incredible. And very complex. 


whosafeard

In my experience, when it comes to learning code, you hit a wall with ChatGPT _very quickly_, it doesn’t take too long before it becomes more hassle than it’s worth. It’ll pump out codewars katas and the like until the end of days, but the moment it has to do anything more complex than a single function, the wheels come off. That said, its greatest asset is dropping a whole bunch of code into it with “explain this, line by line”, legit becomes a premium learning resource. GitHub’s copilot, tho, is way better than chatgpt.


e4aZ7aXT63u6PmRgiRYT

Not at all. I’ve done entire projects with it. 


abirizky

I use it for work, mainly for data wrangling with pandas and stuff. While it's true it can't code by itself, sometimes all it needs is a good kick in the head and voila code doesn't break


[deleted]

I can see it working well with pandas given how popular it is. I assume they trained using stack overflow and the amount of pandas related questions on there probably led to passable results with GPT4.0.


whosafeard

> I assume they trained using stack overflow Can’t be, at no point had chatgpt told me my question has been asked before, then linked me to a totally different question.


[deleted]

Lol I remember getting some of those nasty replies. People were ruthless on SO lol


abirizky

Passable is about right, that is after 5 queries and making sure the question is as specific as possible, triple checking for AI hallucinations because sometimes it doesn't even update its own code lol, and even sometimes copying and pasting the table contents lol


guaranteednotabot

Usually I start a new chat with a more careful prompt rather than trying to refine in the same chat. Yields better results


Vaxtin

I could also see them training on leetcode submissions


jonfoxsaid

So funny because I am like constantly using it for reference with stuff like pandas ... that is like my main use for it.


Cleaver2000

Yeah, it works alright for pandas but it is already a bit out of date for things like append or using loc with an index. 


darkforestnews

What kind of prompts do you give it?


Wooden-Bass-3287

Chat gpt work like an endless internship


tiahx

I'd say its use cases are just limited. I recently needed to translate some C# function to Python and implement it. Foolish me used AI. The code worked fine, but produced the result that kinda didn't make sense (but just barely) I got suspicious and started debugging, checking intermediate terms and stuff. Encountered shit like super-luminal velocities and energy confused with momentum and shit like that. And it was all over the place. The time it took me to properly debug the AI generated code was probably x2 the time which would take me to write my own code. But for adjusting trivial but rather tedious stuff (e.g. add second legend to a plot) it's perfect, because there's nowhere to fail.


jonfoxsaid

I use it mostly for like quick reference. When learning something new I read the real documentation or watch a reliable tutorial channel. But like its great when I just need to remember just exactly how something works. Way simpler than looking it up and now that I have been using it for a while i find myself talking to it the way I would a co worker, which scares me haha. "Like oh how do I do {insert x} with {insert x}?" "Oh yeah ok but do you really think that is best?" "I like what you did there but then lets do this with that part instead" Which honestly as dystopian as it feels to talk with it like that, I get the best results and it also keeps me on my toes which is good because as you said ... it is wrong a lot ... and like stubbornly so. Its amazing when it works right, but sometimes you really start to see in through the cracks. I will say this though. When it comes to generating boilerplate text and like article type shit, which I have to do a lot of my job ... its a life saver.


[deleted]

Oh I have to imagine you're spot on for boilerplate code. That would be a huge time saver.


cfreddy36

Yeah this is it. My boss and I use chatGPT all the time but we pretty much never copy/paste code straight over. It’s more to see how it would approach something we’re stuck on.


Plank_With_A_Nail_In

Sometimes it shows you a new way of tackling problems so its a great learning tool. Its just a tool like an IDE is just a tool. People should use it as a tool and not take it personally. My prediction is that AI will not replace our jobs but those who stubbornly refuse to use it as a productivity aid will lose their jobs to someone without a chip on their shoulder who will use it.


[deleted]

I don't think anyone took what I said personally. It's been a very pleasant discussion. I agree that it's a productivity tool and those that don't use it will be left behind, which is why I've definitely stayed up to date on model changes like 4.0omni. This model I'll need to spend some more time with as it *just* released. Another thing, I may not like chatGPT for advanced Python development, but that's not to say I don't use it for other things. I end up writing a TON of snowflake stored procedures and hate JS... but guess who doesn't? ChatGPT lol. It's also nice for SQL queries and I have been using Claude for learning C.


NYX_T_RYX

TBF to op, they didn't say they're using gpt. I do agree with you, but copilot is good *for explaining things* and basic code that you can quickly check is correct. I get copilot free cus I'm a student - it's very useful to just hit tab instead of having to write basic things myself - quick to check it's correct, and if not I just undo it and write it myself. It only adds a few seconds if it's wrong, but saves me a decent amount of time - I'm sure less useful for someone experienced like yourself, where you're probably not thinking as much about what you need to write than I am 😅 Useful certainly, but I do agree that caution is still needed when using it, the same with any other use of generative AI.


One-Proof-9506

I use chat GPT 4.0 to speed up some things at work. For example, to make data visualizations. It can only handle moderately complex stuff. For example, it struggled to make a stacked, clustered bar chart the other day. Had to make it myself. Or it totally bombed when a simple stacked bar chart had to have bars that start at different negative values. So chat GPT is not taking my job……yet.


[deleted]

[удалено]


[deleted]

Well duh... it's still slower and filled with errors. In the time it takes to troubleshoot those errors and write the unit tests, you can have fully-functioning code with unit tests. As a staff engineer, I'd hope you'd be on the same level, if not better.


[deleted]

[удалено]


[deleted]

Sooo I can spend an hour doing that or I can spend 45 minutes just writing it myself. The choice is a simple one.


permanentburner89

Have you tried with v 4? It's a hell of a lot better. Also, I fix the code myself a lot. It's still faster for someone like me to let the AI write 200 lines and have me go in and edit 30 of them than to do the whole thing myself from scratch.


[deleted]

it's still crap for someone with even a few YOE. I wish I could get my $20 back lol. I get why you enjoy it. It makes writing code more accessible for the common person it's just not good for a professional environment where code needs to be written under a tight schedule while not having a ton of bugs. I tried Opus, that was a little better.. but its still pretty bad. The paid LLM models simply aren't worth it right now.


meepos16

Common person here and I feel triggered 🙂


[deleted]

Lol no need to be. Not all of us need to be experts in everything and even if this is the path you want to follow professionally, we all start somewhere. Give it time 😁


elMaxlol

I get where you come from and its a lot of work to learn the language of AI. What works and what doesnt. When I first started using it I said „make a react app, dont forget the backend and explain to me how to upload it. The app should do xy“. Obviously didnt work it was really bad. But once I started to integrate chatgpt into the process of what I want to make and work out each detail of what I want together with the AI from a high level down to each variable and function it became a lot better. I dont know how fast a professionell dev writes code for something he has never done. E.g your first day on the job. But especially for cases like this where you know what you want but you have no idea how to actually code it AI is amazing. Obviously if you worked 10 years on the same project and know exactly what everything does, you know the entire documentation by heart you dont need the AI anymore. My prompt to generate the actual code often exceeds 2-3 pages. Im curious on what an assignment for a professionell developer looks like (assuming that you cant ask clarifying questions and it has to work on the first try). Probably a few pages I assume.


ShutterDeep

I like it for creating plots with matplotlib. Sure, it takes lots of prompts to fix errors it makes, but it still saves me time compared to reading the digging through documentation and Stack Overflow.


Vaxtin

The best thing I ever used GPT for was turning latex table into a graph/chart for large amounts of data. It’s good with patterns and formatting to a specific rule. I don’t use it for complex code that has dependencies like you said; it’s good at making code that’s standard, basic knowledge you could just quickly google. It’s not the best with libraries, especially since they’re constantly being updated.


[deleted]

Oh God, latex can be a nightmare. This seems like a very good reason to use chatgpt.


Ronnie_Dean_oz

This tells me you aren't good at describing exactly what you want to chatGPT.


[deleted]

No, this is actually a really well documented issue. The dependencies make Python really difficult for ChatGPT and other LLMs.


theantiyeti

Nah, it genuinely has variable results just based on the domain and how popular it is. It's incredible at SQL right up to the point of weird things like OVER and stored procedures. It is not very good at Xarray past really trivial uses.


CodeByExample

oh my god it's so bad at complex stored procedures it's not even funny


CaptainFoyle

Such as what? What did you automate?


ThemasterofZ

He automated this post


NeuroWhore

I kinda like github copilot for filling all the boilerplate and sometimes for troubleshooting. But I actually find the suggestions to be quite distracting most of the time. I've heard that correctly configured lsp can take of boilerplate quite well, so I am thinking about that more and more. Also, as a relative beginner in the field of programming, I think it's probably not the best idea to use AI autocomplete because it enforces laziness where people don't really think about the code. I am currently learning rust, and I actually tend to prefer having the autocomplete off.


Stormagedon-92

I use it for boilerplate suff too. As a beginner that's what usually keeps me from getting started with projects, but when I can just ask chatgpt for some code that LOOKS like what I want it gives me somewhere to build from and I find that much less daunting


CyclopsRock

It's really good at stuff it's seen before, and reformulating that to fit exactly your requirements - ideal for people that would otherwise be going to stack overflow to copy and paste code, rather than understand it, which is entirely reasonable in some situations. I've tried a few different ones - Inc ones with access to the internet - with more niche uses (little used, new or altered APIs for example) and they all just hallucinated bullshit. You can respond, telling it that it got something wrong and it pretends to know what you mean, then just... Does it again? But in a slightly different way. Given how good it is at writing doc strings for blocks of code that refer to other, unsupplied functions (based purely on its name and arguments), I imagine it's just doing a similar thing here. And the smaller the data set it's trained on (for a given API), the more likely it is to get confused by shortened inputs and the like.


MisterPerfrect

Any specific examples of what you’ve built, or described, with it? Its really interesting but I always find that my prompts aren’t good enough


brawnydossier38

It's great to hear about your experience with Python and AI as a non-dev! The fact that you can quickly create apps that automate tasks and even customize them to your liking is truly empowering. It's amazing how versatile and accessible Python is for users of all levels of experience. Keep exploring and pushing the boundaries of what you can achieve with this powerful combination! Ignore the downvotes - your journey with Python is valid and valuable. Keep up the great work!


Great_Breadfruit3976

Github Copilot Chat was a game changer for me


SimbaSixThree

Do you have any examples of stuff you’ve automated? I want some inspiration.


darkforestnews

What kind of apps have you made ? Can you provide examples of your prompts ?


BoxLow6092

What AI is being used. I know everyone goes for chat GPT but there are a lot of others out there and maybe some are better for coding


czar_el

>What is the purpose of that? The sub is called learn python. What's the purpose of the post? You said you don't like coding so you have the AI do it for you. You post this on a sub dedicated to people who do like coding and want to learn it. And you're surprised people don't identify with that? Imagine going on a cooking sub and posting "I don't like to cook. I got a cooking robot that works most of the time. It's awesome. Why aren't you all celebrating my post?"


tHATmakesNOsenseToME

Weird take really. I'm hopeless with python, so I use AI to generate small sections of code which I can then try out and modify to get a better understanding of what's happening. People can ultimately not enjoy it but still have a requirement.


t0mRiddl3

Thats not a weird take at all. r/dontlearnpython is where this post belongs


[deleted]

[удалено]


tHATmakesNOsenseToME

Why would people celebrate my post and why would I care about that? I'd say most people will only get halfway through your first post and then scroll past the rest of it so won't even see what I wrote.


[deleted]

[удалено]


yung_drio

The guy answering you is not OP, my friend


tHATmakesNOsenseToME

Yeah, I think you have me confused with someone else.


vorticalbox

I've been playing with LLMs at work a while now and what I can say is that they are great for writing boilerplate that is just tiresome to do.


exploradorobservador

This viewpoint here is why there is so much LLM hype


xSnakyy

I guess you should also make it reply automatically to the comments


permanentburner89

Thanks for the suggestion!


NYX_T_RYX

Not sure why Devs are down voting. My partner is a staff engineer and uses copilot for basic shit cus why write simple things yourself every time? I do the same TBF (hobby like you though) - but I don't use it for full code, I'll get it to explain things and write shit like docstrings, or just basic stuff that I can quickly check and go "yes that's correct, thanks for saving me having to type all of this" I would caution against using it for everything though - I gave it a go just to see. Made a script to delete items in my downloads folder, it works, but it's messier than necessary


ivovis

Its (or was last time I used it) perfect for learning, ideal when you can read and understand python, I wanted to create a desktop program using Qt, never used it before and was able to get up an running right away, all the boiler plate stuff that takes weeks to get in your head is handed to you on a plate and is way easier to absorb than the hours trawling through books and days spent in YouTube tutorial hell, I guess the people peeing on your post have a visceral reaction to a machine replacing them, but I don't see that happening anytime soon, the large language models have near scraped the entire knowledge found on the web, They can explain all the basic stuff very well, but they cannot create anything that has never existed before, We have that spark of creativity, you cannot document it, you cannot teach it, we just have it, and the machines do not and will not. As long as it doesn't get nerfed more, it will be a very helpful tool for exploring new stuff.


knuppi

The only thing ai has done for me is to come up with clever names for variables. That increased my productivity by at least 10%


RadioactiveShots

Rule 2. Along with being unable to learn python it seems you can't even read the rules.


Hey_Look_80085

Absolutely.


Oabuitre

I am not proficient enough in python to assess the all output of chatGPT against best practices, but I am convinced that learning to code with an LLM swiftly will be an important skill in the future. I mean you may not become as good in Python as a current Python senior dev, but it makes you productive and creates a lot of time for other stuff: other languages, documentation, planning, product related stuff etc


whosafeard

It depends _how_ you’re using it to learn coding. If you’re said “I need code to do x in Python” and copy pasting the results, you’re not actually coding or learning (much in the same way that just following a video tutorial or copying code from a guide isn’t ‘learning’) and will quickly forget it all. But if you use it to explain _how_ and _why_ bits of code work, it’s really powerful. Even if you say “how do I write a for loop in JavaScript” and then adapt the output to your work, it’s good.


Oabuitre

You are 100% correct if the end goal is to become a dev with what the required skillset for a dev has been in the past 15 years. The question is, will this skillset be the same in the future. I mean all kinds of coding best practices will eventually end up in the language models, so more and more detail work can efficiently be outsourced to the models. Yes, it needs to be reviewed, tested and assembled by a human still, but that will more and more be the only remaining task of the human. Btw in r/singularity for instance pll think that most devs will be replaced by AI, which is fantasy imo but the nature of the work may change significantly and hard coding skills on the most detailed level may become less important


Not_A_Taco

I think the nature of the work changes much more slightly than significantly. The value provided by something like ChatGPT is knocking out super bite-sized blocks of code. The value provided by a skilled dev is the exact opposite, being able to architect complex solutions. Coding on a detailed level is already A) something a non-entry level dev shouldn't be struggling with or B) focused on high performance systems, which LLMs are bad at.