Code optimizer

Here is the place to post images, videos and downloads of your current and upcoming applications that you are working on.
9 posts Page 1 of 1
Contributors
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Code optimizer
Axel
This is a code optimizer I'm currently working on
Its not making it faster , just keeping the code tidy and easy to read
syntax highlighting will come , but this is like pre-alpha lol
What do you guys think of this idea ?

The code is just an example it will have like 1000 errors
Code optimizer.png
Original code :
Code: Select all
Public class form1

Dim lol as string

Dim Result as double
Private sub button1_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Result +=1
End Sub

Dim Divideby as integer

Sub Divide(Byval Divideby as integer)
'This will divide and such


Divideby = Divideby / Result

end sub

<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Code39Ascii(ByVal instr As String, ByVal checkdigit As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer
end function

Dim Finally as textbox
Sub Minus(ByVal Minus as integer)


Result = Divideby - Minus

end sub
new code
Code: Select all
Public class form1

#Region "DllImport
<DllImport("connectcodefont.dll")> _
Public Shared Function Encode_Code39Ascii(ByVal instr As String, ByVal checkdigit As Integer, ByVal outstr As System.Text.StringBuilder, ByVal outstrmax As Integer) As Integer
end function
#Endregion
#Region "Declaring"
Dim lol as string
Dim result as double
Dim divideby as integer
Dim finally as textbox
#Endregion

#Region "User-defined routines"
Sub Divide(Byval DivideBy as integer)
'This will divide and such
Divideby = Divideby /result
end sub

Sub Minus(ByVal Minus as integer)
Result = Divideby - Minus
end sub
#Endregion

#Region "Designer-defined routines"
Private sub button1_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Result +=1
End Sub
#Endregion

End class
You do not have the required permissions to view the files attached to this post.
http://vagex.com/?ref=25000
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

Re: Code optimizer
Usman55
That's how I keep my code tidy, I put all the dims in one place, in this way it is easy to find an error.
Image
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: Code optimizer
Axel
Usman55 wrote:
That's how I keep my code tidy, I put all the dims in one place, in this way it is easy to find an error.
Well do you like the idea or not ? :P
I hate polls so I don't make them
http://vagex.com/?ref=25000
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: Code optimizer
zachman61
Nice idea here,
Did u get this idea after i asked u last night?
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: Code optimizer
Axel
zachman61 wrote:
Nice idea here,
Did u get this idea after i asked u last night?
What ? no ?
http://vagex.com/?ref=25000
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: Code optimizer
zachman61
Axel wrote:
zachman61 wrote:
Nice idea here,
Did u get this idea after i asked u last night?
What ? no ?
i mean't after i asked if there is anyway to shorten the code i mean did u think of this after that?
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: Code optimizer
Axel
zachman61 wrote:
Axel wrote:
zachman61 wrote:
Nice idea here,
Did u get this idea after i asked u last night?
What ? no ?
i mean't after i asked if there is anyway to shorten the code i mean did u think of this after that?
Not really lol
I had this idea for like 3 days lol
http://vagex.com/?ref=25000
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: Code optimizer
zachman61
lol
i was hoping i "Inspired you"
lol
still nice idea
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

Re: Code optimizer
Usman55
If it's about one word, yes or no, then yes, It is a nice idea.
Image
9 posts Page 1 of 1
Return to “Work in Progress”