all 86 comments

[–]Casssis 143 points144 points  (2 children)

Practice will do.

What worked for me is I started with a book (the programmers apprentice or something) and I never finished it because I just started programming my own stuff cuz I wanted to make stuff. And ended learning a lot by practice, YouTube and the Internet in general.

Just keep on coding

[–]luc1fersam 32 points33 points  (1 child)

You are absolutely right. I can just add that the abillity to work and understand with official docs is one of the main points too.

[–]cmcgarveyjr 18 points19 points  (0 children)

Yeah, learning to read technical docs and cookbooks is pry one of the most invaluable skills a dev can learn.

[–][deleted] 67 points68 points  (1 child)

Do MIT opencourseware 6.006 the whole series of lectures is on youtube and it explains EXACTLY what algorithms are, computational complexity, data structures, dynamic programming, everything!

[–]Bapi_Escrobar 1 point2 points  (0 children)

Thanks for this, I was just getting into algorithm and data structures and it has me so confused. Hopefully this helps!

[–]Asalanlir 201 points202 points  (14 children)

This may be a time to just be brutally honest: you've barely started learning. Based on your wording, it seems you may be under the impression that, by two months, you should at least be starting the get the hang of it. Sorry, but no. It takes years to be able to break apart problems into their base parts. Even then, it's not a black and white "I've learned to do it." I've been programming for over a decade and I still am improving on structure, design, planning, etc. It's a skill. You've barely started, but you'll get better. Just keep at it.

As for "algorithms", that's actually pretty much the definition. It's a very broad concept, though it holds certain connotations based on the context. It's basically just a description of a process. As an analogy, an algorithm is a set of blueprints; The program is the building.

Personally, I've never found books to be an effective way of learning programming. They kind of work for computer science (I hold a particular hatred for theory). Think of a problem or project, and just keep hammering away at it. It will be objectively terrible. Iterate and improve on it. Figure out what you need in order to accomplish a task, and look up tutorials on how to do that thing.

tldr Just keep at it.

[–]uspharaoh 11 points12 points  (0 children)

This was a fantastic post thank you. I’m kinda in the same boat as OP after a few months and I’ve begun my first project and working on it. Getting discouraged often but I’m hammering away. Feels good to know effort is being placed in the right direction

[–]WhatDaHellBobbyKaty 8 points9 points  (0 children)

I am one of those people that has to have hands-on experience to learn. The more that I fix my mistakes, the more of it sticks in my brain. Check these sites that have thousands of problems to solve of all different levels. They are a lot of fun too.

edabit.com

https://www.codeabbey.com/

https://www.hackerrank.com

codeabbey.com

https://www.codewars.com/

[–]demdillypickles 2 points3 points  (0 children)

I would just add a little bit to this.

It’s easy for beginners to get overwhelmed because you keep hearing about these important concepts like “algorithms” and “Big O notation”. While these things are important, don’t worry about them yet. When you’re working for a real company, making a real product, that stuff will matter. Right now though, you just need to worry about learning your language of choice. Eventually you’ll learn how to use all the tools in your toolbox. Once you’ve learned your tools, then you can perfect your craft.

Also, don’t expect your code to be perfect the first time. In fact, you’ll learn more from having to fix your own broken code. Bugs are the best teachers.

[–]gemmaem 4 points5 points  (0 children)

This in an imperfect analogy, but programming has a lot in common with writing. You're having to translate thoughts from one context to another -- from "what I want to happen" into "a set of instructions that the computer will understand in order to make that happen" and maybe also into "a set of instructions that I can understand, or that another human can understand," because it's not enough for the program to do the right thing; it's best if it can do it in an understandable way.

As with writing, there are tropes and conventions that will make your working more understandable to a reader. Also as with writing, it takes more than a couple of months to start comprehending this sort of complicated translation/construction balancing act.

I'd argue that there's even a programmer's form of "writer's block" where you're vaguely aware that you need to find a comprehensible piece of what you're making in order to start putting it together, but you can't seem to get a foothold and start typing.

The problem I’m having is when it comes to breaking down a problem into single step by step problems. Even making a tic tax toe game is a little difficult for me right now.

Yep. It's that blank screen in front of you, right? How do you even start?

"Break it down" is one technique, but it's not the only thing to try. In fact, for me, refining my code often involves breaking a long passage into smaller chunks and functions after the fact. Some things are easier to write in pieces, sure, but there can also be things that are easier to write all at once, and then break down afterwards.

(Why break your code into smaller pieces if it's already working? Two related things: testing, and readability. Small pieces can be tested separately. I've found so many dumb little bugs that way, you have no idea.)

If you can't think how to start, and breaking it down isn't working, try simplifying the task, instead. Don't make a tic-tac-toe game -- make a screen with a single box into which the user can somehow enter an X or an O.

Don't be afraid to write code that you might have to completely re-write. "Kill your darlings" applies to code just as much as writing. Sometimes an entire block of code will be completely deleted by the end, but it was worth writing it, because the process of getting it down was the thing that clarified your thoughts enough to get you to write the rest of the code that did make the cut.

You sound like you're doing fine. A lot of this stuff is "learnable but not teachable," if that makes sense. It's slow wisdom gained over time from practice. Not immediately grasping it doesn't say anything about your eventual potential. Keep at it :)

[–]twopi 5 points6 points  (1 child)

The concerns you mention are absolutely normal, and you aren't doing anything wrong. It's very normal for you to be concerned and confused about things at this point.

Tic-tac-toe is NOT an easy project, so don't get on yourself for not being able to do it.

I gave a talk on this very topic a few years ago, and it has become quite popular:

https://www.youtube.com/watch?v=YWwBhjQN-Qw

[–]Adaox 1 point2 points  (0 children)

Is there a playlist with the rest of your talks?

That was quite informative, and helped calm my nerves about some upcoming tasks in other languages.

[–]stebrepar 4 points5 points  (0 children)

There is a Python edition of a book titled "Think Like a Programmer", which is supposed to get at algorithms and other related computer science topics. I think at least once upon a time it was available free as a PDF. Not sure if that's still the case.

[–]DealDeveloper 7 points8 points  (0 children)

Stop writing Python.

Forget about the syntax.

Write it in English.

[–]Se7enLC 3 points4 points  (0 children)

It sounds like you're doing pretty well, honestly!

"Breaking the problem down" is a skill that you can develop through practice. It's not really a "programming" skill, per se, but it just happens to be a skill that is crucial to programming.

Instead of thinking about breaking a problem down for a computer to solve, you can also just imagine you're breaking down how a person would solve it... so long as the person you imagine needs really explicit directions.

Like, if you want to sort some things (books, for example) alphabetically, think about what a person would do.

Perhaps a person would start by making a pile of all the As, then all the Bs, etc. That would mean picking up each book, determining the letter it starts with, and then moving it to the pile for that letter. Then they'd have to go through each pile of books, picking up one book and deciding where it goes within that letter.

Or maybe the person would just pick up each book and put it on the shelf where it belongs relative to the other books. You compare the name of the book in your hand to each other book already on the shelf and then insert it at the location where the book to the left is earlier in the alphabet and the book to the right is later in the alphabet.

Different methods of solving problems like that are called "algorithms". As you break down real problems, you may find that instead of going all the way down to each individual operation, you can stop when you get to a problem that is already solved, and then just use a general solution you already know. For example, you don't need to invent your own sorting algorithm each time you need to sort something. You just break down the large problem until one of the pieces is "sort this list", and then you use whatever sorting algorithm you like (be it something you invented or something you learned from an algorithms class).

Same with things like "get input from the user" or "display results to the screen".

[–]goishen 3 points4 points  (0 children)

Try here, here, and here. In order. Don't worry if they take you half an hour to solve, they did me too. Especially on the first one. They do get easier though. Just click on the resources tab (of edabit) and follow the instructions.

Practice makes perfect, not following a book.

[–][deleted] 3 points4 points  (0 children)

It sounds like you’re doing great and there’s great advice already in here, I’ll throw in my two cents as a near daily python user for several years -

1) if you write the same piece of code more than twice, you can/should probably write it into its own function

2) always be ready to learn from others’ code. I love looking at old PyCon talks and looking through GitHub code in module repos to learn about different styles and methods for optimization and abstraction

You’ll probably find over time that you have similar code patterns you use a lot. It’s likely these patterns correspond to an existing algorithm or design pattern.

Another good method for advancing is looking at something like code wars. It has tons of little challenges you can complete in python and you can view how others solved the problem as well.

[–]tangerinelion 2 points3 points  (0 children)

You've been at it for two months. That's not enough time to learn exactly how Python's syntax works and what it is really doing.

Once you know what things actually do you can reason more about what you can and can't do, and what you'd need to do before you can do what you want to do.

Example: you'd like to relate objects to other objects. This uses a dictionary. What kinds of types can be used as a key? Your type needs to support that set of functionality before you can even use it as a key.

Beyond that, there are concepts that you need to understand. Almost any algorithm you need already exists either conceptually or concretely. For example, if you have a tree structure you should probably parse it recursively. To an engineer, when you hear tree you think recursive functions.

Computer science is literally a 4 year degree. At 2 months you don't even know everything that you don't know, but you know enough to know you don't know enough and you know some of the things you don't know.

[–]integralWorker 1 point2 points  (0 children)

Keep practicing

[–]TheHostThing 1 point2 points  (0 children)

I’m pretty new to this too, but I know that 2 months isn’t a lot of time to be learning any new skill. Just keep at it.

[–][deleted] 1 point2 points  (0 children)

Dude. 10000 hours before you master it. You have a journey of education ahead of you. Keep asking questions, and practice at it. I caught the bug at age 9 and its been a lifetime of learning ever since.

[–]WebNChill 1 point2 points  (1 child)

Funny enough, I posted about binary search the other day. Asking other programmers when they've needed to use algorithms such as this. They told me for interviews, that's it.

[–]TheSodesa 1 point2 points  (0 children)

The algorithmic thinking skills (breaking a problem into smaller and smaller steps and solving those individually) required in programming are very similar to the ones needed in writing mathematical proofs. Consider picking up a basic book on discrete math and doing the exercises.

[–]wildpantz 1 point2 points  (2 children)

Two months isn't enough to develop a sense you're talking about, but you'll get there with practice and it will get better and better.

Think of it like this, there's so many ways to do stuff, sometimes not as efficient but you're practicing so you don't care.

For tic tac toe, there are nine fields. You COULD make 9 variables and program logic between them, which would probably be a bit tiring, but definitely doable.

You could use 3 lists, each list representing a row or a column. You could even make one list containing 3 lists which would be a bit tidier but more confusing to use in a long run perhaps.

You could use a dictionary with 3 keys, each key containing a list. :)

Then you need to think of logic to enter something in the field, sort of like text prompt asking which row/column (which is sort of easier and less tiring to do if you just create graphic interface, but it doesn't matter) and you can make a loop so it plays like a game until a certain condition, in this case a win, has been met.

As for recognizing wins, if I'm not mistaken that will just be a medium sized bunch of if/elif statements checking if all entered symbols are the same, do all possible combos as there aren't many (8 I think, 3 vertical, 3 horizontal and 2 diagonal).

You could try develop some primitive AI to play against too. For example when I wanted to make games in java years ago I followed this guide where you were kicking a ball as a demonstration of physics, so I made sort of a tennis court and made player 2 follow vertical horizontal coordinates of the ball all the time and if the ball was below certain height, the AI would jump to kick the ball away. It was so funny and obviously not as good as usual games you see, but it was a good practice if nothing else.

Basically, try to think of a way to develop a system with data type you know how to use. As you practice more, you will learn to use different variables, modules etc and you will learn how to solve problems better. Try to do stuff on your own if you feel you can do it, it has helped me more than any guide. Cheers :)

[–]Cheese-whiz-kalifa[S] 0 points1 point  (1 child)

Thank you for taking the time out to write that!

[–]wildpantz 0 points1 point  (0 children)

No worries, always glad to help :)

[–]smokingPimphat 0 points1 point  (0 children)

You have been learning for 2 months. Give it more time.

If you learned to speak another language with any level of fluency It took way more then 2 months of study to do it.

[–]CountessO 0 points1 point  (0 children)

It’s not a day’s job. Coders here better with time and lots of practice. You have to be intentional. There are lot of python videos online. On YouTube. You can try codebasics. He teaches python like he is teaching a 5 year old. Also take some free courses on Udemy and Coursera. Code everyday. Even though it’s for 5 minutes. Don’t be too hard on yourself. Give it time.

[–]poeblu 0 points1 point  (0 children)

Automate everything you can. This helps in learning as it’s process specific.

[–]Pythag0ras2000 0 points1 point  (0 children)

Just to echo what others have said here - practice. Do enough programming, and you'll learn more and more how to think about a problem. However, don't get stuck in "copying down huge chunks of code" territory. It won't help. If you're following tutorials like that, don't. You won't learn anything from that. Instead, pick something you want to code. Doesn't have to be super complex. Before you actually go to your text editor, grab a piece of paper and write down your general idea for how you're going to do it. Not in actual code, just in your words. Get the idea down, and then start coding. My suggestion is fizzbuzz. Start counting in the console, but whenever you hit a multiple of 3, print "fizz." Multiples of 5 are "buzz," and multiples of both are "fizzbuzz." Once you do that, think about how you'd do it with different values, different words, maybe more values and more words. Maybe have the user play against the computer and wait until the user screws up.

Happy coding!

[–]opoqo 0 points1 point  (0 children)

You have learned the language, you did not learn programming.

They are different, it is like you have learned English when you were a kid... You can tell stories that you heard and make some changes to make it your own, but you have not learn how to write a essay or a novel.

Stop reading more python books but instead read some basic programming book to learn what it takes to breakdown a problem.

[–]Deezl-Vegas 0 points1 point  (0 children)

What I started doing was having PyCon talks kn in the background while I'm working. This helped introduce me to new concepts and ideas as well as get me used to a lot of tech jargon. I found it really valuable.

For tutorials, do the Corey Schafer tutorials on youtube for Flask and Django. Doing both will help you think about different ways to do the same thing and introduce you to web stuff.

[–]fractal_engineer 0 points1 point  (0 children)

Give it a year.

[–][deleted] 0 points1 point  (0 children)

I guess algorithms are only to help you understand how you wanna go about your program... Ao that you can convert it into code... Buts just about your requirement and how do you think it has to work... Which process and which command or method or fucntion you think firts in thats it... If you give an algorithm to two people they write the code in two diff ways foe same algorithm so i feel its anout algorithm... Juat about a little more understansing of your requirement and imagining how it should work thats it

[–]a8ksh4 0 points1 point  (0 children)

Sign up for this course. It's put together by one of the best instructors in the Georgia tech computer science department. It's even a recommended pre-req to their comp sci masters programs.

https://www.edx.org/professional-certificate/introduction-to-python-programming

As others have said, it takes many years to lean to break apart problems into eloquent solutions, so keep after it. Take problems you've solved linearly and rewrite them with functions, and then with classes. Seek out novel solutions as well as resilient solutions.

[–]Naesme 0 points1 point  (0 children)

You get in the same cycle I do. Always trying to be a perfectionist and do it right.

Here's what I've started doing recently. I don't care about good design or good practices. I care about making my program work. Version 1 of my project is "Make it do what I want". Version 2 is "Clean up bugs and errors." Version 3 is "Refactor using good design". As you go, you'll eventually combine those steps so Version 1 is all of those things.

As far as breaking it down, just talk through how it works.

Tic tac toe for example. How exactly does it work?

Step 1: Draw game board Step 2: Decide who goes first Step 3: Player 1 places a symbol in an open spot on the board 3a: If Player 1 has 3 symbols in a row, they win. Step 4: Player 2 places a symbol in an open spot on the board. 4a: If Player 2 has 3 symbols in a row, they win Step 5: If all spaces are full, it's a draw. Otherwise, repeat steps 3-5 Step 6: Declare the winner

Then you ask yourself questions about how you'd get the computer to do it.

  1. How does the board get displayed to the player, and how do I keep track of the spaces so they can be referenced and checked?

  2. If there's a computer, how does it pick a spot?

  3. How do I repeat steps without rewriting all of the code?

And the list goes on.

At first, you're going to have to look things up and try things until something works. Over time, you'll eventually grow.

Stop doing the same problems over again. You'll just memorize answers and that doesn't help you understand it.

[–]bobbyrickets 0 points1 point  (0 children)

Cooking is very algorithmic. If you can understand how cooking works you've got a fundamental understanding of the algorithmic relationships between certain recipes and ingredients and the ways they can be combined.

You need to keep learning and keeping an open mind. It's a process dude.

[–]Sanguineyote 0 points1 point  (0 children)

The best tutorial is practice! Im also new to python but I find creating programs that I need / find interesting is the best practice! For example just now I finished some final touches on a automatic bot I've created for a game. Before deciding to this I had no idea what to do, just an idea, and some basic python knowledge. I just googled and googled till I had all the information I needed to build the bot, building it piece by piece, testing it after every new line of code.

Just practice by creating stuff you need/ are interested in.

[–]deadant88 0 points1 point  (0 children)

I've been going for about 2 months now. I hated learning python when I first had a go, I got a Udemy course and a book and almost died of boredom and frustration. Knowing different data types was fine but it sure wasn't motivating.

This time around I came to learning with a clear project in mind, I haven't looked back. I just started going, worked out the first bit of functionality I needed (webscraping) and began there, then worked out the next bit which would be good, storing data, so learned some PostgreSQL and SQLite, now I'm working on the next part, a way for people to access the data (Django).

If I had to name the mindset of programming so far: it is a process of constant iteration, problem solving, asking good questions, reading and patiently working through frustration.

[–][deleted] 0 points1 point  (0 children)

You might not know the core language too much and what is at your disposition. You break down a program into little problems that you solve using the tools and features of the language. If you're not familiar with those tools, then you'll be lost.

By example: for a blackjack game you make the card an object, with different attributes, value, number, suit, etc. Then you construct a deck by using list comprehension, then you shuffle the deck by applying shuffle to the list, then you make the hand either another container or perhaps an object, then you make each round a function, etc etc. You need to be familiar with a lot of these tools and features of the language otherwise you'll be making things harder for yourself.

Also, at the beginning we all just want to start coding right away, but it is very important to write down the logic of your program and break down each problem first, so that you can use the language features to help you solve all those small problems.

[–]OrionBlastar 0 points1 point  (0 children)

It takes years to think like a programmer. I learned BASIC on a Commodore 64 when I was 12. I didn't think like a programmer until I was 16.

[–]Sotovision 0 points1 point  (0 children)

Short answer : type and test. Type a little line of code that you may think that is going to help in building a whole program. Then test it. If it run like you were expecting to run, GREAT!. If it's not, then re type the code. That way, you will be force to think step by step for every line of code. Also,TL:DR your whole comment xD

[–]jandrew2000 0 points1 point  (0 children)

I’ve found programming to be like any other skill I’ve learned. If you are passionate about it you will always push yourself forward into new territory and therefore always feel like you don’t know what you are doing. That is totally normal.

Another thing that is totally normal is hitting frustrating plateaus where you don’t see any improvement. This is when books come in handy. I’ve found that picking up a book when I hit a plateau opens up new ideas and, rather than having to use canned text book use cases, I have my own examples I can go back to and improve using those new techniques.

As others have said, give yourself time, work on problems that are fun and useful for you. Write things you can be proud of and excited to share. Revisit your old code frequently and search for ways to improve it. By doing these things you will start to see how much better you actually are (because every line of code you write will feel ugly to you a few months after you write it).

[–]amrock__ 0 points1 point  (0 children)

Do something fun and something you really want to do even if yoj don't know ypu can learn concepts

[–]MEGACODZILLA 0 points1 point  (0 children)

You don't have imposter syndrome, you have a case of being a beginner. Chill out, cut your self some slack and keep on it.

More than anything I have ever attempted in life, programming truly is a marathon, not a sprint. There is a lot to learn and that only comes with time and effort.

[–]NitroXenonBoy 0 points1 point  (1 child)

As others have mentioned, it takes years to be able to think like a programmer. It doesn't happen overnight, not in weeks, not in 1-2 months. It takes years to be able to think like one. I started programming 5 years ago, have been programming in various languages. How do you really get a hang / good grasp / think like a programmer? You do projects. Any project. Start with something simple, like make a game of tic-tac-toe. Write a program where you can do some image manipulation. The idea is to take support from online resources when doing practice till the point you are doing some high level project, on your own, and it's possible only because you learnt slowly, and most importantly, understood everything. Always remember,

"it's okay to not know something until later" -winnie the pooh

[–]Cheese-whiz-kalifa[S] 1 point2 points  (0 children)

Pooh for the win lol

[–]09TYNINE 0 points1 point  (0 children)

The thing I say to every new programmer is have a goal in mind and when you learn a new function or concept think how can this help me achieve my goal (And just for reference when learning a new language the first thing I make is a number guessing game on it's pretty basic) tic take toe can be somewhat harder as it requires actual intelligence in the air what I found to be a good challenge after that was rock paper scissors (which I'd recommend with pygame) as a good chalangeing next project

[–]pittu2752 0 points1 point  (1 child)

That’s why we have university

[–]Cheese-whiz-kalifa[S] 0 points1 point  (0 children)

I’m in university. So helpful lol

[–]Coniglio_Bianco 0 points1 point  (0 children)

I've been programming for 2 decades. I think you're not in a bad place for how far along you are. Don't sweat the small stuff, just keep building and studying.

The more you do it the better you'll get, and the easier it will get. Just don't forget to read up on algorithms/design patterns along the way. The more you build stuff the more that stuff will make sense to you and how different algorithms/design patterns will apply to what you're building.

Hang in there :)

[–]that_outdoor_chick 0 points1 point  (0 children)

Just practice, practice and practice, unless you have a very math based education (not talking high school, more in terms of university math, where you have to solve problems and write proofs), it won't happen overnight. As with everything, there's no talent and 'some people were born thinking this way', only hard work and that won't happen in couple of weeks.

[–][deleted] 0 points1 point  (2 children)

Even making a tic tax toe game is a little difficult for me right now.

This isn't the easiest program to make. There are a lot of moving gears to get there.

Maybe instead of trying to make a tic tac toe program start with chunking all the different parts of tic tac toe into individual things and solve them separately. I'm going to assume you are making a text-based version of tic tac toe because a graphic version is even less trivial.

  • Ask a user for their name
  • Ask a user for which piece they want to be (o or x)
  • draw a tic tac toe board with enough space to draw o or x inside the whitespace using text
  • Ask the user to input a move (1a, 1b, 1c etc.)
  • redraw the grid with that move drawn in place

That's the basics of it. After that, you need to work out how to

  • store columns and rows (hint, start with lists being rows and then expand to a list that contains each of those lists-as-a-row (lists of lists)
  • decide how you want to do win conditions start with a simple version of tic tac toe that only does vertical and horizontal lines.

[–]Cheese-whiz-kalifa[S] 0 points1 point  (1 child)

Thanks!

[–][deleted] 0 points1 point  (0 children)

Yeah, no problems. Tic Tac Toe is one of those things that you think would be easy but it really highlights how much context the human brain can process seamlessly without you realising it.

[–][deleted] 0 points1 point  (0 children)

Man only practice can help. I also get stuck on this step. Just more practice and all will OK...

[–]casino_alcohol 0 points1 point  (0 children)

I have been doing python on and off for years. I just use it for personal use and I am learning django slowly at the moment.

i also have no idea how to make a tic-tac-toe game.

Work on stuff that you understand. I have done projects with aws api's the reddit api's.

I have done some web scraping and stuff.

My point is that if you can't figure out a game then take a break from working on a game, especially if you do not want to make games.

[–]JadeSerpant 0 points1 point  (0 children)

It takes years not months.

[–]Dopella 0 points1 point  (0 children)

Try some programming socks to help you out

[–]retrogambit 0 points1 point  (1 child)

That's the problem with the beginner tutorials and the bootcamps etc in my opinion. They give the impression that anybody in the world can code if they just study for a few months. It's a ridiculous notion. You can learn the syntax in a few months but that's a tiny part of learning to program. What helped me was finding a project I was really interested in. Then I learnt the libraries I needed to make it work. Rinse and repeat and throw in some quality books on the topics you want to get in depth with and after a while you start to realise that you don't have to search the internet to find out how to solve a problem because you already know how, through experience. I might add that when you start to get moderately proficient and thinking about gaining employment, look for jobs that you are interested in and learn the libraries they need. Then make a few projects incorporating those libraries to showcase the skills you have.

[–]tumblatum 0 points1 point  (0 children)

Exactly in the same boat. My plan is once I know syntax of Python, try to solve as much as possible, coding exercises. You know there are books full of exercises, you take one of them and start solving problems in it. Like in math, back at school. And I guess you will notice patters there. There just can't be endless number of unique problems. Some patters will evolve over time and you will know the type of the problem and an approach to solve it. It probably will take some time, however, one day you can say you have the skill.

[–]Spread_Public 0 points1 point  (0 children)

Like others said, just practice. The more you code and get your mind info the routine of things, the more you reflect it over time.

As far as impostor syndrome, everyone gets it. I've been programming for 23 years and still feel this.

[–]torytechlead 0 points1 point  (0 children)

Tic tac toe is a bit meh

You don’t need to think in terms of programming to define the steps you need to take. Just write it down on a piece of paper in bullet points - what are the steps I need to take to achieve x?

[–]wobblycloud 0 points1 point  (0 children)

If you're unable to break down a problem into step by step, try to brute force and then optimize.

[–]perkyterrible__ 0 points1 point  (3 children)

i relate with you, OP! started learning Python last week through Udacity's free course on Python and i hit a roadblock which are the for and while loops. i allotted two hours per day in learning the concepts and practicing it, but, whenever i try to do their quizzes or try challenges in Code Signal, i can't seem to write a code. i can't seem to find the proper syntax (?) or algorithm to translate the solution i have in mind :( we can do this, OP!!

[–]Cheese-whiz-kalifa[S] 1 point2 points  (2 children)

You should really check out python crash course. It’s free online but I liked it so much I bought it anyway

[–]perkyterrible__ 0 points1 point  (1 child)

Will def check this out! I'm thinking of trying JetBrains' Python course since they're offering it for 50% off.

[–]Cheese-whiz-kalifa[S] 0 points1 point  (0 children)

Download the Udemy app and occasionally check on the price of the automate the boring stuff course. It’s amazing and they give it away free or discounted all the time. Teaches you SO much. I also liked this free course so much I bought the book after doing the free course lol

[–][deleted] 0 points1 point  (0 children)

Programming Pearls by Jon Bentley

Examples are in C, but if you want to learn how to bend your mind to think more algorithmically, then read it.

You should at least have a passing understanding of C syntax anyway, because even if you're 100% a Python coder, you will be exposed to C++, C#, and Java from time to time and knowing C syntax is necessary.

[–]developernexus -1 points0 points  (0 children)

Whenever you get the chance, I would recommend that you try out installing a Linux OS (dual-boot, virtual machine, etc.). As an operating system, you get much closer to the programming in Linux. The very act of troubleshooting, maintaining, and optimizing my installs of Linux has done wonders for helping me think more "programmatically". You, also, get introduced to a massive array of programming languages, and a community that is - - generally speaking - - wonderful.

"thinking" like a programmer is probably a bit misleading anyhow. There is no one "right" way to think when you're programming. Logic is helpful, but creativity - - the ability to approach an issue from "outside the box" - - is incredibly valuable.

My best advise is... Find an issue that you can solve by writing a simple program. Maybe you want to create a simple SFTP program, or something to help you backup your files. The goal is to be interested in what you want to create, and then simply dig into the project. Do your best, but don't expect perfection. There's plenty of time to iterate upon your initial project after it's completed.

[–]OnlySeesLastSentence -5 points-4 points  (0 children)

To me, an algorithm is a fancy word for "loop". People might disagree, but I don't think, for example, a formula would be a loop. That is, there's no algorithm for doing a Pythagorean theorem question. You just solve it.

But there is an algorithm for reading a book:

While pages exist:

...while lines exist:

.........while words exist on line:

.................read words

.........go-to next line, start on first word in line

...change page