
June 4th, 2012, 12:20 PM
|
 |
I <3 ASCII
|
|
|
|
Quote: | Originally Posted by nightyeye I just wanna share my apps in this forum and hopping for any feedback to help me improve on my programming skills. I had made an application on "Pythagoras Theorem" so to make it easier for those who having trouble finding the answer for your Pythagoras Theorem questions. Have fun Playing with it.. |
I don't know how much success you'll have getting code reviews on a site like this, but since I'm waiting for a code review of my own I figured I'd give it a swing:
Quote: Function Pythagoras_Theorem(A As Double, B As Double, C As Double) As Double
PythagorasTheorem = A ^ 2 + B ^ 2 = C ^ 2
End Function |
This function isn't returning anything. Additionally the PythagorasTheorem variable (assuming it's declared elsewhere won't be a 'double' value it will be a boolean. With the equals sign between the B and the C clauses you're effictively asking if they're equal.
[*] Readability will be greatly enhanced if you name your textboxes and buttons instead of text1 perhaps 'inputVariableA'
[*] Remove the empty subs and functions. Unattach any form properties from them if it causes them to not compile.
[*] Consider commenting your functions to aide readability, even if you're just learning. It will help you down the line if you ever come to revisit this. A lot of times when learning something you use it once, then tend to forget about it. If you comment your code you'll be able to pick it up quicker on the bounce.
-MBirchmeier
|