*
The moose likes Beginning Java and the fly likes How smart must a Java programmer be? 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 "How smart must a Java programmer be?" Watch "How smart must a Java programmer be?" New topic
Author

How smart must a Java programmer be?

Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
I'd like to earn a living by programming in Java, but I can't tell whether I've got what it takes. I enjoyed and had little trouble with the course here at JavaRanch. I've been studying from other sources on my own, and found some of it easy, some perplexing. If I have the aptitude to succeed as a professional programmer, should I be finding introductory courses quite easy?
Here's an example. Below is one of the exercises in Richard Baldwin's introductory online Java course. Part 1 is easy, but I found Part 2 very difficult. I usually have to read sentences like that in Part 2 several times before I understand them. I know what all of the elements (parameters, instantiation, etc.)of this problem are, but I still find this difficult. Please be honest. How hard should this be for someone who will do well at programming?
***********************
Q - Write a Java program that meets the following specifications.
/*File SampProg18.java from lesson 42
Copyright 1997, R.G.Baldwin
Without viewing the solution that follows, write a Java
application that illustrates:
1. Instantiating an object by calling the default
constructor.
2. Instantiating an object by calling a parameterized
constructor as a parameter to a function call.
The program should display the following output:
Starting Program
Object contains 100
Terminating, Baldwin
************************
You can find this problem at
http://home.att.net/~baldwin.dick/Intro/Java042i.htm
Is there a reliable programming aptitude test one can take online?
Marius Holm
Ranch Hand

Joined: Sep 11, 2000
Posts: 84
Hi.
I think this probably has to do with experience. If you only have experience from a few introductory courses, I don't think it means you're too stupid to become a programmer. Not being a professional programmer myself, I can only guess, however...
Regards,
Marius
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Marius. I'm sure Java gets easier with experience, but I don't want to invest too much of my time and energy in an endeavor that will prove fruitless. I'd like to find out now, not another hundreds of studying hours later, whether I'm pursuing the right field. If Java were a breeze for me now, or utterly incomprehensible, I wouldn't be wondering whether to pursue it, but it's somewhere in between.
As a start to an unscientific survey, I'd be interested to know how difficult you find Part 2 of the question above. If you're interested, try to solve it, then go to the URL in my previous post to check your answer. Please let me know how you do.
Brett Knapik
Ranch Hand

Joined: Oct 15, 2000
Posts: 255
I am only 14, and i understand java perfectly. i am a c average student
------------------
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
I think you are confusing "smart" with getting comfortable with the jargon. Even if you are a whiz programmer and future Java guru, you have to expect to have some learning curve on the words.


"JavaRanch, where the deer and the Certified play" - David O'Meara
ryan headley
Ranch Hand

Joined: Jun 28, 2000
Posts: 156
Look at it from the Employer's point of view and how comfortable you are delivering those objectives.
Such as GUI development, talking to database thru Java etc. I don't think many employers want to deliver a "DOS App". If you feel comfortable with delivering in a Client Server environment, work with databases, and things like that, you shouldn't have a problem. Java is just the middle layer between you and an objective that's been sent in front of you...
Ryan


Ryan Headley<br /><a href="http://www.sudovi.com" target="_blank" rel="nofollow">http://www.sudovi.com</a>
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Brett. Can you write a solution to Part 2 of the question in my original post? Please let me know how difficult you find it.
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Cindy. Of course, I do expect a learning curve, but don't you think there is a certain minimum aptitude required for one to be a succussful programmer? The question is, "How does one tell whether one has that aptitude?"
I'm not looking for encouragement, I'm trying to tell, if it's possible to do so, whether I'm pursuing a realistic objective.
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Ryan. That perspective is useful, but I'm a long, long way from being able to tell whether I'll ultimately be comfortable in any particular professional capacity.
I appreciate these responses. I hope someone will address the question of whether Part 2 of the problem in my original post is easy or difficult. You sound like you have some experience, Ryan. Can you solve that problem easily?
Janna Lockhart
Greenhorn

Joined: Dec 21, 2000
Posts: 24
That's a pretty difficult question for a beginning course. It will take a fairly significant amount of time for you to become familiar with all the jargon and rules. I cannot think of a good test to determine your natural ability or aptitude for programming but you should know that it doesn't come natural to most people.
If I had just started java and programming, and been handed that question I would have have found it very difficult.


- Janna
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Well, I have alot of experience programming, and I guess I am pretty good at it, but I had to read those requirements several times to make sure that I understood what the heck they were asking for. Any time you have nested requirements like that, it is going to get dicey. Personally I think that the request could have been written alot more clearly using 2 sentences, and that they are testing your reading skill more than your programming skill.
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Janna and Cindy. It helps to know that the question isn't all that easy. If you'd enjoy trying the problem, then checking your result against Baldwin's solution, I'd be interested in how well your solution parallels his.
JC Cook
Ranch Hand

Joined: Nov 13, 2000
Posts: 32
Jamie,
First, to answer your question, I am a greenhorn in my second month of my first Java class, and I found the 2nd part of the problem to be as easy as the first. I'm not "smart", I just understood the jargon.
Second, most people are of average "smartness", and you appear to be at least that or more. Not everyone has logical aptitude, and the fact that you enjoyed the Cattle Drive course and found it easy testifies to your aptitude. Anyone who has that and enough determination and perserverence can master Java on average "smartness."
I'm studying Jave because I now work in an environment where things have been. I want to work in one where things are going. Sounds like you do too -- good luck!
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, JC. I'm surprised you found the second part as easy as the first. Could you write a solution to the second part easily, or do you just understand the wording of the question easily?
Brett Knapik
Ranch Hand

Joined: Oct 15, 2000
Posts: 255
What i think they means by: Instantiating an object by calling a parameterized constructor as a parameter to a function call. is just calling a constructer with a argument correct me if i am wrong. If you ask me that question isnt very clear or maybe its just me.
class Baby {
Baby(int i) {
System.out.println("I am baby number " + i);
}
}
public class mybaby {
public static void main(String[] s) {
new Baby(2);
}
}
------------------
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks for trying the problem, Brett. It helps a lot to see what people actually come up with. I hope a few more will post their solutions, without first looking at the solution given at the URL in my original post. When I tried the problem, I came up with a solution very different from the author's. Yours, too, is very different.
Brett Knapik
Ranch Hand

Joined: Oct 15, 2000
Posts: 255
I am probably mis-interpreting the question but i tried. hmm maybe what they are asking is to call a function within the constructor to get the results or maybe they want you to use the constructor to return a value and use that value to use in another method.the more i think about the more ideas come to my head on what they could be asking. I am confused i agree they need to be more specific.
David Junta
Ranch Hand

Joined: Dec 10, 2000
Posts: 86
Regarding your question of whether you have what it takes, one employer (who would have trained me in java if hired) made me take a "Programmer/Analyst Aptitude" test at Brainbench.com. It was basically just a logic test full of word problems and mathematical/spatial problems. I'm not sure how accurate it is as an indicator of actual java aptitude, but they seemed to think so. Their concept, I think, was that anyone can learn the syntax and jargon but to be a good programmer you must be able to think logically and solve problems efficiently. Still, I think anyone of reasonable intelligence could become a hireable professional if they put in the work.
The main doubt I have is about getting hired. I've read and heard stories (including the JavaRanch forums) about people learning java on their own and passing the Sun Cert. Java Programmer exam and STILL not being able to get a job without experience. I'd like to hear if anyone knows about the likelihood of getting hired without professional programming experience...and how you get around the chicken-and-the-egg issue here.
Jacquie Barker
author
Ranch Hand

Joined: Dec 20, 2000
Posts: 201
Originally posted by Jamie Cole:
I'd like to earn a living by programming in Java, but I can't tell whether I've got what it takes. I enjoyed and had little trouble with the course here at JavaRanch. I've been studying from other sources on my own, and found some of it easy, some perplexing. If I have the aptitude to succeed as a professional programmer, should I be finding introductory courses quite easy?
Here's an example. Below is one of the exercises in Richard Baldwin's introductory online Java course. Part 1 is easy, but I found Part 2 very difficult. [snip] How hard should this be for someone who will do well at programming?

Jamie, I think it is tough to learn any language when the examples are "terse". I wouldn't let part 2 throw you -- it is a somewhat unusual use of Java syntax.
Java "grows on you" with time -- it is a HUGE language, and you needn't be a master of it all in order to consider yourself competent.
As another example, you might want to take a look at the sample application that I developed as companion code to my book (it is available as a free download from the www.Wrox.com website) to see whether that code makes sense to you.
Regards,
Jacquie
------------------
author of:
Beginning Java Objects


Author of Beginning Java Objects, Beginning C# Objects, and Taming the Technology Tidal Wave
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, David. Brainbench is a nice resource. I'll try the aptitude test tomorrow.
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Jacquie. The download link at Wrox says your chapters 14-16 are available at the U.S. site, but I can't find any link to those chapters. I'd like to see them, along with the code you cited.
I posted another problem that perplexed me in the Intermediate forum, because it seemed a little much for this one. I was hoping someone with a good mix of verbal and Java skills would take a look. I hope you can spare a couple of minutes for it. Here's the post:
http://www.javaranch.com/ubb/Forum1/HTML/000711.html
Rajendra Deshpande
Ranch Hand

Joined: Nov 24, 2000
Posts: 40
Hi Jamie,
I understand your predicament which basically seems to arise out of the friction between your urge to learn Java and the seemingly
unsurmountable task ahead. I was in a similar situation a few weeks back but my resolve to get up there has got me past the crossroad. I still have a long long way to go and with every passing day the confidence seems to grow and as Jacquie has rightly said 'Java grows on you'. So, I would advise you to adopt a positive approach and just keep going, do not get bogged down by the enormity of the task but derive inspiration from each step you climb up. GOOD LUCK.
regards,
Rajendra.
JC Cook
Ranch Hand

Joined: Nov 13, 2000
Posts: 32
OK, Jamie. I observed in your responses the distinction between "do you think you could do it?" and "did you do it?" so I took up your gauntlet and wrote some code. I wouldn't say my code looked like the instructor's solution, but I do think it met his requirements. My approach was just to parse his request into three parts.

  1. Instantiate an object
  2. Call a parametized constructor
  3. As a parameter to a function (I prefer to use the Java term "method"

  4. I worked these three backwards. First I created a method that took in a string parameter -- that took care of part 3. Then I created a Tester class that had one parametized constructor, requiring a string parameter. Lastly I created the main method, taking in a string command-line argument, and in one line, mashing all the requirements together with a call to my test method, passing as a parameter a 'new Tester(args[0])', which accomplished parts 2 and 1 simultaneously.
    Now, more to the point, I found Baldwin's answer, like his question, to be a bit confusing. I think both could have been stated a bit more simply. As students, we shouldn't assume that because we don't clearly understand the question, the problem lies with us. I think it is easy to obfuscate the obvious to the point that anyone would have difficulty. In the real programming world, you could ask questions until you understood the requirement. And you're plenty "smart enough" to come up with the answer.
Kathy Rogers
Ranch Hand

Joined: Aug 04, 2000
Posts: 103
Jamie,
This is the answer I came up with


and in another source file

It's quite similar to the solution and it only took about 15 minutes to write the code. BUT it took me twice as long to decode the question. And I've been working as a C programmer for a couple of years and learning Java for about 6 months - I'd consider myself fairly OK at understanding technical specifications and I found these instructions confusing. I do know it took about 6 months to understand the terminology when I started and it was hard to find books that didn't assume that you knew some of the basic terminology. If you're doing other assignments OK, I wouldn't be too concerned - the aptitude tests are quite good, although the ones I've seen have been a bit procedural orientated - I haven't seen the brainbench one.
Hope this helps,
Kathy
greg clarke
Greenhorn

Joined: Oct 06, 2000
Posts: 25
Jamie
Here's my solution. It took about 10 minutes with the usual family interruptions.

It produces the correct output so now I'll have a look at the site you referred to ..... Hmm. Well, my solution looks fine. It meets the requirements and is actually simpler than his, while covering the essential points. He might complain about me making getABaldwin static to simplify things, but there was no stipulation in the question covering that, so I took a shortcut.
A couple of points. One, there is no single correct answer to this type of question, though there are obviously many incorrect answers. Even people with a "perfect" knowledge of Java can give incorrect answers as you have noticed.
Second, this question sounds more difficult than it actually is. The trick is to break it down into smaller parts, as has been noticed. Breaking complex questions down into smaller problems is part of the skill of a programmer (or any other problem-solver).
Third, I had to read the question twice before it fell into place. Once I understood the question some examples sprang to mind pretty quickly. eg. myFrame.setLayout( new GridLayout(2,0)) is the same type of thing.
I searched in google for "computer programming aptitude test" and found many sites, most commercial, but some free and others with sample questions. eg. http://www.computeraptitude.com/ I haven't done the test. But the real test is whether you can write programs.
Obviously there is much more to being a programmer than just cutting code ( good design, following standards, following requirements carefully, testing, etc ) but solving problems algorithmically is at the heart of it.
Hope this helps.

Bruce Lee
Greenhorn

Joined: Nov 20, 2000
Posts: 10

Jamie,
You dont have to be very clever to be a programmer. In fact I know some pretty dumb programmers. So dont worry be happy.
Rgds
Bruce Lee
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Hehehe..., IQ of 180 will defintiely help you in programming.
Peter Tran
Bartender

Joined: Jan 02, 2001
Posts: 783
Hi Jamie,
I have to agree with Cindy when she said, "they are testing your reading skill more than your programming skill." Almost all examples of using the java.io.* classes are littered with the part 2 of your question.
For example,
File myFile = new File("output.txt");
FileOutputStream fos = new FileOutputStream(myFile);
Part 2 just combines the two statements into one:
FileOutputStream fos =
new FileOutputStream(new File("output.txt"));
If you didn't get this the first time around, don't worry about it. I woudn't have understood the question the first time around either. I've just been reading a lot of JAVA books and gotten use to the jargon. If you're serious about becoming a JAVA programmer, I would recommend:
1. Read a lot of code and try them out. It's really important to type out the code and try things out if they don't make sense to you. Given a choice between downloading the source file and typing the example from the book, I would type the code out because I learn from the mistakes I make this way. Downloading the working source file doesn't teach you anything other than the fact that you can use a mouse.
2. Reading bad code is just as helpful as reading good code. I learn what not to do reading bad code.
3. Ask questions! If it doesn't make sense, ask someone. If they can't answer your question or if the answer doesn't make sense, then say so. Don't accept an answer until it makes sense to you.
Good luck!
-Peter
Marius Holm
Ranch Hand

Joined: Sep 11, 2000
Posts: 84
Brett, I think 'perfectly' is not the best word to use when describing your Java skills... (I too wish the 'Brightness' button could have worked)
And to anyone wondering how it is to program java, I would like to say that having programming a variety of languages on and off for about fifteen years, I find java about as easy or difficult as any language, depending on what you want to use it for...
I currently work with web development, where I have written a few applets, a few Windows-components (in VB and C++), but most of my 'programming' these days is scripting.
I found the question mentioned quite easy, but having my experience it would be strange otherwise. Not only java experience helps me here, the question and solution would look more or less the same if it was about c++, as would many java problems due to the similarities in java and c++ when it comes to syntax and OO approach.
I generally tend to find programming quite difficult, that's why I have not yet grown tired of it.. But if you like to LEAVE your office at usual office hours, you should probably try something else...
Regards, Marius
Sean MacLean
author
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
Jamie,
I'm not 14 and I do not understand the java language perfectly (I hope I never do). People tell me I'm intelligent but, for me, I don't think that it has anything to do with book learnin' or smarts. As Edison said "genius is 99% perspiration and one percent inspiration". Which is really true. I used to play classical guitar professionally and people would say stuff like "Wow, I could never do that. You're so gifted." or whatever. Well, the only gift I had was the six to eight hours a day I practiced for 10+ years. Same thing with programming. Sure I got good marks but that's just a by-product of staying up untill 4am because you just have to make it 'perfect'. However, that one percent inspiration is very important as well, and many 'smart' folks don't have a clue where to find that spark. I get more ideas for 'clever' solutions cooking omlettes that I do reading a white paper. The 99% will come if you love what your doing - that makes it easy. Programming isn't about knowing a language - its about solving puzzles, exploring unique trains of thought and hammering away until you get it right. The programmers that I've known during my degree and here at work have very diverse backgrounds but the common traits seem to be a love of solving problems, a desire to do well at whatever they are confronted with and a confidence that speaks "If anyone can do this, I can do this". I hope this helps you figure out you aptitude for programming. Personally, I'd say that if you've ever felt that glow after seeing you first "Hello world!" appear on the screen, then you're fully qualified to explore programming.
Sean
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks for "taking up the gauntlet," JC. It really helps to see others' experience with the same problem. I like your method of working backwards through the question.
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Kathy. Yes, your solution does parallel Baldwin's quite well. I appreciate your detail on how long it took to interpret, then do the problem, and your level of experience to put that in context.
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Greg. Yes, it does help. Your solution is simpler, and as far as I'm concerned, simpler is better. Thanks also for pointing out the MyFrame parallel. I've used that type of construction before, but it hadn't occurred to me. To put your response in context, how much programming experience do you have?
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Sean. I've rarely seen a more enthusiastic description of programming. I do find that writing a progam is much more fun than reading about programming.
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Rajendra, Bruce, Adrian, Peter, and Marius. I appreciate the advice and encouragement. It's interesting to see the range of perspectives, from "easy" to "quite difficult." If anyone feels like taking on a harder question, please look at my Towers Of Hanoi topic in the Intermediate forum.
[This message has been edited by Jamie Cole (edited January 03, 2001).]
Brett Knapik
Ranch Hand

Joined: Oct 15, 2000
Posts: 255
What i mean is from what I know I understand..but i guess i was exagerating...i will live to to those words one day though.
------------------
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work
Pat Barrett
Ranch Hand

Joined: Jan 03, 2001
Posts: 63
Hello Jamie,
I consider myself to be in somewhat the same boat as you. I have a fairly extensive schooling background in c++, but no real experience. I've only been looking at Java for about a month and it seems, to me anyway, quite a bit easier than c++.
I was able to answer the question in about 10 minutes. I'm not sure if my solution is formatted correctly, but it does work. The key to me was in how the question was read. I took it to mean that Mr. Baldwin was looking for a demonstration of an overloaded constructor, and I went from there.
class BaldwinTest
{
BaldwinTest()
{
System.out.println("Starting Program");
runParamBaldwin(new BaldwinTest(100));
System.out.println("Terminating, Baldwin");
}

BaldwinTest(int i)
{
System.out.println("Object contains " + i);
}

static void runParamBaldwin(BaldwinTest b)
{

}

public static void main(String[] args)
{
BaldwinTest b = new BaldwinTest();
}
}
My advice would be echo quite a few of the other responses here. The key lies in purchasing a GOOD book (read the reviews both here and at amazon before making a purchase), working through all of the examples, and don't hesitate to ask questions. Take a break when you're stymied and sooner or later you'll break through the "wall".
Good luck,
Pat B.
greg clarke
Greenhorn

Joined: Oct 06, 2000
Posts: 25
Originally posted by Jamie Cole:
Thanks, Greg. Yes, it does help. Your solution is simpler, and as far as I'm concerned, simpler is better. Thanks also for pointing out the MyFrame parallel. I've used that type of construction before, but it hadn't occurred to me. To put your response in context, how much programming experience do you have?

Jamie
About 13 years programming, mostly on Oracle/Unix - sql, pl/sql, ksh, awk, some C, various others. I've been writing Java in my spare time for the past few years on and off.
Jamie Cole
Ranch Hand

Joined: Feb 03, 2000
Posts: 36
Thanks, Pat and Greg. You're both pretty experienced, and you came up with similar solutions. I'm glad to be getting the sense that this problem is only easy for a fairly experienced programmer.
You've done more than enough for me already, but if you're interested, please take a look at my Towers of Hanoi topic in the Intermediate forum. My question there seems to be either too difficult or too time-consuming to answer -- or maybe too obvious. I hope not the latter.
[This message has been edited by Jamie Cole (edited January 03, 2001).]
Zkr Ryz
Ranch Hand

Joined: Jan 04, 2001
Posts: 187
It's not about being "smart", ( though it helps a lot ) but making experience and
having patience.
<pre>
public class Baldwin {
public static void main(String args[]){


// 1. Instantiating an pbject by calling the default constructor
String s = new String();
String t;

System.out.println("Starting program");

// 2. Instantiating an object by calling a parametrized constructor
// String(java.lang.String)
// As parameter to a function call
// System.out.println(java.lang.String)
System.out.println(t = new String("Object contains 100"));


System.out.println("Terminating,Baldwin");
}
}
</pre>
you'll be a professional Java programer when you really want it , but like everithing in life , it takes some time
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How smart must a Java programmer be?
 
Similar Threads
accessing private members
Notes on Threads
simple question
Thread Stuff !!!
Threads - overview