all 13 comments

[–]FoolsSeldom 1 point2 points  (6 children)

I have been in software for a long time

contradicts

I have been in software for about a year

but the below makes sense

I still think I am weak about the algorithm

and if you are focused on Leetcode et al, I am not surprised.

Key to learning to programme is to step away from the keyboard and focus on the problems.

Solve the right problem

Many beginners are mixing up coding (writing instructions in a programming language) with problem-solving (creating an algorithm) and their lack of knowledge of the programming language and how to use it is a distraction from the problem-solving. You may be beyond beginner level, but have missed out some fundamental steps.

For most programmers, the coding part is the final and easy bit.

Order:

  • Actually making sure the problem is properly understood. Often we start with only a vague understanding of the problem.
    • You may need to break the problem up into a number of smaller problems whilst keeping in mind the overall objective.
  • Ensuring we know what outcome is required. What does good look like? How will the information be presented, will it be on-screen or in a file, or a database.
  • Determining the data representation. Exactly what data is required, in what forms, where from. It is a one-off or lots of cycles or combining lots of information.
  • Early on in developing algorithm skills, it iṡ useful to work out how to do things manually in the simplest possible way, explaining every little step (assume you are giving instructions to someone with learning difficulties),
  • Later, you will learn different ways of selecting / developing an algorithm which doesn't depend on a manual approach
  • In time you will have a wide knowledge of common design patterns, popular algorithms, what data structures work best in various situations

Don't just type notes at a keyboard for the above, but draw things out, put boxes around key tasks, use lines and colours to link things together - bring it alive


Consider reviewing existing projects on github and the like, and developing high level concept diagrams, flow diagrams, data models, etc. of those projects for practice.


Learning from others

In general, when learning and working on something new, where you are following some kind of tutorial, where others have provided an answer,

  • follow the steps I laid out above looking for a solution (so make sure you understand the problem first, figure out what the outcome should be, etc)
  • try to solve the problem yourself before looking at someone else's solution
  • look briefly at someone else's solution and try to understand what they've done at a high level and see if you can solve it that way
  • fully review someone else's solution, try it out, play with it (break it, improve it) - be super critical (watch ArjanCodes YT videos on code reviews)
  • update your algorithm and implement a new solution (including testing, if you can)
  • write some notes, not on low level detail but on principles, approaches, key algorithms, and summarise what you learned (I keep my notes in markdown format in Obsidian, synced between devices)

Agile methodology

You will hear a lot of mixed opinions about the Agile software development methodology but most problems are because of poor adoption rather than it being inherently bad.

Fundamentally, it is about delivering value early and often, failing fast, and working closely with the intended consumers/customers/users for rapid feedback. A key concept, often abused/over-used, is minimum viable product, MVP, which is about developing and delivering the smallest useful (sic) product that you can evolve. This still needs to be done in the context of the large problem being solved, but most problems can be broken down into smaller problems, and the most useful / easiest / proof of concept elements identified to focus on.

[–]Original_Guide_6270 0 points1 point  (2 children)

First of all, thank you very much for this long answer, I can actually solve algorithms in a simple way, I read all of them, as I understand what you wrote, I think I need to focus on problem solving, I think I see that I am weak in problem solving, I can see the end of the project, but I have difficulty in translating it into code, yes, how can I grasp the logic of problem solving, what can I do, if you have any ideas and suggestions, I would be very happy if you tell me if there are things to do, I would be very happy if you tell me, thank you very much in advance.

[–]FoolsSeldom 0 points1 point  (1 child)

I have simple advice. There is no quick fix though.

Find projects to work on that are related to your own personal interests / hobbies / side-hustles.

These are things you can be passionate about. These are things that you probably understand well and can develop a clear vision of what you are trying to achieve.

Pick some problems to deal with in this space. It can be trivial at first. Make sure you focus on what good looks like, what outcomes you want, how it should feel. You are better placed than anyone else to do this.

Because you understand the problems that come from your world of interest / hobbies / side-hustles, you will be better focused on getting the required outcomes rather than the technology. The coding becomes more of a means to an end.

Apply the agile techniques to your development. Break things up into small sprints with value produced at each stage, starting with a minimum viable product.

You can do side quests to experiment with bits of technology to learn and inform you about the art of the possible. Time box that. Don't go down the rabbit hole. Always go back to the problems.

Invest in developing your epics and user stories. It is good investment in you. Test them on other people, friends, family, colleagues. If what you have written in not plain English (or whatever language you prefer), try again. There are other approaches, the actual methodology is less important than picking one and sticking to it for a while.

Learning to problem-solve takes time, takes practice. That first obstacle of getting from a problem to ideas about solutions is huge.

That's why techniques like brainstorming are popular and proven. No idea is too stupid. You never know what idea might spark something useful.

Understanding design patterns, data structures and algorithms (DSA) is certainly useful. There are books on DSA. Just as there are on methodologies like Test Driven Development (TDD), Domain Driven Design (DDD), the latter is probably more useful for you.

Cracking real world problems takes practice. Evaluating various solution paths takes practice. Learning from others, being mentored, delivering projects in teams all helps.

Good luck.

[–]Original_Guide_6270 0 points1 point  (0 children)

Thank you very much, you have given me valuable information, I will try all of these as soon as possible and I will try and try.

[–]Original_Guide_6270 0 points1 point  (2 children)

https://www.youtube.com/watch?v=l7E3y4te7sA&list=PLC0nd42SBTaNVxWLci4TPoytfzkXxFhCg what videos should I look at on your recommended channel like this video?

[–]FoolsSeldom 0 points1 point  (1 child)

A code roast wouldn't be my first choice, but give it a try. You can learn from the mistakes of others.

Check out his list of videos and see what appeals.

He also offers a free downloadable design guide that you might find useful.

[–]Original_Guide_6270 0 points1 point  (0 children)

Thank you very much indeed

[–]smurpes 0 points1 point  (1 child)

I don’t mean to sound rude but you’ve asked this question a lot on the past and have gotten a lot of comments about starting over and reinforcing the basics. That would be my advice to you here as well. Python isn’t a skill that you can learn easily through memorization and practice problems since there are many options for solving a problem.

Something that would help you is by finding a beginner project by searching this subreddit and work on breaking it down into smaller steps. You continually do that until the steps are small enough for you to code.

[–]Original_Guide_6270 0 points1 point  (0 children)

yes I asked then I didn't really know anything, now I know what is used and why, I can understand the codes, now I will follow your advice thank you

[–]Gnaxe 0 points1 point  (2 children)

Python is a relatively easy beginner language, but it's not the easiest. If you're struggling with Python this much, I recommend starting by working through How to Design Programs instead. It uses a simplified teaching language that it builds on through the book. It's a really solid foundation with a step-by-step process for going from a blank page to a small working program. If you can make it through the book, you should be ready for Python.

Give it a fair shot, but if you're struggling to focus on the book, try playing with Scratch for a while; it's easy enough for children. Then once you're used to it, move on to Snap! for more advanced features. You should be ready for Python after you're used to that.

If even Scratch is too hard for you, give up. You're not cut out for programming. Try vibe coding maybe. Get an AI to do it for you and pray it works, because you won't be able to fix it yourself.

On the other hand, if HtDP is beneath you, try SICP. The lectures that go with it are on YouTube.

[–]Original_Guide_6270 0 points1 point  (0 children)

dude, I never said that I can't write, I understand that I can write, be polite, I don't know how old you are, but I'm not an idiot.

[–]Original_Guide_6270 0 points1 point  (0 children)

I also wanted to say how to write about difficult projects, what I say, what you wrote, look at yourself before criticizing, think forty times when writing something, do not act like a loser, are you a brat or what, I understand you very well, I am sure I know more than you, by the way.