File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Beginner to programming, few questions? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Beginner to programming, few questions?" Watch "Beginner to programming, few questions?" New topic
Author

Beginner to programming, few questions?

j rich
Greenhorn

Joined: Jul 12, 2010
Posts: 9
Hi, I'm new to programming, I've done a little HTML, and website design.
I want to attempt to teach myself Java.
I've bought head first java to start with, I haven't picked it up yet, I'm wondering a few things before i get started intensely in to this.

Is there anything I should REALLY learn before reading head first java, like a prerequisite, or something?

What would your expectancy be for how long it'd take to be a decent java programmer? Primarily, I would like to program small games, random programs to track stocks/funds. As well as IT stuff, key loggers, auto typers, auto clickers and bots.
(Keep in mind I will normally study from 3 - 6 hours a day once i get started.)

Thanks guys.
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
This...

http://en.wikipedia.org/wiki/Object-oriented_programming

Mastering JAVA may take years. But if you stick to it and have the knack for it... You may reach your intentions of coding games and other stuff much quicker!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37926
    
  22
Welcome to the Ranch

You will be more likely to get answers if people know from the title what your thread is about.
You will need to go through the installation instructions carefully, and particularly the bit about setting your PATH (ยง4 for Windows). You will have to find out how to use the command-line and what you write after javac and java.

Don't download NetBeans etc or change your CLASSPATH at this stage.
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

j rich wrote:
Is there anything I should REALLY learn before reading head first java, like a prerequisite, or something?


Learn to read carefully. Especially in the beginning misspelled words and/or wrong punctuation will drive you crazy if you are not careful enough.

j rich wrote:
What would your expectancy be for how long it'd take to be a decent java programmer?

Depends how you define decent. And how fast you can learn. As an rough estimation I would say 5 years (and more).

j rich wrote:
Primarily, I would like to program small games, random programs to track stocks/funds. As well as IT stuff, key loggers, auto typers, auto clickers and bots.
(Keep in mind I will normally study from 3 - 6 hours a day once i get started.)

If you are interested in stocks, have a look at chartsy.org (it's open source and written in Java). Keyloggers are not possible to realize in Java.

Anything else you need? Propably a high infinite frustration tolerance.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11153
    
  16

whatever you're writing, it's better to plan it out on paper first, rather than diving into code (I still have this problem after 10+ years).

write TEENY TINY bits of code, then compile, test, and fix it. DON'T write 200 lines and then compile it the first time. Some folks would say to write ONE LINE ONLY before you go through this iterative process.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
j rich
Greenhorn

Joined: Jul 12, 2010
Posts: 9
5 years or more to learn how to make simple programs? :s I don't expect to become a guru overnight or a master programmer, i was just hoping to be decent enough to make nifty little programs, I'm not really sure what i want to make, but i want to be able to understand the syntax a good bit, and be able to code something if needed, like an alarm clock on my computer that plays a song when the alarm goes off or something like that, nothing in particular, just stupid little stuff? is 5 years really a realistic time period? just to become decent?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37926
    
  22
Yes, I would have thought 5 years is a reasonable time to become a competent programmer.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Take note, understanding Java syntax and keywords is not the same as having the skills and ability to create software with Java.

An individual can learn Java syntax and the meaning of keywords quickly, relatively speaking.

Understanding different software design methodologies, key frameworks and supporting applications, and other public API takes time, dedication and discipline.

5 years is a reasonable time to become a competent [Professional] programmer.

j rich, you may be able to code your "stupid little stuff" in less the 5 years however.
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

As I said, it depends on how you define "decent". If you just want to program e.g. Hangman you might need only a weekend.
If you want to program something more useful, that is maintainable over a longer period of time, you will need A LOT of experience. Because programming is more than just syntax (else this would be sufficient for every programmer).

You've mentioned you'd like to program an application for tracking stocks. Just a few technologies that pops into my mind which might come in here handy:
- Java (okay, that's obvious)
- an IDE like Netbeans or Eclipse (you want to get away from the console... but it IS helpful to start programming without an IDE (like mentioned before))
- a Debugger (to find errors that you can't spot by just looking at the source)
- a build tool like Maven or Ant (because most IDEs use one of them and you might want to know, what the IDE is doing (or: what it's not doing))
- something for dependency management like Ivy or Maven (so you don't have to track all your dependencies on your own)
- a unit testing framework (like TestNg or JUnit) to prevent that your code does not work anymore suddenly
- a logging framework like Log4J because maybe you won't to use it for debugging purposes
- an understanding how the virtual machine works (or computers in general). Not that your application crashes at one point with an Out-of-Memory-Exception and your only thought is "Heck, I have XY gigabytes of RAM"

Back to the stock-program:
- maybe you want to make the GUI in Swing or maybe you want to use a RCP (rich client platform)
- I guess you want to save a list of stocks... what might it be: plain text or XML? Or maybe a database? A relational database? Or one of the types from the NoSql movement? Either way you have to learn either XML (which you need for the build tools anyway, to a certain degree) or SQL.
- If you are planing to use a database, an ORM might be useful (you'll need to learn SQL anyway to a certain degree).
- I guess for tracking stocks you'd also like to display the charts with a framework like JFreeChart.
- And if you are sharing your computer you might want to secure your application with Spring Security.
- You also might need some quotes. Depending from where you'll get your quotes you might need some webservices. Or if you like to parse a website (you'll need to know a basic understandic of HTTP) you will propably need a few regular expressions.

And till now I haven't even mentioned algorithms, design patterns and other nice stuff (like profiling, static code analyzers, dependency injections, refactoring, etc.) or basic concepts (like all the object-oriented stuff).

Do you need all this stuff? No, not really. For hangman just plain Java is sufficient.
I just tried to give you a brief overview that programming is more than just to know the syntax of a language. Way more.
If you will give it a try, don't have high hopes to get the results you are picturing in your head in the expected timeframe you set yourself.

Hope that makes my statement about the 5 years a bit clearer.

PS: and for games you will need again completly different technologies... else it would get boring or? :-p
Hunter McMillen
Ranch Hand

Joined: Mar 13, 2009
Posts: 492

If you are going to learn using an IDE I would suggest against IDE's that auto-fill in terms for you, such as NetBeans and Eclipse. I find it easier to retain the syntax of languages if my IDE isn't writing it for me.

Some simple but good editors:
Notepad++
jEdit
jGrasp

Hunter


"If the facts don't fit the theory, get new facts" --Albert Einstein
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37926
    
  22
Agree with the other posters: and again: don't use an IDE.
j rich
Greenhorn

Joined: Jul 12, 2010
Posts: 9
Joachim Rohde wrote:As I said, it depends on how you define "decent". If you just want to program e.g. Hangman you might need only a weekend.
If you want to program something more useful, that is maintainable over a longer period of time, you will need A LOT of experience. Because programming is more than just syntax (else this would be sufficient for every programmer).

You've mentioned you'd like to program an application for tracking stocks. Just a few technologies that pops into my mind which might come in here handy:
- Java (okay, that's obvious)
- an IDE like Netbeans or Eclipse (you want to get away from the console... but it IS helpful to start programming without an IDE (like mentioned before))
- a Debugger (to find errors that you can't spot by just looking at the source)
- a build tool like Maven or Ant (because most IDEs use one of them and you might want to know, what the IDE is doing (or: what it's not doing))
- something for dependency management like Ivy or Maven (so you don't have to track all your dependencies on your own)
- a unit testing framework (like TestNg or JUnit) to prevent that your code does not work anymore suddenly
- a logging framework like Log4J because maybe you won't to use it for debugging purposes
- an understanding how the virtual machine works (or computers in general). Not that your application crashes at one point with an Out-of-Memory-Exception and your only thought is "Heck, I have XY gigabytes of RAM"

Back to the stock-program:
- maybe you want to make the GUI in Swing or maybe you want to use a RCP (rich client platform)
- I guess you want to save a list of stocks... what might it be: plain text or XML? Or maybe a database? A relational database? Or one of the types from the NoSql movement? Either way you have to learn either XML (which you need for the build tools anyway, to a certain degree) or SQL.
- If you are planing to use a database, an ORM might be useful (you'll need to learn SQL anyway to a certain degree).
- I guess for tracking stocks you'd also like to display the charts with a framework like JFreeChart.
- And if you are sharing your computer you might want to secure your application with Spring Security.
- You also might need some quotes. Depending from where you'll get your quotes you might need some webservices. Or if you like to parse a website (you'll need to know a basic understandic of HTTP) you will propably need a few regular expressions.

And till now I haven't even mentioned algorithms, design patterns and other nice stuff (like profiling, static code analyzers, dependency injections, refactoring, etc.) or basic concepts (like all the object-oriented stuff).

Do you need all this stuff? No, not really. For hangman just plain Java is sufficient.
I just tried to give you a brief overview that programming is more than just to know the syntax of a language. Way more.
If you will give it a try, don't have high hopes to get the results you are picturing in your head in the expected timeframe you set yourself.

Hope that makes my statement about the 5 years a bit clearer.

PS: and for games you will need again completly different technologies... else it would get boring or? :-p


Bahahaha aarrggg! :p
I was hoping it would be easier then that, but atleast your response gives me a little better understanding of what all is needed... I guess it's one of those things, you get better as you go?
Sarah Marshall
Greenhorn

Joined: Jul 12, 2010
Posts: 3
j rich wrote:5 years or more to learn how to make simple programs? :s I don't expect to become a guru overnight or a master programmer, i was just hoping to be decent enough to make nifty little programs, I'm not really sure what i want to make, but i want to be able to understand the syntax a good bit, and be able to code something if needed, like an alarm clock on my computer that plays a song when the alarm goes off or something like that, nothing in particular, just stupid little stuff? is 5 years really a realistic time period? just to become decent?


I'm a beginner and i was surprised at just how quickly i was writing simple yet useful programs. It may take 5 years to become a competent programmer but it's not long at all before learning Java is great fun and rewarding so don't get disheartened.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11153
    
  16

also, 'competent programmer' is an overloaded term.

If you're going to write small, simple little things for yourself, you can get some pretty neat stuff going in a few months.

if you're going to work on a large team, developing part of a huge app. that works well with others, that takes longer...
Jan-Henrik Clausen
Greenhorn

Joined: Jun 28, 2010
Posts: 13
j rich wrote:Bahahaha aarrggg! :p
I was hoping it would be easier then that, but atleast your response gives me a little better understanding of what all is needed... I guess it's one of those things, you get better as you go?


I suppose so. To tackle your question from another angle: I was a decent "ambitious amateur" programmer in Delphi for about 20 years. My largest program was a (rather complicated) strategy multiplayer game which was conducted per email (pbem-game - you see, I was programming before the MMORPG hype...). It evolved over the years and in its final version it was even quite nicely coded ^^. If I understood you correctly, that is the level of programming which will suit you already: Do nice spare-time-stuff but try to do it as competent as you can.

I started to learn Java a month ago. In comparison, Java is much easier because it is stricter. In Delphi, a Pascal descendant, you carry around the luggage of procedures and functions, and oh, how seducing they are.. In Java you have no choice but to program object oriented and you are pushed in a direction to program in a clean and easy-to-read manner (and you got JavaDoc which is a Godsent). The only disadvantage is that you have to carry out the GUI programming all by yourself instead of doing it with the programming environment that you have in Delphi. On the other hand: if you want to get a GUI which does a bit more than the standard things you can't avoid to get your hands dirty even in Delphi, and I expect that your (in the first time tedious) manual GUI programming in Java will make you much more flexible in the long run. Of course you can always get NetBeans (which is free).

So my preliminary estimate would be this: It will certainly take many years to become an ace programmer. But this is true for any programming language I know (which are not much: Pascal/Delphi, Basic, Fortran [a bit], C/C++ and now starting with Java). Compared to these Java is easy to learn after you get over the "installing the JDK" hurdle and after you get the basic concepts of object oriented programming - because of its strictness. I am still shuddering when I remember my C/C++ - pointer experiences...

Claudius

PS: By the way: "Head First Java" was my first book. It was great to start with, I think you bought the right book. Now I am working with "Core Java" (2 volumes) which seems to be a good follow up.
j rich
Greenhorn

Joined: Jul 12, 2010
Posts: 9
Ah, some answers I was hoping to hear, and yes I wasnt plan on being on a huge team of developers anytime soon, although it will be nice when that can happen, I really just want to code applications for personal use, nothing too fancy, I would like a gui but i don't expect it to look like gold. Thanks guys. I think it's time I dive in!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37926
    
  22
"Claudius Calvus" please read your private messages for an important administrative message.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

j rich wrote: Thanks guys. I think it's time I dive in!

A great place to dive in are The Java Tutorials.

(Wow, Oracle uglified the URLs).


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41063
    
  43
Claudius Calvus wrote:...

"Claudius Calvus", you need to read (and act on) your private messages rather urgently; your account is about to be closed.


Ping & DNS - my free Android networking tools app
 
jQuery in Action, 2nd edition
 
subject: Beginner to programming, few questions?
 
Similar Threads
SCJP java 6 or head first for java
How to learn Java?
Embarrassing Download questions
Java Beginner tutorial
Best way for learning