views:

1453

answers:

17

I've repeatedly read that it's great for budding programmers to find a cool project he/she is interested in, so here I am. I'm a beginner-intermediate Java learner and I'm looking for a project to do.

At first I was thinking about creating a simple game (inspired by www.java4k.com) but I found no tutorial that guides me at my level.

What would you guys suggest? I'm also open on other suggestions other than creating a game in Java. Actually I wanted to do a web app but I guess it's to advanced for me. Maybe some day. Any ideas?

Ajushi

+36  A: 

Think of some problem in your life that software might solve and write something to address it. Motivation comes easiest when it's something that you need.

duffymo
Short answer, but quite correct - If you need it, you'll invest the time to complete it...
Hugoware
Well, I'm not sure about that... For example, if he needs a graphical symbolic integration engine, then that would not be a good first project :)
Andrew Rollings
Agreed. I was thinking more along the lines of an on-line address book.
duffymo
yea i think the perl programming language was created that way... ;)
melaos
Graphical Symbolic Integration Engine? No? If it's important enough it'll get done - Hell, I did one over last weekend....
Hugoware
Scratch your itch.
menko
If the "Graphical" here is for "graphical" (i.e. square-by-square) integration method, then it the weekend may be just enough :))
mlvljr
Is that "integration" in the calculus sense? Sounds like 2D quadrature, shape functions, and finite elements would be perfect for you.
duffymo
+3  A: 

Try to create a simple animation, like a bouncing ball. Actually, make a ball moving at a steady speed first. Then make a stick figure that you can move with the arrow keys. Now put a couple of bouncing balls in a window and make a simple game with the stick figure that has to walk past all balls without getting hit by one.

This is a good tutorial: http://java.sun.com/docs/books/tutorial/uiswing/index.html

Jules
That seems cool! How do I do collision detection and such?
ajushi
@ajushi: you look it up on the internet like everyone else ;-)
Steven A. Lowe
If you model the stick figure as a ball then collision detection is simple: compute the distance between the center of the figure to the center of the bouncing ball. If this distance is smaller than the radius of the figure + the radius of the ball then you have a collision.
Jules
I wrote a program like this, and even posted here on SO. http://stackoverflow.com/questions/345838/ball-to-ball-collision-detection-and-handling
Simucal
It is written in java, the source code is included in a link in that post towards the bottom.
Simucal
+2  A: 

For a first project, I would recommend making something that is of personal interest to you. If you have a hobby, try writing something related to it. I always find myself writing stuff related to a hobby when I am looking to try something out on my own time. It allows for you to focus on the coding, since you are most likely already an "expert" on the business logic.

joseph.ferris
I do play NBA Fantasy but it seems difficult to do anything related to it (that's useful).
ajushi
+2  A: 

I would say a game is not the best place to start. It's rather atypical of the way you'd go about writing most development projects. As stated elsewhere, motivation will be your biggest problem, so make sure you are doing something that will be useful to you or to someone else, otherwise, you'll just get bored and abandon the project.

Steve
You have a great point. I just can't figure out what to do. Could you please give some examples?
ajushi
Ask some friends or family if there is some piece of software that they need. Even better, watch them use a computer, and see how they do things now. See if you can see a better way for them to work.
Steve
A: 

Web applications aren't more complicated than any other applications. First, make sure you understand the 'Hello World' applications, then you can:

  1. Try to make a Notepad application. This way you can understand the basic concepts of GUI(graphical user interfaces)
  2. If games are what you want to make, try the bouncing ball first
  3. If web applications are what you want, then try to make one! Start with something very simple. However, keep in mind that web applications have some security issues that need to be addressed. Make sure you protect yourself from SQL injections(this particular type of vulnerability is only relevant if you use databases)
luiscubal
+1  A: 

I always like to make socket applications for my first projet in new languages. (I know it's not exactly your case, I was just saying it). This is some projets I did and really enjoyed:

  • IRC Server / IRC Client / Bot on IRC
  • MSN Client
  • Games, as you said.. Tetris or a small RPG is always nice
  • Email reader client
  • Poker game (Server and Client)

I think all those projects are cool to do and are feasable at intermediate level.

All of those are nice pet projects, but they do not really sound like a good idea for a "first project" to me.If your first project fails because you've set the bar too high, it's not really motivating, so I would suggest something simple.
Wouter van Nifterick
A: 

I believe that programmers are mostly productive when working on a project they personally like and believe in, so I recommend that you look for suggestion, then choose what you like the best.

Personally I like open source software and I always look for open source alternative of proprietary software, if you're also interested in that, theses are some programs that don't have open source alternatives, thus they represent real world examples that will help a lot of users if implemented and will get you a lot of feedback (I think this is what Steve is saying):

As a side note, you can join a pre-existing project, look for one in websites like Sourceforge.net

Lawand
+4  A: 

yea, call a few of your non geek friends, ask them what would be useful to them if you need motivation to do a project and worry that you can't follow through if it's just you who's going to be using your own creation..

but you might want to do some research first on whatever you're trying to do, no point in reinventing the wheel with square blocks.

and most importantly have fun building it!

melaos
Just a suggestion: write something for yourself first. Making something usable enough for non-geeks is a whole extra challenge.
slim
A: 

If you really want to build a highly interactive, visually interesting, game application, I'd suggest looking at Java FX, which is a layer on top of Java specifically designed for Rich Internet Application development (in the same style as Flash or Silverlight).

You could begin with one of the simple demos on that site, then gradually add or modify features to your own taste. Because JavaFX runs on top of Java, you could drop down to the underlying level and write pure Java classes where appropriate.

joel.neely
A: 

Twitter client.

SamBeran
+2  A: 

Some other good suggestions here: What is a good application programming problem to solve for beginners?

Turnkey
A: 

As mentioned many times above just try and think of something you'd like to have or something someone you care about would value and try to build that.

I would put a slightly different slant on this point from melaos "but you might want to do some research first on whatever you're trying to do, no point in reinventing the wheel with square blocks."

I think it can be very worthwhile to struggle along with finding a solution and getting it working and then, and only then, seeing someone else's code that solves the same problem better can be an amazing moment of breakthrough. You really understand the problem (because you solved it) and then you see a whole other way of solving it than your approach and it can be like a lightening bolt to the brain (in a good way) that opens up all sorts of new understandings about programming or the language you are working in.

Just doing 'cut and paste' programming on an 'old' problem won't give you this so avoid it.

So, in my opinion, don't be too concerned if you are covering old ground. It can be valuable to your learning and you might even be a prodigy who finds a whole new, better, way to solve the problem (not likely, but it's possible).

duncan
A: 

Project Euler is pretty good for this sort of thing. They pose maths questions and you answer them in code.

Alternatively, if you have already learned another language - rewrite an existing project in Java. You already know the problem domain so it should be easier.

Fortyrunner
A: 

Hey what about this.

A java app that takes an screenshot from a section of the screen, saves is to png and uploads it to some some free image hosting service.

Then you post the code here and let me have it!! :)

I know how to do this, I just don't feel like doing it. :P It is very easy to do ( with java.awt.Robot class and java.net class )

Ohh well that was just an idea.

OscarRyz
A: 

You can to join in a existing project. Example:

you have a profile with some feature (hosting, repository of control of version, etc).

alepuzio
A: 

As mentioned by another poster, an IRC bot is a good way to get started. My first Java project was an IRC Bot for a game called "Soldat".

It was a "gather bot" which allowed users to start an organised game. Someone would start a gather, and once there were enough players, the bot would set up the server and PM everyone the connection details.

I learned about socket connections, threading and implementing a simple database to gather statistics. It was a good experience.

To make the IRC part easy, I used a simple framework called PircBot. You just override some methods and off you go.

Simon Hartcher
A: 

How about building a battle robot and setting it off against others. http://robocode.sourceforge.net/

paul