Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

papadopolis1024

macrumors 6502
Original poster
Mar 14, 2007
373
0
What are some good place to go about learning this? And any tips? Thanks... and o ya I have no programming experience...
 

Southern

macrumors regular
May 15, 2007
217
0
London, UK
Try the Java book from O'reilly press, they have always given me a good start when I need to learn how to use something. The last one I read was when I borrowed a copy of their OSX Tiger book when I was switching and found it an informative and easy read.

Otherwise, try googling for Java tutorials.
 

toddburch

macrumors 6502a
Dec 4, 2006
748
0
Katy, Texas
Here's a link to the online Java Tutorials. Lots of info.

http://java.sun.com/docs/books/tutorial/index.html

Don't get too hung up on all the Object Oriented big words like encapsulation, inheritance, polymorphism and all the other $2 words that are used when books and people try to teach you about object oriented programming. You'll soon enough learn what these are as you get into more complicated exercises. And, these terms are typically thrown around as a means of teaching the experienced procedural (or structured) programming programmer about OO programming and how it's different and why it is so much better... blah blah blah.

Follow the examples, type them in and make them work.

Todd
 

Doctor Q

Administrator
Staff member
Sep 19, 2002
40,077
8,340
Los Angeles
I recommend Thinking in Java by Bruce Eckel. However, the book that's right for you depends on your previous programming experience, which you say is minimal, so it might be better as a supplemental source. This book states:
This book assumes that you have some programming familiarity: You understand that a program is a collection of statements, the idea of a subroutine/function/macro, control statements such as “if” and looping constructs such as “while,” etc. However, you might have learned this in many places, such as programming with a macro language or working with a tool like Perl. As long as you’ve programmed to the point where you feel comfortable with the basic ideas of programming, you’ll be able to work through this book. Of course, the book will be easier for C programmers and more so for C++ programmers, but don’t count yourself out if you’re not experienced with those languages—however, come willing to work hard.​
 

aLoC

macrumors 6502a
Nov 10, 2006
726
0
Don't learn Java as your first language, try a non-Object Oriented one.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
I've heard debate on both sides of this.

Why do you suggest learning another (non-OOP) language first?

My university teaches C first. Java isn't even touched until around senior year. People have enough trouble figuring out the simple parts of procedural programming (functions, variables, etc.) alone. I couldn't imagine what it would be like to try to add on classes and everything that comes with it.

Edit: forgot we do do C++ semi-early, but OO wasn't emphasized. Mostly was figuring out how to work with MFC.
 

Heath

macrumors regular
Aug 19, 2005
133
0
Canada
If you have minimal programming experience I highly recommend Head First Java and once you complete that you'll have a better mindset to tackle Thinking In Java which is a very good in depth java reference.

Just find yourself a good text editor, then learn to love the terminal and you're off.
 

aLoC

macrumors 6502a
Nov 10, 2006
726
0
I've heard debate on both sides of this.

Why do you suggest learning another (non-OOP) language first?

I regard OO as a specialized technique, useful in certain cases, such as GUI libraries and collection classes. I don't think it should be taught as a general programming method.

Obviously you can use it that way, but I don't know how many systems I've seen where the developer, in their obsession with respresenting every little problem as a set of objects messaging each other, has made a real mess of things where a simple recipe style procedural description of what the computer should do would have served the company better.
 

zimv20

macrumors 601
Jul 18, 2002
4,402
11
toronto
I regard OO as a specialized technique, useful in certain cases, such as GUI libraries and collection classes. I don't think it should be taught as a general programming method. [...] I've seen where the developer, in their obsession with respresenting every little problem as a set of objects messaging each other, has made a real mess of things

sounds to me that you haven't worked on any projects with actual, skilled OO developers. i grew up learning procedural, and while i still use many of the lessons i learned during that time, no way would i want to go back. i've been developing exclusively OO since 1992 or so.
 

aLoC

macrumors 6502a
Nov 10, 2006
726
0
sounds to me that you haven't worked on any projects with actual, skilled OO developers. i grew up learning procedural, and while i still use many of the lessons i learned during that time, no way would i want to go back. i've been developing exclusively OO since 1992 or so.

The right tool for the right job. If there is a natural object hierarchy in the problem, then use OO, otherwise don't. OO is not the only fish in the sea.
 

zimv20

macrumors 601
Jul 18, 2002
4,402
11
toronto
The right tool for the right job. If there is a natural object hierarchy in the problem, then use OO, otherwise don't. OO is not the only fish in the sea.

but above you've limited the usefulness of OO to only a couple areas. that tells me you've had only 1 or 2 experiences w/ OO, and they weren't good. so, naturally, you're questioning OO as a whole, but just because you can't abstract to "a natural object hierarchy," doesn't mean the rest of us can't.
 

aLoC

macrumors 6502a
Nov 10, 2006
726
0
but just because you can't abstract to "a natural object hierarchy," doesn't mean the rest of us can't.

Of course, how could I have been so blind. I now realize OOP is the one true programming way. Praise Jebus and thank you for showing me the light.
 

papadopolis1024

macrumors 6502
Original poster
Mar 14, 2007
373
0
So now I am confused :confused: ... What should I learn to start learning basic programming... This already seams harder than I thought :confused:
 

Doctor Q

Administrator
Staff member
Sep 19, 2002
40,077
8,340
Los Angeles
The traditional first program in any programming language is one that outputs the phrase "Hello, World."
 

Blacky

macrumors member
Jun 27, 2007
45
40
The right tool for the right job. If there is a natural object hierarchy in the problem, then use OO, otherwise don't. OO is not the only fish in the sea.

hierarchy is ********, no offence, but if you view OOP like that it's a too narrow view.

OOP allows analysts, programmers, to model a program after real life (business) processes or to encapsulate change or complexities.

There are a few common problems about how people use OO:
1) people try to mimic reality, they create "reusable" objects containing too much properties, and not how the object functiones most efficient for your use cases
2) incorrect assignments of responsibility, this causes for methods to be in the wrong place, this in turn causes that you need certain objects at the wrong time just because of their incorrect responsibilities. This is first rule of Demeter: "Don't talk too strangers"

OO has multiple levels, you have the modeling, you have design patterns, you have entire design methodologies like MVC.

For example have a look at the Java I/O framework, they use a decorator pattern for file reading/writing so you can transparently read/write to zip files, use encryption etc.

Now to give my 2 cents about the initial question: just start with oop, always care about quality and writing the program correctly, applying mvc, seperating concerns. When you can program oo procedural is a breeze.

2 books I can recommend: applying uml and patterns from Larman and design pattern explained by shalloway and thott.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.