How do I learn algorithms? [closed]

2020-05-15 00:52发布

Brief History: Just graduated high school, learned a bit of python and C++, have no friends with any helpful computer knowledge at all. Out of anyone I met in my school years I was probably the biggest nerd, but no one really knew. I consider myself to have a vast amount of knowledge on computers and tech then the average person. Built/fixed tons of computers, and ability to troubleshoot pretty much any problem I came across.

Now that high school is over, I've really been thinking about my career. Loving, living computers for the past 13 years of my life I decided to take my ability's and try to learn computer programming, why I didn't start earlier I don't know, seems to be big mistake on my part...

Doing some research I concluded that Python was the first programming language I should learn, since it was high level and easier to understand then C++ and Java. I also knew that to become good at what I did I needed to know more then just 2 or 3 languages, which didn't seem like a big problem considering once I learned the way Python worked, mainly syntax changed, and the rest would come naturally. I watched a couple of youtube videos, downloaded some book pdf's and snooped around from some tutorials here and there to get the hang of what to do.

A two solid weeks had passed of trying to understand the syntax, create small programs that used the basic functions and understanding how it worked, I think I have got the hang of it. It breaks down into what I've been dealing with all this time (although I kinda knew) is that, input, output, loops, functions and other things derived from 0's and 1's storing data and recalling it, etc. (A VERY BASIC IDEA). I've been able to create small programs, Hangman, file storing, temperature conversion, Caeser Cipher decode/encoding, Fibonacci Sequence and more, which I can create and understand how each work.

Being 2 weeks into this, I have learned a lot. Nothing at all compared to what I should be learning in the years to come if I get a grip on what I'm doing. While doing these programs I won't stop until I've done doing a practice problem on a book, which embarrassing enough will take me a couple hour depending on the complexity of it. I absolutely will not put aside the challenge until it's complete, WHICH CAN BE EXTREMELY DRAINING, I've tried most problems without cheating and reached success, which makes me feel extremely proud of my self after completing something after much trial and error.

After all this I have met the demon, algorithms which seem to be key to efficient code. I can't seem to wrap my head around some of the computer codes people put out there using numbers, and sometimes even basic functions, I have been able to understand them after a while but I know there are a lot more complex things to come, considering my self smart, functions that require complex codes, actually hurt my brain. NOTHING EVER IN LIFE HURT MY BRAIN....... not even math classes in highschool, trying to understand some of the stuff people put out there makes me feel like I have a mental disadvantage lol... I still walk forward though, crossing my fingers that the understanding will come with time.

Sorry if is this is long I just wish someone takes all these things into consideration when answering my question. Even through all these downsides I'm still pushing through and continuing to try and get good at this, I know reading these tutorials won't make me any good unless I can become creative and make my own, understand other peoples programs, so this leads me to the simple question I could have asked in the beginning.....

WHERE IN THE WORLD DO I START? I've been trying to find out how to understand some of the open source projects, how I can work with experienced coders to learn from them and help them, but I don't think that's even possible by the way how far people's knowledge is compared to me, I have no friends who I can learn from, can someone help me and guide me into the right direction.. I have a huge motivation to get good at coding, anything information would be extremely helpful.

8条回答
贼婆χ
2楼-- · 2020-05-15 01:55

In my approach to programming I think that the collected writing of Brian Kernighan are the most influential books on how to think like a programmer I've encountered. On the cover of "The Practice of Programming" are the words:

  • Simplicity
  • Clarity
  • Generality

which given your noted interest in Python reads like the short form of PEP 20. Algorithms are a means to an end as are recipes in cooking. While it is true that you cannot make bread without knowing about the care and feeding of yeast, knowing that you want bread in the first place is the goal. Even though Kernighan's books may seem hopelessly outdated, their unifying themes of the craftsman spoken with a elegance that few technical writers even aspire to make for.

Machines are getting so fast that the formal study (e.g. Knuth) of algorithms can indeed make for a competent mechanic - but that's actually the easy part. What the apprentice of today should strive for is the artistry of the field because that is where humans are truly at their best.

查看更多
在下西门庆
3楼-- · 2020-05-15 01:56

The job of laying out a course of study in algorithms - and the other things you need to know to put them to use - especially one that leads to a career in computers, is the job of laying out the syllabus of a university course in Computer Science. Indeed I suspect that some universities provide little value except to lay out the syllabus and assess the students - the students do pretty much everything else for themselves. If at all possible, your goal should be to prepare yourself to get onto a course in Computer Science, whether by full or part time study.

My book recommendation would be "The Practice Of Programming," by Kernighan and Pike, especially if you plan to learn by doing. It doesn't go very deeply into algorithms, but in a few pages it should tell you enough about design and testing that when you practice you will find, fix, and learn from many of your mistakes, and get into the habit of writing programs that other people can look at without grimacing.

查看更多
登录 后发表回答