As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
there are tons of books out there teaching you a new language. but some of them are just too thick with lot of information and less code. it usually makes you sleepy. especially when you already know the basic syntax and wanna learn how to use a new language very fast.
are there good series of books for this?
the dummies series is very good but are there like "faster" book series that skip the unnecassary (how do you spell it) talking and get straight to the point?
maybe from 500 pages to 150 hard core practical step to step with pics kind of pages=)
these kind of series would be very appreciated i think (lynda is good cause its that fast to learn a new language! but unfortunately they dont have java videos)
You should write code, not read it...
Go for Head First Java. http://oreilly.com/catalog/9780596009205
I strongly recommend you to read
Teach Yourself Programming in Ten Years...
Head first Series of books are very useful and easy to understand (and covers many topics from learning programing languages to design patterns and such)
For dummies Series -Programming related books- are pretty useful too, even if you heard alot of criticism from the more experienced programmers, for us - new programmers and beginners- it is really simple and useful.
Wrox Beginning series -programming related books- is also very useful for beginners (read 2 or 3 of them) and they are pretty simple and useful, and most of the time they use one book-lenght example to cover all chapters (1 example that starts simple and keeps progressing with each chapter, and by the end of the book you will have a very nice ready-to-use application/website, which is an implementation of progressive learning)
Wrox Professinal series -programing related books- is normally the next level after reading Wrox-beginning series ( and that's of course if you've liked the previous series and NOTE that you might find some gaps between both series due to the fact that the same programming topic is written by different writers for each series)
Unleashed Series (programming books) Really useful, easy to understand , takes the reader step by step through the learning process.
Manning In Action Series Nice series, uses the learn through examples procedure (lots of examples that tends to show the power of the language, recommended if you are looking to quickly learn and use a certain language or framework.
Apress Pro series pretty Hardcore and normally not the 1st book i'd recommend to start learning a language , but definitely recommended to push your basic skills to the next level(s) (recommended to read after learning the basics.
OReilly Essential series
NOTE:
What's written above is a simple opinion, and at the end of the day, different books are written by different writers -even if your reading 2 books from the same series, you dont have to enjoy or understand them both at the same level- and OF COURSE i hold great respect to all authors and the efforts they put into writing their books. :)
NOTE 2: Writing Code is the best way to learn, reading will just give you the basics of knowledge, writing Code gives you experience and helps Crave everything you read and learned through writing into your brain.
My experience backs up your suggestion that a 150 pg treatment of a technical subject is just better than one that's 500 pages. Your time and energy won't last long enough for 500 pages. I love it when I find a solid, short technical book like that, but I can't recommend a series of them that's consistently good.
But here's a different suggestion for learning a new technical skill: read code written by leaders in the space.
I often feel we don't read each other's code enough. Code snippets in books are too often "straw man" examples -- they tackle sweet-spot scenarios, and avoid real-world complexities like security, internationalization, and integrating with legacy APIs.
You can get a good sense of not only how to use but "think in" a new syntax by reading real-world code from the masters.
I think Madi D.'s List is pretty comprehensive and includes most of what I think are the best series of programming books.
My personal favorite is the Head First Series, because of its unique approach to teaching stuff.
Wrox, Apress and Manning also are pretty good. It surely depends on the book, but they are usually written very well and to the point.
I recommend going to the respective websites. Usually you can get a few sample chapters for free to find out whether the book fits your learning style.
The other obvious answer of course is that you should just do it. (Another reason why the Head First books are a good choice, because they practically force you to do the exercises and try your hand at coding.)
I dislike the Head First series as they are very fluffy - filled with cartoons, jokes, puns, and nonsense. Go for the "Core" series from Sun Microsystems. "Core Java" by Cay Horstman is a good start. Also the O'Reilly Notebook series is quite good. No fluff and right to the point.
Although they aren't shorter, the Head First series does avoid inducing sleep, therefore you can get through them faster with a better understanding of the topic. I'm working through Head First Java right now. It's really sinking in. I've learned a number of new languages over the years, and the Head First style of teaching seems to work faster for me than any other language book I've read. The series does include titles covering Java and PHP. Some title are for the complete beginner, others assume some programming familiarity. Check out Head First Labs.
The Pragmatic Programmer series is also quite recommandable.
For Java, yes, the head first series as others have suggsted. That is my favorite series of books. I've read over 2 of them and both were great. As well as the Java one, you should also get the OOD one: http://www.amazon.com/Head-First-Object-Oriented-Analysis-Design/dp/0596008678/ref=sr_1_1?ie=UTF8&s=books&qid=1263239109&sr=8-1
Object Oriented design is at the heart of learning Java.
Also, if you want to go a little cheaper, the Java tutorial is excellent IMO. There is a lot of meat there and its defiantly fast and easy to progress through. Check it out here: http://java.sun.com/docs/books/tutorial/
Go down to the section header "Trails Covering the Basics" and start there.
Related
Well at-last I am working on my final year project which is Intelligent web based career guidance system the core functionality of my system is
Recommendation System
Basically our recommendation system will carefully examine user preferences by taking Interest tests and user’s academic record and on the basis of this examined information it will give user the best career options i.e the course like BS Computer Science etc. .
Input of the recommendation system will be the student credentials and Interest test and in interest test the questions will be given according to user academic history and the answers that he is giving in the test, so basically test will not be asking same questions from everyone it will decide on real time about what to ask from which user according to rules defined by the system.
Its output will be the option of fields which will be decided on the basis of Interest test.
Problem
When I was defending my scope infront of committee they said "this is simple if-else" this system is not intelligent.
My question is which AI technique or Algorithm could be use to make this system intelligent. I have searched a lot but papers related to my system are much more superficial they are just emphasizing on idea not on methodology.
I want to do all my work in Java. It is great if answer is technology specific.
You people can transfer my question to any other stackexchange site if it is not related to SO Q&A criteria.
Edit
After getting some idea from answers I want to implement expert system with rule based and inference engine. Now I want to be more clear on technology aspect to implement rule based engine. After searching I have found Drools to be best but Is it also compatible with web applications? And I also found Tohu to be best dynamic form generator (as this is also need of my project). can I use tohu with drools to make my web application? Is it easy to implement this type of system or not?
If you have a large amount of question, each of them can represent a feature. Assuming you are going to have a LOT of features, finding the series of if-else statements that fulfills the criteria is hard (Recall that a full tree with n questions is going to have 2^n "leaves" - representing 2^n possible answers for these questions, assuming each question is yes/no question).
Since hard programming the above is not possible for a large enough (and probably a realistic size n - there is a place for heuristical solutions one of those is Machine Learning, and specifically - the classification problem. You can have a sample of people answering your survey, with an "expert" saying what is the best career for them, and let an algorithm find a classifier for the general problem (If you want to convert it into a series of yes-no questions automatically, it can be done with a decision tree, and an algorithm like C4.5 to create the tree).
It could also be important to determine - which questions are actually relevant? Is a gender relevant? Is height relevant? These questions as well can be answered using ML algorithms with feature selection algorithms for example (one of these is PCA)
Regarding the "technology" aspect - there is a nice library in java - called Weka which implement many of the classification algorithms out there.
One question you could ask (and try to find out in your project) which classification algorithm will be best for this problem? Some possibilities are The above mentioned C4.5, Naive Bayes, Linear Regression, Neural Networks, KNN or SVM (which usually turned out best for me). You can try and back your decision which algorithm to use with a statistical research and a statistical proof which is better. Wilcoxon test is the standard for this.
EDIT: more details on point 2:
In here an "expert" can be a human classifier from the field of HR
that reads the features and classifies the answers. Obtaining this
data (usually called the "training data") is hard and expansive
sometimes, if your university has an IE or HR faculty, maybe they
will be willing to help.
The idea is: Gather a bunch of people who first answer your survey. Then, give it to a human classifier ("expert") which will chose what is the best career for this person, based on his answers. The data with the classification given by the expert is the input of the learning algorithm, its output will be a classifier.
A classifier is a function itself, that given answers to a surveys - predicts what is the "classification" (suggested career) for the person who did this survey.
Note that once you have a classifier - you do not need to maintain the training data any more, the classifier alone is enough. However, you should have your list of questions and the answers for these questions will be the features provided to the classifier.
All you have to do to satisfy them is create a simple learning system:
Change your thesis terminology so it is described as "learning the best career" instead of using the word "intelligent". Learning is a form of artificial intelligence.
Create a training regime. Do this by giving the questionnaire to people that already have careers and also ask questions to find out how satisfied they are with their career. That way your system can train on what makes a good career match and what makes a bad one.
Choose a learning system to absorb the data from (2). For example, one source of ideas might be this recent paper: http://journals.cluteonline.com/index.php/RBIS/article/download/4405/4493. Product sum networks are cutting edge in AI and apply well to expert-system-like problems.
Finally, try to give a twist to whatever your technology is to make it specific to your problem.
In my final project, I had some experience with Jena RDF inference engine. Basically, what you do with it is create a sort of knowledge base with rules like "if user chose this answer, he has that quality" and "if user has those qualities, he might be good for that job". Adding answers into the system will let you query his current status and adjust questions accordingly. It's pretty easy to create a proof of concept with it, it's easier to do than a bunch of if-else, and if your professors worship prolog-ish style things, they'll like it.
As #amit suggested, Bayesian analysis can provide you guidance on the next question to ask. Another pitfall of dynamic tests is artificial thresholds ("if your score is 28, you are in this category, if your score is 27, you are not"), a problem which fuzzy logic can help address. Another benefit of fuzzy logic is that adding a new category is relatively easy, since the domain expert is only asked to contribute qualitative assessments, not quantitative thresholds.
A program is never more intelligent than the person who wrote it. So, I would first use the collective intelligence that has been built and open sourced already.
Pass your set of known data points as an input to Apache Mahout's PearsonCorrelationSimilarity and use the output to predict which course is the best match. In addition to being open source and scalable, you can also record the outcome and feed it back to the system to improve the accuracy over time. It is very hard to match this level of performance because it is a lot easier to tweak an out of the box algorithm or replace it with your own than it is to deal with a bunch of if else conditions.
I would suggest reading this book . It contains an example of how to use PearsonCorrelationSimilarity.
Mahout also has built in recommender algorithms like NearestNeighborClusterSimilarity
that can simplify your solution further.
There's a good starter code in the book. You can build on it.
Student credentials, Interest Test Questions and answers are inputs. Career choice is the output that you can co-relate to the input. Now that's a very simplistic approach but it might be ok to start with. Eventually, you will have to apply the classifier techniques that Amit has suggested and Mahout can help you with that as well.
Drools can be used via the web, but watch out; it can be a bit of beast to configure and is likely serious overkill for your application. It is an 'enterprise' type of solution focused around rule management, rather than rule execution.
Drools is an "IF-THEN" system, and pretty much all rules engines use the Rete algorithm. http://en.wikipedia.org/wiki/Rete_algorithm - so if your original question is about how not to use an IF-THEN system, Drools is not the right choice. Now, there is a Solver and Planner part of Drools that are not IF-THEN algorithms, but this is not the main Drools algorithm.
That said, it seems like a reasonable choice for your application. Just don't expect it to be considered an 'intelligent' system by those who deem themselves as experts. Rules engines are typically used to codify (that is, make software of) the rules and regulations of business, such as 'should you be approved for a mortgage' or 'how much is your car insurance' and so on. 'what job you should do' is a reasonable application of the same.
If you want to add more AI like intelligence here are a few ideas
Use machine learning to get feedback from the user about earlier recommendations. So, if someone likes or hates a suggestion, add that back in as a feature of the person. You are now doing some basic feedback/reinforcement learning (bayes, neural nets) to try to better classify the person to the career.
Consider the questions you ask the person. Do you need to ask all of the questions? If you can alter the flow of questions based on their responses (by estimating what kind of person they are) then you are trying to learn the series of questions that gives the most useful knowledge for a recommendation.
If you want specific software, look at Weka http://www.cs.waikato.ac.nz/ml/weka/ - it has many great algorithms for classifying. And it is a Java library, so you can easily use it within a web application.
Good luck.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I realize that to become a better programmer, you need to program!
So obviously the more practice, the better you become.
My problem is this. I am currently in university, and I find my course load is a bit daunting, and I don't have a lot of free time. I don't think I could really take on a big project, particularly I don't think I would have to motivation to see it through, it would be easier just for me to keep putting it off in favour of work that is due is school.
But I still want to practice.
So I am looking for any resources which have programming challenges which can be completed in a fairly small amount of time. Ideally something i could get done in under 10 hours of work (so just over an hour of work each day), if not smaller.
I have heard of Google Code Jam, but I am not sure the length of the programs it specifies, nor the skill level.
Does anyone have suggestions? Even perhaps a compendium of tutorials for different functions might be useful. For example, a tutorial on file IO would be worthwhile (if I didn't already know it), even though it can be a fairly small topic.
You should look into code katas, they do exactly what you are talking about. Short exercises that are designed to perfect your coding/thinking abilities.
Other references:
http://kata.coderdojo.com/wiki/Overview_of_Learning_Resources
Project Euler has some math/number related problems that are very interesting and ranged from easy to very challenging. You can pick your language of choice and submit only the solution (a large integer number). After you submitted the correct solution, you have access to a forum/comment page where others posted their comments and solutions.
From experience I recommend finding a task that you do repetitively and turning it into a program. I also recommend, seriously, re-invent the wheel in order to get practice with programming. Don't let people tell you to not do something just because it exists already. If you don't know how it works, try to write it yourself.
I don't exactly know what programming level you are on, but don't try to do anything too crazy off the bat, that is just a demotivator (such as trying to write a game for the PS3).
If you already can navigate your way around with IO, then you should try to really learn how to use Collections effectively. I think one of the best practice assignments I have ever done was rewriting the Java TreeMap Class. It was a huge challenge and I learned a lot by doing it.
Here are some suggestions for practice assignments:
Take a text file that has a fair amount of information in it, grab anything, you can get something from here if you'd like: http://www.gutenberg.org/ and make a program that will do the following:
Read in the file
Create a collection of words and their occurrences
Create a collection of anagrams
Create a collection of words and the positions in which they occur (line#, word position)
Develop statistics on the words in the file - meaning - treating each word as an individual - which words occur before it and after it.
Remove all of the white space from the file
Write all of the above data to their own files
One of my favorite things to do is mess with web data, go to a polling website, find a page that has poll data in a tabular form and do the following:
Download the data
Parse through the data and turn the tabular data into a CSV file
Open it in excel without error
Or just look for any site and extract data from it, just make sure the site is robot friendly http://www.robotstxt.org/, you don't want any one site to feel like it is under attack. Most of the time though this isn't normally a problem because if you read the site's terms of use it clearly states you are allowed to download 1 copy of whatever it is you are viewing so long as you don't intend to sell it. Of course this changes for every site.
Go to a website and get all of the links off of the page programmatically.
Here is a fun one, the Susan Program (I don't remember why it is named Susan) which I initially wrote using a C program and two Bourne shell scripts in a Unix environment. The idea in this program is to fork 4 child processes and give them each a task like so:
Child 1: Reads in a file, creates a dictionary of each word and its position in the file, this is outputted to a file.
Child 2: Takes Child 1's output and reconstructs the document, this is outputted to a file.
Child 3: Takes Child 2's output and does what child 1 did again
Child 4: Takes Child 3's output and does what child 2 did again
The goal here is to have an exact replica of the original file once Child 4 outputs it. This is challenging and somewhat pointless, but the point of this exercise is to get the practice.
In your case, don't feel that you need to use different threads for this, you can just use a single program with two different functions and just call them in order.
Again, not sure if you are at this level yet, but try to replace any "for" or "foreach" loop you have in your program with recursion, just as practice. Recursion is a pain in the butt, but it is valuable to know and understand.
These are some suggestions which I think will really help you sharpen your skills.
Enjoy
I like SPOJ and Project Euler to take quick programming challenges and exercises.
Code Jam is a good programming contest, although, as you mentioned, most of the problems there aren't for beginners.
There's a good selection of problems from past topcoder algorithm competitions. (They are held ~2 times a month for almost 10 years already, so there're quite a lot.)
Difficulty range from very simple (but still interesting) problems in the 2nd division to very hard.
Additionally, there're editorials with solutions and live environment where you can submit and test your code. You can also learn from submissions by other people.
Check the problem listing.
Another advantage of topcoder is the regular online contests they hold. I find that competing against other people in realtime is a great boost for motivation.
There're many more problem archives, like SPOJ, UVA and Timus, although they rarely provide solutions or even hints.
http://codegolf.stackexchange.com might have some programming challenges to your liking. A lot of the answers on that site are golfed (they implement the program in the least number of characters) but there are definitely some interesting examples to learn from.
Try enrolling on any IT course on the following websites:
Coursera
Edx
Udacity
These websites offer free educational IT programs from prestigious schools wherein there are lot of challenging exercises to sharpen your programming skills. I've learned to program percolation, pattern recognition, bouncing ball and so many more interesting things because of this. You will upload your program upon completion of the exercises and you will be graded accordingly (basically your progam will be checked).
At the end of each course, you will even receive a certificate of completion. Cool Right?
It depends of the language, but in the past http://rubyquiz.com and http://pythonchallenge.com did great for me, also you can join to an open source initiative because usually helps to give you better code review chances.
I've always thought that practicing with sample interview questions was a great way to sharpen one's skills and get exposed to types of problems that you normally wouldn't solve. Plus, if you're going to be looking for a job it helps you even more.
Here's a pretty simple one that I did for fun the other day:
Write a routine to print the numbers 1
to 100 and back to 1 again without
using any loops.
Glassdoor.com has a lot of good interview question submitted by people who actually got them in an interview.
Since you are in University and looking to improve your coding skills the hard-copy book Cracking the Coding Interview might be a good fit for you. It's got great general programming questions and tidbits about interviewing with some of the best companies in tech. Not only are there great questions, but there are decent problem breakdowns as well.
[Disclosure: I own the book but otherwise have no association to it.]
If you like programming and want to improve your programmer skills, you must try cocode.co. It's a social young site, similar to StackOverflow but based on posting and solving programming challenges, instead of asking and answering questions. From very easy challenges to very hard ones.
You can try to solve ACM problems. There are thousands of problems there and you can find the difficulty level so you can choose which problems to do first. The offcial site for this is:
http://uva.onlinejudge.org/. You can learn more there.
regards
arefin
It may seem a little obvious, but I've noticed a real boost in my regular-expressions skills lately just from answering regex questions on Stack Overflow. Teaching forces you to break down problems into easily explainable pieces, and will also guide your research on those occasions where you know most, but not quite all, of a solution.
I suggest finding a topic you're already somewhat proficient in, since this type of thing isn't so good as a beginners' tutorial. Search SO for questions tagged with that topic and try to figure out the answers. Don't just code them in your head; go ahead and write them out, test them, and explain them. If you're not sure your answer is correct, just write it without posting it.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am new to Java and referring Head-First book.
Do I have to learn Algorithms to be able to make programs in Java?
Should I learn Algorithms first or only Java books like Effective Java, Java puzzlers etc will be enough?
I want to be a successful enterprise developer. Then what algorithms and data structures I should be well versed with? What books would you recommend me?
To be a successful Java developer, do I need to know all the advanced algorithms such as those given in CLRS?
PS: I had C and C++ in my past semesters, I got good marks in them but that was kinda mugging. I know basics of programming. I am not a newbie. Thing is that I don't have sound knowledge in any language also I want to be a developer not an algorithmist.
If you want to become a successfull developer you'll need to learn a lot of stuff. A main programming language (java) and CS basics (e.g. algorithms) are just two of them. Others are: a communication skills, testing (I'd say TDD but I don't want to start a fight), handling of databases, web stuff, OOD and many more. Also a lot of stuff that you might not use directly will still help a lot by broadening your horizon (functional programming, advanced CS concepts)
There is no fixed order in which to learn that stuff. Since learning works best when you are motivated, just pick what you are interested in most or what is helping you most. Learn a little here, then learn a little there. Keep your eyes open and practice a lot and you will be fine.
In your current situation I'd recommend to pick up an Algorithms book and implementing the algorithms there in java. It teach you java and algorithms.
Also read "Clean Code", "The Pragmatic Programmer" and the SOLID http://www.butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod principles
My advice - learn a subset of Java, then learn some basic algorithms, then figure out where you want to go from there.
You don't need to know all of Java to experiment with implementing algorithms. You will need to be able to wrap a few methods (often only one) in a single class (and even that only because Java insists everything's a class). You'll need conditional and looping constructs and arrays. For data structures, you'll probably need to understand Java references, though you may be able to fake pointers using integers as array subscripts.
The point is that algorithms are important, but on a relatively small scale. Data structures typically need a few algorithms to make them work. But you don't need an understanding of larger-scale issues such as object-oriented design to experiment with algorithms.
EDIT
From comments, I see that you're already well into the "where to go from there" stage.
Don't forget algorithms (or discrete math) because you don't care about analysis, though. A broad (not necessarily in depth) understanding is a useful resource - they are great for problem-solving methods.
For example, I was recently confused in a dependency-ordering issue about how to deal with cycles. I'd forgotten about "strongly connected components" in digraphs. Once I was reminded, the problem became trivial - no point trying to order within a strongly connected component, but those components form an acyclic digraph. From there, the answer is just a topological sort away.
Knowing about topological sorts makes the last step trivial. Having forgotten about strongly connected components cost me a fair bit of time. Understanding how Tarjans strongly connected components algorithm works... Wikipedia and a few minutes with pen and paper are enough, once you know what to look for.
Actually, I should confess - "I was reminded" means I looked up an old Dr. Dobbs article on topological sorting that used the same approach.
I recommend you begin learning with Head First. functionx.com is also a good site. Most Java books describe algorithms as part of the book, so don't worry about algorithms. First of all learn Java.
Let me give you a easy way to find good books. Always look for higher rated books in amazon.com and then download them from wowebook.be.
I recommend "Data structures and algorithms in Java" by Michael T. Goodrich and Roberto Tamassia.
"Think Like a Programmer" are good algorithm-related books.
I'm with Steve314 for the most part but wanted to specify some things.
Learn enough Java (or whatever else) to be dangerous. Then the main data structures (lists, stacks, maps, trees, etc), which does include some algorithms for traversing them. Do the rest of your algorithms work after that. Here are some specific goals, if you want them, that more or less mirror the order of Data Structures & Algorithms in Java.
Understand Java and OO on a basic level. Specifically inheritance and polymorphism
(as Java define them) and how to use generics.
Have a basic understanding of Big-O
(how it's defined and why you can
drop lower order terms).
Be able to use, write, and trace recursive functions.
Code singly- and doubly-linked lists. They should implement Iterable and support adding and removing elements.
Use them to implement a stack and a queue.
A couple of things to know about once you do dive into a book like Algorithms:
MIT OCW has videos lectures up from the class that Algorithms was written for, given by one of its authors.
The purpose of a book like Algorithms is not just to show you specific algorithms, but to teach you how to analyze their running times. You need a small amount of discrete math for that, basically sums and recurrence relations. Look on here for big-O questions to see what I mean.
Speaking of videos, I think this is a way better place to start: Programming Abstractions (Stanford, Julie Zelenski). I'm very happy that those exist.
(As it happens I am in the middle of implementing a map with a binary search tree.)
#Chankey: According to me you should take both java and algorithms hand in hand. First learn some basics of Java programming language like what are classes, data types, functions etc. Then learn some basic algorithms of sorting and searching. And, now apply your java knowledge to implement these algorithms.
Cheers!!
Mukul Gupta
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Ok I know this might sound a bit silly, as it depends on the person, but on average how much time should I spend on preparing for SCJP? I already have some experience with Java (a few small and medium projects for my university, from implementing a simple "ships" game to some client-server stuff).
I was thinking about taking it around jun-july '10 so I'd have around 7-8months, is it enough/too much/not enough?
Also I've been looking for a good book, is there anything better than: "Sun Certified Programmer for Java 6 Study Guide" by Kathy Sierra and Bert Bates? And what about some practical questions (like "implement this and this" or "write a piece of code which does...")?
Ah and is it really worth it (I'd spend my own money). I'm not asking if it will make me a better programmer (as I've seen such a thread on stackoverflow alread) but do the employers even care about it?
It took me 3 weeks to prepare for the Java 6 exam, I have 0 professional Java programming experience. For someone who uses the language daily (like a java programmer) it should be even easier. I was very excited to get it over with as soon as possible, so I ordered the Kathy Sierra SCJP Sun Certified Programmer for Java 6 Study Guide at http://www.amazon.com/SCJP-Certified-Programmer-Java-310-065/dp/0071591060 and one day shipped it to me so that I received it on a Saturday. As soon as it came, I started reading. That took about two weeks as the book is an 800 page monster with some self tests in the book that both give you good practice and teach you some specific details that the book did not mention in the actual chapter (a lot you can guess but not all...). For the last week I reviewed all the 2 Minute Drills and re-read the chapters that were API heavy. Also there are a lot of tables (important string methods, thread methods, file API methods, and concurrency). I also took the two master exams included in the book. I took them in study mode and attempted the question, then if it said wrong, I went and tried to figure out why it is wrong, then I went to the reference/hints if I needed. On the day of the exam I reviewed the File/String/Collections API an hour prior to the exam and took it.
I scored 90% so that's GREAT considering I do not have any Java work experience at all and prepared in 3 weeks. It should be much easier for any professional Java developer to prep/take. Although I have known of Java since it came out, and I used it for the occasional graduate and undergraduate program in college so I'm not totally new. Also, I know other C languages so I am used to much of the control structures, etc... However if I can figure out the API/language workings in three weeks enough to get a 90% any experienced java programmer should have no problem figuring out enough to pass. Still that book is giant, the 2 hours of daily train riding to work was a big help in getting the reading done.
Some people say you have to write a hundred small programs to figure things out. But that book is pretty good on details. The most important thing to write programs about (maybe I wrote 10) are the constructors/initializer blocks/static initializer blocks/to find out exactly what is inherited and to cement the order. And when casting a sub class as its parent, it is important to see what happens when you access the variables/overloaded methods. While the overloaded methods are simple and what is expected, accessing variables is not so straight forward. Trust me, write a few programs about it, especially where the super type/sub type have instance variables with the same name.
I think the main thing I got out of SCJP is a broad overview of the language. Java is a beast, the API/language is huge. Typically I just used the parts of the language I needed for each project/activity in Java and looked up the API as I went. Some key words (like transient) I just did not know. Also some interview trivia (like if you override equals what else must you override) I did not know (at least according to what a friend told me). Also I had no idea about things like the internationalization classes Locale, Calendar, DateFormat, NumberFormat, and Date. Really if I was writing serious Java software, I would probably use Calendar for date arithmetic needs. I don't think it will help me land a Java job as everyone seems to want Java experience prior to even giving you an interview. But if I ever do get an interview, the knowledge I gained from preparing the exam would definitely help me to better answer the questions (though I'm sure a lot of the specific API details will fade with time). Also now I feel more confident with Java. Still I can't say that I can just whip up a Java program on the white board that fully works because the API is very complex. A language like C is pretty small, include stdio.h/stdlib.h/string.h and memorize 30 functions and you can do a lot. Java has way more packages/classes to include and way more API. Also with expressions there are a ton of rules, promotions, casting, autoboxing, etc. which would be really easy to mess up. Though C has precedence hell, with the right parenthesis you can get away with a lot. Java is more strict on things (ie if(0) is an error). But the exam is worth it just for some additional trivia, although the exam is a bit frustrating, and if you look at the book it pretty much tells you that the exam deliberately picks tricky questions and edge cases in an attempt to confuse you. It will deliberately give bad indentation and other stuff to try to be tricky. I hate that because rather than focusing on you knowing the material reasonably, it focuses on trying to confuse you.
One thing of note, don't get thrown by the Master exam. I tried to take one in exam mode, and they gave 75 questions in 1.5 hours and I nearly decided to postpone the exam. The real exam is 60 questions and you get 3 hours. Also the questions on the actual exam are MUCH easier than on the master exam. My master exam score was 37%.... My last two times I just did it in study guide mode, attempted each question/if answer was wrong tired again/viewed reference once with the A exam and once with the B exam... I did fine on the exam and I am really really happy that I did not postpone it over the study guide, because now it is over and I can relax....
In the Parachute book, the author tells of how he likes showing off résumés to his friends, who remark that "This résumé will never get anyone hired!", to which he responds "Oh, but it already did!". The lesson is that every employer is different.
So the real question is not whether the SCJP will help you get a job, but whether it'll help you get a job at one of the places you want to work. Google has a lot of pretty smart programmers who use Java, for example, and of all the people I know who work there, zero have taken the SCJP, so it's probably not a big concern there.
Now, some more personal (i.e., less universal) feedback:
It would not help you if you were to interview at my company, and in fact might hurt (especially if you call attention to it), if it looks like you're only a Java programmer. We need good programmers, not good Java programmers.
I've not taken the SCJP, but I suspect it's like every other standardized test: it's as much about your SCJP-taking ability than your Java ability. When you interview, we're going to look at the code you've already written (open-source projects are great), and the code you write during the interview. What Sun thought of you is not our concern. (We can't exactly call up Gosling in a year and say "Dude, you told us this loser knew Java! You totally owe us one year of dev time".)
Some people have suggested that it'll make you look good over another candidate, if all else is equal. First, all else is never equal when it comes to interviews. In fact, I've rarely interviewed somebody and been neutral: it's either an immediate "No" or an emphatic "Yes". Second, unless it's a really tiny company, everybody needs more great programmers, so if two "Yes"s walk in the door at the same time, we'll hire them both. Yes, even today, in this economy.
So figure out where you want to work (a specific place, or a type of place), and see if the SCJP will help you there. There are lots of other ways to get good at Java in the time you might save. First of all, writing real Java programs. :-) Bonus if you open-source them so everybody can see the cool stuff you've done. Double bonus if you write a blog about all the gory details. Second, learn something other than Java. If you spend 6 months learning Haskell, for example, I guarantee it'll significantly help your Java.
I prepare it for about 3 Months for 1.4 Java Version SCJP with an O'Reilly book (not an Head First sadly) I think that the SCJP Exam for the 1.5 specification is harder thank's to generics.
Anyway, the most important is to focus during the test, almost all questions have a trick,as you could see on the preparation book mock test.
It really depends on what you're doing the certification for. If you just want to pass the exam you could probably do it in around three months.
However, if you're studying to really get an in depth understanding of the JDK and the intracacies then I'd say more like six to nine months.
The book you mentioned should be fine, but make sure you do example programs and really explore the concepts presented to you in each chapter. One site I would definitely recommend is JavaCertificate.com:
http://www.javacertificate.com/
It's worth spending the money to do the practice questions and the mock exams, but don't do this too early on.
I highly recommend doing the SCJP, it will put you ahead of most of the mediocre Java hackers out there. Unfortunately, most employers I know of are not that aware of the certification - nor it's benefits. I really wish Sun would grade the certification you get in the end - 90% and plus would be Level 1, 80 - 90% would be Level 2 etc...
From the Sun Certified Professional Wikipedia page, I understand that SCJP is a prerequisite to a number of the other Java-related certifications, so indeed I would say it really is worthed. Not only it will look good on your resume, but it will open a path of new certification opportunities and allow you to gain better chances of employment in the long run, not only due to certification, but also due to the experience you will gain.
For an extensive discussion upon this matter, you could take a look at this forum post.
I've never known being certified to help greatly but I don't live in the US or a hot bed of the IT industry. Someone else may be able to shed more light on this topic, but I can only assume that in a more vibing city for IT such as Silicon Valley or perhaps NY, it may look a little more impressive if two or more candidates are evenly matched. But if you're weak in interviewing skills or thinking on the spot etc, being certified might not help too greatly.
The book you mentioned sounds good and will probably be sufficient. I've always enjoyed the head first series too and in your case perhaps the Head First Java might be worth a look (also Kathy Sierra and Bert Bates).
Some other posts relating to SCJP may be of help too:
Does scjp help
is an scjp certificate worthwhile
Although it took me a long time to prepare for the SCJP exam (because I was working during the day that time), I think 7 months is long enough and perhaps too long depending on your mad skills.
The only resource I had that time was Sun Certified Programmer for Java 5 Study Guide by Kathy Sierra and Bert Bates. I think it was all the resource I needed. Although I have to admit that I had to read the chapters again and again and answered the quizzes and practice exam multiple times to make sure I got it in my head.
As far as I know, questions such as "implement this and this" or "write a piece of code which does..." is for the SCJD exam, not SCJP. This is also mentioned in the book by Sierra and Bates, together with other information about the exam.
Views on certification certainly seem to be a mixed. Some employers say they won't hire if you don't have one; others don't care; and others seem downright hostile toward certs. So, having one could help, but not necessarily. My viewpoint is that if you're using it to improve your skills then get it. If your skills are already at a point where the certification is easy, then it's only worthwhile if you're convinced it will help you get the sort of job you want... or if your employer is requiring you to get it.
As for the time to spend on preparing, this varies also. Some factors:
How much you already know
How much time you have
How well you want to perform on the test
I'd think 3 - 6 months of studying should be adequate to pass, probably less if you're already good with Java. From my own experience, I had only a passing familiarity with Java, but studied toward an SCJP a couple times. I had no deadline and wanted to "ace" the test, so was thinking 6 - 8 months of study time. However, life would present distractions and I'd suspend studying for a bit. I wasn't using Java regularly, so I would have to start over somewhat when I resumed. Eventually life presented the ultimate distraction (a child) and I still haven't gotten that SCJP. (However, I'm starting to use Java regularly, so that may change.)
JavaRanch is another good site to use for SCJP preparation.
Started up solving UVa problems again as a way to pass time (going to the army in 6 weeks). I love writing Java, but end up using C / C++. It's not because IO is faster, no need to box data, more memory or use of unsigned, because its algorithm efficiency that counts.
In short i am slowly constructing how to/article/code base for different categories of efficient algorithms and dp is next.
Quoting Mark Twain: It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so.
I aid assistance in building priority list what are must have efficient algorithms.
This MIT lecture is a good introduction to dynamic programming if you're already familiar with algorithms.
The wikipedia article on Dynamic Programming has a section entitled "Algorithms that use dynamic programming" with many examples.
Here is another good list of practice problems in dynamic programming.
Since you referenced the UVa problem list, you should definitely take a look at Problem 103 - Stacking Boxes. The problem lends itself well to a solution using a Longest Increasing Subsequence algorithm.