Reputation: 2638
I'm coming to the end of my intro programming class, we're using java and have been doing command line programs so far, no gui's which I've enjoyed quite a bit. So far in the class the programming assignments have been somewhat challenging but leave me wishing for a bit more. I find myself wanting to write a program when I'm bored but always have a hard time figuring out what to do.
I'd like to know if anyone has any good advice on programs I could write, or work on, at this point in my development to challenge me and help reinforce the concepts that I've been learning in class. The class hasn't been too fast paced, so far we've only covered up through classes and objects(though not yet inheritence or polymorphism) and are working with arrays now. I feel comfortable with all of the stuff we've been doing in class as I had been introduced to it a bit on my own studies before starting classes.
Any advice on things to keep me busy would be greatly appreciated.
Upvotes: 4
Views: 4741
Reputation: 1419
I would strongly suggest doing some web development. Whether Java-based, Rails, ASP is not important but getting intimate with web technology is in my view necessary for a well-rounded programmer. Start with HTML, CSS, then some JavaScript, Ajax, jQuery. Fred
Upvotes: 0
Reputation: 26586
Try your hand at a new project. This could be anything that interests you, e.g. a small game, a simple music player, a basic picture viewer/editor, simple web app etc. Just choose something small enough to be manageable but not too trivial. This will help you get better acquainted with the language and its libraries.
Try solving some of the simpler problems at sites like SPOJ, TopCoder and Project Euler. In addition to coding practice, doing these problems help in getting a deeper understanding and appreciation of problem solving and computer science in general.
Get a good book on algorithms and data structures. CLRS is my favourite, but really any good book will do.
Upvotes: 2
Reputation: 1419
I would strongly suggest doing some web development. Whether Java-based, Rails, ASP is not important but getting intimate with web technology is in my view necessary for a well-rounded programmer. Without web skills you risk getting stuck in the "engine room".
Upvotes: 1
Reputation: 7875
Write a program to pull the HTML source from a URL and output all the hyperlinks, one per line, like this:
Link1 Text: URL1
Link2 Text: URL2
...
You'll learn stuff you'll use throughout your whole career.
Hint: stay away from regular expressions for this. And write it in a bunch of different languages.
VB, Common LISP, Ruby, Scheme, ML, Prolog, Go, ...
Oh oh, or write a command-line program that prompts the user for a semicolon-separated string, and then split the string and sort the values using one of several sorting algorithms and print them out. and you get to code up the sorting algorithms!
So the user inputs hello;world;1;two;3;!
and the program outputs something like
!
1
3
hello
two
world
Upvotes: 0
Reputation: 76725
Here's something fun to try: get one of the "robot combat" games where you write the code that drives a robot, then your robot is dropped into an arena with other code-driven robots and the robot with the best code wins.
For Java, there is Robocode.
There are others, in other languages. It's such a simple idea, it has been implemented many times by many people over the years.
The best games are the ones where strategy is the important part. If you never scan with your radar, you might not see another robot heading right for you. If you spend too much time scanning with your radar, you just sit there and get shot. You need to find the best balance of scanning, moving, targeting, etc. Do you pick one target, chase it while shooting until it is dead, then repeat? Do you drive randomly around in unpredictable patterns, while shooting anything you happen to see? What is the best strategy for a battle robot?
I haven't played a game like that in years. It was really fun; I should do that again. (I've been meaning to learn Java, and I'm planning to use Robocode as part of my Java education.)
Upvotes: 1
Reputation: 15773
I would suggest creating a web-based application. Server-side development is one of Java's primary domains currently, and there are many important concepts that you would be exposed to that are very import and valuable to learn (and often not taught in schools).
Choose a simple data-tracking application that you think would useful to have. A recipe manager, sports stats collector, etc. Choose a database like MySQL to track the data and create a web based front-end to enter and view the data using Servlets. Once you see how painful that is, look at JSP, Spring, and other tools that will make it easier.
If you pick a project that you actually use, you will always have new features and improvements you want to make. This will keep you interested and will drive you to learn more. As you find areas that are repetitive or difficult to code, look for tools and patterns that other people have used to solve similar problems.
Having a real project will also force to you manage requirements, estimate scope, and crate priorities.
There can be a lot of interconnected libraries and many new tools to learn, but if you start with a simple Tomcat server running servlets that read and write to a database and build from there, it is very manageable.
Upvotes: 1
Reputation: 27446
I would recommend Project Euler. It's a great way to exercise your mind, and implementing the solutions in an unfamiliar language is a good way to learn that language.
Upvotes: 9
Reputation: 76725
You might want to tackle a new language. After Java, you could go down in power by trying C (and then try C++ later) or you could go up in power by trying Python. (Or Ruby, if you prefer, or even LISP/Scheme.)
If you try a new language, start by getting a decent book that teaches the language, with exercises. Try out the exercises, and see if they inspire you to do something new.
Once you have learned the basics of Python, you could use the PyGame library to write some sort of simple game. If you do this, you might want to get the book Beginning Game Development with Python and Pygame: From Novice to Professional.
Once you have the game working, be sure to share it with the world by putting it up on Github or some other code-sharing site! (Once you have a working game and you share it, someone may be inspired to take your game and add new features to it. Eventually your game may turn into something big!)
Or, instead of writing your own game, look at games written by others, and see if you are inspired to add new features. There are dozens on the PyGame web site, in various stages of completion.
P.S. Yes, I am pushing Python. I love the simplicity of the basic language and the power of its advanced features. You can use Python for everything from trivial system administration scripts to advanced AI. There are other good languages too, and I'm not looking to start a language flame war here, so if you want to learn something else, that's fine too.
I do strongly encourage you to learn by writing programs, and I do strongly encourage you to try different languages. I've found that I learned things in Python that have made me a better programmer even in C, a downright primitive language in comparison. After years of experience with C, I would not have expected a slower-performing high-level language to teach me cool things, but it did.
Upvotes: 3
Reputation: 76725
One of my favorite books, ever, on programming is called Software Tools in Pascal. This book has you implement a bunch of simple tools that work well together; basically you are re-inventing the basic command-line tools from UNIX.
I recommend you get a copy of the book (Amazon says used copies start at about $4 including shipping) and try re-implementing the programs from the book in Java. If you have just finished an intro-to-programming class you should be able to understand everything in the book; you may not know the syntax of Pascal well enough to write it, but you will find it easy to read.
If you do this, you will write programs that match strings, search and replace, compute keyword indexes, and expand macros. I guess you don't have to write every program in the book, but I do hope you will at least read through the book.
I read this book years ago, before "Agile" practices had been codified, and from it I learned a useful sort of agile-ish method of development. The book calls it "left-corner-design"; you start with some useful tiny subset of the program, get that working, then keep adding features one at a time until your program is done. The book walks you through examples of this.
I feel that much of my success as a software developer has come from the lessons I learned from this book, and I recommend it highly.
Upvotes: 1
Reputation: 1483
I suggest looking for code katas (like these) or programming quizzes. Those are usually small enough to be done as practice and challenging enough to provide a learning experience.
Also, try reading code. Find an open source project that deals with the problem domain you're interested in and have a look at the code other people write.
Upvotes: 5
Reputation: 75235
A typical progression path is to study algorithms and [data] structures. This may seem boring but will provide you with important skill for the long haul. To give you an idea of the kind of stuff this is about, check MIT's Open CourseWare 6.006. You do not necessarily need to follow this class in full (just to give you an idea of what is meant by algorithms and data structures.
Alternatively you can try and develop a game, by leveraging existing libraries, but the risk is that you'd develop somewhat of a superficial understanding of things. (Enough to "glue" various things together...)
To be sure a video game would be much cooler to demo to your boy/girl-friend than say a fancy sort algorithm ;-)
Upvotes: 0
Reputation: 5082
You could look for an interesting open source project that requires assistance and suggest your help.
Upvotes: 3
Reputation: 3767
Work on something visual...it will be more fun. Create a game and use tweening effects. You'll be forced to think about timing, callbacks, handling user interaction...
Upvotes: 1
Reputation: 91806
This might be a huge step, but if you are familiar with Arrays try looking at some Data Structures they are very useful in understanding Java concepts.
Some of my intermediate projects with Java:
Upvotes: 3
Reputation: 8258
Writing a simple game, like sollitaire, maze, etc. is a good starting pointed for many development issues and concepts.
Upvotes: 1