On Feb 25, 1:18 am, "Dustin Cook" <bughunter.dus...@gmail.com> wrote:
> On Feb 25, 12:11 am, "Kadaitcha Man" <nntp.n...@gmail.com> wrote:
>
> > > </quote> childish code. No wonder they
> > > call it BASIC (read: code for children)
>
> Actually, it's not quiet basic.. See below, as I tear K-man to
> shreds
>
> > These days, with .NET there is no fundamental difference between BASIC, C#
> > and J#, et al. Real differences lie only in how the code is required to be
> > structured by the precompiler. Only a very short copy/paste manoeuvre is
> > needed to convert .NET-based C# to Visual Basic or Visual Java, and back
> > again.
>
> blah blah. Any developer realizes this.. even you... shrug.
>
> > made with daubed faeces by captive orang-utans bored ****less from nothing
> > else to do except swing in the trees and eat an endless supply of bananas.
>
> > "That's a simple programming thing tho"http://groups.google.com.au/group/alt.comp.os.windows-xp/msg/616184df...
>
> > The emphasis is on simple.
>
> So simple in fact, you missed it.. See below.
>
>
>
> > So, on to a really rough and quick but professional critique of the code
> > above... I was a professional software developer, now in management, though
> > I still cut a lot of code just to keep up with the latest advancements...
>
> > > randomize
> > > a=rnd(0)
> > > a=a mod 1
> > > b=rnd(0)
> > > b=b mod 23
> > > death=b
> > ^^^^^^^^^^
> > > b=rnd(0)
> > > b=b mod 23
> > > runy=b
> > > b=rnd(0)
> > > b=b mod 23
>
> > The variable named "death" indicates that the language is capable of
> > supporting variable names other than simple a, b, c. Code should make use of
> > extended variable names with the intent of increasing the code's ability to
> > self-document.
>
> True, that was sloppy on my part. I think I said the code was sloppy
> originally tho..
>
> > As another example of the woefully poor exploitation of variable names...
>
> > > ar=local
>
> > ar might be short for "AR AR ME 'ARTIES!!!"
>
> > Perhaps Dustfart fancies himself as a pirate on the high seas or something.
>
> just lazy...
>
> > > b=rnd(0)
> > > b=b mod 23
> > > death=b
>
> > Three lines of code are used to do what can be done in one line...
>
> > death = rnd(0) mod 23
>
> Ahh, but your wrong sir. This is Asic, it cannot be done in one
> line.
>
> > The results are the same but the process is not. Dustfart's amateurish and
>
> The results would be the same, If the language supported it in one
> statement like that. (It doesn't). It's asic, not quiet basic.
>
> > woefully inefficient code requires values to be moved left, right and
> > centre, then all the way back again before a result is obtained. I use the
>
> Ouch, I don't think you realize how close asic really is to
> assembler... Your loss.
>
> > word "amateurish" reservedly. I am bereft of sufficient one-word
> > superlatives to convey the idea of complete rubbish born of his artless
> > bumbling.
>
> > > gosub check:
>
> > Subroutines should only be used where there is a need to eliminate repeated
> > _larger_ segments of code. The subroutine named "check" is called from only
> > two places in the entire ...ahem... "program", and it will cause the
> > compiler/run environment to beat on the processor; see a little later about
>
> Actually, it won't. The assembler code is referenced via jmp
> statements in the executable. It saves codespace, by writing code once
> if it's going to be used more than once, it should be a routine. Why
> repeat the same code?
>
> > strings. Given what I say a later about strings inside loops, the "check"
> > subroutine is not just entirely superfluous, it is detrimental to the
> > efficient execution of the code.
>
> Ehhhehh.. Heh, the code is written in asic. I don't think you quiet
> understand what asic is.
>
>
>
> > > b=b mod 23
> > > death=b
> > > b=rnd(0)
> > > b=b mod 23
> > > runy=b
> > > b=rnd(0)
> > > b=b mod 23
>
> > > if death=runy then
> > > a=rnd(0)
> > > a=a mod 23
>
> > Some variable modulus 23 is used 4 times in 10 lines. Setting aside that the
> > code segments use 3 lines where one line will do, the whole rnd(x) mod 23
> > should have been a candidate for conversion into a subroutine, then
> > discarded as a candidate because it would probably require just as many
> > processor cycles to jump and return as it would to calculate the modulus of
> > two simple numbers inline. I doubt Dustfart's capacity to have ever
> > considered that at all. I suppose soon enough we'll see if his hindsight
> > is operating at a perfect 20-20.
>
> Pure lazyness on my part. The entire rnd code could have been
> converted to a subroutine, but it has to occur in that order. Asic
> doesn't understand multiple statements/actions per line.
>
> > > for y=1 to 24
> > > a$=a$+"+-"
> > > next y
I'd like to show you a couple of other ways of doing the same
thing.
a$=string$(24,"+-")
that will do the same as the code above and below.
a$="+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-"
another way
a$="**** k-man"
kmanshouse=varptr(a$)
ourhouse=defseg(0)
x=1
y=kmanshouse
while x<25
poke y,27
x=x+1
y=y+1
wend
and another
a$="**** k-man"
kmanshouse=varptr(a$)
ourhouse=defseg(0)
x=kmanshouse
y=x+24
for z=x to y
poke z,27
next z
the end result is the same, but the code generated isn't. Now, you
wouldn't understand why this would be considered useful to someone
like me, but I suspect 4Q might get the idea behind it. This is how
things are done in Asic k-man, 4Q has mislead you concerning what asic
is and isn't.
--
Dustin Cook
http://bughunter.it-mate.co.uk



Reply With Quote