views:

185

answers:

7

I am sorry, that I am bringing my school stuff here, but I am out of ideas.

I am attending an "advanced UNIX programming" course, and we have to make a proposal for the program, which, if accepted, we have to finish later and will get credits.

The thing is, I try to think something original, but I can't think of anything that is both interesting and "doable". It shouldn't use too difficult algorithms, but it should use standard UNIX API calls (the more the better).

Examples from teachers site (that are all quite unimaginative and have been done over and over):

  • our own shell (simpler than bash)
  • our own zip / tar
  • our own wget
  • our own ping
  • our own http server
  • our own cron
  • our own rsync
  • our own proxy server

etc etc. All games are specifically forbidden.

Now, the only original thing I can think of is Gopher server and/or client, because no one use gopher and it's a shame. Any of you have better ideas?

+1  A: 

Write a Jabber client that can chat send messages to a Jabber server. Being able to announce "the server is going down" across a network is always useful, and being able to send a ping to your home computer that you left gmail open on? Priceless.

Dean J
A: 

How about a http crawler - point it at a URL and it will follow all other URLs on the returned page - could lead to all sorts of interesting spin off projects.

dice
lynx -crawl ... ?
snoopy
Ok, wget -r ... ?
intgr
come on - a shell, ping, cron, nmap, jabber, source control, monitor etc... I didn't say this idea was never done before - I meant it would be a good exercies
dice
A: 

oh! What about an implementation of John Conway's Game Of Life in ncurses(or a graphical toolkit if your experienced with one). It's border line a game, but it's very interesting.. albeit a bit simple.. implementing with ncurses would make it more difficult though

Earlz
+2  A: 

How about some sort of source control tool? Either distributed or centralized...

Frank V
I was about to post exactly this. :P
Alberto Zaccagni
Don't think of easy ideas then!
Martin York
Then, host the source of the source control tool in the source control tool. Awesome.
Aiden Bell
A: 

What about your own nmap version. Get IPs from a range, ping them and if alive, then try to connect to different common ports (HTTP, SSH, FTP, etc). Then you provide a report on all the devices found and which services they have. It will be a fun thing to do, and you will use a lot of UNIX sys calls also.

Freddy
+1  A: 

Ok, one by one:

  • our own shell (simpler than bash)

Since BASH has dared to defy POSIX to make things easier for the user, well, I'd vote no here.

  • our own zip / tar

Improving on what exists , how?

  • our own wget

Trust me, they though of everything.

  • our own ping

For high school students, maybe.

  • our own http server

Ah yes, the new 'hello, world' in UNIX C programming. Why not study something like Apache, Cherokee or Lighttpd and invite students to argue?

  • our own cron

At this point, you must be joking...

  • our own rsync

That could be useful as a learning experience.

  • our own proxy server

That could also be useful as a learning experience.

The point is, study and re-use what exists. If it does not do what you want, MAKE it do what you want, no pun intended :) Hacking great code is a great experience, especially for students.

Studying production code is one thing. Studying it if you know you have to do 'better' is dangerous, as students will always do 'better' than what is peer reviewed by thousands if not millions, depending on the project.

Tim Post
I don't see what's so bad about implementing your own shell. It'll cover a range of topics, and you should have a lot of freedom to experiment, perhaps baking in a few easter eggs?
Suppressingfire
@Suppressingfire: I wrote and released two shells. I use BASH. Enough said :) Sometimes you just have to give in to the best idea and find something else to work on.
Tim Post
@Suppressingfire: the whole idea is the user is happy and uncomplicated, just like the subject.
Tim Post
I prefer ksh, but that's just me(shows that one shell does not own all). I would say it's pretty difficult to write a fully POSIX compliant shell.
Earlz
I was not joking, I just didn't include the full description of those examples.
Karel Bílek
+1  A: 

How about a application heartbeat moniter.

Its a Daemon that runs in the background.
When an application starts up it registers with the heartbeat Daemon. Then sends a heartbeat every couple of seconds. If the deamon does not recieve a heartbeat then it restarts the application (assuming it has hung).

What you need:

  • A heartbeat Daemon.
  • A heartbeat lib.
    • The lib is distributed to application that must stay up and responsive.
    • This will require you to have a some initialization and destruction code run by the lib to register unregister with the deamon. And you must think of a way that the lib will talk to the Daemon so that if the application locks up the heartbeat will not longer be sent (so a dedicated thread doing the heartbeat is not good enough).

For extra points.
Provide a method for the Daemon to actively scan a registered application (ie provide a http end point that responds to are you alive queries). It sounds trivial but if you have a thousand application registerd with the deamon what ports do they use etc.

Martin York
+1 for IPC considerations
Earlz
now THAT sounds great. Thanks for a great idea :)
Karel Bílek