This past semester I took intro to object oriented programming in java and next semester I will be taking computer science 2 with java which is basically learning about various algorithms and data structures implemented in java such as linked lists, binary trees, etc...
What are some ways that I can reinforce the knowledge I've learned in my intro to object oriented programming class while still preparing for next semester of algorithms and data structures.
There's a good website that helped me get into java which is called CodingBat. => It even contains an online compiler to check your solution against some testcases.
After being "done" with codingbat, I started on ProjectEuler - this one contains the real badass problems :D
I highly suggest checking out those pages.
Edit:
Those problems weren't related to the real-world problems I encountered until now. But they surely helped me thinking about code in a different and efficient way.
Coding issues now seem like puzzles to me. Which immensely motivates one towards a goal.
You can do some programming in java.
These are some interesting problems, so you can solve these problems in Java in order to improve both Java and Algorithm knowledge
Project Euler
TopCorder is another good place to start. Just go to algorithm section and launch topcorder arena. Moreover it has some nice tutorials about algorithms.
Good Luck
From easy => difficult:
learn/code linked list
learn/code graphs
learn/code about red black tree
I see you want to improve your OOP skills and not the problem solving skills. My best suggestion is below and in that order
General Responsibility Assignment Software Principles or GRASP
Practical API Design: Confessions of a Java Framework Architect
Related
To tell the truth you require some advance Math knowledge and java fluency to understand what I am asking for!
Column generation is an technique for optimizing some task related to patterns finding.
In programming, we are addicted to solve some problems by finding all the possible occurrences and choose the best solution from it.
But it is much time consuming thing.
When dealing with a large number of data set the time required will be 2-3 day unless we don't have a super computer.
But, I do some research on it and found something called COLUMN GENERATION in linear programming.
If there are someone who implemented it in java please guide me!
(Usually I use JOptimizer to develop my linear programming related apps)
Sorry if this is a strange question, and thank you to everyone who takes the time to consider it.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Learning to write a compiler
I know this is a broad question to ask, but where could I start learning how compilers actually work, how programming languages are made, I mean not how you use Java or Ruby but how people actually are making them. I will not try to replicate these languages in any ways but I want to understand the concepts and theory behind it. So what I need is either some directions on what I should search for, or even better and more appriciated are book recommendations.
Regards,
Jonathan Nash.
You might find Lets Build a Compiler by by Jack Crenshaw an interesting introduction.
Kept very simple and focussed on building actual functionality.
Compiler Constrution by Niklaus Wirth is pretty good and available for free from the link I provided (yes, legally). It's a bit old and uses Oberon for the examples but is easy to follow.
Create Your Own Programming Language by Marc-André Cournoyer is available online for USD 40 and consists of an eBook (including exercises and solutions), source code for two example languages (one in Ruby and one in Java) and a screencast on extending the JVM based language. This is probably the most newbie-friendly introduction you can find on the topic and afterwards you should have a pretty good idea about the steps involved (tokenizing, parsing, lexing etc.) and can continue your research with the provided links. It's a bit expensive, but IMHO it's worth it.
While not primarily a learning resource, the CoffeeScript web site has a section called "Annotated Source", which is really helpful in seeing how a programming language works. CoffeeScript's author started working on it after he read the book I mentioned in the previous bullet point btw.
You could take a look at the Dragon Book:
Compilers: Principles, Techniques and Tools by Aho, Lam, Sethi and Ullman
I've greatly enjoyed Language Implementation Patterns and learned a bunch. I wish I had read it before trying to implement a DSL some years ago.
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
OK I am not only new to concurrency in java but am also fairly new to java programming. I tried understanding concurrency from The java tutorials, tried reading Concurrency in practice but it seemed too advance, so tried reading from couple of other books: SCJP A comprehensive, The java programming language 4th edition.
Its as if there are things which just don't add up or make sense, I am not able to get the why's and how's and form the correct pattern of conceptual understanding. I apologize for describing this exercise in futility. But can someone please recommend good reading materials and/or ways to learn concurrency in java.
but am also fairly new to java programming
Leave the concurrency book aside for a few months and go ahead with reading a basic Java/SCJP book and practicing basic Java a lot. Create so now and then a Thread or Runnable as per the book's instructions. Play around with it for some months until you get a good grasp on it. Then continue with the concurrency book.
Learn walking before running, else you're crawling instead of running.
This sounds like you will soon be tested (class? certification?) "on Java concurrency". You have not experienced the cycle of running into a problem naturally, thinking about how to solve it, and turning to concurrency for a solution. If this is the case...
(1) Don't blame your brain. Rather, take a step back and start thinking about problems that interest you. Write them down. Internet applications are a good place to start. For example-- writing some sort of Internet server that can handle multiple connections from different users, like a game server. Or, a stock trading program that has to handle your robot's orders at the same time as processing information from the broker.
(2) Think concurrency. Now that you have a problem that interests you, and thinking of concurrency simply as multi-tasking, draw a diagram of actors/programs with arrows representing how they need to communicate with each other. Sketch out a dummy-skeleton code. You're not actually going to write a game server; but you can make a simple skeleton class library with simple, empty member functions like connectToGame(){}
(3) Now you're ready. Run a hello-world thread example or two. Flip through your books or browse the Javadocs and see the different concurrent structures that are available. Think about which ones you might apply to your problem. Don't worry about making the "right choice". You will soon find out if you've got something that works.
(4) Embrace trial and error. There is another word for it: learning!
Now, after you get some experience doing this, you'll be able to pick up a Java concurrency book and read about someone else's problem.
Hang in there and don't give up.
My favorite learning Java Book which has a great chapter on concurrency is:
Sun Certified Programmer & Developer for Java 2 Study Guide (Exam 310-035 & 310-027)
It's a difficult subject, nobody has full grasp of it, not even those who designed it.
Many people understand only a subset of it. If you only know a few tricks/patterns that you can use in your programs with confidence, that's good enough. From there you accumulate more and more.
A novice may only know that he can add 'synchronized' keyword to methods. Amazingly that solved a lot of problems and performs just fine, even if he has no idea what he is doing.
To add my two cents worth: concentrate on learning the concepts of concurrency first, rather than the machanics of actually using it in any particular language. If you get bogged down in language constructs it'll be all that much harder to get a high-level understanding of the subject.
To this end I would recommend How to Write Parallel Programs by Carriero & Gelernter (free & legal PDF download). It strikes a good balance between describing the concepts and providing concrete code examples, and doesn't get bogged down in theory. It's actually very readable and entertaining (or maybe that might be just me).
I feel like I understand concurrency backward and forward. Recently, I grabbed a book off the shelf in our office and found it was VERY good. Not just at concurrency, it gives great coverage of Java as a whole.
Introduction to Java Programming, Eighth Edition: Comprehensive Version, Y. Daniel Liang
However, most of my understanding came from experience working with code, tackling problems, and trying examples. I never truly understood threading until I did it.
Concurrency is complex and most people won't get it just from reading. Look through the API and write some test programs to try things out. Whatever book you choose, try to not just read the code, write it out and run it. After a day or two, working with it, you'll have it mostly figured out.
I'm working with someone who's looking to get back into programming after several years of IT support work. They know all the iterative programming basics and have used them frequently, but their only object-oriented programming experience was in college. The goal is to come up with a decent-sized project that is good for illustrating and practicing OO concepts. Has anyone ever used or thought of a good problem domain for an introduction to OO? I'm looking for a domain where concepts such as inheritance, abstraction and polymorphism really make sense and provide an advantage when modeling with the classes.
Of course, I did some googling and found the popular ATM and Address Book OO examples. They're both pretty good, but ATM is a little more complex than what I'm looking for. Address Book may be decent, but I think it might not be complex enough, or a clear enough domain for modeling objects. The goal is for the project to take a decent amount of effort to complete, not something that can be completely done in an afternoon or two.
As for implementation specifics, the project will be implemented as a Java console app with a minimal UI. Learning the OO concepts and how to implement them in Java is the primary purpose of this app.
How about a text based adventure game?
I like casino game simulation. Simulation is one of the application domains that lead to the development of OO programming. Casino games are relatively simple but with some sophistication.
You can look at http://homepage.mac.com/s_lott/books/oodesign.html.
Along the same lines as address book, a general catalog (cds, books, dvd, equipment & so on). The idea here, you have a base item that is extended by all the other types (inheritance) and each one can implement a specific interface for display and other purposes (polymorphism).
When I've taught other people how to understand OO-principles, I've asked them to relate to OO-programming as if they were building a house. A house has everything you need.
I have my first ever interview for a Java developer role, specifically RMI, Serverlets and JDBC.
However, it has been a while (2 years) since I have done any Java coding. I am sure I still have it up there somewhere and I do remember the Java syntax
I wanted to ask how can I re-fresh everything in 2-3 days specially the OOP concepts (polymorphism, inheritance) specifically to Java?
Any links, references and tutorials appreciated.
I am new to this site and I see there is a preference for programming related questions, hope I can get away with this!
Would also appreciate those that know any Java interview questions so I can go through them and test myself.
Thanks all
I'd suggest you you test yourself, e.g. on Java Black Belt, which has a good question base grouped by categories and detailled explanations for your mistakes.
I'd also recommend (re-)reading Sun's Java Tutorial and (longer) Thinking in Java by Bruce Eckel (3rd edition is free to download).
Tutorials on RMI
Java Servlet Technology
JDBC Tutorials
OOP concepts (polymorphism, inheritance): Head First Design Patterns
Java Interview Questions
How about this. Take a certification guide. It will save you a lot of time, and give you an exercise after every chapter (might give you some interview questions). You don't need to bore you down to death by teaching yourself in a wordy way, what you might already know. The best would he Khalid's Java Certification Guide. Believe me it would be faster and more effective. Plus give you the skills for appearing in the test for real, if you like to. :)