For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > June 2006 > GOTOs to the People - Discussion please!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author GOTOs to the People - Discussion please!
Lorin

2006-06-18, 6:56 pm


On Error GoTo Geneva ' for a convention

This brings up the discussion of GOTO since On Error GOTO is a GOTO.

This is the VB6 code I use on occassion if pressed

Public Function MySub(sMyFile as String) as String()
ON ERROR GOTO MySubErr
Dim lFNbr as long
Dims sBuffer as String
Dim sArgs() as String
Dim iX as Integer

sBuffer = String$(50," ")
' some code
Do
100 Open sMyFile For Binary As lFnbr

200 Get lFNbr,, sBuffer ' what happens if there are not that many
characters in the file?
If Split(sBuffer,",")(0) = "VALID" Then ' just making a point
sArgs=Split(sBuffer, ",") ' now get all
For iX = 0 to UBound(sArgs)
if sArg(iX) = "OOPS" then Exit Do ' a convieient was
to escape using this GOTO
' Note it skips out
of the FOR as well as the DO
if sArg(iX) = "GOSH" Then GoTo FlyingLeap ' another type of
GOTO
' Now which is easier to follow?
' Can your eye find the label first or the end of the Loop?
' Labels are automatically left justified.
' what if this was in a complex multilayered nested bit of code?
Next iX
MySub = sArgs
EndIf
Loop While 0 ' solely the target of a GOTO, can you spot it?
' mixed message, I know, but what the heck.

FlyingLeap: ' label are cheap, and I can search to find the source of this
destination
' some additional code goes here to do something very usefull

MySubExit:
Close lFnbr ' it always closes due to controlled exiting
' cleanup even from errors
Exit Sub

MySubErr:
Debug.Print Err.Description
Select case ERL
Case 100
' do something here in code
' if there is a possibility on an error at this point then call a
subroutine with its own error handling to do the work and catch an error
Case 200
' do something else here in code
Case Else
' handle other errors here
End Select
' all errors resume to MySubExit
Resume MySubExit

End Sub ' MySub <---- do you know why I always do this?

I know, all you purists go HISSSS and BOOOO.
THis is not Spaghetti, just clear and responsible coding.

Any discussion????

Stirring the pot.


Michael C

2006-06-18, 6:56 pm

"Lorin" <Lorin@discussions.microsoft.com> wrote in message
news:A9570BA0-E676-4268-83E6-9C5E4E0A6A7D@microsoft.com...
> Any discussion????


Yes, your sample was too complicated for a sample and I lost interest half
way through.

Michael


Bob O`Bob

2006-06-18, 6:56 pm

Michael C wrote:
> "Lorin" <Lorin@discussions.microsoft.com> wrote in message
> news:A9570BA0-E676-4268-83E6-9C5E4E0A6A7D@microsoft.com...
>
> Yes, your sample was too complicated for a sample and I lost interest half
> way through.



You got half way? I lost interest at the first inappropriate word-wrap.
Michael C

2006-06-18, 9:55 pm

"Bob O`Bob" <filterbob@yahoogroups.com> wrote in message
news:OdRWd$ykGHA.1456@TK2MSFTNGP04.phx.gbl...
> You got half way? I lost interest at the first inappropriate word-wrap.


I was exaggerating a bit :-)

Michael


Michael C

2006-06-18, 9:55 pm

"Lorin" <Lorin@discussions.microsoft.com> wrote in message
news:A9570BA0-E676-4268-83E6-9C5E4E0A6A7D@microsoft.com...
> I know, all you purists go HISSSS and BOOOO.
> THis is not Spaghetti, just clear and responsible coding.
>
> Any discussion????


I think this shows how poor the error handling in vb6 is. I know everyone
here's ultra sensitive about any criticism of vb6 but the fact that your
spagetti code was necessary shows a real flaw in the language.

Michael


Steve Easton

2006-06-18, 9:55 pm


"Lorin" <Lorin@discussions.microsoft.com> wrote in message
news:A9570BA0-E676-4268-83E6-9C5E4E0A6A7D@microsoft.com...
>
> On Error GoTo Geneva ' for a convention
>
> This brings up the discussion of GOTO since On Error GOTO is a GOTO.
>
> This is the VB6 code I use on occassion if pressed
>
> Public Function MySub(sMyFile as String) as String()
> ON ERROR GOTO MySubErr
> Dim lFNbr as long
> Dims sBuffer as String
> Dim sArgs() as String
> Dim iX as Integer
>
> sBuffer = String$(50," ")
> ' some code
> Do
> 100 Open sMyFile For Binary As lFnbr
>
> 200 Get lFNbr,, sBuffer ' what happens if there are not that many
> characters in the file?
> If Split(sBuffer,",")(0) = "VALID" Then ' just making a point
> sArgs=Split(sBuffer, ",") ' now get all
> For iX = 0 to UBound(sArgs)
> if sArg(iX) = "OOPS" then Exit Do ' a convieient was
> to escape using this GOTO
> ' Note it skips out
> of the FOR as well as the DO
> if sArg(iX) = "GOSH" Then GoTo FlyingLeap ' another type of
> GOTO
> ' Now which is easier to follow?
> ' Can your eye find the label first or the end of the Loop?
> ' Labels are automatically left justified.
> ' what if this was in a complex multilayered nested bit of code?
> Next iX
> MySub = sArgs
> EndIf
> Loop While 0 ' solely the target of a GOTO, can you spot it?
> ' mixed message, I know, but what the heck.
>
> FlyingLeap: ' label are cheap, and I can search to find the source of this
> destination
> ' some additional code goes here to do something very usefull
>
> MySubExit:
> Close lFnbr ' it always closes due to controlled exiting
> ' cleanup even from errors
> Exit Sub
>
> MySubErr:
> Debug.Print Err.Description
> Select case ERL
> Case 100
> ' do something here in code
> ' if there is a possibility on an error at this point then call a
> subroutine with its own error handling to do the work and catch an error
> Case 200
> ' do something else here in code
> Case Else
> ' handle other errors here
> End Select
> ' all errors resume to MySubExit
> Resume MySubExit
>
> End Sub ' MySub <---- do you know why I always do this?


Because you like little green comments??

>
> I know, all you purists go HISSSS and BOOOO.
> THis is not Spaghetti, just clear and responsible coding.
>
> Any discussion????
>
> Stirring the pot.
>


Kinda gives me visions of a Japanese Pachinko machine.


--
Steve
95isalive
This site is best viewed............
........................with a computer


Michael C

2006-06-18, 9:55 pm

"Steve Easton" <admin@95isalive.com> wrote in message
news:%23b6s71zkGHA.1260@TK2MSFTNGP05.phx.gbl...
> Kinda gives me visions of a Japanese Pachinko machine.


Wouldn't that be any event driven language, especially one with multi
threading :-)

Michael


AK

2006-06-18, 9:55 pm

Hey,

I am just the guy banging uranium rocks together and the humor of all the
responses made my day, especially after going thru the grinder with one of
my earlier posted problems where the crew helped me out, and gave me better
understanding.

AK
aka MonkeyCoder or UraniumBanger

LOL

"Lorin" <Lorin@discussions.microsoft.com> wrote in message
news:A9570BA0-E676-4268-83E6-9C5E4E0A6A7D@microsoft.com...
>
> On Error GoTo Geneva ' for a convention
>
> This brings up the discussion of GOTO since On Error GOTO is a GOTO.
>
> This is the VB6 code I use on occassion if pressed
>
> Public Function MySub(sMyFile as String) as String()
> ON ERROR GOTO MySubErr
> Dim lFNbr as long
> Dims sBuffer as String
> Dim sArgs() as String
> Dim iX as Integer
>
> sBuffer = String$(50," ")
> ' some code
> Do
> 100 Open sMyFile For Binary As lFnbr
>
> 200 Get lFNbr,, sBuffer ' what happens if there are not that many
> characters in the file?
> If Split(sBuffer,",")(0) = "VALID" Then ' just making a point
> sArgs=Split(sBuffer, ",") ' now get all
> For iX = 0 to UBound(sArgs)
> if sArg(iX) = "OOPS" then Exit Do ' a convieient was
> to escape using this GOTO
> ' Note it skips
> out
> of the FOR as well as the DO
> if sArg(iX) = "GOSH" Then GoTo FlyingLeap ' another type of
> GOTO
> ' Now which is easier to follow?
> ' Can your eye find the label first or the end of the Loop?
> ' Labels are automatically left justified.
> ' what if this was in a complex multilayered nested bit of
> code?
> Next iX
> MySub = sArgs
> EndIf
> Loop While 0 ' solely the target of a GOTO, can you spot it?
> ' mixed message, I know, but what the heck.
>
> FlyingLeap: ' label are cheap, and I can search to find the source of
> this
> destination
> ' some additional code goes here to do something very usefull
>
> MySubExit:
> Close lFnbr ' it always closes due to controlled exiting
> ' cleanup even from errors
> Exit Sub
>
> MySubErr:
> Debug.Print Err.Description
> Select case ERL
> Case 100
> ' do something here in code
> ' if there is a possibility on an error at this point then call a
> subroutine with its own error handling to do the work and catch an error
> Case 200
> ' do something else here in code
> Case Else
> ' handle other errors here
> End Select
> ' all errors resume to MySubExit
> Resume MySubExit
>
> End Sub ' MySub <---- do you know why I always do this?
>
> I know, all you purists go HISSSS and BOOOO.
> THis is not Spaghetti, just clear and responsible coding.
>
> Any discussion????
>
> Stirring the pot.
>
>



Ralph

2006-06-19, 3:55 am

Xref: TK2MSFTNGP01.phx.gbl microsoft.public.vb.general.discussion:594884


"Lorin" <Lorin@discussions.microsoft.com> wrote in message
news:A9570BA0-E676-4268-83E6-9C5E4E0A6A7D@microsoft.com...
>
> On Error GoTo Geneva ' for a convention
>
> This brings up the discussion of GOTO since On Error GOTO is a GOTO.
>
> This is the VB6 code I use on occassion if pressed
>
> Public Function MySub(sMyFile as String) as String()
> ON ERROR GOTO MySubErr
> Dim lFNbr as long
> Dims sBuffer as String
> Dim sArgs() as String
> Dim iX as Integer
>
> sBuffer = String$(50," ")
> ' some code
> Do
> 100 Open sMyFile For Binary As lFnbr
>
> 200 Get lFNbr,, sBuffer ' what happens if there are not that many
> characters in the file?
> If Split(sBuffer,",")(0) = "VALID" Then ' just making a point
> sArgs=Split(sBuffer, ",") ' now get all
> For iX = 0 to UBound(sArgs)
> if sArg(iX) = "OOPS" then Exit Do ' a convieient

was
> to escape using this GOTO
> ' Note it skips

out
> of the FOR as well as the DO
> if sArg(iX) = "GOSH" Then GoTo FlyingLeap ' another type of
> GOTO
> ' Now which is easier to follow?
> ' Can your eye find the label first or the end of the Loop?
> ' Labels are automatically left justified.
> ' what if this was in a complex multilayered nested bit of

code?
> Next iX
> MySub = sArgs
> EndIf
> Loop While 0 ' solely the target of a GOTO, can you spot it?
> ' mixed message, I know, but what the heck.
>
> FlyingLeap: ' label are cheap, and I can search to find the source of

this
> destination
> ' some additional code goes here to do something very usefull
>
> MySubExit:
> Close lFnbr ' it always closes due to controlled exiting
> ' cleanup even from errors
> Exit Sub
>
> MySubErr:
> Debug.Print Err.Description
> Select case ERL
> Case 100
> ' do something here in code
> ' if there is a possibility on an error at this point then call a
> subroutine with its own error handling to do the work and catch an error
> Case 200
> ' do something else here in code
> Case Else
> ' handle other errors here
> End Select
> ' all errors resume to MySubExit
> Resume MySubExit
>
> End Sub ' MySub <---- do you know why I always do this?
>
> I know, all you purists go HISSSS and BOOOO.
> THis is not Spaghetti, just clear and responsible coding.
>
> Any discussion????
>
> Stirring the pot.
>


VB6's comprehensive frame-based exception handling for guarding code blocks
was rather advanced for its time. (cf. VC++ at the time had at least 3
different incompatible methods). Utilizing exception handling is absolutely
essential in developing a professional application, since in a compiled app
an unhandled error is FATAL and will likely cause the entire app to crash.

Error handling was implemented using Labels opposed to adding new keywords
or complex contructs to the language. When utilized correctly it can be
quite eloquent. While it may use the label mechanism (and syntax) don't
confuse it with the archiaic use of Gotos.

The only 'purity' in my hiss and boo is to note your code is *pure* classic
spaghetti code the result of muddled thinking.

-ralph



Jan Hyde

2006-06-19, 3:55 am

"Michael C" <nospam@nospam.com>'s wild thoughts were
released on Mon, 19 Jun 2006 11:09:46 +1000 bearing the
following fruit:

>"Lorin" <Lorin@discussions.microsoft.com> wrote in message
>news:A9570BA0-E676-4268-83E6-9C5E4E0A6A7D@microsoft.com...
>
>I think this shows how poor the error handling in vb6 is. I know everyone
>here's ultra sensitive about any criticism of vb6 but the fact that your
>spagetti code was necessary shows a real flaw in the language.
>


The OP's spagetti code isn't necessary.

I once laid down a challenge to my coworkers, with the
exception of the error handler show me *any* routine I can't
rewrite without a GOTO

I'm still waiting for that day, and it certainly isn't to
today.

The usual mistake is to try and write one routine that
should be two (or more)









Jan Hyde (VB MVP)

--
"I'll have to change your grade" Tom's teacher remarked
(Kegel Archives)

David Kerber

2006-06-19, 7:55 am

In article <4poc92tg80fvaab2hlfff8c3s81mc59r9o@4ax.com>,
StellaDrinker@REMOVE.ME.uboot.com says...

....

> I once laid down a challenge to my coworkers, with the
> exception of the error handler show me *any* routine I can't
> rewrite without a GOTO


You know, until I saw this thread, I didn't even know that VB still had
an unconditional GOTO statement outside of the error-handling
statements!!!


> I'm still waiting for that day, and it certainly isn't to
> today.
>
> The usual mistake is to try and write one routine that
> should be two (or more)


That's one of my common failings, and I usually end up going back and
refactoring the code later on, into a more appropriate number of
routines. About the time that I start trying to track down a missing
End If buried in 4 or 5 nested IF's and a Select Case statement or two.



--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Jan Hyde

2006-06-19, 7:55 am

David Kerber <ns_dkerber@ns_WarrenRogersAssociates.com>'s
wild thoughts were released on Mon, 19 Jun 2006 08:03:25
-0400 bearing the following fruit:

>In article <4poc92tg80fvaab2hlfff8c3s81mc59r9o@4ax.com>,
>StellaDrinker@REMOVE.ME.uboot.com says...
>
>...
>
>
>You know, until I saw this thread, I didn't even know that VB still had
>an unconditional GOTO statement outside of the error-handling
>statements!!!
>
>
>
>That's one of my common failings, and I usually end up going back and
>refactoring the code later on, into a more appropriate number of
>routines. About the time that I start trying to track down a missing
>End If buried in 4 or 5 nested IF's and a Select Case statement or two.


There is a tool in dotnet I use, if anyone knows of a
VB6 addin that does the same as this dotnet one please speak
up

http://www.devexpress.com/Products/NET/Refactor/

It's really , you can just select a block of code and
Refactor will create a new routine including all the
required paramaters, and change the original code to call
the new routine.





Jan Hyde (VB MVP)

--
Tell a man there are 400 billion stars, he'll believe you. Tell
him a bench has wet paint and he has to touch it.

Steve Easton

2006-06-19, 6:58 pm


"> I am just the guy banging uranium rocks together and the humor of all the
> responses made my day


As long as you don't reach critical mass.
I don't think there's an On error GoTo that would handle that.
Unless maybe it was: On Error GoTo TheMoon

;-)

--
Steve
95isalive
This site is best viewed............
........................with a computer


Lorin

2006-06-19, 6:58 pm


Do only downward jumps qualify as spaghetti code?

This is no different than using EXIT DO
or
EXIT FOR
etc.

If there is a mish-mash of up and down jumps, then I would consider calling
it spaghetti code.

Yes, writing additional subs called from within are a solution, however, no
one mentioned that this creates overhead. Some people like tight code,
eliminate stack pop and pushes (not necessarily in that order).

Which brings up GOSUB.

The higher level of coding, the faster the hardware has to be. THis is a
viscious cycle that only drains everyons purses.

Let's all go back to machine language please where the spaghetti is tasty.


"Lorin" wrote:

>
> On Error GoTo Geneva ' for a convention
>
> This brings up the discussion of GOTO since On Error GOTO is a GOTO.
>
> This is the VB6 code I use on occassion if pressed
>
> Public Function MySub(sMyFile as String) as String()
> ON ERROR GOTO MySubErr
> Dim lFNbr as long
> Dims sBuffer as String
> Dim sArgs() as String
> Dim iX as Integer
>
> sBuffer = String$(50," ")
> ' some code
> Do
> 100 Open sMyFile For Binary As lFnbr
>
> 200 Get lFNbr,, sBuffer ' what happens if there are not that many
> characters in the file?
> If Split(sBuffer,",")(0) = "VALID" Then ' just making a point
> sArgs=Split(sBuffer, ",") ' now get all
> For iX = 0 to UBound(sArgs)
> if sArg(iX) = "OOPS" then Exit Do ' a convieient was
> to escape using this GOTO
> ' Note it skips out
> of the FOR as well as the DO
> if sArg(iX) = "GOSH" Then GoTo FlyingLeap ' another type of
> GOTO
> ' Now which is easier to follow?
> ' Can your eye find the label first or the end of the Loop?
> ' Labels are automatically left justified.
> ' what if this was in a complex multilayered nested bit of code?
> Next iX
> MySub = sArgs
> EndIf
> Loop While 0 ' solely the target of a GOTO, can you spot it?
> ' mixed message, I know, but what the heck.
>
> FlyingLeap: ' label are cheap, and I can search to find the source of this
> destination
> ' some additional code goes here to do something very usefull
>
> MySubExit:
> Close lFnbr ' it always closes due to controlled exiting
> ' cleanup even from errors
> Exit Sub
>
> MySubErr:
> Debug.Print Err.Description
> Select case ERL
> Case 100
> ' do something here in code
> ' if there is a possibility on an error at this point then call a
> subroutine with its own error handling to do the work and catch an error
> Case 200
> ' do something else here in code
> Case Else
> ' handle other errors here
> End Select
> ' all errors resume to MySubExit
> Resume MySubExit
>
> End Sub ' MySub <---- do you know why I always do this?
>
> I know, all you purists go HISSSS and BOOOO.
> THis is not Spaghetti, just clear and responsible coding.
>
> Any discussion????
>
> Stirring the pot.
>
>

Ralph

2006-06-19, 6:58 pm


"Lorin" <Lorin@discussions.microsoft.com> wrote in message
news:B127F763-173F-4E27-8844-DE68F872E1AC@microsoft.com...
>
>
> The higher level of coding, the faster the hardware has to be. THis is a
> viscious cycle that only drains everyons purses.
>
> Let's all go back to machine language please where the spaghetti is tasty.
>
>
> "Lorin" wrote:
>


And one hopes you enjoy that taste when you finally release your first beta
of amazingly tight and essentially read-only code and your competitors are
announcing the release of their version 3. <g>

-ralph



J French

2006-06-20, 7:57 am

On Mon, 19 Jun 2006 11:50:25 -0500, "Ralph"
<nt_consulting64@yahoo.com> wrote:

<snip>

<snip>
[color=darkred]
>And one hopes you enjoy that taste when you finally release your first beta
>of amazingly tight and essentially read-only code and your competitors are
>announcing the release of their version 3. <g>


We used to develop in DOS BASIC and ASM
- the ASM libraries were in-house and thoroughly tested

It was a fast development environment, and the code went fast too


Lorin

2006-06-24, 7:57 am


My experience as a software lead shows me that too many programmers spoil
the application.
ASM and PLM coders do a better job all around because they understand
programming and the ramification of their code.
High level language coders do not know diddly squat about what they are
doing and just burb out code to make others with the milestone charts happy.

Bottom line - there should never be a version 3 !
If ther are significant improvement, it should be a diferent product.
But marketeers run the universe.

"Ralph" <nt_consulting64@yahoo.com> wrote in message
news:dYSdnRsj0sQJSAvZnZ2dnUVZ_rOdnZ2d@ar
kansas.net...
>
> "Lorin" <Lorin@discussions.microsoft.com> wrote in message
> news:B127F763-173F-4E27-8844-DE68F872E1AC@microsoft.com...
>
> And one hopes you enjoy that taste when you finally release your first
> beta
> of amazingly tight and essentially read-only code and your competitors are
> announcing the release of their version 3. <g>
>
> -ralph
>
>
>



Mike Williams

2006-06-24, 7:57 am


"Lorin" <lorinm@hotmail.com> wrote in message
news:eU06naPlGHA.3528@TK2MSFTNGP02.phx.gbl...

> High level language coders do not know diddly squat about what
> they are doing and just burb out code to make others with the
> milestone charts happy.


That's a very unfair generalisation. Lots of high level language coders know
a great deal about what they are doing. In fact many of them, including
myself, have been "machine code" programmers (sometimes with and sometimes
without a "hand holding" ASM) in the past, and some still are. They choose
to use a high level language simply because in many cases it gets the app
done very quickly and the resultant application performs virtually
identically (as far as a user's perception of time is concerned). And, if
you're honest with yourself, you'll certainly admit that there are some ASM
coders out there who, in your own words, know "diddly squat" as well!

Mike



Ralph

2006-06-24, 7:57 am


"Lorin" <lorinm@hotmail.com> wrote in message
news:eU06naPlGHA.3528@TK2MSFTNGP02.phx.gbl...
>
> My experience as a software lead shows me that too many programmers spoil
> the application.
> ASM and PLM coders do a better job all around because they understand
> programming and the ramification of their code.
> High level language coders do not know diddly squat about what they are
> doing and just burb out code to make others with the milestone charts

happy.
>
> Bottom line - there should never be a version 3 !
> If ther are significant improvement, it should be a diferent product.
> But marketeers run the universe.
>

<snipped>

I agree with Mr. Williams that that is an unfair generalization. It is also
a very dangerous one because the areas where ASM/PLM can be productively
used has dwindled dramatically.

Even assuming you have expert ASM/PLM programmers that also have extensive
knowledge of the problem domain ASM/PLM has the following divantages -
1) It tends to be vastly more wordy, providing ratios in the range of 10 to
15x more lines of code. And the number of lines is directly proportional to
the number of errors, time to develop, time to debug, and test. ASM/PLM is
expensive.
2) Due to the nature of the language and the problem domain it takes
additional, if not extraordinary, effort to avoid writing type-specific
code. ie, "One of a kind". Which always leads to problems and longer delays
to repair or modify the code.
3) Related to the above is the fact that ASM/PLM programming often leads to
"pre-optimizing" (why else are you bothering to use low-level language?).
Pre-optimizing is perhaps the most expensive, most wasteful, exercises a
development team can wander into.
4) Platforms, APIs, and O/S services have expanded to the point where there
is now often at least 5 to 10 layers of indirection between your application
and the actual machine services. Whatever savings ASM/PLM might bring to an
Application is usually miniscule compared to the over-all clicks.

Also I have found it far easier to teach or explain to a high-level language
programmer the impact some internal computing feature has when using some
particular API, than it is to bring a ASM/PLM programmer up to speed on the
nuances of new platform services. The former often takes 15 minutes on a
white board, the latter a couple of evenings with a manual and playtime.

To end, here is my wild generalization...
In the real world, expert ASM/PLM programmers tend to be class A prima
donnas. Attempting to managing a group of them is somewhat a kin to herding
cats. That is likely why you suggested they work alone and have few of them.
<g>

-ralph



Ralph

2006-06-24, 7:57 am


"Michael C" <nospam@nospam.com> wrote in message
news:OHJtrmalGHA.4980@TK2MSFTNGP05.phx.gbl...
> "Ralph" <nt_consulting64@yahoo.com> wrote in message
> news:KpGdnXv-P5gDzQTZnZ2dnUVZ_oadnZ2d@arkansas.net...
language?).[color=darkred]
>
> What a total and utter load of bull. While preoptimising can be a waste of
> time it pales into insignificance against such things as lack of planning
> and poor database design. There's also many degrees of pre-optimising. I
> tend to just take it into account on the way which costs almost no time.

If
> I know one method is faster than another I'll use that method.
>
> In response to what Lorin said I think you guys might have

misinterpretted.
> I took it as comparing a pure high level programmer with another high

level
> programmer with assembly experience. The second will be a better

programmer
> to some degree because they know what's happening underneath.
>
> Michael
>


Labeling pre-optimization as "THE" most expensive was a hyperbole. It is
however very pervasive and can affect just about every part development
including planning and database design, and one needs to be on their guard
at every stage. As every developer's job is to deliver code that is as
efficient as possible it can become difficult to recognize when one is using
good sense and when one is not, if one doesn't specifically look for it.

Choosing the faster Method A over the slower Method B may be a no-brainer.
Dwelling on and squeezing the last click out of a Method C may not be so
sane. Using "speed" as a primary criteria in all situations serves as a good
warning sign.

Of course the more any programmer knows about the problem domain - whether
that knowledge concerns the business or the hardware - the 'better' he/she
will be prepared provide solutions. I am just not convinced that simply
being able to program in ASM/PLM or a willingness to bail on higher-level
tools and jump into such programming is all that fruitful in today's market.

But of course it depends on the nature and target of the product.

-ralph


Karl E. Peterson

2006-06-24, 7:57 am

Michael C wrote:
> What a total and utter load of bull.


Has it ever struck you just how often you feel compelled to respond like
this?
--
Working without a .NET?
http://classicvb.org/


Bob O`Bob

2006-06-24, 7:57 am

Karl E. Peterson wrote:
> Michael C wrote:
>



I think you meant:


> Michael C wrote:
> a total and utter load of bull.
>



HTH!
Karl E. Peterson

2006-06-24, 7:57 am

Bob O`Bob wrote:
> Karl E. Peterson wrote:
>
>
> I think you meant:
>
>
>
>
> HTH!



Heheheheh... Yeah, what he said!
--
Working without a .NET?
http://classicvb.org/


Michael C

2006-06-25, 3:56 am

"Karl E. Peterson" <karl@mvps.org> wrote in message
news:eFLGbJilGHA.4716@TK2MSFTNGP04.phx.gbl...
> Michael C wrote:
>
> Has it ever struck you just how often you feel compelled to respond like
> this?


Yes but there are 2 ways to look at it. The first is that I'm over reacting,
the second is that there is a lot of stupid statements presented in
newsgroups. Do you really think the second is NOT true? No matter how silly
an idea there's always someone there who pushes it as the best thing since
sliced bread and will go to any lengths to back up the idea. Probably the
worst group is those about the rotary engine, some of the statements are
truly amazing.

Michael


Karl E. Peterson

2006-06-26, 6:56 pm

Michael C wrote:
> "Karl E. Peterson" <karl@mvps.org> wrote in message
> news:eFLGbJilGHA.4716@TK2MSFTNGP04.phx.gbl...
>
> Yes but there are 2 ways to look at it. The first is that I'm over
> reacting,


You? <g>

> the second is that there is a lot of stupid statements
> presented in newsgroups. Do you really think the second is NOT true?


I think you're "getting very warm!" now...

> No matter how silly an idea there's always someone there who pushes
> it as the best thing since sliced bread and will go to any lengths to
> back up the idea.


"Hot!"
--
Working without a .NET?
http://classicvb.org/


Michael C

2006-06-26, 6:56 pm

"Karl E. Peterson" <karl@mvps.org> wrote in message
news:%23Heb2VWmGHA.3632@TK2MSFTNGP03.phx.gbl...
>
> "Hot!"


So what you're saying is the news is so full of stupidity that I should stop
being suprised by it?

Michael


Karl E. Peterson

2006-06-26, 9:56 pm

Michael C wrote:
> "Karl E. Peterson" wrote ...
>
> So what you're saying is the news is so full of stupidity that I
> should stop being suprised by it?


Colder.
--
Working without a .NET?
http://classicvb.org/


Larry Serflaten

2006-06-26, 9:56 pm


"Michael C" <nospam@nospam.com> wrote
> "Karl E. Peterson" <karl@mvps.org> wrote in message
>
> So what you're saying is the news is so full of stupidity that I should stop
> being suprised by it?


More like the groups are a mirror on society, or the proverbial;
While you're pointing one finger at somebody else...

<g>
LFS


Gary Nelson

2006-06-27, 3:56 am

> We used to develop in DOS BASIC and ASM
> - the ASM libraries were in-house and thoroughly tested
>
> It was a fast development environment, and the code went fast too


I got a big kick working on ASM (It's been nearly 20 years ago now). You
always had to have one finger on the reset button, as the smallest mistake
would hang the machine, but the results were astounding especially mixed
with BASIC PDS. I kind of miss it.

Gary


J French

2006-06-27, 3:56 am

On Tue, 27 Jun 2006 08:47:12 +0100, "Gary Nelson" <gn@nospam.com>
wrote:

[color=darkred]
>I got a big kick working on ASM (It's been nearly 20 years ago now). You
>always had to have one finger on the reset button, as the smallest mistake
>would hang the machine, but the results were astounding especially mixed
>with BASIC PDS. I kind of miss it.


Basic 7 and ASM made a wonderful toolkit

Any (well most) limitations of BASIC simply disappeared with the
addition of a little ASM

Since we used LIB files, they were like an extension of the language

They were happy days
Michael C

2006-06-27, 7:56 am

"Larry Serflaten" <serflaten@usinternet.com> wrote in message news:%
> More like the groups are a mirror on society, or the proverbial;
> While you're pointing one finger at somebody else...


Groups are a filter of society and not really a mirror. The filter is more
than just the topic of the group in a lot of cases. This group certainly has
an extra WHERE RefuseToMoveOnAndAcceptReality = TRUE ;-)

Michael


Jim Carlock

2006-06-27, 9:55 pm

"Larry Serflaten" <serflaten@usinternet.com> wrote in message news:%
> More like the groups are a mirror on society, or the proverbial;
> While you're pointing one finger at somebody else...



"Michael C" <nospam@nospam.com> wrote:
> Groups are a filter of society and not really a mirror. The filter
> is more than just the topic of the group in a lot of cases. This
> group certainly has an extra WHERE
> RefuseToMoveOnAndAcceptReality = TRUE ;-)


VB already moved over to Linux. Did you?

Michael, are you up for a challenge? I've got a challenge for
you.

Create an app in the .Net language, YOU select the criteria
for the application. Don't make it overly complicated. State the
objectives of the program so as some folks here can create a
similar application (not for comparison in any means, but just
for fun). I'll host both haps for fun if no one else wants to be
involved. Just make sure you don't compare anything, so as
not to offend anyone at Microsoft. We'll explicitly provide
disclaimers that Microsoft says "DO NOT COMPARE the
file size. DO NOT COMPARE the speed." You know to
be legal and all. We'll just do this for fun. What do you say?
I think this is a really great challenge.

--
Jim Carlock
Post replies to the group.


Michael C

2006-06-27, 9:55 pm

"Jim Carlock" <anonymous@localhost> wrote in message
news:eMOeOelmGHA.4536@TK2MSFTNGP04.phx.gbl...
> Create an app in the .Net language, YOU select the criteria
> for the application. Don't make it overly complicated. State the
> objectives of the program so as some folks here can create a
> similar application (not for comparison in any means, but just
> for fun). I'll host both haps for fun if no one else wants to be
> involved. Just make sure you don't compare anything, so as
> not to offend anyone at Microsoft. We'll explicitly provide
> disclaimers that Microsoft says "DO NOT COMPARE the
> file size. DO NOT COMPARE the speed." You know to
> be legal and all. We'll just do this for fun. What do you say?
> I think this is a really great challenge.


Hi Jim,

If I was going to pick the app I would make it an imaging app. We're
duplicating imaging code in 2 different apps at work now, one in vb6 and the
other in dot net. While the dot net developer can write 1 line of code to
resize an image the poor vb6 programmer is spending hours sifting through
newsgroup postings and api calls to get the same result (actually a poorer
result). And there's plenty of other functionality for this app the vb6
developer is having lots of trouble with. However I'm not interested in the
challenge, I don't have time to do my own programming let alone taking on
more for an exercise. :-)

As for the speed and size issue we could write apps in assembler in dos and
I'm sure they'll be faster and smaller. I can see the day approaching where
you don't get to run an exe on a user's machine but run everything in
sandbox mode. There's plenty of examples of this already such a flash files,
excel spreadsheets, powerpoint slides etc. Remember when email jokes used to
be exes? One day I suspect everything will be jit compile and yes there will
be a performance and size hit but a necessary one.

Michael


Tym

2006-06-28, 7:57 am

On Sun, 18 Jun 2006 21:12:32 -0400, "Steve Easton"
<admin@95isalive.com> wrote:

>
>Because you like little green comments??


No - most likely so that when you've scrolled down to the end of a Sub
you don't have to remember which one it was.

Howver, i if you look at the top of the window at the right - it tells
you there so - to answer his question - no - not really :-)

Tym

~There's no place like 127.0.0.1~
Gary Nelson

2006-06-30, 9:55 pm

> Basic 7 and ASM made a wonderful toolkit
>
> Any (well most) limitations of BASIC simply disappeared with the
> addition of a little ASM
>
> Since we used LIB files, they were like an extension of the language


We did the same. I remember once showing our program to some COBOL
programmers and watching their jaw drop. They couldn't believe the things we
could do with BASIC (and a little ASM).

> They were happy days


Very.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com