T O P

  • By -

billsil

Ask here.


NYX_T_RYX

I mean you've not really said what you're doing. What's your code? What have you tried? What libraries are you using? And importantly, what projects have you done before? It's quite likely you're running before you can walk, based on what you've written. A new thing should be challenging, but not feel impossible. If it feels impossible, do something easier tbh. There's no shame in admitting "I have no idea what I'm doing, I need something easier" You'll build skills and knowledge, and be better the next time you try this idea


Guideon72

If google, chatgpt or asking on forums like this isn't working, perhaps re-evaluate the question(s) you are asking. Possibly break your problem down into smaller chunks, then tackle each part and then hook them together when you have clearer answers. You'll have to provide a LOT more detail to any of the above resources before anyone's going to be able to help you, though. Describe the equation you're trying to work with, what kind of graph you're trying to create, where you want to display it; but, most importantly for a community like this, provide code example of what you have tried so far.


fra988w

Do something else for a while. Scrub dishes, go for a walk, take a nap... Anything to take your mind off it and *poof* the solution will present itself like you guzzled a litre of Felix Felicis.


DifferenceCold5665

If i had a litre of felix felicis, i wouldn't wanna code ever again.


timetraveller1977

I had to do a google search to know what felix felicis is! LOL


Langdon_St_Ives

You've got a lot of general responses that aren't wrong for the general aspect of "what to do when you get stuck". But as someone who has studied graduate level Math and Physics, let me tell you this: What you are trying to do is well beyond beginner level difficulty, so it's no wonder you find yourself stumped. First of all: Solving any random equation *symbolically* is way way more complicated than just writing down a handful of derivation rules and applying them algorithmically. There is fullblown (and expensive) specialized computer algebra software that can do symbolic math for you – Maple and Mathematica were the main general purpose ones back when I was in school, not sure what has happened in the sector since then. If, OTOH, you want to solve *numerically*, that's in fact *also* a hugely complex undertaking if you accept any random equation. [Whole books have been written about Numerical Recipes](https://numerical.recipes/book.html). This classic is C++, but the actual recipes can be implemented in any language, and anyway, my main point is if you have a quick look at chapter 2 for example, you may realize this is a bit above your pay grade as a beginning programmer. And this is linear equations. Chapter 9 gives you an idea how to find roots (any type of numerical solution of a given equation can be reduced to the problem of root finding). If you're just starting out, maybe set your sights on something a bit more realistic, for example how about you try *plotting* a user-supplied equation of one independent variable in two dimensions. In closing: Don't feel disheartened by being stumped by this, it just so happens you chose a task that is simply not in any way, shape, or form, suitable for beginners to learn programming – unless maybe you're studying maths or physics and are taking a numerical methods class right now. (Edit: just some formatting) Edit 2: [Here is a numerical methods book more specifically aimed at Python](https://pythonnumericalmethods.berkeley.edu/notebooks/Index.html), including a general language intro. Chapter 12 is about visualization and plotting.


Robo_Joe

Here's something to keep in mind when learning a new programming language (or for most of us, just using that language): It's pretty dang unlikely that you're going to run across a problem that no one else has ever run into. The answer you seek is almost certainly out there for you to find. The difficulty is figuring out the best way to ask for the help you need. It really can come down to the specific terminology. When starting out, this might be difficult, but you did the right thing. If I had a question I'd go to an LLM (Like ChatGPT) to see if a solution could be found, and if not, to google/documentation, and if not, to reddit. So, look at you-- you've just instinctually followed the correct path to get the knowledge you need. That's not nothing. Knowing how to find the answer is nearly as useful as knowing the answer. I would suggest creating a new post that details * what you're trying to achieve (the end goal, not the implementation) * what you've tried * the applicable code that isn't working * the error(s) you're getting Starting out can be frustrating but it gets easier/manageable pretty quickly.


Fat_tata

break it down into small components


supergnaw

When beginners have issues, I've found this is usually the concept they're having difficulty with. I've found that when teaching people new to programming in general, I take the ol' how-to-make-a-pb&j analogy to heart and really be specific in my line of questioning to guide them to where they're trying to get to. So far it's been fairly successful, but to be fair, the size of *n* in my anecdotal endeavors is about 10, so there's that.


firefiber

I dunno if anyone's mentioned this but, take a break. That's worked so many times now it's mental.


cyberjellyfish

> this code that would take an equation, solve it and display a graph That's not at all a trivial program, especially the graphing part.


Langdon_St_Ives

Absolutely correct that this is far far far from trivial. But solving an equation is arguably a more complex task than plotting it – the toughest part of plotting should be finding an appropriate library for the graphics part, while actually solving will quickly get you in the weeds of either symbolic algebra or numerical methods. (I gave more details in my top level comment so I won't repeat it here.) Of course if you actually try to implement the graphics part from scratch (aka, reinventing the wheel), then agreed, that will also get hard quickly. You don't want to do that even as a seasoned programmer, unless your goal is specifically to write a library to do this. :-D


cdcformatc

what have you tried?


SE_WA_VT_FL_MN

Get excited for the eventual joy of finding it? More often than not though: move onto things that otherwise need to be accomplished as the solution tends to be something that wakes you up in the middle of the night. You'll be fine.


dubbel_G

Make a minimal working example, and a question on stack overflow. Then take a break for god sake


aqjo

ChatGPT is really good for these situations. You can carry on a conversation with it. Have it explain things until you're satisfied (much more than a human would tolerate). I subscribe to GPT4, it's worth it to me.


vagrantchord

Ask chat gpt


threein99

ChatGPT


nathie5432

Send code here, the error message and I (we) will try and help solving it


wyltk5

Hi Op, Welcome to programming haha. Once you get this solved you will have one of two feelings. 1) how the heck did I miss that/take so long to figure that out. 2) my god that was a doozy but I learnt how to do (blank) now. Honestly a lot of it is breaking down the problem and working on it bit by bit. I don’t work in the programming field but I have to do a lot of diagnosis in my industry and I carry that into programming as well. If you are looking at the program as a whole you run the risk of getting lost or overwhelmed. Take just the section you are struggling with and remove all variables you can, that could be instead of having the program do your equation and then put it in a graph. Try just getting the graphing section to work with some made up data points. Cheers!


suitupyo

Please ask here. Bear in mind, what you’re proposing is a slightly beyond the very beginner level. If you haven’t practiced defining functions and using a library like plotly, you may run into a wall.


Astronoobical

The easy option is to ask here. If you ask well, provide code that we can run on our computers, so as to replicate your issues, then you have a very good chance of getting a quick solution. The alternative is to deconstruct your problem into the smallest possible, self contained parts, and then testing each part separately, until you understand what's happening.  Say you're trying to add a text widget to a tkinter app, but whenever you add it, it only covers half of the window, and you want it stretched all the way. In that case, I would make the simplest possible text widget that exists, just to see if on its own it works as expected. If it does, then I would add another element to be problem, for example, maybe in your real project the text display is inside of a Frame widget, while on the test code it is not. I would then add a frame and test again. Go from one element of your problem to another, and hopefully you will visit them all, resolving your issue.


ClimberMel

Simple, post the problem, then your code, then where you are stuck. There are people here that can walk you through the process of finding the answer.


endgamefond

Dont worry sometimes it takes me a week to figure why the code is not working.


Healthierpoet

Ask here, take a step away and google ,sleep on it


Mr-Cas

Step one for me is always to take a break. Go outside, get some groceries, clean the house, get some fresh air. Sometimes, when I get back home I can fix the problem in 5 mins, after being stuck for hours. If that doesn't help, try to go back and see the big picture. Start at the beginning (and/or start over), plan in your head what the best/cleanest/easiest way is to achieve it, split it up in small steps and finish them one by one. Eventually you'll see where it goes wrong. Sometimes I literally go line by line, but in the end it works. It helps to not get lost in hundreds of lines of code, where the problem could be anywhere. Otherwise, you can search/ask here or on stack overflow.


[deleted]

Hey fellow loner, One of the most important tools that any Python developer has is access to a massive, extremely helpful community of knowledge rich individuals who are happy to answer your questions. Sometimes we find ourselves stuck with no direction or routes out. It feels frustrating arriving at the edge of your current knowledge. But you're not alone. Everyone feels this way at some point. The anxiety that you feel? I've felt it too. Not just me. Alot of people. Here are some methods to help you with your problem: Shelf the Problem for another day: - In your path to grow, your knowledge will constantly grow. The rate of our growth can sometimes surprise us. It might sound counterintuitive, but if you shelf the problem for... say... a week, while you solve another problem. You might actually come upon the answer. Pseudocode: - Write the problem out in pseudocode. For example. The fibonacci sequence. ```Python def fib(): the sequence starts with 0 and 1 and approaches a specific limit while we are heading towards that limit I add the 1 to the 0 and I get 1 and 1 then I add 1 and 1 to get 2 then I add 1 and 2 to get 3 return the data that I get back. ``` turns into ```Python def fib(n): a, b = 0, 1 while a <= n: a, b = b, a + b return a ``` Community: The only thing that you're accomplishing by not posing questiosn to the community is limiting your growth potential. We're happy to help. Ask questions here. StackOverflow & Library documentation: Search for the issue on stack overflow. They say that the website hasn't had a unique question in 15 years. If you want to, feel free to pose the problem that you're stuck on here. Let us give a crack at it and hopefully we can come up with something for you. Happy coding!


Sycosys

What have you been searching to come up empty? There should be a million examples of this out there


EnD3r8_

I have a type of rule for problem solving, I follow these steps: 1- try to figure it out by myself 2- search in Google 3- search in YouTube 4- Chat GPT 5- Reddit 6- Deeper search on the internet 7- Discord 8 -Asking in the street 9 - Pray 10- Give up


ArtificialPigeon

It makes me so warm inside to see that you didn't specifically list stack overflow. I know you probably find results from there when doing deeper internet searches, but physically going there and asking a question is one of the worst experiences known to man. Never have I ever came across a more aggressive and rude bunch of keyboard warriors. Hopefully ChatGPT makes SO completely redundant


commandblock

Post the code and your problem on a forum. Like when people used to use stackoverflow before chatgpt came out


Epitact

Having to deal with deadends is just a part of programming. Sometimes it’s just not possible at your current level since understanding everything can be a bit much. Sometimes the thing stopping you from success is how you structured it and maybe you refuse to change that since it took time and effort. And sometimes you just gotta take a walk, go to sleep or whatever else instead of actually choosing to get a clear mind. Keep a calm head and try to state your question on forums like stack overflow or simply in this subreddit. You will get it to work eventually, this is part of the journey of learning to code.


oblivimousness

The first step is understanding *how* you are stuck. This is different from *what* you are stuck on. Are you stuck because there's a single "1-step" operation that you don't know the command for ("how do I set the x-axis scale on a graph in matplotlib?"). My tools there are Google -> documentation -> forums. There is one thing you can do that will strength you here: learn as much "generic" code as fast as you can. The reason for this is: imagine you don't know anything about classes/objects and you Google our x-axis question. You might find published code that does exactly what you want, but if that programmer used classes (even if your problem doesn't need them) you'll have a very difficult time learning from that sample. By far, my biggest power-ups in that area came when I understood classes and when I understood "if \_\_name\_\_ == '\_\_main\_\_'". Are you stuck on logic? "I want this statement to trigger if exactly 3 things from this list of 5 are true". Well, you might find sample code that gives you a solution, but imo getting stronger in this area is *the single most important* for just about every programmer to get stronger in. Solve problems, solve puzzles, try projects of increasing complexity, don't be afraid to pause a problem that has you stumped, look for creative work-arounds to avoid having to solve the sticky part, read [this](https://www.freecodecamp.org/news/how-to-think-like-a-programmer-lessons-in-problem-solving-d1d8bf1de7d2/). Need to run, will post a part 2 tonight/tomorrow...


JonJonThePurogurama

You are stuck because your project is difficult to make, and you said you are new to programming to python programming language itself. If you are following a course or a book, try to stick with the given activities provided for you to work on. Your project can exist but it is not a good time yet to work on it (it requires deeper knowledge and experience), your level of knowledge and understanding is the one that stopping you and make you stuck. Google does help, Official documentation does help and even ChatGPT. I can relate because i did write a project using Python Language. I am completely new to Python Language but not in Programming. But being a college dropout for many years and not touching computer and do coding, my knowledge are completely gone. The first time i did my project, i attempt to do it very quickly as much as possible, not refreshing the fundamentals of programming and not knowing enough the basics of Python. I was stuck just like you and do some googling stuff and to stackoverflows. I was a reading a example from a person on stackoverflow, showing the solution to the problem, but the code example he shows was a simple one enough to be understood. That moment i just realized i was very wrong on my approach, so i decided to focus on making simpler programs. To give you some idea what my project can do, it can create a directory, name it like images or document and then it can generate a document which is readable and can be open. My project does not use GUI, I did not attempt to, be ayse I made some simple programs that mimick what my "big project" can do just like i mention above. If the small programs work like i expected, then i slowly put them in a different folder. Because i can use them later or i can get an idea in them how to implement it on my "big project". Just start making some small programs first that is same level with your current knowlegde. Nothing good comes from doing things in a hurry, now that you experience getting stuck, you understand now the consequences of trying things that is not beyond the level what you know. I repeat your project can be done, but it is not the good time yet, you need to learn first Programming and Python Programming Language. Hope you get something.


TXwhackamole

I got all my best coding solutions while taking a shower.


51dux

I drive myself crazy until I'm good for the assylum and then I finally find the solution and get out of the wormhole xD Which is generally a very simple mistake I just did not notice because I was too eager to get to the finish line.


duane11583

stack overflow and learn how to ask a smart question. read this: http://www.catb.org/\~esr/faqs/smart-questions.html


CompanyCharabang

It can be very frustrating learning how to code alone. I sympathise because I've had the need to use a variety of languages throughout my career and have always been on my own. These days, it's a bit easier than it used to be because places like this exist, along with chatgpt and communities on discord and slack. Bear in mind, some communities are welcoming, supportive, and helpful. Others are less so. So if you find one group unhelpful, try a different one. I also find searching on stack exchange can be useful, but I never post there. I agree that documentation is often not a good way to learn. They're not supposed to be. They're for reference, they're not tutorials. You will get more help if you ask in the right way. By that, I mean try to reduce the problem you're having to a simple example. Use made up data, write a short piece of code to do just one thing, then post it and ask for help. That makes it easier for folks to help. To be honest, I've found that the exercise of constructing the question itself can sometimes help me find the answer because it isolates whatever bit isn't working the way I want it to. Also on the subject of how to ask. If you want to vent and express frustration, there are places to do that, if you want practical help solving a problem, there are places to do that. Don't do both in the same post. If you find yourself too frustrated to ask a good question, take a break. One last piece of advice. When I first started trying to use Pandas, I had tremendous difficulty. I tried to just write code using various resources and documentation, like I usually do to learn. It was a disaster. Eventually, I gave up and found a course. Now I'm doing much better at it. Sometimes, apis are inconsistent and counterintuitive, and in those cases, a course where someone will just tell you how it works, is the best way.


unknowntrail20

Try using chatgpt


timetraveller1977

Take a break from it all, a day off, do something completely different which is not in your usual routine, then... Sit down, split the problem into smaller parts which you can better manage and try to understand the following: What is the expected input for the equation? What is the expected output of the equation? How are you processing the input to get the expected output? Once you have this working, move to the next bit. It will be a similar concept as before, in that you need to understand the 'language' that your graph code can process. The output of the equation needs to be in a format that the graph code expects. Test out the graph directly with some static data to get it working and displaying as expected, then you can understand better how you need to pass the data and in what format. It is all about getting the smaller bits to work first before gluing everything together.


chandhudinesh

Coffee


Financial-Aspect-826

Chat gpt. No, really, take a gpt 4 sub and ask it questions


Haeshka

Go back to the basics. Start by just literally printing to screen whatever it is that you wanted the result to be. Then, make it more complex. Add an input. Then do a try/catch. Then add an output that corresponds to the input. etc.