1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Any resources to find programming project ideas? or suggestions welcome!

  1. Jan 16, 2007 #1
    Hello everyone,

    For my programming class we have to find somthing we want to code and do it, and it must be at least 1,000 lines of code. This is an indepedant project we have to work on through out the semester. This is an internmediate programming course so it doesn't have to be that advanced and there won't be any graphical GUI other than a console. It will be written in C++.

    I'm having problems coming up with somthing I could code, he told us if others have a problem you can code it too, it doesn't have to be my idea.

    Anyone have any suggestions on what I could do for a programming project?

    ts due next class period and he just gave us the assignment today to figure somthing out so I have a day to get some ideas.

    Thanks!
    :biggrin:
     
    Last edited: Jan 16, 2007
  2. jcsd
  3. Jan 16, 2007 #2
    You could try you hand at some optimization algorithms (such as simulated annealing, branch and bound, etc). Those can be fun*.

    *DISCLAIMER: I design algorithms for a living, so your level of fun may vary.
     
  4. Jan 16, 2007 #3

    verty

    User Avatar
    Homework Helper

    Perhaps you could write a solver for a prime puzzle, and write your own prime sieves and bigints and stuff. Well, just a thought, don't know how suitable that would be.

    Well for what I suppose was an intermediate Visual Basic class I wrote a version of tetris, something I had always wanted to do. I don't know if that could be done too easily with the console though.
     
    Last edited: Jan 16, 2007
  5. Jan 16, 2007 #4

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You could make a simple 3D video game, using OpenGL for example. You could also write your own ray-tracing program. You could write a web spider that downloads (and perhaps indexes, if you're ambitious) web sites. You could write a simple web server. You could write a (really bad) program to play Go. You could write a program that implements run-length encoding, dictionary encoding, or even Huffman-tree encoding to perform data compression. You could write a program to encrypt files. You could write a simple chat server. You could write a simple email client. You could write a simple raster graphics editor (read in jpgs, apply filters, etc.). You could write a program to find the digits of pi. You could write a program to simulate fluid dynamics. You could write a neural network. You could write a visualization plug-in for a popular music player like Winamp. You could write your own (very trivial) mp3 encoder. You could write your own (very trivial) peer-to-peer file sharing system. You could write your own (trivial) SQL database engine. You could write a program that plots star charts. You could write a program that calculates the position of planets based on their orbital parameters. You could write a (very trivial) weather simulator. You could write a program that filters audio to add effects like reverb. You could write a program that uses the FFT and a neural network to distinguish one speaker's voice from another's. The possibilities are endless...

    edit: Actually, I see you want this to be a console-only program, so I'd have to nix some of these. Most, however, could definitely be done with nothing but console output.

    - Warren
     
    Last edited: Jan 16, 2007
  6. Jan 16, 2007 #5
    Memory allocators are both fun and informative. You could implement one or more in various ways. Since you are using C++ I would suggest that you implement a custom allocator for an individual class, as well as a more generic memory chunk allocator similar to malloc. Google/Wikipedia abound with descriptions, or make up your own algorithm.

    - Corey
     
  7. Jan 16, 2007 #6

    ranger

    User Avatar
    Gold Member

    Hi mr_coffee, since you said you do not need any fancy GUI, you could do a text based game. There are many text based games that have their source code freely available. An example of such a game is myman, which is a clone of the popular pac-man. Viewing the source code of such a program would give you ideas of how to approach your own project. If you do not settle for a simple game, you can go looking for other programs in the open source community that better suite your goal.

    Good luck!
     
  8. Jan 16, 2007 #7
    I heard that making a calculator is actually a decent project. If you implement enough functions it could easily go 1000 lines. Now, obviously, its not like this is very practical as there are already programs that do this and much more. A program like this will make use of a variety of types (int, char, float, etc), if/then statements, various loops, memory allocation if you make it fancy enough.

    You'd have your basic arithmetic, and then you could also do numerical derivatives and integration, FFT as someone mentioned, etc. Though, the FFT code itself could be pretty long.

    Another possibility is to make a solitaire game. Some versions of solitaire would be easier to code than others but all use about the same ideas. Vectors become pretty important here so that you can use foo.popback() and what ever other functions <vector> has (I forget, its been a while). This can be done via console too. You'll have to make the "game board" with cout and ASCII characters :)

    Good luck!
     
  9. Jan 16, 2007 #8

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Personlly, I think a more "real world" programming project is one that uses modules of code written by other people. Rather than wrtiting your own FFT routine, why not use the fftw library, and concentrate instead on what you're doing with the FFT?

    - Warren
     
  10. Jan 16, 2007 #9
    I certainly wouldn't code my own FFT :P Since this is a programming course though it makes sense to make your own original code. If this was a numerical methods course then, most definitely, use other codes to do what you need to be done.
     
  11. Jan 16, 2007 #10

    robphy

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I'd like to see a new approach for handling spam emails.... especially some of the newer flavors.
     
  12. Jan 16, 2007 #11

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You may be correct that every single line of code in the entire program must be written by the student's own hand, but I doubt it. Real world programmers do not reinvent their wheels.

    If he uses an FFT library, but writes 1000+ lines of code to use/analyze the results of the FFT, then I'm sure he will have met the project requirements.

    - Warren
     
  13. Jan 16, 2007 #12
    The calculator idea is actually pretty cool, I have been trying to wrap my head around writting one for myself.
     
  14. Jan 16, 2007 #13

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You can break a calculator up into two pieces:

    1) A user interface, which allows people to type in their expressions, and then parses them into trees.

    2) An engine, which accepts the trees and actually performs the calculations represented by them.

    - Warren
     
  15. Jan 16, 2007 #14

    ranger

    User Avatar
    Gold Member

    But isnt 1000 lines of code too much to ask for a calculator program?
     
  16. Jan 16, 2007 #15

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Depends on the language. In C++, the code to parse an infix expression and build a tree is probably 500 lines, and the code to walk the tree and perform the computation is probably 500 lines. You could easily keep adding more functionality to it until it was over the 1k mark.

    - Warren
     
  17. Jan 16, 2007 #16
    Awesome thanks for all the great ideas guys!!

    This programming class goes over the following:
    The calculator program seems like it could work, because I could probably implement it using a stack to push and pop the operators or like you said using a tree.

    After looking at the syllabus it looks like if I did a program that handled data management like allowing the user to enter information (such as Name, Age, Salary, Job Title, etc) and storing it in a database, and accessing the records, deleting the records, sorting, search, and modifying the existing records, I could really hit the data structures. What do you think?

    I agree with Warren,

    The professor told us if you reinvent the wheel it usually will come out like a square. He has no problem if we use other people's libraries.

    If i were to develop a data management program, would I be better off using a SQL database or some other database that would work well with C++? I don't know any SQL though but i'm trying to figure out if I want to actually store the information in a text file or an actual database system so later if I want to expand this project, and make it accessible online, using php the database could be accessed offline or online.
     
    Last edited: Jan 16, 2007
  18. Jan 16, 2007 #17

    turbo

    User Avatar
    Gold Member

    Years ago, when a 286 was a nice desktop PC and small-network servers were 386s, I wrote accounting and inventory control software applications. I coded them in dBase and compiled them to run in FoxBase's run-time environment. The concepts underlying bookkeeping and inventory control are simple ones so if you wrote something like this, you would be able to devote all your time to the coding. Inventory-control is a good one - you want to be able to track the cost of parts and where in the warehouse they are located, and alert the parts manager when the on-hand inventory falls below the target level, so parts can be re-ordered. If you need more lines of code once you have done that, you can write a routine that calculates inventory costs on a Last-in-first-out basis AND on a First-in-first-out basis. I did this for a customer, and his accountant was ecstatic. Businesses are not allowed to calculate the cost of inventory on LIFO/FIFO freely for tax purposes - such changes can only be made rarely, but the tax implications for a business with a large inventory of expensive parts (my client manufactured, sold and repaired tree-harvesting equipment) can be quite significant.
     
    Last edited: Jan 16, 2007
  19. Jan 16, 2007 #18
    Awesome, thanks turbo that sounds like a great idea and is actually useful.
     
  20. Jan 18, 2007 #19
    Don't spend too much brain sugar trying to find a program that will be useful to yourself or others. The point is that you exercise the skills you are learning in your class. Most likely, by the time you finish the project you will see 10 better ways to accomplish the same things and/or find omething more fun and useful to work on.

    It's very common for budding programmers to feel like they need to create something immediately useful. The problem is that your knowledge will change rather rapidly and so will the goals of the 'useful idea.'

    IMHO the calculator is a good project idea because the requirements are very clear and easy to define. New ideas for functionality are also easy to confine to modifications to the grammar recognition and the tree/stack processing code.

    My overall point is, don't over complicate the task at hand. You'll learn more and have more fun. Save the 'killer app' for later.
     
  21. Jan 19, 2007 #20
    i would do the calculator but I've already done somthing similar to it a year ago and I want somthing that would look some what like i know what i'm doing a resume if they ask me, well what did you do with C++? (i'm trying to get an internship this summer)

    So i decided to use mySQL to store all my data the user will enter in the C++ console using mySQL++, i'm still in the process of getting it to work with VS.net 2005. Another nice mySQL++ feature is it uses alot of STL which this class is going over.

    ANyone have experience getting this to work with VS 2005, i see alot of tutorials but they use an old version of mySQL++ and VS 6 and alot has changed since then.

    I think once I get it set up to recognize mySQL++ libraries it will go smoother.
     
    Last edited: Jan 19, 2007
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Any resources to find programming project ideas? or suggestions welcome!
  1. Any suggestions! (Replies: 7)

  2. Any ideas? (Replies: 14)

Loading...