Author | Message | Time |
---|---|---|
JoeTheOdd | Clicky This is for a Visual Basic class (namely Computer Programming 1), where we're expected to have absolutely no knoledge of Java whatsoever, and rather limited VB skills (none at entry). Of course, I'm not normal, so eh? I wrote a chat server in Java, and a chat client in VB. Its a simple protocol, send your username with a space after it, then your message with a CRLF after it. All the server does is relay, theres absolutely no parsing involved. I've still got four weeks to correct/add/whatever anything, so what do you have to say about it? | December 3, 2005, 6:37 AM |
Myndfyr | Why is it ZIPped? | December 3, 2005, 7:45 AM |
Yoni | If this is high school, you're gonna fail | December 3, 2005, 2:46 PM |
Mangix | he's in 9th grade IIRC :P | December 3, 2005, 8:57 PM |
JoeTheOdd | [quote author=Mangix link=topic=13407.msg136234#msg136234 date=1133643470] he's in 9th grade IIRC :P [/quote]Omfg, stop stalking me. Yes, I'm a freshman in high school. MyndFyre, because theres both a server and a client, each with binarys and source files encluded (or did I have a compiled client? I don't know). Yoni, what do you suggest I change to make it non-failing? I've talked to Warrior and he suggests I use a binary protocol of some sorts. | December 3, 2005, 10:34 PM |
Yoni | [quote author=Joe link=topic=13407.msg136255#msg136255 date=1133649255] Yoni, what do you suggest I change to make it non-failing? I've talked to Warrior and he suggests I use a binary protocol of some sorts. [/quote] No dude. I mean, if you're only in high school, chances are your teachers are too dumb to accept projects of this type. Make a calculator like everybody else. Jeez. | December 3, 2005, 11:06 PM |
JoeTheOdd | Nah, my teacher is pretty smart. I've shown her tons of Java stuff that I've done and she was pretty impressed, and she teaches Computer Programming 2, and AP Comp Prog 3-4, all of which are Java. I'm sure my client alone (which is like 30 lines of code) will blow away the rest of the projects. EDIT - Rewrote mass portions of the server to be more efficient overall: -- Now using an InputStream instead of a BufferedReader -- No longer using a timer in each individual client class. That cuts it down by 255 timers, so I'm happy. =) | December 4, 2005, 12:10 AM |
FrOzeN | Through in a 'On Error Resume Next' in your Form_Resize() sub so it doesn't crash when resized to small. :P | December 4, 2005, 12:50 AM |
JoeTheOdd | Nice catch. How could I forget that? I've switched to a binary protocol now, although its not much. I've got a mediocre userlist thing going on, but its printed to the screen. I'm going to move it to a listview! =) | December 4, 2005, 1:11 AM |
rabbit | [quote author=FrOzeN link=topic=13407.msg136277#msg136277 date=1133657454] Through in a 'On Error Resume Next' in your Form_Resize() sub so it doesn't crash when resized to small. :P [/quote]That is possibly the worst idea ever. Why not fix the problem instead of ignoring it? | December 4, 2005, 1:34 AM |
Quarantine | How do you fix it? I believe I just subclassed the mainform and didn't allow it to resize smaller than x and y. Even then it's a hassle because of debugging things in the future. | December 4, 2005, 1:43 AM |
FrOzeN | [quote author=rabbit link=topic=13407.msg136291#msg136291 date=1133660063] [quote author=FrOzeN link=topic=13407.msg136277#msg136277 date=1133657454] Through in a 'On Error Resume Next' in your Form_Resize() sub so it doesn't crash when resized to small. :P [/quote]That is possibly the worst idea ever. Why not fix the problem instead of ignoring it? [/quote] Not worth it really for such a simply school project. Though I guess he could through in some simply If statements instead.. | December 4, 2005, 1:49 AM |
JoeTheOdd | [quote author=rabbit link=topic=13407.msg136291#msg136291 date=1133660063] [quote author=FrOzeN link=topic=13407.msg136277#msg136277 date=1133657454] Through in a 'On Error Resume Next' in your Form_Resize() sub so it doesn't crash when resized to small. :P [/quote]That is possibly the worst idea ever. Why not fix the problem instead of ignoring it? [/quote] Because the problem is caused by the user. Should I goto a error handler at the bottom, then [tt]Call MsgBox("I've detected an error. You squeezed me. Fixing error..") Call PunchInFace(App.User)[/tt] | December 4, 2005, 2:29 AM |
Stealth | [quote author=Joe link=topic=13407.msg136305#msg136305 date=1133663375] [quote author=rabbit link=topic=13407.msg136291#msg136291 date=1133660063] [quote author=FrOzeN link=topic=13407.msg136277#msg136277 date=1133657454] Through in a 'On Error Resume Next' in your Form_Resize() sub so it doesn't crash when resized to small. :P [/quote]That is possibly the worst idea ever. Why not fix the problem instead of ignoring it? [/quote] Because the problem is caused by the user. Should I goto a error handler at the bottom, then [tt]Call MsgBox("I've detected an error. You squeezed me. Fixing error..") Call PunchInFace(App.User)[/tt] [/quote] Most all problems are caused by the user. Since punching them is impossible, you should just anticipate problems created by the user like this one and code such that they never become problems. | December 4, 2005, 3:02 AM |
JoeTheOdd | Seeing as how a perfect-looking GUI is not vital to the operation of this program, I'm going to have to go with ignoring it completely. | December 4, 2005, 5:51 AM |
JoeTheOdd | - Updated protocol specification telling when packets should be sent. - Documented packet header. - Documented packet footer. - Fixed disconnect packet issue. http://www.javaop.com/~joe/VBFinal.zip I'm running a server on joex86.no-ip.org, if anyone wants to check it out. | December 4, 2005, 8:02 PM |
Newby | [quote author=Joe link=topic=13407.msg136316#msg136316 date=1133675476] Seeing as how a perfect-looking GUI is not vital to the operation of this program, I'm going to have to go with ignoring it completely. [/quote] Seeing as how completing my homework in math is not vital to the completion of the class, I'm going to not do my homework in math. I won't have an 'A', though. I may have something closer to a 'C' or a 'D'. (But for me, I have a 95% :)) | December 4, 2005, 8:57 PM |
JoeTheOdd | [quote author=Newby link=topic=13407.msg136370#msg136370 date=1133729828] [quote author=Joe link=topic=13407.msg136316#msg136316 date=1133675476] Seeing as how a perfect-looking GUI is not vital to the operation of this program, I'm going to have to go with ignoring it completely. [/quote] Seeing as how completing my homework in math is not vital to the completion of the class, I'm going to not do my homework in math. I won't have an 'A', though. I may have something closer to a 'C' or a 'D'. (But for me, I have a 95% :)) [/quote] Ah Newby, I should teach you something you taught me. The beauty of open source is, if you don't like the way something works, you can fix it yourself. =) EDIT - I rarely do math homework either, so eh? | December 4, 2005, 9:09 PM |
Newby | [quote author=Joe link=topic=13407.msg136372#msg136372 date=1133730569] [quote author=Newby link=topic=13407.msg136370#msg136370 date=1133729828] [quote author=Joe link=topic=13407.msg136316#msg136316 date=1133675476] Seeing as how a perfect-looking GUI is not vital to the operation of this program, I'm going to have to go with ignoring it completely. [/quote] Seeing as how completing my homework in math is not vital to the completion of the class, I'm going to not do my homework in math. I won't have an 'A', though. I may have something closer to a 'C' or a 'D'. (But for me, I have a 95% :)) [/quote] Ah Newby, I should teach you something you taught me. The beauty of open source is, if you don't like the way something works, you can fix it yourself. =) [/quote] Your teacher is not interested in my coding skills, or anybody else's coding skills for that matter. He's interested in yours. | December 4, 2005, 10:09 PM |
UserLoser. | [quote author=Joe link=topic=13407.msg136372#msg136372 date=1133730569] [quote author=Newby link=topic=13407.msg136370#msg136370 date=1133729828] [quote author=Joe link=topic=13407.msg136316#msg136316 date=1133675476] Seeing as how a perfect-looking GUI is not vital to the operation of this program, I'm going to have to go with ignoring it completely. [/quote] Seeing as how completing my homework in math is not vital to the completion of the class, I'm going to not do my homework in math. I won't have an 'A', though. I may have something closer to a 'C' or a 'D'. (But for me, I have a 95% :)) [/quote] Ah Newby, I should teach you something you taught me. The beauty of open source is, if you don't like the way something works, you can fix it yourself. =) EDIT - I rarely do math homework either, so eh? [/quote] The beauty of closed source is, if you don't like the way something works, you can write your own and make it better instead of being lazy | December 4, 2005, 10:20 PM |
kamakazie | [quote author=UserLoser link=topic=13407.msg136380#msg136380 date=1133734824] The beauty of closed source is, if you don't like the way something works, you can write your own and make it better instead of being lazy [/quote] Awww, I thought this thread would have changed you. Guess not :P | December 4, 2005, 10:59 PM |
Newby | [quote author=UserLoser link=topic=13407.msg136380#msg136380 date=1133734824] The beauty of closed source is, if you don't like the way something works, you can write your own and make it better instead of being lazy [/quote] That's because if you are lazy, it doesn't get changed. Also, the beauty of open source is, if you don't like the way something works, you can write your own or have someone else write it for you. 2 perks over 1! | December 5, 2005, 1:14 AM |
rabbit | [quote author=Warrior link=topic=13407.msg136292#msg136292 date=1133660631] How do you fix it? I believe I just subclassed the mainform and didn't allow it to resize smaller than x and y. Even then it's a hassle because of debugging things in the future. [/quote][code]Private Sub Form_Resize() If Me.ScaleWidth > 0 Then ' resize y End If If Me.ScaleHeight > 0 Then ' resize x End If[/code] If it's less than 0 they can't see it anyway, so there is no point in doing any resizing. | December 5, 2005, 1:49 AM |
Quarantine | That looks ugly + flickers :/ | December 5, 2005, 2:09 AM |
JoeTheOdd | Guys, get over it. I am not going to modify my resize sub, unless I add new controls which need to be resized, etc. | December 5, 2005, 2:41 AM |
JoeTheOdd | -- Added error handler in Form_Unload to avoid errors when sending PKT_DISCONNECT when the socket is closed. -- Server is now using a dynamicly size-increasing array of sockets, and the loops have been modified to work with this. -- Now using port 8999 for communication instead of port 99, as port 99 is a restricted socket (except on Windows). Thanks iago! http://www.javaop.com/~joe/VBFinal.zip EDIT - I'm running a RabbiChat server on iago's production server. www.javaop.com:8999. | December 5, 2005, 3:08 AM |
rabbit | [quote author=Warrior link=topic=13407.msg136405#msg136405 date=1133748564] That looks ugly + flickers :/ [/quote]Actually, it doesn't do either at all. | December 5, 2005, 3:45 AM |