Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Ok. I'm stupid but I still need "EXPERTS" help.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sixjuwel




PostPosted: Wed Dec 29, 2004 3:30 am   Post subject: Ok. I'm stupid but I still need "EXPERTS" help.

Confused ok. the problem is this.........(download first!!)

when you run this one you can choose the menues

ok. follow this step

1. click "AND GATE" first, and turn on the side button 1 and 2
2. and click start button(animation will be playing)
3. click "Clear button"
You will see the menu on the top of the window
4. click " OR GATE" next, and do step 1 &2

As you can see, they doesn't make compatibillity.
why does it happen? plz fix this... Confused
(I think I need to disable the first one after use...)



whta.t
 Description:
........... try it if you are expert

Download
 Filename:  whta.t
 Filesize:  117.07 KB
 Downloaded:  96 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
McKenzie




PostPosted: Wed Dec 29, 2004 9:42 am   Post subject: (No subject)

I'd love to help but you have gone out of your way to make your code hard to read. One of the points that your teacher should have told you when teaching proper coding style is that if you use horrible style no one will want to look at your code. Come on

Quote:
code:
procedure fool
...
procedure stupid
...
procedure what
...

and the only comments you have are all but useless
sixjuwel




PostPosted: Wed Dec 29, 2004 1:42 pm   Post subject: oh... sorry

so sorry haha

humn....

first

fool - it's box when the animation finished
(ai,mega,whwh) are same thing

stupid- this is simulation for AND GATE
(what, which, how) are same

I think those are ..... things...
plz help me...
McKenzie




PostPosted: Thu Dec 30, 2004 10:28 am   Post subject: (No subject)

Those are just some of the examples of poor name choices.
code:
var k, e, r, a, m, q : int
var it1 : int
var it2 : int
var it3 : int
var it4 : int

I could find loads of others.
I've done something similar before. You start working on a program and as a way of saying "ha, I'm so good that I don't need proper variable names or comments. Stupid teacher." you go out of your way to use poor style. The problem is the code becomes painfull to look at. You need to go through add comments and change most of your variable and subroutine names, heck even the name of the program. If you do that, repost the new version and I'll look at it.
McKenzie




PostPosted: Thu Dec 30, 2004 10:56 am   Post subject: (No subject)

OK, despite the heartfelt lecture I took a closer look at your code. On top of poor naming and poor comments you also have a a resource leak. The resource leak is not the reason your program doesn't work but it's related. In sidebutton/sidebutton1 you keep making new buttons, but you never dispose of them. Whichever Start button you make first will always be on top and the only one you can click on. Two ways to fix this.

1. Dispose of your old buttons before making new ones.
2. Make all of your buttons globaly and use GUI.Show/GUI.Hide to control them
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: