After Learning Java Syntax, What Next?
Niris writes "I'm currently taking a course called Advanced Java Programming, which is using the text book Absolute Java, 4th edition, by Walter Savitch. As I work at night as a security guard in the middle of nowhere, I've had enough time to read through the entire course part of the book, finish all eleven chapter quizzes, and do all of the assignments within a month, so all that's left is a group assignment that won't be ready until late April. I'm trying to figure out what else to read that's Java related aside from the usual 'This is how to create a tree. This is recursion. This is how to implement an interface and make an anonymous object,' and wanted to see what Slashdotters have to suggest. So far I'm looking at reading Beginning Algorithms, by Simon Harris and James Ross."
How about writing code????
Learning the theory is good, but writing code is very important..
"You can't make a race horse of a pig"
"No," said Samuel, "but you can make very fast pig"
Program something for real. Be goal-oriented. No amount of working through exercises teaches you programming for real.
http://projecteuler.net/index.php?section=problems
http://www.spoj.pl/problems/classical/
http://programmingpraxis.com/
http://codekata.pragprog.com/2007/01/code_kata_backg.html
Or, you know, write some code.
I'm sure "SlashdotMedia" will improve on all the wonders that Dice Holdings blessed us all with
While I do regularly program in languages like Java that have automatic garbage collection, but in my experience you need to actually do some time in a language(C being the most common) that does not do this for you. While this is anecdotal, I've found that people who have never actually programmed in a low level language tend to regard object allocation and deallocation as "magic" and thus write poorly performing code.
By implementing a lot of the same things in C you can get a much better feel for what is actually happening underneath the covers.
Monstar L
being a night security guard, you should start looking around for all those anonymous objects skulking around the building.
Pick something simple to build (i.e an application) and build it. You'll learn huge amounts just from filling the gaps in your knowledge in order to achieve what you want.
Buy an Arduino or something similar (msp-430) and see how much work it is to actually toggle a LED at a certain frequency, or drive an LCD connected via I2c or something. It's a whole new world. You'll have to learn C (probably) and maybe a bit of assembly language.
Linux journal had a nice introduction article on embedded programming.
I've been doing embedded development work for the last 20 years, and am still enjoying it. It pays pretty good, and you'll be far less interchangeable with someone else than your typical Java programmer.
Write a program that tries to help to solve one of your everyday problems. It mustn't be the best in general, but it should be as good and as well suited for your own needs as possible. It could be something for you personal finance tracking, something for entertainment, a better interface for data that you can download from the web (dictionary? thesaurus?). The most important thing is that the problem must be interesting enough for you to finish the task so you should be able to at least get the software to a certain level of usability. Then write documentation for it.
Just reading books on language to learn, only takes you so far. Work on some projects. This helps you to gain understand the intricacies of the language. It helps you understand where you can use certain features of the language efficiently too. Writing code is the best way to learn the language imo.
Effective Java by Joshua Bloch. Will give you some deep insights into the workings of the language.
I'll echo some of the other sentiment here, program something!
Most of the popular languages these days can all do pretty much the same things as each other, the real challenge is being able to pull it all together and make an application that does something useful.
I would suggest putting together a game. It's a good challenge in your language of choice (in this case java) and a finished game is a good example of your ability as a coder to show to others and proof of your ability to yourself (in case you were doubting yourself).
Yay me! ^^
Pick a small project and produce some code for this. Then pick some of the Java technologies (eg. Swing, JEE), learn these and code a project using these. Algorithms are good to understand as are development process techniques (eg. test driven development, UML modelling etc). Oh, and if you find yourself with a few spare moments, multi-threading and concurrency is pretty much required. Then learn another language (.Net, C/C++, functional etc)
I see a lot of posts suggesting that he start writing real programs. That's good advice, but it might not answer the question. The submitter says he works as a security guard. As such, sitting focused at a laptop writing code might not be an option. He seems to just want suggestions for books to read. As such, I reckon a book on algorithms wouldn't be a bad direction to head (provided he's got enough math to follow along).
The only problem I see is that if he's taking these classes for college credit or working toward completing a certificate, he's going to be really bored with the later classes when he actually has to take them if he reads all the books beforehand. Either that, or he'll know enough to be dangerous and he won't pay sufficient attention to the guidance from his instructor.
Breakfast served all day!
Read more if you want, MIT's open courseware is great, donate if you can, i do. they are good refreshers.
There are pretty standard student projects, (like game of life, notepad, msg servers,)
You might want to move into more advanced topics, like javax or concurrent stuff like RMI
Algorithms are great to learn but sadly Ive had little chance to use em in real work, would'nt put too much stock in them for returns.
In any case, any algos you need most likely you will learn on the job, if something slows too much.
They are however fundamental if you want to be a proper engineer.(In my opinion anyway)
If you want real world experience, go look at the freelance websites and just copy down the specs and attempt yourself.
Dont need to bid, but these provide a snapshot of EASY projects in real jobs.
I also have some 100% real world work projects assigned to me if you want to do for free........ just kidding
Get some practice ! Write real code. Look up some opensource Java programs and study the source code. Try to make your own program or modify an existing one. If you're interested in programming for cellphones you can try J2ME.
Good luck, and godspeed.
Dislike the Electoral College? Lobby your state to join the National Popular Vote Interstate Compact.
As an instructor, I always tell my students: the only way to become a good programmer is to write programs, more programs, and even more programs.
Make up ideas: write a program to keep track of your music, write a game program, write a program to track recipes. It almost doesn't matter. The important thing is to make the programs a bit challenging. Want to track your music? Store the objects in a file using Java Serialization - a great reason to learn about serialization. If you already know about that, then store the books in a flat-file using Random-I/O. Writing a game? Learn how to use sockets by making it a network game.
Find problems that are fun, and use them to discover and learn about more and more aspects of programming.
Enjoy life! This is not a dress rehearsal.
I don't know a whole lot about programming, but I've already got some game ideas on the horizon, and maybe I'll contribute to some open source projects along the way. Just find something that interests you and you'll be coding in no time.
If anything, it will prove that you truly know Java syntax. A score of 100% can't hurt.
If step 1 is Learn the language then step 2 is Learn the idioms.
Get a copy of Effective Java, read it, understand it and you will be half way there.
Learn JEE. Learn some hibernate, learn struts, learn about containers, and servlets, and beans. Learn about JDBC and relational databases. Learn JPA and see how great it is and how crap it is. Then actually do something with it.
Is this your first language? I'm a Java developer but I believe all Java developers can benefit from knowing another language. Personally I wish everyone knew a little assembly. I've met Java developers that couldn't keep kilobytes, megabytes, and gigabytes straight because they never learned about the hardware their applications ran on.
Syntax is one thing, designing code is another. There are several design pattern books you might want to look at. There is the Head First Design Patterns book and the traditional Gang of Four Patterns book. Code Complete, The Mythical Man Month, and Patterns of Enterprise Application Architecture are some other books you might want to look into.
Don't forget about Java EE and the other frameworks. You've got dynamic websites (Servlets and JSPs), database applications (JPA and Hibernate), EJB 3, CDI (WebBeans), etc. You might want to start with the "Java EE Tutorial" that is on the Sun/Oracle website. Start with either Java EE 5 or 6. You'll need an application server; for EE 6 this will be GlassFish, for EE 5 you could use GlassFish or JBoss AS. There are frameworks that are outside the official standards like Spring and Struts.
You also might want to look for a local Java Users Group (JUG) as they present topics that you might find interesting.
My Hello World is 512 bytes. But it's also a valid Fat12 boot sector, Fat12 file reader, and Pmode routine.
There are several very important books: 1. Effective Java - Joshua Bloch. This is by far the most important one. 2. Java, Concurrency in practice - Goetz 3. The art of multiprocessor programming - Herlihy and Shavit. This is much more theory oriented, but essential to become an excellent multithreaded programmer. 4. Java Puzzlers - Joshua Bloch and Neal Gafter. This is quite a fun book - lots of Java Conundrums Enjoy!
The only real way to learn a programming language is to use it in a real project. Come up with something you've always wanted but can't find and make it happen. That's the great thing about programming. You'll learn more doing that than you ever will from a book.
My assumption is that at some point you'd like to try to make a living as a Java developer. If that's not the case, please disregard this post.
How much do you know about databases? If the answer is nothing, you'll want to get up to speed on at least basic SQL. Pretty much every Java project you ever work on in the business world will make use of a database. 80-90% of the syntax is pretty standard from database to database, although nearly every professional Java project I've worked on used Oracle.
While not every Java project is a web project, it wouldn't hurt to have a basic understanding of HTML, CSS, and at least one web server commonly used to host JSP such as Tomcat or WebSphere. Even if these pieces don't end up being your job, the basics are helpful.
There are all kinds of popular Java frameworks meant to solve different problems. Try to get a basic sense of what's out there and what each of the leading options is good for, e.g. that something like Hibernate is used for data persistence and something like Java Server Faces is more of a presentation technology. (Or whatever's popular now; I haven't worked a Java project in a few years and I'm starting to get out of date.)
Probably you also should start to learn one or more of the common Java IDEs. Eclipse is near ubiquitous, but you may prefer one of the other options.
Good luck!
Why not look to a site like rentacoder.com and try to pickup a small project? You can do it to make money or you can simply do it to gain experience writing software for other people. This could be a great way to start building your programming resume if you decide to become a full time java developer after completing school. If you were able to successfully complete a few projects before graduation they'll certainly become interesting talking points on your resume and help to set you a part from the other recent graduates. In a tough job market anything you can do helps plus you'll get a chance to see if you really want to work as a programmer without having to commit to a full time job. It will probably be one of the few times in your programming career where you get to pick and choose the projects you work on.
The best stuff to read after you think you've got the basics are anti-patterns which show you what not to do. A lot of that stuff can be quite eye opening to read. One of the best books on that topic is Effective Java by Joshua Bloch. Also, search the web for sites like this one: http://www.odi.ch/prog/design/newbies.php
Also, not a book per se, but if you do write some code it's possible to learn more by analyzing the code with tools like findbugs which will show you a list of things wrong with your code. Even professional programmers can learn something from these kinds of tools.
Now you understand the basics, it's time to put them to a test. Reading books will only get you this far, the rest is experience, experience and more experience.
.xml configuration files or plain Servlets.
The more you apply what you've learned, the more you'll discover. If you wanted to create a book indexing application, you'll discover that you'll need to master either Swing or SWT, that you need some kind of storage and learn how to use an flat files for storage or use ORM like Hibernate or write your own SQL queries in JDBC and how to setup a database like PostgreSQL. If you go for an web interface - learn about JSP & containers like Tomcat. Want to do stuff in 3D? Learn how to use OpenGL and the JOGL bindings and read up on basic linear algebra.
Or you could jump from Java to another language. Don't get me wrong - in my opinion, Java is still one of the best designed language, and a huge plus is that you can step through everything to see how it works, right down into the C++ code powering java.nio, but it's a lot of work to get some results on the screen, if you don't count System.out.println(). ActionScript is quite a bit easier to apply, you can get going and write a small game in no time. Python + Django is the perfect web framework for starters, it's almost as powerful but much much easier to learn than JSP+Taglib with their arcane
Once you have seen a few languages and discover their strengths and weaknesses, you'll be able to apply your skills even better. In a digital world, everything is possible. Go create your own future.
The best way to "know" petty much anything is to teach it to someone else. I never knew Calculus III (even thought I had an A in the class) until I taught it to someone else. Similarly working with my co-workers and explaining something that I think is cool, makes me "know it". So go teach Java to your younger brother, your mailman, or Schrodinger's cat.
Find some small projects, and write them in Java. Then do this process again in a few other languages: I suggest JavaScript (bonus points if you do the OO stuff in JavaScript without using classes, and don't worry so much about browser-compatibility), Haskell, and either Lisp or Scheme.
The point here isn't so much to learn these languages for their own sake, though that's a nice bonus. These languages will force you to think about programming in very different ways than Java tends to teach people. This is not to say that the Java way is bad -there are certainly times when it's the most appropriate way to go- but it's only one way to attack a problem, when usually there are many. Being able to figure out how to do these same things in such different languages will make you a stronger programmer in all of them.
...now that you have one of the tools for your toolbox.
As you appear to be realizing, learning a programming language is like having a particular type of hammer. Each computer language you learn is another type of hammer. You don't have to have more than one hammer, but since some hammers are better some types of construction than others - the more hammers you have (within reason) the more flexibility you have in building things.
Congratulations on absorbing some of the aspects of Java, keep shining that hammer and get ready to learn how to build a doghouse. How ambitious you are should determine what type of doghouse you're going to build first (I recommend knocking out a few doghouses before moving on to small sheds.)
A good doghouse to start with would be (with a Java hammmer) a calculator (try an applet.) You have a UI, you have a simple to understand feature set, you don't have to think to much about the spec (this time), and you can leave persistence to your next doghouse.
Doghouse number 2 could be something like a very crude text editor with (if you feel adventurous) a pluggable UI (through the classloader) and one that not only loads/saves edited files, but has undo/redo capabilities, and most importantly saves it settings in an options file of some sort (yes, there are other ways to do this but it is good practice for learning persistence, dirty flagging, the impact of your choices when creating your own little file format, et cetera.)
Doghouse number 3 should be your first foray into network related code. Write a simple GUI FTP client. If you're feeling adventurous, not only make the UI plug-in capable (again through dynamic classloading or through another method if you wish), but make sure that the user can stretch/shrink the UI. Make sure the user has persisted settings/options. When writing your UI code, try to make it possible for the user to switch UI languages on the fly. This means create your own format for loading/saving this language data.
Now, there are shortcuts to pretty much all of the aspects of these little mini-applications, but implement these things yourself. You're not doing these things for the purpose of learning how you should implement a particular feature for a particular future professional application, you're doing these things so that you gain experience in realizing how different aspects of applications meet and interact (especially using a pluggable GUI, this will really force you to separate your codebase better.)
Once you've written a workable little ftp client, you're ready to take those basic construction techniques are start building sheds. What those sheds are are pretty much up to you, but pick something that interests you.
Once you can handle a shed or two, you can tackle a house, analogy beaten into ground, et cetera, ad nauseum.
Like some of the earlier posters said, it's just like becoming a writer. You can have a great typewriter, know all the rules of grammar, have tons of vocabulary at your fingertips, but you MUST WRITE to become a good writer. You do software engineering to become a good software engineer. It's that simple. Stuff will go wrong, you'll f*** things up, you'll paint yourself into corners. You'll make stuff you think is crap, but every single time you do it you make sure that you're learning something about why things ended up the way they did (good or bad.)
Good luck!
Loading...
This might be a bit heavy for somebody as new to programming as you, but Java Puzzlers is a great book for Java devs of all skill levels to read. It's a series of small programs that screw up in ways you wouldn't expect, often related to bizarre gotchas in the design of Java itself. Newbies might not understand every puzzle, but generally it'll give you an appreciation for the fact that no tool is perfect, and insight into what sort of bugs you might find yourself writing in the real world.
Build a JVM in it.
Religion is what happens when nature strikes and groupthink goes wrong.
Design books are good, but I think you may have trouble getting much from them until you go through a few real programs and see what problems can occur that design patterns can address.
One great book if you really want to understand Java at a much deeper level, is Thinking in Java by Bruce Eckel. It's really a great place to start, to understand how to use the language the way it was meant to be used - and that in turn will make your life easier, sort of like not putting your shoes on the wrong feet even though you can technically make it work.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
I agree with you about the shitty code out there. I simply can't agree with anything else you've wrote.
Why do you assume that only people with Computer Science background should be writing code? Your post also just assume that because he is a security guard, that he just should write code that would never see the light of the day. That's plain stupid you know.
The submitter already told me two thing with his article. First is that he truly loves programming, and second is that he is able to self study any language without the need of a course where he could ask many questions about issues he didn't understood.
That's more than I find in many people with a computer related education. Your computer science background can teatch you important concepts, and the right way to do things. It can be a valuable and important background. It can't teach you how to be creative with your algorithms, and how to be smart enough to write complex programs.
Although I get what you're saying, I think it's a bit harsh too. Everyone starts somewhere. Everyone writes crap code when they start. The key thing is, the more you do it, the more you learn, the better you get.
I don't know whether there are any other self-taught coders such as myself who can back this up, but personally I've found that half my learning was done before I even reached university - learning that code isn't about cool routines. It's an operation of keeping things simple, making it so you need to think the smallest amount to understand what's happening. That design is paramount. CS has so far been (a still enlightening) mathematical cherry - but on a cake of practical experience I had prior to university.
So I suppose what I'm saying is that, given enough time and experience I would not say CS is strictly necessary. And at the same time, in some cases, CS as a course actually does a whole lot less than what people think it does. You need to expand beyond the academic experience to be useful, even if you do have CS
From the obviosly start a project or code there are a lot of things to learn from books that aren't java related but are more general for software development.
*learn Patterns, like composite, singleton, factory and so on. *learn the tools available, like maven and ant, eclipse, netbeans *learn project management and UML *learn SCM tools, like git
http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
Grab a piece of open source code that interests you and walk through it. In fact, in contradiction to what some others have posted here, it's better to read other people's code -first- before starting to write it yourself. You'll end up with a much better appreciation for the language and the structure of a program.
You want to look for both 'patterns' in the small ("What does this little chunk of code do?") and structure in the large, e.g. class layout, etc.
Too many people out there produce 'write-only code', just check out http://thedailywtf.com/
Seriously, check out the job boards. During your investigation you will see what real skills employers are looking for in a JAVA developer. You'll find all kinds of interesting terms to decipher and while you are decoding those you will be introduced to other supporting technologies that support a JAVA development environment that employers are also interested in. Then you can also learn about those.
You are obviously going to find a lot of great info here in this /. article and you should pay attention to most of those. However, by viewing the job boards you will notice how certain technologies will be assembled to blend with one another.
If you don't plan on moving after your education, look only for companies developing with JAVA in your area and learn about the supporting systems they use so you'll have a leg up on them when the time comes that you are able to make the leap from student to developer.
The bottom line is that by seeing what your potential future employers are interested in will allow you to tailor your education appropriately.
Effective Java, Second Edition, by Bloch. This book is quite unique and can save you a lot of journey time as you travel the path from "beginner" to "expert". I wish it had been available when I started. Caution: it can make you grow a beard and mumble about the advantages of respecting the .equals() contract.
Nobox: Only simple products.
timothy, you are a little bit ambiguous about your high level goals. If your goal is to pass a course which is part of a degree plan of some sort then maybe you can focus on other classes. If you just love java and want to know everything about it, then continue on learning from books, java ranch and slash dotters. If your goal is to get a job writing java sooner rather than later, then start in on prep work to become an SCJP. Many employers and recruiters that can barely spell Java will give you more serious consideration if you are certified.
Im going to assume a java course actually includes coding java... but if its a focussed-on-java type course your probably missing a few very important facets.. So what I would do, in this order is (while trying to avoid system coding as such):
- google java app engine (this is a good one cause it requires almost zero computing resources you own to actually host an application, its good for learning some servlet stuff and has the advantage of not having to learn how to deploy apps into things like tomcat). Its basically just a good place to start for java web stuff but keep in mind, its in the google way.
- Web Apps, i.e. j2ee, java servlets, etc (look at a job ad site and tell me how many ad's you see looking for these - j2ee is no small fish by the way and there are as many ways to utilise it as there are people who code java)
- Now learn some of the common frameworks used with java (struts, etc)
- take a little tour of database and sql, this is pretty critical to alot of java work (mysql is a good, free place to start).
All that will lead you down a path of learning some html, etc, which is a good thing... then:
- Learn some stuff about soap and the various other server-to-server rpc type stuff (quite handy to know)
- Learn some android coding (again from google and ya never know, you might come up with an app everyone wants and never have to find a job cause your rich!)
Next, take a tour of some other languages.... from java you could easily stroll into something like C#, but there are tonnes of languages out there that would give you experience worth having. Ultimately though, with java alot of the time you'll be heading towards web coding. There is some call for gui's and the like but its far less common (though android is making that less true).
What a load of tosh. So you need a CompSci degree to be a professional coder ?
I've just finished a 9 year employment with a company that was based not on degrees, CVs or other paperworks, but on the basis of a successful 6 week freelance project back in 2000. I should point out I'm completely self taught, no formal training whatsoever.
Coding has nothing to do with language or syntax, but upon having an analytical mind. Breaking down a problem into it's bare elements, and knowing how to make those elements work together is everything. There's plenty of CompSci grads who can parrot off the functions and procedures available in NET or JAVA, but haven't got the first clue how to apply those to the problem at hand.
I don't know whether there are any other self-taught coders such as myself who can back this up
Yes there are plenty around to back you up. And I'm one of them. And I do a Pepsi-challenge with my code, with many out there with computer science degrees.
A programmer without sql knowledge is like a fish out of water and not very likely employable. SQL knowledge
and working with databases is a must.
Got Code?
It may be too early in your education to know what you want to do in your career, but I would start looking in to areas where you can specialize. Client/server architecture will always be a skill that looks good. If you want to go this route, look into learning Java Enterprise Edition. UI design is good to know, but with abundance of WYSIWYG editors that are available now, writing UIs is becoming less of a skill. UI design theory is still pertinent even if the coding skills are going the way of the dodo. Some other skills that will come in handy are writing web services, database interaction (with JDBC and JPA, both good to know), and multi-threading. I would also recommend the book Head First Design Patterns to get started on learning how to design software (as opposed to just writing software).
I would agree with what a lot of people have been saying, though. The best thing that you can do is put what you know in to practice. Start out writing a small application for yourself. Write unit tests.Do some code coverage analysis on the code and make sure you are completely covered. You can start with Cobertura. Get to know what APIs are available in JSE. I'm assuming that in an academic environment you are using the latest JSE (6), so I would also look into familiarizing yourself with JSE 1.4. There are some major differences between 1.4 and 5 (and not a whole lot of major differences between 5 and 6), and if you are working on legacy code in the future, it helps to know what differences there are. Write an app in whatever you are used to using, write it again with JSE 1.4. Check out an open source project and debug it. Get code coverage on the project and write tests to cover more lines of code. Most OSS projects would be happy to integrate tests that increase their code coverage. Look through the bugs that have been logged against the project. Pick something small, fix the bug, and submit patches. Get familiar with build systems like Maven 2 or ANT. That should keep you busy until next semester.
Writing software is about solving problems. If I were you, I would try to come up with some project that you can build. Coming up with an idea, refining it, and then going through the actual process of working out the inevitable kinks in any technology stack--that's the best thing you can do. Build something big, something where every component forces you to learn some new sub technology. You are now in the Java business. Java is your hammer. Find some problem to solve.
I would say that he is dong his best to rectify exactly the problem you raise. He seems to be well aware that simple knowledge of the language syntax is not enough to qualify to use the language, and is asking how he can rectify his lack of experience. I give kudos to him for being as aware of the problem as this, and more kudos for seeking out a place like /. to learn and to ask the question he has done.
I would say that I am more self taught than academically taught - nearly forty years ago. And I have shipped a lot of systems used by a lot of users by choice, so my code cannot be that shitty.
Consciousness is an illusion caused by an excess of self consciousness.
Have a look at the tests on BlackBeltFactory http://www.blackbeltfactory.com/Home.wwa These tests cover some of the most commonly used frameworks and tools within the wider java environment. Also learning design patterns is going to be indispensable and SQL is a must.
RTFM is not a radio station.
Schools are aware of this and they do try, but IMHO it just can't be done for real in that setting.
Getting involved in an open source project over a significant period of time is a better way.
So yeah, go forth and write code wherever you think it will be cool. Work on an open source project or two that you can point me at, or find a company with an entry level programming position -- there are plenty of them around! Do it because you like it and you'll do all right.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
Good question. Since you are relatively new to Java and seem to pick things up quick, I'd highly recommend picking up Effective Java (2nd Edition) by Joshua Bloch ($43 on Amazon) -- it's not that you have to become a high-performance fanatic, but there is a lot of magic in Java and a lot of abstractions that if you don't understand them correctly can be abused and result in poor performance.
Again, I don't care so much about pushing you towards optimized development, but what the book *will* do, is pull back the covers on the abstraction and "magic" in Java and show you the nuts and bolts all over the place so you understand everything from the high-level concepts (data structures, syntax, etc.) down to the low-level stuff (object creation, garbage collection, interned Strings, etc.) -- this will give you all that "depth" and detail to the learning of Java that will spring-board you forward with learning all the other things in Java.
As you pickup other APIs that might have otherwised seemed totally magical to you (Hibernate/JPA, proxied objects, etc.) you can just refer to the nuts and bolts you learned in Effective Java and go "Oh I see how that works" or "Yea I guess I get how that's functioning" so less of it is mystical hand-waving that just serves to confuse you when you are really down in the guts of some application.
Beyond that book, then you can start to specialize -- meaning you can learn specific APIs and frameworks based on your needs. Like Swing/SWT for Client GUI dev, or JSF/JSP/Struts/Wicket/SpringMVC/whatever-the-hell for web development and so on.
But the book you are reading now and Effective Java will give you that solid foundation to branch out to other areas.
Best,
Riyad
Buy "Effective Java" by Joshua Bloch. Even if you're not quite ready for it yet, read it and make it's rules your own.
Being well-versed in these will up your Java street cred by quite a bit.
My suggestion would be to sign up on the Sun Java Forums (now confusingly branded as the 'Oracle' forums in some places; and looking rather ugly) and try and answer questions that newbies post. Sure, some will be really dumb and some will be of the help-me-get-my-assignment-done kind, but you'll also see questions that make you wonder 'yeah, why *does* it work that way?'. I found that explaining what I already knew helped make the concepts concrete for me, and looking at the explanations that others gave helped me learn new things and new ways of doing things.
Of course, the suggestions that were already given - picking a project and working on and visiting sites like projecteuler.net or topcoder.com and working on problems posted there - are much better; the forums will mostly help you improve your Java skills and occasionally give you some general insights into programming and problem-solving.
Being able to parrot off a language's APIs doesn't make you a Computer Scientist. Being able to write those APIs makes you a Computer Scientist.
Go get Algorithms in Java and implement the algorithms. Not only will you learn about algorithms but simple tasks like this teach you a lot about coding that you can't learn from a book. That would be things like testing, and debugging.
Next implement something!
Good beginner projects are conway's game of life.
Tetris or breakout.
You can also go to one of the programming challenge websites and start working through their problems.
Then you really need to find a project that you want to implement. If not that at least an open source project that you can contribute to.
If you want to work in the real world, writing software, you're going to have to speak to other engineers about what you are doing at a level of abstraction higher than "for loop" or "switch statement". You'll want to talk about algorithms and even more commonly, patterns. You may already be familiar with "tree" and "linked list" so you're off to a good start. But, in the future, you'll find yourself saying: "This is a visitor", "this is a controller", "this is a command pattern", etc. The current "bible" of these patterns is known as the Gang of Four book:
http://www.amazon.com/Design-Patterns/dp/0201633612
That one is a hard read. I understand that a more digestible book is this one:
http://www.amazon.com/Holub/dp/159059388X/
Two other routes you will want to go down is that of algorithms, like you already mentioned, and refactoring. Algorithms are the most common next step in College, so it might be wise to do that before patterns and refactoring, but I don't think either is a prerequisite for the other. But, knowing what "Big O notation" is, and understanding why a divide and conquer sort is so fast is helpful in your career.
Finally, refactoring seems to be the hidden art of writing good code. So few programmers really understand how to refactor bad into good. This advanced topic will be what sets you apart from the other engineers you compete with for a job. This one is a good "bible"
http://www.amazon.com/refactoring/dp/0201485672
The vast majority of Java jobs out there are for J2EE/Java EE, which is server side Java.
There are a gazillion Java web frameworks out there. Two of the most popular are JavaServer Faces (JSF) and Struts 1.
Struts is old, it has been around for about 10 years or so. It is not glamorous anymore, but there is so much code written in it that you pretty much cannot avoid working with it.
JSF is Sun's (Oracle's?) attempt to have a standard framework. You may read a lot of hateful posts about JSF, but personally I think it is pretty good. JSF 2.0 is awesome, but it is also very new and most companies have not adopted it yet.
Learn Enterprise Java Beans (EJB's) EJB 2.x and before was a nightmare to work on, but 3.0 and 3.1 is actually very nice.
Learn an Object Relational Mapping framework. These days Hibernate has the most mindshare. The Java Persistence API is Java EE 5/6 standard ORM tool. Newer versions of Hibernate are JPA implementations, adding their own "enhancements" that are not portable to other JPA implementations.
As a development environment, I would recommend the NetBeans/GlassFish combo for a beginner. This combination will let you focus on developing/deploying code without having to worry about application server configuration and what not.
Expert Java EE Consulting
Because good data structures and their associated algorithms are important, your next step could be to pick up a decent book on them such as Algorithms in Java by Robert Sedgewick. He also has the equivallent books for C and C++.
Java has been open sourced, so you can learn from the people who wrote it. I've found this to be a worthwhile use of time. Knowing what's under the covers, and seeing how professional Java developers implement things can be a valuable learning experience.
Program something for real. Be goal-oriented. No amount of working through exercises teaches you programming for real.
Seconded.
Once one get all the basic and theoretic concepts (tree, lists, classes, whatever), the bast is to start tackling some real-world problems.
Book-wise:
- One might be interested in books which show how some practical problem and real-cases got solved in Java code (Can't point to a good example being not a Java programmer my self, but probably O'Reilly has some interesting books).
- Info about useful classes and libraries might be useful too (because once you start coding your self, you'll eventually need to interface with some programs or access some data).
Experience-wise: (if the night watch jobs allows it) get a laptop with enough power to run a java development environment, and think of a few problems you have that would be easily fixed with some program.
Start with small problems (need some app to store your groceries list ? some app to prepare a series of invitation to your birthday party, using a list of guests as input ?) as long it's a small thing you're fed up doing by hand, it'll be a nice task to tackle with code. Just something where you need to apply the concepts you know to solve real-world problems. (Instead of the "design a doubly-linked list" kind of things you find in assignments)
Then grow bigger.
In the end, once you get some experience, you might want to code a simple game or something similar.
Don't be afraid to go to coders' places such as stack overflow to ask for tips.
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
I understand that you are being taught java, and I am sure there are a lot of java developer job opening. But I have to tell you, as a software development company owner we stay as far away from java as possible and prefer to code everything in C#. Since we along with a majority of corporate business prefer and operate with the Microsoft platform (flame bate?). And even if we are required to write in a Ninux platform we would be using Mono (pretty much C# on Unix).
Other than that I also would agree with a below poster that learning SQL, even if rudimentary, would be of great importance.
All is not lost, java is an decent introduction into C#, and IMHO and easier language too.
Niris,
I have helped teach several people how to program. What you really need to next is apply what you have learned and solve a problem. Ideally, solve a problem that you know something about. Or solve a problem where you have some subject-matter expertise.
I'm not sure if you actually like being a security guard or not. Maybe you do. Maybe you don't. But you are probably familiar with the subject matter. Write a program that will solve a problem related to the subject matter. Using problems that are in operations research are really good ones. For example, a problem I might give you:
Security Scheduling Program for a Business
Purpose
The program should create the optimum shift schedule for a week -- guarding a business 24 hours a day.
Requirements
1) The program must allow for the user to input the number of available security guards.
2) The program must print out the shifts for each security guard.
3) No shift schedule can be over 8 hours long.
4) No security guard can work more than four days in a row.
5) All guards must be used in the schedule.
6) Each guard must have a 30 minute lunch and two 15 minute breaks each day.
7) During a break or lunch period, another guard must cover the watch.
8) If any of the constraints cannot be met -- given the number of guards available -- then the program should indicate that more guards are needed.
This problem is just an example of an operations research problem -- finding optimality. If you don't like this problem, you can make up another one. Or do a search on the internet. The idea is that you find a problem to solve that you: 1) know something about and/or 2) have some interest in.
When first learning to program, the key isn't the language you learn. The key is proving that you can solve a real world problem using programming. Good luck to you.
Try reading Structure and Interpretation of Computer Programs. After reading it you will understand everything more fully than before, while being exposed to a new and elegant syntax.
I think that in order to make the leap into writing real programs, you need to be able to apply OO to a bunch of common situations, and that's what design patterns are all about.
You can either leap in at the deep end with the Gang of Four's book, 'Design Patterns' or try something a bit more accessible, like Larman's 'Applying UML and Patterns'.
The latter book is what helped me jump out of a severe procedural rut, and finally grasp OO.
Java is fairly common and you should spend some time writing programs in it, but the next step is to learn another programming language. Since Java is object oriented from birth, uses strong typing and is a compiled language (somewhat), try the opposite: a language that does not assume that everything is an object, doesn't impose strong typing and is a script language. Like perl, lua or python.
Try Code Complete. It's still just reading (as opposed to implementing, which is invaluable), but I get the impression reading is possible during your shift but probably not actual coding. Code Complete will improve your skills as a developer immensely.
Savitch's book is superb as a textbook. You won't find many other books that are that good. The two things I'd suggest learning about are data structures/algorithms and design patterns. For the former, there are a lot of text books, but the good ones are advanced and expensive (for instance, Cormen, Leiserson & Rivest, *Introduction to Algorithms*), and the inexpensive ones are poorly written. You might try the O'Reilly book "Algorithms in a Nutshell*. For the latter, there are a number of books - a good intro book is *Head First Design Patterns*; the book of books is the so-called Gang of Four book that introduced the idea, *Design Patterns* by Gamma, Helm, Johnson, and Vlissides.
I can back it up by being a high school drop out that busted his ass for the last 16 years to build the experience and reputation that now has managers and companies fighting over him. I have yet to meet anyone with a CS degree outside of scientific positions where that degree was worth more than if they just spent that amount of time teaching themselves how to do it and getting the entry level jobs. And contrary to the seemingly popular belief among fresh CS graduates, an entry level job is still all they are qualified for.
As to the submitter's question, my honest answer is to forget the syntax. What you really need to understand is the underlying logic of how and why to do things. Once you have a strong basis in logic, languages just become syntax and you can pick that up in a matter of days when the need arises. It also allows you to better recognize when a given language isn't the right tool for the job.
My suggestion would be to join up with a local programming group or two. Find yourself an experienced mentor that can give you some tasks and help you work through them. As a new programmer judging who might be a good mentor will be difficult, but I would say first and foremost to trust your gut. A good programmer will also be one that makes their code look clean and simple even in complex situations and has logical and rational explanations for why they did something one way rather than another.
...if you do want to _read_ something, and to go beyond your knowledge of Java as a language, try Grady Booch's "Object-oriented analysis and design". Not very new, but very useful, and language-independent, too. (Did somebody else mention it? Too lazy to go through all comments...) http://www.librarything.com/work/174920/details
Mostly harmless.
I'm not trying to be mean or disrespectful to AC, but there a re a lot of pompous assholes which, when asked 'I've learned such-and-such, what next', ramble on about how how totally useless you still are, which is both uninteresting, mean, unhelpful, stupid, and not the question.
I've spent more times listening to castrative bullshit spewed out by people with an ego and idiocy like his than I have having constructive, interesting conversations.
The Cloud - because you don't care if your apps and data are up in the air.
I can recommend the book "Head first design patterns". It teaches you to design object oriented software, and all examples in the book are written in Java! I also recommend you to read about software engineering in general and relationships between objects etc.., then of course, be creative and start coding something. I would recommend you to start building something in a nice framework for implementing GUI apps.
Coding has nothing to do with language or syntax, but upon having an analytical mind.
Apparently, English is the same way.
"I don't care about the Constitution!" --Bill O'Reilly, November 17, 2009
For a beginner in Java, I would suggest learning how to use a nice free IDE like Eclipse before attempting to write too much code. Knowing how to step through code with a debugger instead of dropping in System.out.println() everywhere, open call hierarchies and declarations, getting inline javadocs by hovering over classes and methods, content assist to give you a list of all available methods... knowing stuff like that will allow you to learn faster and make writing your first apps immensely easier.
Next Book = Effective Java 2nd Edition by Joshua Bloch
A quick look through the posts shows a number of people mentioning algorithms which is important, but before you get started you may need a better understanding of the different types of data structures and their efficiencies.
All too often, Java programmers have no idea what it means to be running within the JVM. They don't understand how the garbage collector works (just that it does, but it doesn't always does it?). They don't understand the differences between the different gc models. There's very little understanding of what the difference is between the various generations in the generational garbage collector, or what the difference is between native heap and vm heap.
Also, understanding how the JIT compiler works, how the Java threading model works, and how to write thread safe code. Also, just because code looks thread-safe doesn't mean it is without appropriate uses of volatile keyword. Learn why the doublecheck idiom isn't safe until Java 5 and higher.
There are alot of people out there who can write Java code. By understanding the VM, you can hope to write better Java code.
Coding has nothing to do with language or syntax, but upon having an analytical mind. Breaking down a problem into it's bare elements, and knowing how to make those elements work together is everything. There's plenty of CompSci grads who can parrot off the functions and procedures available in NET or JAVA, but haven't got the first clue how to apply those to the problem at hand.
Having an analytical mind is only half the battle. I know lots of programmers whom started with COBOL and now work in a J2EE environment. They can break a problem down to it's bare elements and know how they work together, etc. What they can't do is basic best practices. They don't know how a hash map works, they don't understand exception handling, they don't understand encapsulation or really anything OOP. While having an analytical mind is important, I think it's silly to say that having a knowledge of the language itself "has nothing to do with" it.
As I a little project I've built out the site http://javabat.com/ ... it's about having lots of little online problems for code practice. arc
Big architectural ideas are important, but javabat just helps you build the basic but critical loop/logic/array/string skills. There's also a big section on recursion.
First of all, congratulations on taking charge of your life and deciding to learn a new and potentially valuable skill!
Java is a decent place to start, but Java is quite a lot like scripting. You never get down to the hardware, almost everything is done for you. By know you should understand the basics of looping and branching so do yourself a favor and see just how deep the rabbit hole goes.
Now here is what I suggest. Go find an OLD computer someplace, perhaps a 386 or something like that and get a copy of DOS of some flavor. Pick up a book on C ( I recommend K&R ) and a book on assembler ( beginners level. Lean some low level coding. You might also pick up a used copy of "Data Structures, Algorithms, and program style using C" by Korsh and Garret
I recommend this so you can have a decent understanding of how the machine works. Hi level coding in Java has many many degree's of separation from the actual hardware and IMHO a lot of "programmers" never learn this stuff and in doing so never really understand whats going on and so are lost when things don't really act like they expect.
Understanding how the machine works will serve you well as you progress.
Hey KID! Yeah you, get the fuck off my lawn!
When the number of items is small; when insertions and deletions are common and/or time-critical; when ordering is important...
Any of the above could alone be good enough reasons to use a linked list vs. a hash table, and obviously more than one criterion would make a stronger argument. But this is a very one dimensional discussion; in any of those cases, perhaps an array or an ordered tree would prove more appropriate... each case must be matched to a particular data structure on its own merits.
To understand how much of Java _actually_ works, you have to understand the software it's written. Start with "The C Programming Language" by Kernighan and Ritchie.
When you feel more secure about both languages, and have increased your employability by a factor of 3, I suggest you learn how _not_ to do several of the extremely bad practices common to Java programmers, such as redefining functions of the same name locally, and making the same function name do different things with different capitalization.
I've met plenty of programmers with advanced degrees in Computer Science who couldn't tell me how to implement a linked list,
That's covered in a freshman Data Structures course these days. Where did they get their degree from?
Don't thank God, thank a doctor!
As you read these books, come up with a hobby project where you actually implement something.
After Learning Java Syntax, What Next?
Hmmm, depends on what your goals are as you pursue your studies. The best thing (usually) is to write code that is sufficiently large and complex. However, that usually only happens at work or when taking classes beyond the 3000-level (assuming a good school and instructors.)
For n your case (studying part-time while working on a non-programming job), there are a few things I would recommend you to pursue (which I would recommend to any full-time or part-time student.). These I recommend based on my Java experience (10 years out of 15 in development/IT.)
Learn C
It is very hard to be an efficient Java developer without having a good understanding of explicit resource allocation management, and concepts such as passing by value and passing by reference.
In Java the garbage collector does memory allocation for you, but without a good understanding of it and an object's lifecycle (.ie. when its finalizer get called) and pointers, you can still leak resources. This is perhaps the #1 thing f* things up on many poorly-written JEE applications. Having do to do all that crap by hand, specially in C, that will open your eyes on how much elbow grease the JVM does for you. It will help you learn to spot poorly written Java code.
Also (and this is based on observation), it is hard to truly understand Object-Oriented Programming without understanding the fundamentals of Structured Programming and how to write good Procedural code. This will teach you how to spot bad OO code (code that is still procedural or code that tries excessively to model everything as objects.)
Learn Basic Algorithms and Data Structures
I think you are in the right track with this. It would be good if you can learn these in a procedural programming, be it C or Pascal. This is extremely important because a lot of mediocre Java/.NET programmers cannot differentiate between algorithms and ADTs from classes and objects. Algorithms and their associated data structures exist independently of object-oriented constructs.
Learn SQL and Relational Database Theory.
Except for few specialized applications, most Java applications exist to manipulate data on a relational database. There are OR mappers nowadays that do the work for you to map from Java to SQL, but one needs to understand SQL and Relational Database Theory to really know how to get the best of OR mappers.
My 2c.
Job security my man. Job security.
Have some shop hire in a newb that can't write because they're cheap. Six months later they'll need me. And I'll be able to bill whatever I want.
And on the other side of the coin - maybe he's an ace, a diamond in the rough. A colleague just waiting to be discovered. Not everyone I know who writes great code has a degree. I can think of three people that absolutely blow me out of the water - none with formal degrees.
Weaselmancer
rediculous.
Now you must unlearn it.
Specifically, you're going to need to learn how to use verbs again.
Try php. It's got a great function library and you can build webpages quickly and easily.
May the Maths Be with you!
I just don't want him to get the idea that because he took a college course and read a couple books that he's a Java programmer ready for the Big Leagues. These are the kind of people who make it hell for those of us who bothered to get a proper Computer Science background, and then spent many additional years learning our craft. Just because somebody can use a saw it doesn't make them a carpenter, and just because somebody can plunge a toilet it doesn't make them a plumber.
Hopefully he won't have to work with a jack ass like you. I know people with a "proper computer science background" that cause grief for people without a proper Cs background and even those with a proper CS background. It doesn't matter how you learn if you don't take it seriously. People who think you're automatically good because you have a degree are one of the biggest problems.
A degree is very much a good way for most people to learn because they're given structure and can be forced into doing things right but in the end it doesn't mean shit. You still have to see what the individual can do
I would suggest the guy get the Algorithms book (have it myself it is decent) and as well books on design patterns and UML. But most importantly he just needs to start bashing out lots of code and once he's comfortable working with himself he needs to get into a team, whether by starting his own for a project or joining an open source project so he can get experience working with others which a lot of self learners can struggle with because it can be quite different.
But he's definitely got to start writing lots of code. This is what a lot of people miss out on. Especially those who think "Ok, I've got a degree now, give me $100,000". Everyone needs to get their hands dirty and all sorts of mistakes to learn from. Degrees and books can't cover everything and those alone won't make you an top notch programmer.
I am aware you mentioned spending years afterwards learning the craft but face it, everyone needs to start off somewhere and yes inexperienced people can make more mistakes but again those mistakes are what will help them improve. I would hope you're giving people some insight to how their mistakes can be avoided rather than just fixing them and saying nothing because you're not helping them or yourself.
As a counter-example, I one worked on a program written by someone with a Ph.D. in Computer Science. The code was supposed to control a very precise machine operation quickly, and in real time. The program could be used as a perfect teaching exemplar in how to write top-down code. The main control loop, the very deep subroutine nests were beautifully crafted. The program could also as easily be used as a perfect teaching exemplar in how NOT to write machine control software. The mechanical design was borked from the beginning: a desktop computer was controlling an in-machine plc, the two splitting up key functions in a truly schizoid manner. The OS was Windows 95. WRONG. The language was Visual Basic. WRONG. From start to finish, the project was total crap. The man responsible for it theoretically knew comp sci. He just didn't understand how it worked.
I think we're missing the big picture. Where are you a security guard? I think we'd all like to know what gets guarded at night by people reading Java books :)
You can start working on some open source software. Spring RTS is a great way to get started. Or make your own text editor.
I made a couple of apps for the G1 and I found it very educational. I agree with most of the replies in that I took a bunch of CS classes a few years back, but nothing compares to writing code yourself. The cool thing about making an Android app is it's almost completely the same syntax as Java and you can make money from it. Android is getting really big now and it definitely wouldn't hurt for you to get well versed in it anyway and it will help you better understand Java as well. One very important thing with Android is it's little more of an issue with make sure your apps run on multiple devices whereas with Java on PCs, you might take that for granted. At least I know I did. Also, you have multiple inputs for each phone and it is very easy to get started and there are a ton of examples and forums for help with your code.
I can 100% back you up. I've been coding for over thirty years, in everything from Z80 machine code to C#, written compilers, you name it, and somewhere in those thirty years I took a required semester of Pascal.
Write code. Read other code. Decide if it's good or bad. Take the good, excise the bad, write code and read code. Someone up the chain said, "typing, lots and lots of typing."
Learn algorithms and data structures (I'm a mathematician, I have to say that). Sure, there's libraries to do the scutwork, but you have to decide which structure is going to work for your problem.
You save only 59 seconds over 8 miles by going 75 instead of 65. Do you really have to pass that guy? Do the Math!
You sound like a quick study. Go buy a copy of "Introduction to Algorithms" by Cormen, Leicerson, and Rivest (yes, *that* Rivest). It's a very, very good book. But, make no mistake, any book on algorithms that is easy is a bad one, and this one, while clear, is difficult because there are some algorithms, some very important ones, that are hard to understand. Pick up a used copy from Amazon.
Put my fist through my alarm clock with its ding-dong death inside my ear. - The Blackjacks.
Go to http://freshmeat.net/ search for "Java", find a java project that interests you, download the source -- see if you can understand it & get it to run, contact the author to see if there is anything you can work on or tweak.
Port Nethack (http://nethack.alt.org) from ANSI C to Java?
Build an Android application?
IOW -- find a way to apply your knowledge. Program a little every day -- just for the fun of it.
The most complex piece of Java (or any other language for that matter) I've ever worked with didn't have a single line of JDBC, SQL-whatever. There are a butt-load of scientific and real-time applications out there that don't have a DBMS anywhere in the code tree. And, if I'm on the hiring committee, not one of my big concerns for the things my company does (defense-related).
That said, DBMS-oriented programming is useful, but the world doesn't revolve around it. And yes, I have at one time taught it and programmed it (DBMSs, that is), so I'm not a "diametric myopic" here...
Right! Just because you have a degree doesn't mean you magically crap daisies and good code. I've met plenty of programmers with advanced degrees in Computer Science who couldn't tell me how to .
I feel the same way when I'm hiring guys with Microsoft or other certifications. If they can't answer basic questions, I don't hire them. I had one guy claim he knew Server 2000 really well even though he had an MCSE and less than 1 year of experience. I called his bluff by pointing him to a computer that was blue screening on boot and asking him to fix it. This MCSE twit didn't know how to boot in safe mode. For what I needed, I'd much rather have the guy with lots of experience.
Learn to use Apache Ant. When I was in school they didn't cover Ant at all, it wasn't until I got in to the "real world" that I encountered Ant.
If you learn ruby (& probably rails), when you go back to Java, you will write better code.
And you will miss ruby :)
In other order of things, guice might be a nice addemtum for you.
Effective Java and Java Concurrency in Practice. These are a must have for any serious Java programmer.
In a real emergency, we would have all fled in terror, and you would not have been notified.
201 principles of software development http://portal.acm.org/citation.cfm?id=203406 I found this useful. Cheers, and good luck!
Where there is the necessary technical skill to move mountains, there is no need for the faith that moves mountains.
Try learning more about what goes on behind the scenes. The syntax is one thing, making useful code is another. Making EFFICIENT useful code is yet another.
I've never been a huge fan of Java because it does so much for you, and you never really understand what's going on behind the curtain. Worse, unless forced to, you never have to deal with or think about resource allocation/deallocation, I/O access & caching, and the other things the JVM is doing for you or hiding the real details of.
The amount of time I've seen Java coders, who never coded in anything but java, spend DAYS trying to figure out why their program keeps having 'spikey' peroformance only to eventually realize it's the garbage collector, and then spending weeks more trying to figure out how to minimize the 'damage' without having their application's resource usage go through the roof by either disabling it or reducing it's frequency to unacceptably long times.
Of course, if you don't care about efficient coding, then none of this matters as much, but the point is - if you understand what is going on behind the scenes, you can either avoid or mitigate these problems ahead of time rather than spending weeks trying to figure them out, then weeks more trying to figure out how to minimize them without having to re-write large portions of your code.
If you want to USE Java in an actual job, you might look at the industry you're wanting to be in. By far the most interesting use of Java (to me) is in Android app development. And, like everyone else said, start writing actual code. There is no substitute for that.
I'm taking Java this semester and we're moving on to Data Structures.
This is the book my class is using. It's written by my professor and it seems pretty good.
-jX
Don't you just love politics? It's like a comedy of errors.
Read Plauger's Programming on Purpose series.
Then pick up another language. If you want to stay within the jvm universe, try jython or scala.
Great book, It is exactly what the poster is looking for. Its all about taking the things you learnt as a beginner and improving on them
Look over their, it's a grammar nazi
The first two things I wrote in java were the quintessential '15 sliding tiles' puzzle game and an Othello game. I wrote them in swing. I wrote them not because the world needed yet another implementation, but because it was a fun challenge, and I got some practical experience in writing not only Java, but UI code (in this case, Swing, but the concepts had far wider applicability).
They're still on the net, for what it's worth. Don't expect a lot.
The third thing I wrote was MacXM, though that was in Java/Cocoa. Its follow-up was JXM.
I mention all of this because my advice is that once you've gotten all of that theoretical stuff in your head, the next thing you should do is write something. Even if it's just something for you, it's still something.
The other thing an education in C.S. does not give you is the social aspect of code development, i.e. working in a team.
That's a broad statement, it all depends on where you studied. If your course includes a lot of group work you are going to get a better feel for the social aspects. Then there are those that include industry projects, and even further to that are those that include industry placement experiences. Not all CS degrees are the same.
Learn design patterns and data structures. Good programmers can't live without them.
Coding has nothing to do with language or syntax, but upon having an analytical mind. Breaking down a problem into it's bare elements, and knowing how to make those elements work together is everything. There's plenty of CompSci grads who can parrot off the functions and procedures available in NET or JAVA, but haven't got the first clue how to apply those to the problem at hand.
I agree with most of what you are saying, a degree doesn't guarantee a good coder just as being self-taught doesn't. The core of what i look for is experience, real success in the real world!
How do you get this at the outset though? Of course a CS grad with no experience will be preferable to a self-taught with no experience, even though it doesn't necessarily mean they will be better, so the way to enter the industry is to work on OSS projects, its a great way for someone to get that real-world experience needed to be considered for a professional role. The more real experience you get the less your education matters.
Come to think of it, what was really lacking in all the group projects I ever did in school was that none was large enough it wasn't easier to just do myself, whereas real-world projects you simply can't. That changes everything.
A fair point. The mechanical engineering school where I did my bachelor's degree had a "capstone project" that was larger scale than any of my class projects in CS.
All that said, I don't think it's bad to learn theory in school, and pick up experience later, at work. Most school time should be spent learning things you won't just "pick up" later. And if you really want work experience during school, get a job.
Algorithms/data structures are solid grounding for whatever you want to do; from that point, it pretty much depends what kind of programming you want to do. If you're planning on doing graphical applications, try to learn about GUI programming (if you're definitely sticking with Java, learn its swing/awt graphics API). If you want to make a web-based Java applet, learn the workings of HTTP and setting up Java to interact with a browser. Basically, from this point (after the algorithms and stuff) learn project-specific concepts, and perhaps a broader range of languages (once you know one, it's a lot easier to learn others - the concepts are pretty much the same).
Actually I didn't put it in the article, but I am a computer science major, and have already taken the two courses on syntax and whatnot for C and C++ that are offered at my school before I transfer to get into the major courses. Only the C++ course was required, but I took the others for fun. Have also taken circuit boards, web development, javascript and up through differential equations for fun.
What's your end goal?
Algorithms are good - learn that stuff, at least the basics.. then implement them in java. Then go and learn how to implement them in a few other languages, so you get a feel for what's common, and what's just unique to java.
you could hit up some of those automated online programming contests that are always running - they run hundreds and hundreds of problem sets and let you solve and submit code, of all kinds of difficulty levels - challenge yourself to solve those in various ways and you'll learn a lot along the way.
Come to think of it, what was really lacking in all the group projects I ever did in school was that none was large enough it wasn't easier to just do myself, whereas real-world projects you simply can't. That changes everything.
I certainly can't disagree with that.
Around here we call those folks "highly educated idiots".
>>What a load of tosh. So you need a CompSci degree to be a professional coder ?
Sort of. The process itself of having someone look over your code and beat you over the head when you do Common Mistake Number 12 is very valuable.
In a particular bit of irony, Walter Savitch (author of TFA's textbook) was my professor for intro to computer science, and we beta tested his C++ textbook (the one before his java one). We got (nearly) free books, and I got a job working as a professional coder after just two quarters in his class. I'd been programming all my life, but having experienced TAs look over my code was very very helpful.
Good books on how to actually program are few and far between. You get syntax, libraries, design patterns, and project management but how to sit down and really write this kind of program or that kind of program is rare. It's a lot more complicated to write a fully functional game or enterprise management system than anything you learn in school and often learning takes place as trial and error and by looking at other programmers trial and error code. Learning the right overall structure is very domain dependent and can be tricky. Writing code is a good start but it's a slow way to learn.
At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
A lot of the bad code I've seen was from CS majors. They take a lot of classes but don't spend enough time writing code. They don't learn their history and keep recreating the same thing. Overall I'd rate CS majors as about the same as anyone with an equivalent hands on experience. Any craft needs years of study and practical experience before you can be a master. Even then it's as much art as anything. You have to have a feel for it.
At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
I always despair of this young'uns who ask about their programming careers while talking about a particular language. Until you're close to language agnostic, you don't have a programming career.
Go learn why Java sucks. Go learn why every programming language sucks in some (or many) ways, so you can choose the right language for the task.
Then use some other languages to actually do things.
No the next language should be radically different and preferably be one which does not employ { and }. You learn from the differences not from the similarities.
For a beginner I guess it might be better to start with the associate test. The programmer test is the biggest of the lot.
If, by reading all of the material and going through all of the exercises you have thus far, you are preparing to write a test... congratulations, you're probably finished learning what you need to know. If you're preparing to get a job, you have some work ahead of you. I've been writing software professionally since 1997 (not as long as some, but long enough to impart *some* knowledge.) The more time you spend trying to solve real problems by writing software, the better you will become at doing just that. Having knowledge of an API, system, class library or a language's syntax will never compare to actually doing something useful with that language.
When you get out of school you'll end up running into languages you've never worked with before, didn't spend any time learning and you will be able to pick up their syntax in a very short period of time (for me, recently, it's within hours.) Learning the gotchas of each language/platform combination can take a very long time. Learning how not to shoot yourself in the foot in those languages can take even longer. If I were you, I would create a project for yourself, define a list of requirements. Then, go through the list of requirements and attach an hourly amount to each one, your estimate of how long you think it will take you to perform those tasks. Then, perform them. Don't necessarily focus on making sure you stay within the time you set for yourself, just focus on providing the best solution per task that you know how.
Your first self-made project might go over the hourly allotment, it may not, but either way you'll be well on your way. The next self-made project you assign yourself should be longer, more complex and involve more features (perhaps additions to the project you assigned yourself the first time.) Practice makes perfect. Also, do your best to try not to be "creative" necessarily, solve the problem, don't try to be a code hero, and you should do fine from there.
"It's here, but no one wants it." - The Sugar Speaker
I've seen web sites that present an assortment of algorithms for the visitor to write in the language of their choice; if someone has a link, please reply with it. However, my first search query turned up an interesting variety of links that are relevant. While I didn't find my objective, I found lots of sites discussing interview questions (hopefully, useful in the future) and reviews of various books (some Java, some other languages).
I echo those suggesting learning a new, different language. I'd suggest Python (which has a varient, Jython, that is written in and is useable with Java) and C (because I agree that it will quickly teach you what really goes on during memory management).
Nothing for 6-digit uids?
unlearn it and learn it again!
Through copious amounts of glue!
8 of 13 people found this answer helpful. Did you?
A favorite book of mine is "Refactoring - Improving the design of existing code" by Martin Fowler. It's probably best read after you've written code for a little while.
You might find "Head First - Servlets and JSP" kind of fun if you're interested in programming web applications. I'd save JSP for later and focus on servlets if you're just starting out.
If you want to learn how to use Java's APIs, you can have a look at Sun's Java Tutorial at this address: http://java.sun.com/docs/books/tutorial/index.html There are quite a few tutorials to cover the basics, and then there is the specialized trails section which you can read when they become needed.
Hibernate makes all of Java worth it. I probably spend most of my weekly swear-word arsenal allotment on Hibernate, but fuck if it isn't the most powerful tool for connecting a web front end to a complex database schema (complex == dozens/hundreds of tables, stored procedures, complex joins, etc.)
It's not Java, but if you're looking for something to read, and you want to learn something in Java, then read this: http://designpatternsinruby.com/
Then, go back and figure out how to do the same things in Java.
You get the bang of learning Ruby, which is kinda fun, you get to learn OO design patterns which are very valuable, and you get the critical thinking of going from one language to another, and figuring out why they're different(or the same).
While Java isn't a bad choice, I don't think it's the best entry-point for someone learning programming by himself. In your case, I think I would start looking around for other options, especially Python. A good mix of book-reading for the pure theory, community-based support for your specific questions, and a LOT of practice is the key.
____
nico
Nico-Live
My job is to code. I had a neighbor that worked in a paint factory. He got hurt, and went to school to learn software. Pretty soon, he's coming home talking to me about UML / Booch and other esoteric OOP topics that I barely had a grasp of. I thought, gee, wow, it is amazing to see how fast a blue collar guy can come up to speed. But then it all kind of fizzled out. And I wondered for a long time why that was. How could someone get so far and be able to recite complex comp-sci topics and then give up?
And the answer is, there are (at least) 2 components to being a s/w developer. You need to be able to think and analyze and understand. But you also need to be able to - and more importantly - slog it out to make it work. And it's that slogging out that - at least in my experience - is where you truly grok the information and become effective and confident and useful.
So, that's why I say 'beware'. You might be having one of those 'I know Kung Fu' moments, because you can understand your textbook. And that is a wonderful thing. But unless you cement that knowledge by actually using it - and in particular, by learning to debug hairy problems - it is at risk of floating away.
I mean, I could pick up a cutting edge cardiology book and, given a few weeks, recite and even talk intelligently about topics that most doctors wouldn't know. I could probably impress virtually all of the population with this knowledge. But, I would be a long way from being someone anyone would hire to cut someone open. Balance your book knowledge with practical knowledge. You need a residency.
Does it hurt to hear them lying? Was this the only world you had?
add them to the luggage - on the current state of the market only Java is not going to get you a job. write a toy j2ee app with all the mvc buz in it - keep on the standards so that you learn the core - jsp, servlets, jdbc, leave the candies like spring/hibernate/struts/wicket for the icing at the end of handling the core like a pro.
"find a company with an entry level programming position -- there are plenty of them around!"
Really? Where? 'Cause I've been looking.
NEED JAVA DEVELOPER
Must have:
- 5+ years development experience in professional environment with Java, J2EE, JSP, and JDBC
- Professional experience with Oracle RDMS.
- Intimate knowledge of EMS/SAP/WYSIWYG/BLAHBLAH/$WHAT_OUR_VENDOR_SELLS systems.
- Previous experience working in $METHODOLOGY
- Bachelor's degree in Computer Science or related field.
Even if they are hiring entry-level programmers, nobody says they are. How does one get "5+ years professional experience with $WHATEVER" if there's no one hiring that says, "Look, we don't care if you've used whatever API, just so long as you can learn ours pretty quickly."
I don't believe in time. It's a grand conspiracy designed to sell watches.
Oh noes! Someone wants to improve themselves, quick change professions!
As to the submitter's question, my honest answer is to forget the syntax. What you really need to understand is the underlying logic of how and why to do things. Once you have a strong basis in logic, languages just become syntax and you can pick that up in a matter of days when the need arises. It also allows you to better recognize when a given language isn't the right tool for the job.
Well, it's not JUST syntax.
A *good* CS degree, would teach you the lesson, that different languages, require different approaches, to use them *well*.
It's easy to "learn java syntax, and write java code".
it is actually somewhat difficult (judging by the amount of FAIL out there) to write non-trivial, speedy, and *efficient* java code.