Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

Reply
 
Thread Tools Display Modes
Old 14-01-2005, 01:27 AM   #1
ultranewbie
Abandonia nerd

 
Join Date: Jul 2004
Location: Shella, Kenya
Posts: 51
Post

:bye:,

I read through Kon Tiki's post on programming tutorials, and thought I would give it a go. I have just started Python, mainly because I haven't heard of that language and it sounded cool.

I have lots of computer knowledge, have been around them for over 15 years, but have never really got into programming.

ANYWAY!

I was wondering if some of you Computer Science students would mind sending me assignments?? It would be a lot easier to learn with concrete examples to work through.

Any advice on introductory programing, etc welcome.
ultranewbie is offline                         Send a private message to ultranewbie
Reply With Quote
Old 14-01-2005, 02:06 AM   #2
Kon-Tiki
[BANNED]

 
Join Date: Sep 2004
Location: Dentergem, Belgium
Posts: 1,811
Default

Two generic ones're: Make Connect Four for two players and make Tic-Tac-Toe for two players. Those're probably the two most frequently used programming assignments out there.
Kon-Tiki is offline                         Send a private message to Kon-Tiki
Reply With Quote
Old 14-01-2005, 02:32 AM   #3
ultranewbie
Abandonia nerd

 
Join Date: Jul 2004
Location: Shella, Kenya
Posts: 51
Post

hrm. all good, thank ye.
ultranewbie is offline                         Send a private message to ultranewbie
Reply With Quote
Old 14-01-2005, 04:01 AM   #4
mika
Games Master
 
mika's Avatar

 
Join Date: Oct 2003
Location: Johannesburg, South Africa
Posts: 308
Default

Also try something that involves databases, like a simple ecommerce system.
mika is offline                         Send a private message to mika
Reply With Quote
Old 14-01-2005, 04:07 AM   #5
Predator
Forum hobbit

 
Join Date: Jan 2005
Location: ,
Posts: 42
Default

Or try to create something similar to Bittorrent, as it was created in Python.
Predator is offline                         Send a private message to Predator
Reply With Quote
Old 14-01-2005, 12:17 PM   #6
Kon-Tiki
[BANNED]

 
Join Date: Sep 2004
Location: Dentergem, Belgium
Posts: 1,811
Default

What's good fingerpractice too, is making a very basic RPG. Text-based if you don't want to bother with graphics. First is character creation, by choosing between race, occupation, gender, etc. Then just fighting random monsters and leveling up. No need for exploring or anything like that.
Kon-Tiki is offline                         Send a private message to Kon-Tiki
Reply With Quote
Old 03-03-2005, 03:44 AM   #7
YMIHere
Newbie

 
Join Date: Oct 2004
Location: ,
Posts: 7
Default

My teacher had us make designs in text without actually typing it out. Try to make something like this:

Code:
* * * * *
 ** * * *
 * * * *
 * ** *
 * * *
Without typing it out directly.

Example:
Code:
for( var/i=5; i>=0; i-- );
{
 *printf("*");
}
This should print out five astericks (if I remembered how to use C anyway). =P
YMIHere is offline                         Send a private message to YMIHere
Reply With Quote
Old 03-03-2005, 07:05 PM   #8
NeKromancer
Newbie

 
Join Date: Feb 2005
Location: ,
Posts: 21
Send a message via MSN to NeKromancer
Default

Here is an assignment I had done a few years ago.

Quote:

OPTION1: SIMULATION OF A SIMPLE SPOOLING SYSTEM
GOAL:* SCHEDULING POLICIES IMPLEMENTATION

As you are surely aware, each of our labs has a printer and a number of computers.
The users who sit in front of their machines occasionally issue a PRINT command
which causes one of their files to be printed. The users are unaware of each other's
work in general, and who is about to print what and when in particular. Each user
issues her or his print request at whim.

It goes to reason that users cannot access the printer simultaneously - the printouts so obtained would contain gibberish and so would be perfectly useless. The piece of software arbitrating the use of the printer is called the "Spooler". ("SPOOL" is an acronym for Simultaneous Peripheral Operation On-Line).

The spooler works as follows:

The PRINT command submits to the spooler the file to be printed. The spooler queues
the print requests and makes sure that all files get printed in an orderly fashion.

There are a number of possible organizations of the print queue:

1. FIFO: The printouts are produced in the order in which the print requests
were issued. The problem with this approach is that a number of short print jobs
may be made to wait uncomfortably long for a large print job submitted before them.

2. SPJF: Shortest print job first. In this approach the print queue is sorted in
ascending order of printout size (size= pages). This methodology favors short print jobs at the expense of longer jobs, which may languish in queue for uncomfortably long
periods of time. (Actually, some universities like this approach as it forces
the students to conserve paper and to reduce printing cost).

3. PAPQ: Priority-aged print queue. The print queue is sorted in descending order
of print job priority P calculated as follows: P = A + B*T, where A and B are
carefully chosen constants, while T is the amount of time a print request spent
in the queue (counted in terms of the number of print jobs completed since joining
the queue).

In PAPQ model the job with the highest priority is to be printed next.
At the time of joining the queue the priority of each job is A (since T= 0). No job is allowed to linger in the queue indefinitely (its priority increases at rate B as it waits).

4. LBAQ: Length-based aged queue: Similar to PAPQ, but the priority P is
calculated according to the formula P = (A + B*T)/L where L is the length of the
document to be printed (in pages). In this way the priority of each job when
joining the queue is A/L, i.e. shorter jobs are given preference, but the* priority of all
jobs increases in time (although the rate of increase depends again on job size L).

Your task:

Consider the spooling system with a printer capable of printing 40 pages per
minute. The average print job is 4 pages long (assume Poisson distribution
here). It is obvious that the print system is capable of servicing the print
requests provided that they are less frequent than 10 per minute (Why?).

Write a brief program in Java to simulate the behavior of that spooling system
under the following scenarios:

1. FIFO: Plot the average turnaround time and the maximum turnaround time as a function of the print request frequency.

NOTE: Turnaround Time is the time elapsed between the moment the PRINT request
is issued and the moment the requested print job is completed.

2. SPJF: Plot the average turnaround time and the maximum turnaround time as
functions of the print request frequency.

3. PAPQ: Plot the average turnaround time and the maximum turnaround time as
function of the print request frequency, for selected values of parameters A and B.
The values of A to be considered are 0, 1, 2, and 4. The values of B are 1, 2, and 4.
Organize your plots in suitable groups.

4. LBAQ: Plot the average turnaround time and the maximum turnaround time as
function of the print request frequency, for selected values of parameters A and B.
The values of A to be considered are 0, 1, 2, and 4. The values of B are 1, 2, and 4.
Organize your plots in suitable groups.
You don't have to do the whole plotting crap, heh I didn't even bother with it cos I hate math but when I Got this I wrote the actual spooler simulation code and all the data structures for it.
__________________
Rdy to play even older game :P
NeKromancer is offline                         Send a private message to NeKromancer
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 04:48 PM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.