Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing code the best use of time???

 
Bailey Klinger
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all. I know everyone says that to learn java well you need to spend alot of time writing your own code and learning from your mistakes.
In the exam, however, we don't actually write our own code as I understand it (I could be wrong). My question is this: in preparing for the exam, wouldn't it be better to spend most of my time reading and understanding code written by others, like we have to do on the exam, rather than pulling my hair out spending days figuring out and writing a program to solve a problem specific to one exercise (like turning numbers like 999,999,999,999 into words)? I'm talking just in terms of exam preparation.
 
Marcus Green
arch rival
Rancher
Posts: 2813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my view the best code writing exercise is to write lots of trivial programs (10 to 20 lines ish) to explore the principles that you are required to understand in the exam. Thus you could go over various mock exams and write your own bits of code to test the principles. Be able to declare arrays in the various ways "off the top of your head".
As you imply, if you work on some significant program you may not actually cover all the topics required by the objectives.
Marcus
 
Kathy Rogers
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Marcus that you should be writing lots of short programs. Now that there's many more code examples in the exam,writing your own programs is a really effective way of learning to read and follow through the flow of code. It also helps you learn to predict what's going to happen when you try to compile and run a short program. The exam is very keen on asking questions along these lines. Plus having SCJP is going to be worth very little if you can't actually program anything in Java. I think writing simple programs consolidates Java fundamentals.
Hope this helps. Good luck with the exam preparation.
Kathy
 
Wasim Ahmed
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ditto here guys. Bailey you MUST write small code and compile it and learn from mistakes because exam ask " compiler error at line no. xx" OR "runtime error" . To answer these you must have a good understanding of Java Fund.
Remember practice makes the Man/Woman perfect (politically correct).
 
Bailey Klinger
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know I need to do alot of practice code to learn the syntax and such, what I was talking about is working on problem-specific algorithms. It seems like that would not be as productive a use of time.
 
John M. Gabriele
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bailey,
it seems to me that the ideal use of time is to have 2 tables
in front of you; one with the computer on it all set up to
compile and run little sample programs, the other table with
your books and notes for you to study at. i just study at the
book table until i need to clarify something by "asking the
compiler and/or JRE". oh, and posted up on the wall, keep the
exam objectives as defined by Sun.
Sun will be testing you on using the java language, not
whether you can write a quicksort.
note tho, i haven't taken the exam yet, so take my advice for
what it's worth (oh,.. about $65 per lowercase letter---likely
double for the caps since i gotta hit the shift key!)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic