• Post Reply Bookmark Topic Watch Topic
  • New Topic

Perhaps a kind of vague question, but nonetheless: fundamentals  RSS feed

 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

Can I get your opinions with regard what you would personally consider to be the most important / fundamental areas / concepts of Java to be most knowledgeable about? I would of course assume that this would be quite dependent on what specifically you want to do with, Java but from a general persepective what would be the key areas of Java that ALL Java programmers should be most at ease with? I'm asking because I'm a little concerned with jumping into things more advanced without fully understanding the core elements of the language as well as the most important tools it has.

I hope my question makes sense, if not I'll try to clarify.

Thanks,

Ben
 
Les Morgan
Rancher
Posts: 779
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben,

I am a fundamentals kind of guy, the fundamentals are the most important. "Core Java" is a good place to take a look or Oracle's Really Big Index. I have taught Java to many programmers and if you have strong fundamentals, you can branch out to anything. Bad foundation, and nothing is ever good after that.

Being able to interface to a DB is always good. Know how to make a parameterized query and get the results back, it is something data analysts do every day.

The next up would be GUI's either in FX or Swing. We always had the guys with more Java skills do the GUI's, it seemed to be where the big challengers were.

Les
Ben Poland wrote:Guys,

Can I get your opinions with regard what you would personally consider to be the most important / fundamental areas / concepts of Java to be most knowledgeable about? I would of course assume that this would be quite dependent on what specifically you want to do with, Java but from a general persepective what would be the key areas of Java that ALL Java programmers should be most at ease with? I'm asking because I'm a little concerned with jumping into things more advanced without fully understanding the core elements of the language as well as the most important tools it has.

I hope my question makes sense, if not I'll try to clarify.

Thanks,

Ben
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are datbases and GUIs really fundamental?
I think the most fundamental things about Java are object, object, objects and objects. We see so many people here who don't seem able to create and use objects of any kind.
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm already very interested in GUI's as I would like to, when my knowledge is greater design apps and design my own interfaces for them. I don't want to simply jump into things without really having the real "core to Java" concepts firmly in place first, that just leads to being ok at what you do and not good, mediocre is such a horrible word. I have the Really Big Index bookmarked already and go for a read when I'm taking a break I'll check out Core Java also.

Campbell, any suggestions on best places to read about objects? Any suggestions or challenges you could throw my way to help me get to grips with objects better?

Thanks guys, much appreciated as always

Ben

 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell,

Would you suggest that some of the cores then to understand would be encapsulation, inheritance, polymorphism and abstraction? From things I've read so far these would seem to be the most important things to fully understand in the first place.

Thanks,

Ben
 
Paul Clapham
Sheriff
Posts: 22844
43
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:We see so many people here who don't seem able to create and use objects of any kind.


And a lot of them went straight into writing GUIs, where you can't do anything non-trivial without being able to create objects and share information among those objects in a sensible way. Object-Oriented Design (OOD) is the key phrase here -- if you don't have a good understanding of the concepts there, your GUIs are going to be a big mess. If you even get them to work at all, that is.
 
Les Morgan
Rancher
Posts: 779
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are skills in programming that are far below those, and when I say fundamentals, indeed that are things that I have to consider the foundation of programming:

And more, but most things have been ingrained to the point I do not even realize them or remember them as separate any longer.

And yes, the things you mentioned are very important, but you need to have the basics before you start overlaying languages. I was fortunate enough to have gone through my formal education in a time and place where theoretical models where taught before hands on programming in computer languages, as such, a language is nothing more than another tool to use--by the time I graduated I workably programmed in 13 languages and had been exposed to literally dozens; including compiler and interpreter theory. There are things far below the implementation of language that you need to understand and master before you will really be good at programming.

Ben Poland wrote:Campbell,

Would you suggest that some of the cores then to understand would be encapsulation, inheritance, polymorphism and abstraction? From things I've read so far these would seem to be the most important things to fully understand in the first place.

Thanks,

Ben
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow! Now there's an answer!

So break things down to the simplest things first, part at a time? Don't code until you know what it is that you actually want to do in as much detail as you can? And move forward from there?

Aside that, any chance you could elaborate or point me in the direction of some examples so I can better understand what you mean?

Maybe not such an easy question to answer, but if you were just learning to program now, what would be the very first things that you would look at / want to learn and understand (I've a feeling you probably answered this with that last post anyway )? What would you consider the real do's and don'ts when you first start learning a language?

Thanks,

Ben
 
Les Morgan
Rancher
Posts: 779
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben,

I would have to say look at the Object Model. When I started back in the day, it was a Functional Model, but today the buzz is till the Object Model--especially in Java and C++. When you delve into learning what Objects are and what makes a good object you will run into things like: encapsulation, cohesion, polymorphism, inheritance, and several others.

At some point your are going to want to look at actually making something, when you do you design using a top down approach which is the degeneration of your main idea down into small components, then smaller yet, until you get down to an "atomic" idea. Then to implement that you work from the bottom up.

When you look at Java, Object Oriented Programming, be sure to pay attention to Scope, Visibility, and Life of your objects, methods, and resources. When you get to implementation you are going to have to debug. Understand the benefits of knowing your IDE and its debugger, and putting print's in your code to see what is happening--and implementing debug modes for your project.

Les

PS: don't be afraid to modify your style and supplement your knowledge at any point, programming is an industry where you will NEVER STOP LEARNING.

Ben Poland wrote:Wow! Now there's an answer!

So break things down to the simplest things first, part at a time? Don't code until you know what it is that you actually want to do in as much detail as you can? And move forward from there?

Aside that, any chance you could elaborate or point me in the direction of some examples so I can better understand what you mean?

Maybe not such an easy question to answer, but if you were just learning to program now, what would be the very first things that you would look at / want to learn and understand (I've a feeling you probably answered this with that last post anyway )? What would you consider the real do's and don'ts when you first start learning a language?

Thanks,

Ben
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great advice, Les... Thank you I will follow this "model" moving forward.

Are there any kind of major "do's" and "don'ts" when it comes to developing? Moreover, LEARNING to develop. I always figure you're better to pick up the best habits from the start so you don't end up spending a LOT of time learning to UN-learn all the bad ones you've picked up.

I REALLY need to be able to give cows soon! My "owe a cow" tally is adding up!

Thanks again,

Ben
 
Paul Clapham
Sheriff
Posts: 22844
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben Poland wrote:Moreover, LEARNING to develop. I always figure you're better to pick up the best habits from the start so you don't end up spending a LOT of time learning to UN-learn all the bad ones you've picked up.


My recommendation to people who post here trying to make really awful code work (sorry, I don't mean you although I'm giving you the recommendation): Read the Oracle Java tutorials, especially when you're getting into an area which is new to you. Download the source code from the tutorials and play around with it, trying to make it do slightly different things and then very different things. Web search keywords for topic X in Java are "Java X tutorial" and that should give you an Oracle tutorial near the top. There's often other tutorials out there and some of them are good too but usually the Oracle tutorials are the ones to read.
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben Poland wrote:
Are there any kind of major "do's" and "don'ts" when it comes to developing? Moreover, LEARNING to develop.

My two cents....

Compile and save often, like every couple of lines. I use NetBeans which compiles every time I save, and ctrl-shift-S saves everything. I hit those keys constantly so compile errors are found and fixed immediately. I've seen people write dozens or hundreds of lines of code and then when it doesn't compile they don't know where to start.

Keep methods small. A dozen or so lines is usually enough. If your methods are growing larger than that, look at refactoring them into multiple methods. A method should do only one thing and do it well.

Use variable names and method names that explain to the reader what it is doing. Don't be afraid to use long names. I'd rather see a variable called "machineOutputDailyCount" than "machCnt". Trust me, when you go back to change this code in a year, you'll be glad you used helpful names.

And the one piece of advise that I've yet to follow, and it's not really a core skill, but very important nonetheless. Learn Test-Driven-Development. You don't have to be in an Agile/Scrum environment to use TDD, but learning how to write JUnit tests is a very important skill.
 
Les Morgan
Rancher
Posts: 779
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben,

J. Kevin Robbins' had a really great comment, don't write more than you can debug. I knew a person when I was in college that once said: "I have never been able to debug 5 lines of code." Well, if you cannot debug 5 lines of code, then write less than 5 lines of code before you debug. One scheme I learned early on was to create the stubs of the program and fill in from there. Basically you just make the empty class, don't even add the variables yet, and then add the methods and return values if needed. You then have a fully defined structure that you can start implementing by filling in all of the methods and debugging as you go.

I am surprised at how many people come in with 30 or 40 lines of code in their project and exclaim: "Help, I cannot get it to run!" That is just craziness for a beginner. Never write more lines of code than you can debug. I can debug, and have, very large amount amounts of code, but I've been doing it for over 2 decades now, and still, I don't want to ever debug large amounts of code that has never run before. When I write my own stuff, I still type in a few lines of code and compile, it keeps me from finding 30 typo's in a big block of code and it gives me a chance to reflect on what I've typed in at that point--kind of a chance to give myself a little code review and reality check.

Back in the old days, or if your are on a mainframe, CPU ticks are precious and people tended to write large blocks of code and pour over the code for hours searching for bugs manually before trying to compile--I had a COBOL class like that, 1 compile A, 2 compiles for a B, 3 compiles C, 4 Compiles D, 5 or more why bother--to save CPU ticks. Since the PC though, you have CPU to burn and it has given rise to the type some compile to catch errors type of programming--which is way more productive than the old model. Long gone are the days of pouring over the code to catch errors before you compile and compiling big blocks of code. I saw good riddens too!

So as J. Kevin Robbins' suggests, and anyone that has coded for a while will also tell you, don't code any more than you can debug at a time.

Ben Poland wrote:Great advice, Les... Thank you I will follow this "model" moving forward.

Are there any kind of major "do's" and "don'ts" when it comes to developing? Moreover, LEARNING to develop. I always figure you're better to pick up the best habits from the start so you don't end up spending a LOT of time learning to UN-learn all the bad ones you've picked up.

I REALLY need to be able to give cows soon! My "owe a cow" tally is adding up!

Thanks again,

Ben
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!