r/learnprogramming • u/rdpp_boyakasha • Jan 27 '16
When You Know the Basics, but You Still Can't Code
A few weeks ago I [asked] (https://www.reddit.com/r/learnprogramming/comments/3zouul/beginners_tell_me_about_the_difficulties_you/) programming beginners to tell me about the difficulties they faced, and a common problem was moving beyond the basics, especially after doing online courses. I've written an article about it here:
http://www.programmingforbeginnersbook.com/blog/when_you_know_the_basics_but_you_still_cant_code/
Below is a short summary.
People express this problem in a few different ways, such as:
"I've learnt Python through an online course, but I don't know how to use it to make programs."
"I know the theory, but I can't put it into code."
"I know about while loops, but I don't know how or when to use them."
"I know about loops and arrays and variables, but I don't know how to combine them." Usually the student completes some kind of online programming course, but feels lost once the course is over.
[...]
In summary, programming is hard. Really hard. And if you've just breezed through an online course, this might come as an unpleasant surprise.
Set up a real programming environment, with an IDE or a text editor. Write little text-based programs to learn all the features of your chosen programming language, before moving on to bigger, complicated projects. Write all the code yourself. Don't copy and paste other people's code without understanding it first.
Write lots of code. Read theory, but make sure to apply the theory to your code. Read, code, read, code, read, and so on, and eventually you will master it.
When you get stuck, try to fix the problem yourself, but don't be afraid to ask for help. You will learn faster if you ask questions. For a more pleasant experience, Learn how to ask questions the right way, because the programming community has a few grumpy bums in it.
Most importantly, have fun and keep going!
5
u/canipleasegetaname Jan 27 '16
One of the biggest problem that I'm facing right now is that I know how / what to do when tackling a problem. But I can't remember the right syntax off the top of my name. Whenever I see my friends or people online code, it seems like they can always remember the specific syntax / code to do something while I have to go back to my old notes / projects to learn the correct syntax.
2
u/rdpp_boyakasha Jan 27 '16
Try making a cheatsheet. Cram all the common syntax into a single page, print it out, and keep it next to the computer. After a while you'll have it memorized, and you can throw the sheet away.
16
u/NightmarePulse Jan 27 '16 edited Jan 28 '16
Can't you just look it up? That is what most people do. You aren't expected to memorize everything, especially when you code in different languages.
Edit: added a "you" in place of the extra "just" =P
→ More replies (6)3
u/bmamba2942 Jan 27 '16
I found this to be a good resource for coding syntax. I believe I picked it up from this sub before. I know that doesn't quite answer your question, but I have to occasionally lookup syntax as well. I don't see it as a big deal.
2
Jan 27 '16
Design and breaking a problem properly is a better skill to have than being able to write code really fast. If you have to look stuff up do it. But if your design is correct you only have to write the code once.
When people's design is poor. They have to do the implementation phase often many times to solve a problem.
Being able to do both effectively takes a bit of time.
→ More replies (12)3
u/YeOldeDog Jan 27 '16
Your being way too hard on yourself, 'Avoid getting hung up on syntax' should be in the top ten rules for a code monkey. Just as a book is really not about its grammar or spelling, correct syntax is not your software. Good design and decent algorithms are your software, syntax is simply what enables your design to run. Many times a single design can be coded into a number of quite different programming languages, especially when you are ramping up your skills.
22
u/DoTheEvolution Jan 27 '16
some older copy/paste I posted in python subreddits
get through codecademy python course, or Dive in to Python, or Learn Python the Hard Way... whatever some introductory course to programming and python
start working on your own project and learning stuff that is needed to complete it. Eh, you dont have any? Thats normal but you will need some eventually... meantime...
start doing challenges. CodeEval, or CheckiO, or Codewars from easiest to hardest, its important to do some challenges, it will keep you using the language and it will get your confidence up, not to mention learning stuff as you search for solutions
have a look at PyQt, short zet code tutorial. To make user interface, windows, menus, buttons, tables,... you realize that you can do very interesting things rather easily. Having some basic understandings of some GUI library is needed or you be quite limited with what you can make of python and what projects you can undertake...
if you want to continue PyQt way there are some yotube tutorials. And beyond that theres a book
if you dont know html and css it might be good thing to get some under your belt, its easy and the web will be with you your whole fucking life. Html and css in 30 days(its free course once you register and actually last like 3 days even if moving slowly)
web scrapping is an excellent thing to know, learn and try scrapping
Understanding whats API and using some is also essential, maybe start with reddit api
basic idea about databases, zetcode short intro to sqlite. You got some data, even just few? You wanna use a database just to play with it.
keep doing those challenges, try some more on /r/dailyprogrammer or find new source of challenges that you can do while you wait for some inspiration of what you want to try to do in python, some project of your own now that you have some basics. But if nothing comes to mind, just keep doing challenges and moving in to directions that interest you...
→ More replies (1)
17
u/bububoom Jan 27 '16
Projecteuler is an AWFUL recommendation for a beginner. I don't understand the circlejerk of projecteuler. And bullshit like "i always learn new language by solving" what the fuck. I've solved around 50 PE problems a few years ago and a lot of them involved some tricky math tricks and the code was just a few lines performing arithmetic.
I doubt a lot for those who recommend project euler. You will learn nothing by solving it. At least not programming. At the early stages one needs to write a lot of code and solve a lot of problem, not guess some tricky algorithm for calculating 10000-th prime number which is divisible by its digits sum.
26
u/holyteach Jan 27 '16
Don't forget about Programming by Doing, my site designed for exactly this sort of learning.
Source: I've been teaching beginners to code for the better part of two decades.
3
u/je66b Jan 27 '16
This is awesome, hope it gets more exposure, if i was learning java right now id have found a goldmine
Edit: Actually looks like i could do some research and do these with C#.. Sweeeeeet
2
u/Funkydunkie Jan 27 '16 edited Jan 27 '16
This is looks really useful, thanks!
E: This is actually exactly what I needed. Bitesize projects to do to keep me refreshed with Java and larger projects to help improve my skills. Thanks again!
→ More replies (4)2
u/ghostabdi Jan 28 '16
respect yo. That is awesome and is exactly what my teacher had us do while teaching us. I learnt loads through building games, and of course that is how he hooked us on coding. He also built an automated code tester so he could minimize the time looking over our code manually to spot things like proper variable names, no hardcoding etc...
46
u/Xer087 Jan 27 '16
http://www.projecteuler.net/problems
I'm still a student but if I was a professor with students I would highly recommend they go here and start with the most basic of problems. It's multilingual and ranges from 1 step above "hello world" to about "Super Nerd". These questions will force the student to put themselves out there to find answers. There is also a forum where people can submit their codes and you can skim through that for variations of code that solve the same problem. From there you can ask yourself "why did they do it "way x" over "way z" and over time you are leading yourself to answers. Which as we know seeking answers is a big part of the job. Unless you wrote the language, you won't know every little thing.
I haven't had a chance to read the article yet but once I'm off I will.
55
u/CatatonicMan Jan 27 '16
Fair warning - Euler is all about algorithms, mathematics, and theory. You'll learn how to solve complicated problems and discover interesting algorithms, but the actual amount of programming you'll end up doing is fairly limited. Euler is all about theory.
The best way to get better at coding is to do projects. Make simple games (pong, tetris, platformers), build applications (file checksum/hash calculator, simple file compressor, a text editor), build websites (a blog, a portfolio) - these will help you get better at the practice.
12
u/LaurieCheers Jan 27 '16
My new favourite set of programming questions is http://adventofcode.com. Far less emphasis on theory - most (though not all) of the questions are tractable enough to be solved by brute force, so all you have to do is write it.
→ More replies (2)3
u/Xer087 Jan 27 '16 edited Jan 27 '16
I'm not a pro coder by any means, and that's why Euler appealed to me. It is very basic, but I often found myself wondering into the unknown while comfortably wading through things I could handle and getting more comfortable with the programming environment. The OP wrote the piece for people who had some knowledge but lacked know how and experience. I saw Euler as a good way to get comfortable in the "surroundings". You won't walk away able to program a text editor but you will get more comfortable creating and using methods/classes/objects (What ever your poison) and feeling out how they can be extensions of your work.
While the complexity of the problem does increase, the skills required to complete them are rather basic (relatively) while not jumping straight to "Create and roll out an app" and I felt were a good stepping stones into the programming environment.
Also for people who lack vision it gives you focal points.
→ More replies (2)
19
Jan 27 '16 edited Jan 27 '16
While I'm playing a game, the whole time I'm thinking how it'd be better if it did this or that and think about how I'd do it differently if this was my game. That's where all my hobby projects come from, and I always have 3-4 in active development at any given time.
I start every project with "Hello world". I've had 250k LOC projects that took 5 years to write that began with "Hello world" on their first compile.
Then you just incrementally add the next most basic feature. Next "Hello world" is drawn in a graphic window. Then it can go full screen. Then it's drawing a polygon under it. Then it's loading and drawing a single full 3D model from a local file. Then it's querying the network for a list of models to draw. Then it's downloading the models from the network. Then...
4
Jan 27 '16
Yeah - I agree with you. I don't think the op and a lot of non coders understand that all big applications are assembled out of smaller and smaller bits. Hello world is so intrinsic to development because it's the first minimum product you have. Iterating from there is the rest of the process.
I almost think the want a turnkey system that just understands what they intend rather than what they tell the machine to do. That might be an interesting AI problem -- but probably something in the very very hard space of problems.
But I get the frustration. They are approaching a field composed of people that would have been hand lettering bibles back in the day and expecting them to drop down and explain the meaning of simple words and phrases. It's not going to be pleasant for the outsider.
I hope these guys learning understand that they are not really learning a language - they are learning a thinking style. Once they acquire the ability to think in code they will at least be able to take their knowledge and apply it to real world problems.
→ More replies (2)
9
u/Anon_badong Jan 27 '16 edited Jan 27 '16
I started learning programming when I was a kid. We had apple computers in our elementary school, and were taught to enter commands and coordinates into the computer, and it would make the "turtle" triangle draw lines on the screen. I LOVED it, but it was the only programming exposure I would have until I was in my early teens.
When I was 14, a friend of mine had a Windows 95 computer, and his dad taught me some basic DOS commands. I loved it. I wanted to learn more. I did not have the resources to teach myself to program.
Fast forward to University. I go into my first ever programming class, where they will be teaching us Java. The title of the course is "Intro to Programming." I sit down in my lecture seat, excited and nervous about starting my programming career. One of the first things the teacher says is "If you have never had any programming experience, this is going to be a very difficult course for you." My heart sank. Within the first 3 homework assignments, I was lost and overwhelmed, and dropped out of the class, and changed my major from Computer Science to Sociology. I later minored in a Humanities program that taught me the beginnings of Visual Basic, and thus started my programming career.
Many years later, I've been programming small scripts for very specific tasks, and I still don't feel like I know how to program. After all of these years and the time I've committed to learning, I can tell you that there IS a gap and a problem for modern programming that not many seasoned programmers understand. If you didn't grow up with the language, you aren't going to be able to learn it the same way as someone that did.
I've seen the best books and tutorials encourage people to use the Java API because it will tell you what to do, but that's utter nonsense. I can use a method call found in the API, but understanding the complex underpinnings of a language that has evolved over time, without knowing how and why it changed is utterly frustrating.
The problem is, a lot of programmers take for granted that they had the chance to evolve with the language, whereas many of us are looking at the API from Java 7 and 8 and wondering how this language got to be so huge, and why all of these classes are necessary.
If you are teaching a foreign language, practice is key, but it does no good to practice if you don't know what you are saying is anything beyond gibberish. True immersion into the language absolutely requires an understanding of why its built the way it is, what parts it has, and immersing oneself in an evironment where the questions can be answered quickly. IMO this is why online courses simply aren't enough, and will never be enough to learn programming. You need the feedback from others that know what they are doing. You need to understand WHY you do it the way you do, and just like most math instruction, there are very few people that actually know why, and are good at explaining it.
The OP covered one small aspect of what is required to learn a language. He's right, you do need to practice, but that is FAR from the whole story. The frustration many of us feel is valid. Stack Overflow is full of nonsense and overly bloated examples that don't necessarily teach you anything. Seasoned programmers telling people to just write more code is frustrating because nobody has the time to write a bunch of code just to have it not work and have no idea why. This happened to me just the other day when I was using some code in a program I wrote from scratch, and I still have no idea why its happening. I've googled it. No luck. The only hope I have of understanding why its doing what its doing is understanding why the Java class is the way it is, and what behavior I can expect from it, but it is very difficult to find that information in the API, or understand what the API means even if I do find some information.
This huge gap between understanding concepts, and actually being able to use the API is the obstacle to learning programming. IMO, programming tutorials do us no favors by using classes and starting with loops and conditionals or specialized classes that do particular things. In the end, the process to learn programming is sum'd up by saying: immersion comes first, understanding comes last, and the gap in the middle has to be filled with a lot of persistence, sweat, and tears. We all want to think there is a better way, and believe there is, but I'm not convinced. I have yet to find any other way.
Perhaps we should all start out like children and learn the building blocks of the language first, before diving into the deep end, but I have yet to find a tutorial or book that is willing to explain why things are the way they are to a depth that satisfies me. Head First Java is the closest I have come, but again, it skips some things I want to know, and I really just wish I had a whole series of books that just explain why Java classes are the way they are, and what problems they were attempting to solve when they created them. For now I know that I have to memorize a hell of a lot of strange and difficult to recall facts about all kinds of quirky behaviors of the language, and that is overwhelming.
Perhaps we should learn from those that have had the task of learning English in their adulthood? I imagine the process is much the same, although more frustrating since you aren't allowed to ask questions in the programming world online without a huge amount of condescension.
Edited for clarity
→ More replies (1)3
u/reddilada Jan 27 '16
One of the first things the teacher says is "If you have never had any programming experience, this is going to be a very difficult course for you."
My experience was exactly the opposite. Our teacher asked everyone who had been learning programming on their own to raise their hand. These were the ones that were going to have a difficult time.
3
u/Anon_badong Jan 27 '16
Wow. Well, this was way back in 1999. I hope that teachers are more adept these days at starting with the basics. :)
→ More replies (3)
32
u/iamktothed Jan 27 '16
I'd argue that the best way to learn coding is to be curious and challenge seeking. Find a project or an idea and implement it. You'll get lost, frustrated and flustered but when you come out from underneath it you will see that you're stronger and wiser for it.
→ More replies (3)19
u/SSJNinjaMonkey Jan 27 '16
Don't you love it when you're learning new code and you just cannot seem to grasp what's happening. But you go get a coffee and your subconscious works it out for you. :D
→ More replies (3)32
4
u/Lilywing Jan 27 '16
Thanks for the advice! I'm in this stage of learning my self, and its super annoying, I've been doing problems to try and get bettter
4
u/lurgi Jan 27 '16
To use an analogy, I know the English language pretty well. I'd even say very well. I know about the present and past and future tense and why, arguably, one of these is not a tense (future, in case you were wondering). I know about the Oxford comma and why my parents, God, and Ayn Rand think I should use it.
I can't, however, write a good novel. Or, for that matter, a short story. I can write a pretty decent paragraph and I've got some kick ass sentences rolling around in my head, but that's my limit.
If I wanted to write a short story I'd have to write one. And then write a different one. And keep writing them until I figured them out (and none of them will be any good compared to the true masters of the form). Knowing the English language would be an important first step, but you can know everything about English and not know how to structure a really good dramatic scene. You can be a great novelist and not know how to write a play. Or a poem. Or a science fiction novel.
This is not too far removed from programming. You know Python. Congrats. You are now qualified to write the Python equivalent of short sentences. If you are feeling ambitious you can write a short story which will be a rip-off of another short story that you read before, only you won't tell it as well (and the main character's name will change from Bob to Bill halfway through and you won't notice). Novels may take you a few years and you may never be able to write one (although you might well be able to contribute scenes to novels that other people are writing. Or edit their work. That's fun, too).
So, get writing.
2
u/bluelite Jan 28 '16
Learning to program is more than just writing a lot of programs. To use your analogy: you can't become a good writer by simply writing a lot of stuff. Sure, it's part of the process. But you also need to read a lot of other people's writing. A lot. The best writers do a lot of reading.
That's a significant piece that's missing from most CS educations. Student's are expected to write programs, but spend precious little time reading programs.
Artists get better not just by painting/drawing/sculpting, but by studying lots of art.
Musicians get better by listening to lots of music.
Athletes get better by watching other athletes compete.
Programmers should get better not only by writing lots of programs, but by studying pre-existing ones. It'll have to be more than simply "look at this program." The beginner will need to be taken step by step through its structure and runtime behavior. And then show them another, and another, and another.
6
Jan 27 '16
Read, code, read, code, read, and so on, and eventually you will master it.
Haha. Hah. Ha. I wish. When someone thinks they have mastered coding, give me a call.
→ More replies (1)
3
Jan 27 '16
A typical example of an intro project for Web Development is a blog. Find some small blog or static site generator on Github and dissect the code to see what they did. Look up things you don't know or play around in a REPL until you get it. It doesn't even have to be good code your only goal is to understand it in full. Same approach I take to learning a (human) language - read an intermediate book in it once I know the basics and study it until I can read it through.
Start writing your own and as you do repeat this process, pulling inspiration from other projects. Don't copy and paste just study other projects. Throw it away and do the same thing again 1000 times. Then you will have taken your first step of a thousand mile journey.
3
u/midasgoldentouch Jan 27 '16
For those of you that are looking for ideas for those "little text-based programs," there's a list of resources for programming challenges in the sidebar. If you're ready to move onto more substantial projects, there's also a list of project ideas in the wiki, the new sub r/monthlyprogram, and usually some listed within the individual language subreddits. Of course, you could always expand on the programming challenges as well - like taking the balancing chemical equations challenge from r/dailyprogrammer and adding a GUI, a step-by-step solver showing exactly the problem is solved, or a quiz-based program that instead provides questions and answers to the user. However, once you've been at this long enough, you'll start to get swamped with ideas. Just trust me on that one...
3
u/pickituputitdown Jan 27 '16
Shout out to r/learnpython every one there have been great for all my many, many questions
3
u/The_Floyd Jan 27 '16
IMHO The problem is that most of these online courses focus on teaching you how to use all the 'bells and whistles' of a language but not on how to think about and solve a problem. This is, in part because people are impatient and want to start 'coding' right away.
Teach them, first, how to solve a problem and describe the solution(the algorithm, if you want to call it that), and then teach them how to 'fit' that solution with the language vocabulary.
2
u/Kazeshinrin Jan 27 '16
Logical thinking is very important in programming, which was why I didn't score well in my programming methodlogy module in university.
2
Jan 27 '16
Gonna go ahead and save this one. I am currently working on getting my 2 year degree in programming, this should help though out my actual programming classes.
2
u/jamessmith17 Jan 27 '16
It's been said before and I will reiterate it as well: start your own project. One of the best ways to learn a language is to start a project wholly in that language and then go through the whole process of building and deploying the project. Get friends to test the program and other developers to critique the code and the project. Use all your spare time on this one project and at the end you will not only know the language confidently, but you will have experienced how to deliver a project in that language. Then, when you go to interviews for jobs, you can demonstrate the project and show them the code. It's a great way to show you not only know the language but that you also know how to use that language in real world projects.
→ More replies (1)6
u/AynGhandi Jan 27 '16
If you have just done say Codecademy, you have absolutely no clue how to even begin your own project. Yes, some people manage to work it out by themselves, but plenty of people just stall here. Its not a coincidence that subs like /r/learnpython and /r/learnprogramming are full of people going ''well, i've done X, what now?". It's because there is an absolute flood of tutorials going "this is a variable, this is a loop, good luck you now know python!", and a lack of good educational resources which show things like how to divide up a problem in small pieces, create those pieces and how to bolt all those pieces together again.
It's also not helped that some of the people who do manage to figure out how to start get scared away by places like Stack Overflow, which is quite a hostile place. So in the end only a certain type of person remains, which perpetuates the whole myth that only greybeards can program.
→ More replies (2)
2
u/brureader Jan 27 '16
This might have been already posted here, but I read this article yesterday, and might show someone "insight" into the question.
2
Jan 27 '16
I was encouraging my girlfriend to learn some basics of programming and showed her Python course on Codeacademy.
She did some exercises be she couldn't grasp what REALLY is that all about - and how do you actually write programs.
She says "show me how you do it". So I started explaining some simple things like printing text, operations on numbers etc, 10 minutes later I was parsing Open Weather API to show current weather for our city :/
I think that's the problem - when you know a little more, you jump too fast, too far and people get lost on the way.
I started by reading Delphi book for absolute beginners. And I think this is the best way to start, so you can very slowly understand how do you actually program.
1
Jan 28 '16
No, the problem is that we don't have a bf looking over our shoulder to help us out with our code. To point out syntax errors, logic errors, etc. That is sorely needed and can only be found by having a bf coder or by going to college (maybe) or bootcamp (definitely).
2
u/CubeActimel Jan 27 '16
I think it is really important to simply code more. Not thinking about what to code and then failing but googeling for beginner exercises (there are some good pdfs). The first few might be no problem at all but then comes a point (most of the time "simple" school mathematics we all forgot at one time) and then they don't have to ask professional coders, they have to understand the mathematics and after that how to use the code and loops they learned to solve their problem. Once they did a few exercises where they first had to understand a concept and then applying it in a program they've learned not to copy and paste code but to think about a problem and then how to express it. There are thousands ways of how to write the same program and therefore it is important to try to solve it themselves as the code from the professionals is often really compact and optimized, where beginners can't understand how he solved his problem in one line of code with shit he never heard of. Even though a you want to start big as a beginner I think it is really important to do these beginner exercises. If you can solve them without a problem maybe look that the code is clean and understandable and try to shorten and optimize the code yourself. I don't know how many times I looked a solution after I was done and how bloated my code was. It is important to look at code from other people too, try to understand what they've done. You don't have to solve everything by yourself, but try not to copy and paste but to really understand at which logic or syntax part you have problems, it will help you avoid the same problem and taking on a problem in a rational, scientific way. Sorry for the blocktext, I am on my phone. If anybody is interested I can look up sources for beginner exercises. Ps: What really helped me was buying a beginner book. I even bought it after I wrote my first game, so I already kind of understood what I was doing. There are thousands resources on the net and by learning by yourself you will sure miss some basic stuff, because how could you even know about it? Get a book and learn the simple shit, it will really help you on avoiding some problems because you don't understand something because you missed some basic stuff.
2
u/ironicperspective Jan 27 '16
What most fail to realize is that one class/course isn't going to actually make you learn the language. It takes a lot of time and effort, just like learning any other language in the world.
1
u/PalTonk Jan 30 '16
Like if you learn how to read a language, but not how to pronounce or actually speak the language and you end up in Russia and try to speak russian without those things. It's just going to be impossible. At least with languages you have some steps you take all the way to speaking fluently.
After you're done with cplusplus.com it's just a question of... uhm what now? Like the title says: "When You Know the Basics, but You Still Can't Code"
2
u/RICHUNCLEPENNYBAGS Jan 27 '16
Well, despite the pointless hostility you got I don't see what other advice could be given.
→ More replies (1)
2
u/CropDustinAround Jan 27 '16
I have not been a professional software developer long. But it pains me to see how people go about learning to code. There is no simple trick or secret save for this: most developers write scripts not programs. Knowing the basics is literally all you need in the professional world ( ie an actual company).
Very few corporate developers write entire programs. Those are the elite among even the employed developers. What 'noobs' dont understand is that companies have large code bases and working programs that often need maintained or improved by the 'basics'. This requires fixing it with an often small amouny of code to actually make work since the framework already exists. This framework is (roughly) called the architecture, and is the design and implementation of software. That is a whole new beast.
Once you know the basics then you know what you need to know to be an entry level developer. This is hard for the 'noob' because they feel like that cant be all there is. Well to bad. It is. Writing larger programs is still just stringing multiple smaller scripts into a larger file to hold it all in one place.
O and did i mention that i had a relatively unreleated degree (bs and ms in mathematics) when i was hired to be a developer? I learned from the same websites and books as everyone else when i got here.
1
Jan 27 '16
You're right, and to add on: the problem that I've found is that the online courses don't go beyond just learning a syntax. Having just started in a software developer role in the "real world" I've spent more time dealing with stuff like version control, dependency management, doing builds and deploying to a web server (this especially), interfacing with other programs/webservices. This is all stuff I had very little knowledge of coming out of school and it was overwhelming. Sure knowing syntax you can write a nice little program in a vacuum, but I think that practical knowledge relating to configuring and running programs in a real world environment is seriously lacking in these online courses (and in my college education as well).
→ More replies (1)
2
u/Farobek Jan 27 '16
"Write little text-based programs to learn all the features of your chosen programming language". Disagree. Write something that you are willing to spend hours/days/nights pulling out your hairs for.
1
3
Jan 27 '16
People cannot program because they do not understand what they are learning. Most books teach it really wrong. Learning the syntax and function calls does not teach you how to program.
Actually the thing you suddenly realize at some point is that the programming language you learn is completely irrelevant. It is how you take a problem and break it up into sizable manageable chunks and implement it that really matters.
When you master the part about breaking up a problem into steps. You suddenly realize that you don't have "steps" you actually have something that resembles function in which case the rest is really simple. Which is to type the program into a computer. This stage is basically called design something not often looked at or taught in more learn to program books.
Until you actually solve an problem in this way. You haven't actually learned to programmed anything in any language.
This can be applied because if you take a step back. python / c / c++ / c# / java / php / perl / bash / many others. They all have the same basic building blocks (many people fail to realize this). They all do if / while / do while / do until / functions / case statements / and have the same underlying basic data types. They also all have around the same lib's for doing operations.
1
u/RICHUNCLEPENNYBAGS Jan 27 '16
Most people do not learn well by first learning abstractions and then learning concrete applications but rather in just the opposite order.
→ More replies (1)
2
u/ghostabdi Jan 27 '16
If you are brand new to coding and are just taught the syntax which what a lot of teaching code stuff out there does, it's useless. You truly need to do problems with your new skills. Grab a Python textbook, C#, Java, whatever it is you want to learn and go through it, I say a textbook because it quizzes you on applying your new knowledge in critical ways that broadens how you think about problems.
2
1
u/zehydra Jan 27 '16
I've got the opposite problem; I can code, but my theory isn't as grounded as it should be.
1
u/denialerror Jan 27 '16
A lot of universities have their syllabus and sometimes lectures online for free. Find a course you think you are lacking in and go through it.
1
u/mplang Jan 27 '16
Nothing beats experience. You'll never really learn how to write code if you don't write code.
→ More replies (1)
1
Jan 27 '16
I'm in the same situation myself. I learned some basics of C but I realistically can't do much past writing little programs that prompt for user input and display some kind of message, or programs that do basic arithmetic The assignments in the class I was in demanded more complex programs above my skill level, and it was frustrating. OP's advice in the article is helpful especially when he mentions not to write things well above your skill level, and work your way up there. Definitely something I need to keep in mind.
1
Jan 27 '16 edited Jan 27 '16
Thank you! I'm about to finish a second online course in Python & have been feeling uncertain about where to go next/how to not take classes forever. Thanks for the part advice, part pep talk. :)
EDIT: Now that I've read through the top comments and disenchantment, I don't feel as good. Sigh.
1
u/xian0 Jan 27 '16
Where would you like to take it? The only thing you can really do is build programs, big personal projects, open-source projects or industrial applications. It is a programming language after all. You might find yourself back in a class, perhaps you want to make a P2P messager app, you might find yourself right back to videos learning about P2P network algorithms, but that's normal.
Don't worry about the top comment, the newbies are just dominating the hivemind. They keep fobbing each other off with codecademy and I think people just leave them to it.
1
u/panda5303 Jan 27 '16
hey guys, I've been reading your comments and checking out the websites you've posted but I can't seem to find what I'm looking for. I'm taking a new online class at the local community college, it's a Software Design class which uses Visual Studio 2013. I have no prior experience with coding, I do however use Excel daily at work and understand formulas and have done a tiny bit of vba but that is it. So my issue is our class has no book, we only have a class website with notes from the instructor and I tried to email him and ask what type of coding we are doing so I could research it but he told me I didn't need to and to only reference the class notes. I'm ready to pull my hair out!!! I'd like to think of myself as a tech savvy quick learner but I don't know what to look for.
To give you an idea of what we have been doing so far it's just super basic coding - SetTitle("Demo 1")
SetForegroundColor(Color.White) SetBackgroundColor(Color.Blue)
DisplayLine("Hello World!") DisplayLine("Hello " & "World" & "!!!") sName = "Tyler DisplayLine(sName)
Do you guys know what type of coding this would be? What pages I should look at/terms to look up? Also in the current problem I am working on I am stuck on figuring out how to properly setup GetRandomNumber() where could I find examples? Thanks in advance for your help and sorry for the novel!
2
u/1337bacon Jan 27 '16
So you're working with Windows Forms.
Do you guys know what type of coding this would be?
not sure what are you asking here. DisplayLine is a method for diplaying the text between the parenthesis. sName is a variable.
GetRandomNumber, for this check Random() class.
What language are using? I've been working with C# for a few years now. You can pm me if you need any more info.
1
u/hontes Jan 27 '16
I've noticed in a lot of these newer online courses that it usually starts out very basic ("Hello World" type exercises) then becomes progressively harder and harder very quickly, missing a lot of nuances in the middle.
So in terms of level of difficulty, it usually goes something like:
Level 1, then 2, 3, 5, 10, 20, 50, 75, 100, after which you're expected to be a developer.
I think the levels should be more like this:
Level 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5...................... 99, 99, 99, 99, 99, 100, 100, 100, 100, 100
The best way to learn is really to dive in and work on a project (whether your own or somebody else's). For example, if you want to be a web developer, create a website. The caveat is that the website should be something extremely simple (for example, a basic static web page, not a social media site). The first projects you do will be horrible and it's okay. They're only for learning. They will also take a lot of time and that's okay, too. After you finish one basic static web page, you can create a site slightly harder than that (create another site with one or two extra features). And so on and so forth.
As far as StackOverflow or any other kind of forum, I do also find that some people are snarky or cranky especially if the questions have been asked repeatedly. I do get their point of view because these very basic questions are always asked but at the same time, a lot of beginners don't have the language or skills to ask questions properly so it is really important to be nice.
If anybody wants to be a web developer and has this same problem (know the basics but can't code), please PM me and I'll be happy to mentor or provide guidance and advice.
1
Jan 27 '16
If anyone is interested Codewars.com is a great place to test your skills that you learned and apply them. I want to say there is a few thousand exercises on that site. Once I started learning the basics, I was able to learn a lot quicker using the site.
1
u/Aceflamez00 Jan 27 '16
The issue here is that people don't know what APi Frameworks are, so that's why they are limited to text only. If you want to do some cool shit with code learn how to incorporate APi frameworks into your code, better yet learn what APi's are. PS : E xternal libraries = APi Frameworks.
1
u/iCameToLearnSomeCode Jan 27 '16
One contributing factor to this problem is the artificial environment that online courses provide to students. Students are usually typing code into a web page that contains instructions and hints. This is not how real programming gets done. So when the course is over and it's time to use a real programming environment, students feel lost without the environment that they are accustomed to.
Any Youtube video by a 15 year old kid will solve this for you, I learned to set up a couple IDEs and do basic powershell commands before almost anything else, maybe I got lucky but most I have seen show you how to get the environment the instructor is working with and then build the project. I love game build videos for this reason often times the kid running it is younger than the language they are teaching so they remember their first time trying to learn a language and they show you everything from how to download the interpreter to how to move the game to your smart phone. While obviously not as helpful for getting you employed as your boss is probably not having you design crappy java games I found them to be great tools for bridging the gap between the ordered "enter this line of code" type instruction and building your own programs.
1
u/andre-lima Jan 27 '16
None of these courses teach programming logic.
I learned it by making RPGs using RPG Maker. Learning syntax is useless if you don't know the logic first.
For that, I usually sugest people learning Scratch before anything else: https://scratch.mit.edu/
1
u/popup20 Jan 28 '16
Thank you. I created a reddit account just to tell you that. Thank you so much for validating what a nightmare learning java has been.
1
u/clyzev1 Jan 28 '16
Read some books from O'Reilly.
I do not know if he did write something about Python.
But here must be beginners friendly books.
I really advice you to read books.
When i watch online courses it just doesn't stick in my head.
So try books. And code and read and code and read until you will be able to code more and more..
1
u/clyzev1 Jan 28 '16
Practise..
Practise making functions that do small things like searching for wifi etc.
Then make a bigger app like a reservation system then go bigger and bigger..
1
1
Jan 27 '16
I don't agree with any of this. Taking a class can show you the simple crap about how to write code. Takes it out of context of how that code would fit into a functional program. Coding is practical. The best way to learn is find something you want to make and figure out how to do it. Doesn't matter if it sucks or if it's great. Code is never done and can always be improved. Most programs really aren't that complicated. Most programs have been broken up into smaller pieces so that they can be maintained, but more importantly so that each individual part can be tested to make sure they work when they build more complicated around them.
0
Jan 27 '16
[deleted]
2
Jan 27 '16
Yep. I started learning to program last year for Computer Science and put in tons of hours. When I first learned python I was completely lost and after a lot of stumbling and messing up, I'm here now and I'm pretty confident.
Learning a programming language is essentially learning how to use a hammer, saw, and other basics tools to build, but doesn't teach you how to build anything. You're going to have to build a lot of shitty tree houses and dog houses before you feel like you kinda got this.
What sucks is there is no way to do this unless you see other examples of dog houses or tree houses, but what is the equivalent of that in terms of coding?
I chose a reddit bot and used PRAW with python. It was fun and engaging for a beginner IMO.
0
2
u/freakzilla149 Jan 27 '16
I haven't tried too many MOOCs but in my view MIT 601x is almost there. Add in maybe 3 more weeks of content which helps students to learn about actual development stuff like handling libraries, UI, understanding how to handle files etc. and it would be a very strong start to programming.
As it is, its still a very strong prep for a CS course.
1
u/edbluetooth Jan 27 '16
I learned python using Udacities CS101 python course.
granted I already knew C when I started it - but i thought that the scaling questions were excelent.
1
Jan 28 '16
The problem is the quality of beginner resources touted on this board. They don't really teach you how to program. Codecademy is completely worthless, unless you have literally zero programming experience.
Absolutely! Thank you for responding.
0
Jan 27 '16
[deleted]
0
Jan 27 '16
[deleted]
4
Jan 27 '16
That's just malicious coding for anyone who has to maintain the code. That would not fly in any professional development environment where code reviews happen.
Though I did work on a legacy project that had a 22000 line switch statement wrapped in a function called "doTheDonut". So I guess there is shit everywhere.
It's good for you though. Makes you realize what good code is as opposed to shit code.
4
u/reddilada Jan 27 '16
Eight thousand line switch within switch within switch ending with goto repeat for me. Actually there were loads of goto repeats and several goto skips and goto agains thrown in for good measure. And no structs. Structs just obfuscate.
There is nothing like living with a coding horror to teach you how not to do something.
0
Jan 27 '16
[deleted]
1
u/at-work-account Jan 27 '16
Not an expert programmer here, but I know you want to stay in the zone but sometimes it's more important to step out of it while programming and modify your plan in accordance with what you've spent time implementing. Theres no point in being in the zone if it's not making you efficient as you could be. If you took more time out of the zone now you'll probably end up being able to manage your planning/mind in the zone once it becomes a part of your thought process.
You say you randomly diverge into features and such. Perhaps sitting down with a specific task in mind would help you. For example spending a few hours ONLY refactoring code and do nothing else. Take it one kind of task at a time if you can!
0
Jan 27 '16
[deleted]
1
Jan 28 '16
Just saying there needs to be more examples in tutorials and books. Not a tough concept. Not talking about confidence (I'm the founder of a multi-million dollar ecommerce company) so, no idea why you'd even say that.
0
740
u/[deleted] Jan 27 '16 edited Jan 27 '16
First off, I apologize for being an ass in responding to this, but I simply can't let it fly, as if it was incredibly valuable advice that is actually helpful. So, I apologize in advance for sounding like an angry ass.
This isn't enough. It's not much more than teaching people how to bowl by telling them, "throw the ball down the aisle as hard as you can, right down the middle and hit all 10 pins."
Simply saying, "Write little text-based programs to learn all the features of your chosen programming language, before moving on to bigger, complicated projects," is not enough and is not guidance. It really angers me when I hear developers say this, where the dev thinks he or she is distributing gold when really it's not helpful at all. And me saying such really is just met with anger and hostility because professional developers simply can't wrap their minds around what is going on through a beginner's brain when the beginner is struggling. And no, having been there once 10 years ago isn't enough for a developer to "understand". Times have changed. The environment and table dressing have changed, programs have changed.
Oh really? Why didn't I think of that? Maybe I'll go to Stackoverflow and ask a question. Oh, looks like they really don't care for the way I asked the question. Guess I need to wrap it up in a perfect, hermetically sealed magic spell that's not asking an opinion in order for them to even take a look at my question. Or maybe I should try MDN, which really isn't easy to interpret as a beginner either.
Oh, I see you already understand the 'grumpiness' of professional, elitist coders who are offended, as if someone took a shit in their Lucky Charms, when a noob asks an ignorant question. No, it's not ok to be ignorant around those sites, and you just validated my point.
How about this...for a more pleasant experience, how about devs learn to intuit what the beginner is attempting to say and not ostracize him or her like he was a piece of shit.
No. No, what is needed are more exercises. A shit load of them. Treehouse doesn't have them, CodeAcademy doesn't, Code School doesn't, Thinkful doesn't, Lynda doesn't. The resources online pretty much suck, and you stated so at the beginning of your post. They suck because the tutorial creators forgot what it was like to be a beginner. They forgot the number one rule, which is, "one learns to code by coding more and one codes more by working through examples. A noob SHOULD NOT be expected to shit out their own examples and problems while they're trying to fight syntax errors and learn new methods.
Simply put, the industry is inferior when it comes to creating a substitutive learning environment with a quality pedagogy. It sucks and devs simply refuse to acknowledge this. Why should they when they can simply thrust all responsibility back on the hapless noob.
</rant>
Let the flames begin.