PDA

View Full Version : very, very new to programming. need help



sypher2
June 1st, 2015, 06:13 PM
I am a beginner when it comes to programming, and I am currently attempting to learn Java. Does anyone have any suggestions as to what I should do or where i should start? I have everything i need already (JDK/JRE, Compiler) to run my script. Im a little lost at the moment with how to "practice" and learn. What should i be doing?

ofnuts
June 1st, 2015, 09:11 PM
I am a beginner when it comes to programming, and I am currently attempting to learn Java. Does anyone have any suggestions as to what I should do or where i should start? I have everything i need already (JDK/JRE, Compiler) to run my script. Im a little lost at the moment with how to "practice" and learn. What should i be doing?

Programming... this is how you learn. Make mistakes, see how others solved the same problem (read their code), ask questions... To get started find small exercise programs, then find things you would like to do and code them.

sypher2
June 5th, 2015, 04:03 PM
Programming... this is how you learn. Make mistakes, see how others solved the same problem (read their code), ask questions... To get started find small exercise programs, then find things you would like to do and code them.

where can i find small excercise programs? i know a little bit of java, and a little bit of python.

ofnuts
June 5th, 2015, 07:54 PM
http://learnpythonthehardway.org/book/

There is the same site for Java, but only the first chapters are available online for free.

CptPicard
June 6th, 2015, 02:14 PM
Add an IDE such as Eclipse to the mix. As a very early beginner you'll want to know how the very fundamentals of the compiler and stuff like the Java classpath work, but one of the great strengths of Java, despite the enormity of the tech stack, is also its discoverability. Java may also be verbose, but having an IDE constantly teaching you what is available and doing your refactorings for you is a huge boost to how fast you grasp it.

I really wish I had understood this over 15 years ago when I was more of a "do it the hard way" kind of guy.

sypher2
June 6th, 2015, 08:12 PM
I see. Thank you for your replies. I have added Eclipse to my arsenal. Im trying to learn this by myself but I don't have a starting point. Can you recommend any books that I can read and understand the basics from?

Gustaf_Alhll
June 6th, 2015, 09:13 PM
Im trying to learn this by myself but I don't have a starting point. Can you recommend any books that I can read and understand the basics from?

Don't try to learn programming on your own. The book I started with was "Sam's teach yourself Java", and that's unfortunately the only one I have read in terms of programming Java.
Java, those were good times...

pavelexpertov
June 8th, 2015, 01:58 PM
Yo, welcome to adventures of coding!!! I was just in the same situation as yours when I was clueless as to how to approach and learn java and hope my past experiences and advice will suffice to help you in your journey.

The first book I used was called Java in Easy Steps (A green looking book for 10 british sterling or 13 dollars) and I was doing basics of everything (starting methods like Main, file writing and reading, outputting text and later some building GUI using out-of-the-box libraries). I have found it quite useful and for reference whenever I needed to look at certain things. Each time I completed a chapter, I would think of a tiny programs I could write using what I learned in previous/past chapters and that way I exercised not only my ability to do what I wanted to write, but also to know how to write nicely written code and exercise your memory(I will explain later in this post)! However, this book may have some flaws and one of the code snippets did not work as expected so you would eventually use your brains and curiosity as to why it's not working by looking on the web.
Also I strongly recommend reading Java's official tutorial pages (http://docs.oracle.com/javase/tutorial/), because they are written by Java programmers for programmers and it's got introduction to object-orientation (important!!!) paradigm and how certain things work in detail. When you know how and why things work, you are better programmer rather than the monkey who codes all the time!

About IDEs and compilers....
If you starting to learn Java and deciding to take this as your career choice, I would recommend starting coding in a simple text editor (yes, a very dumb text editor) and use command line to compile your files and execute them that way. Although I agree with CptPickard about using IDE to help you fix simple errors and help coding a bit easier, my recommendation will help you grasp and engulf your brain into understanding and getting used to the syntax in the long run AND you do not have to worry about extra - features over bulked IDEs provide (that way you're more confident in debugging your errors due to your logic, run-time or compilation error made by you and you only) so you concentrate more on understanding of how and why things work. Also another reason it will help you is that you will develop a habit of 'picturing' (or drafting, programmer's instinct etc) after you have done so much coding without worrying about anything else. For example, I give you a problem to solve and you may have an 'idea' popped up in your head on how to solve it, and you program it and through trial and error you finally have a solution for it. When I was in my university class for programming components (C#) last year, I have finished a full assignment over weekend (also nailing extra marks for extra features and ****) just 4 weeks before deadline. All because I already figured out that certain 'problem' by having an 'idea' (so using my instinct and curiosity) that helped me with my development, while all students I knew would have to do tutorials and look up on the internet on how to solve it and it would take them a lot of time to do it because they are 'new' to programming.
Let me summarise on this: More practicing and learning on how things work ---> More using your brain rather than look up on your internet ---> Save tonnes of time and have more fun do it yourselves and complete project sooner!
There is a problem with this recommendation though, and it's a repetition of writing over and over again. But that's the point of it. You only can exercise your brain to program in any language and grasp understanding via repetition and it's hard work that can annoy as ****, but it's worth it coz I programmed that way for about a year and you already know the story that I told. Furthermore, when you decide to go on a little bit 'bigger' problems to get out of your 'comfortable zone', it may be painful to use my recommendation, but here's a short list of what I learnt through my mistakes after solving more problems:

1. My code was a mess and debug its logical errors was a mess --> thus outputting what program processed was essential AS WELL AS make certain things into functions like modules to ease debug and logic.
2. My code didn't utilise objects to ease my development and had fewer understanding how functions would be useful in this problem ---> thus learning the importance of objects and understand how functions can be used in different situations and what they can do.

My main point is this: Do first version that made you suffer, assess your mistakes, research and learn to solve them, do it again with improvements and solutions found and start it from scratch.
I had one project and let me tell you this, it was hell, but one hell of a time that made me realise and appreciate the solutions and what java could offer to ease my development, thus making me a better programmer and live to tell a tale to others to make newcomers better at what they do.

My last word on practice: just practice and have fun. There is a dart player named Phil Taylor (who has been a UK dart Champion for over a long time!!!) and he practiced every day, every holiday and on christmas days!!!
Adios and have fun!!!!!

CptPicard
June 8th, 2015, 05:37 PM
Hmm. To each their own, but I really would strongly suggest preferring the faster feedback loop an IDE provides you. There is nothing that makes you nobler by doing the grunt work of manually compiling, not getting immediate error hints and forcing yourself to memorize APIs. The more exposure and feedback you're getting per time unit, the quicker you'll learn, and an IDE helps you in that.

Also, when you move to higher-level OOP design, you really want an IDE to help you mangle your code into whatever new forms you desire. If you do it by hand in a verbose language such as Java, you become afraid of refactoring because of the work involved, and you end up never experimenting enough.

sypher2
June 8th, 2015, 11:06 PM
Thank you for both of your suggestions. I think i will have my IDE on hand, but also try to compile scripts on a regular text editor. why not get the best of both worlds? ;)

pavelexpertov
June 9th, 2015, 01:09 AM
CptPickard, agreed, but I didn't suggest to learn api by heart (I can't picture anyone who would have api book next to his/her bed when they are asleep lolz), but few essential classes within certain libraries are useful to know (plus training memory ;)). The complex ide's used to scare me in a sense that I didn't understand how class and other files would communicate or link from one folder to another when it comes to compiling, so using dumb editors (yet with good highlight options) are a go (not to mention you get a chance to use terminal and learn its commands, a real feel of a poweruser ;)).

Plus one extra note, sypher2, if you really do decide to go coding and it's your passion, consider learning basics of C++ and then some Assembly code. Difficult and scary **** I admit (although I got 96% for computer architecture module, while others hated it), but one that helps you understands how actually computer processors work with your code (and probably twist your perspective on this, that's what I feel like at the moment haha).