Finally... marathon coding session is over

Martin

Lifer
Jan 15, 2000
29,178
1
81
Started just after 6pm. Wrote a distributed system with 4 different kinds of nodes, no bugs, and fairly neat code.

time to get some sleep now!
 

sao123

Lifer
May 27, 2002
12,653
205
106
I want to check your work.... how about some downloadable source code
 

DaShen

Lifer
Dec 1, 2000
10,710
1
0
Originally posted by: DivideBYZero
Great. Shame it's a washing machine simulator.

Hahahah... that made me laugh ;)


Hey OP,

What was the code for? You used Nodes, so a scheduling machine?

Was this for school or an actual work project becasue 4 different OOP structures for one system doesn't seem to fit Data Patterns all that well.
 

DaShen

Lifer
Dec 1, 2000
10,710
1
0
Originally posted by: sao123
I want to check your work.... how about some downloadable source code

Agreed. ;) :p

I am not that great of a programmer though (goofed off too much in college), so I will probably botch up your code.
 

Martin

Lifer
Jan 15, 2000
29,178
1
81
Its an assignment for my distributed systems class that's supposed to simulate a stock exchange-type of system. What I meant by 4 different kinds nodes was that there's a lookup server, a 'broker', an 'exhange' and a client.

Of course, this being a school assignment it doesn't do anything useful, just demonstrate I can write this type of stuff. Pretty straightforward, but it did take some time...
 

yllus

Elite Member & Lifer
Aug 20, 2000
20,577
432
126
Originally posted by: DivideBYZero
Great. Shame it's a washing machine simulator.
Martin, why are all of my underclothes coming out pink? :|
 

sao123

Lifer
May 27, 2002
12,653
205
106
Originally posted by: Martin
Its an assignment for my distributed systems class that's supposed to simulate a stock exchange-type of system. What I meant by 4 different kinds nodes was that there's a lookup server, a 'broker', an 'exhange' and a client.

Of course, this being a school assignment it doesn't do anything useful, just demonstrate I can write this type of stuff. Pretty straightforward, but it did take some time...

sounds interensting. ive done a lot of programming, though nothing ever client-server based. I still wouldnt mind examening your code just too the concepts at work.
BTW... what did you code it in? Java, C++, VB, C#?
 

Martin

Lifer
Jan 15, 2000
29,178
1
81
Originally posted by: sao123
Originally posted by: Martin
Its an assignment for my distributed systems class that's supposed to simulate a stock exchange-type of system. What I meant by 4 different kinds nodes was that there's a lookup server, a 'broker', an 'exhange' and a client.

Of course, this being a school assignment it doesn't do anything useful, just demonstrate I can write this type of stuff. Pretty straightforward, but it did take some time...

sounds interensting. ive done a lot of programming, though nothing ever client-server based. I still wouldnt mind examening your code just too the concepts at work.
BTW... what did you code it in? Java, C++, VB, C#?

This is Java sockets programming, which is pretty easy - not unlike working with files. Just instead of getting the input/output streams from FileWriters, you get them from socket objects.

here is the lab, along with the handout that shows what the objects of the lab are and an example "echo" server/client. you can use the b1/b2/b3 bat files to launch the program (sometimes b3.bat executes too quickly and the lookup server doesn't fully start when the others try to connect. if you get less than 6 command line windows, just close them and try again.)
 

BigJ

Lifer
Nov 18, 2001
21,330
1
81
Originally posted by: AmigaMan
unless you have unit/integration tests, how do you know it's bug free?

While not completely bug free, they'll often give you test cases or setup a test server where you can see if you pass all the tests. If it passes all tests and conforms to their style, you get 100%.

At least that's been my experience at two colleges.