Page 1 of 1
Newbie Programming Assignments
Posted: Sat Aug 19, 2006 7:12 am
by Ollie Saunders
Does anybody know any PHP assignments suitable for newbies?
I was thinking of a currency convertor but I'd appreicate any new ideas.
Acceptable assignments have to be
- Not algorithmically challenging
- Not instantly solvible with PHP functions
- Not too big, say an hour's work for us pros but maybe a day for a noob
I'd quite like something that involves an element of design, something that is easy to do but harder to do really well.
Posted: Sat Aug 19, 2006 7:42 am
by Benjamin
How about a contact us form that either mails the results or stores them into a database?
Posted: Sat Aug 19, 2006 8:11 am
by Ollie Saunders
I should qualify this a bit better. I'm not looking for anything involving lots of systems. Just PHP/HTML. and ideally these things should be objects or a couple of object.
Here's one idea:
A table generator that generates rows, columns, and headings based on some input and can be changed to show headings on the top or the side (table scope).
Posted: Sat Aug 19, 2006 5:53 pm
by s.dot
Perhaps an Image of the day script with different captions for each picture. This would involve a good big of array handling, the PHP date function, a good bit of HTML learning how to load them dynamically.
Posted: Sat Aug 19, 2006 5:54 pm
by daedalus__
simple encryption and decryption?
Posted: Sat Aug 19, 2006 5:59 pm
by tomisina
an assignment that i used while learning was creating a math problem page... it can be as easy or hard as you want...
mine started out just displaying 10 x 4 math problems.... then it took the inputs from those problems and graded them... then i added a javascript timer at the top that gave you 60 seconds to do it... then i turned incorrect answers red... then i stored past performance in cookies...
and it all started out with a simple page of random problems
Posted: Sun Aug 20, 2006 12:04 pm
by sansoo
By assignments do you mean providing an example of how its done and then asking a newbie such as myself to not only recreate what is already done but expand upon it successfully?
If so i have some ideas for assignments:
Ole-> Table generator
Scottayy-> Image of the Day
Daedalus-> Encryption / Decryption
1. Simple form sessions -> How to pass variables throughout multi-page forms.
2. Anything to do with Arrays -> I cant seem to find a whole lot of info on them.
3. Form Validation -> Functions / Classes (classes arent hard but they can be dawnting if youre new to PHP)
4. Connecting to a MySQL Database-> posting and retrieving data
I think the problem with a lot of the tutorials and assignments available on the web now is that they assume just because were are new to PHP that we must be sitting at our computer wearing a padded helmet, playing with balloons, and drooling on ourselves. We definitely need assignments that take us past the mere basics of PHP. Something that makes us use the basics we have learned, teaches us more, and makes us put it all together to get something useful.
I think it would be a mistake to just create assignments for PHP/HTML only. MySQL is a big part of why i think a lot of people begin learning PHP.
anyways thats 2 cents worth of crap form a newb
Posted: Sun Aug 20, 2006 12:52 pm
by christian_phpbeginner
Hi, how about giving the noobies with object oriented approach ? I think this exercise will suit your need:
Create a form that accept user firstname, lastname and age.
Store them in a class named PERSON.
Then, instantiate the class person in PHP/HTML Page and output them into a table sorted by the length of the fullName, OR sorted by the oldest age.
The students have to create a class of Person with methods and attributes they need. I think it's a very good way to introduce PHP as a OOP language now.
Hope you like the idea.
Chris[/list]
Posted: Sun Aug 20, 2006 6:03 pm
by RobertGonzalez
Simple, but hard still...
A file uploaf form that only accepts text files. The text file is read, line by line and added to a database. The file is then stored on the server. In two hours, the file needs to be checked against what is in the database to see if the file has changed content against what is in the database (not by file modification time).
This isn't the most practical standalone app, but it introduces filesystem, db interaction, dates/times, file uploads and user interaction.