If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Bad programming practices encouraged.... namely VB!

VB introduced some bad, non-standard programming practices... now they are
going to allow for this continuing bad practice...

If those who were writing code to compare for true/false had simply used
the *NAMED* constants, not the values, in their code they would have been
fine under .NET.... but noooo... let's belly-ache and moan and get MS to
concede to the people who wrote BAD CODE to begin with...

Fix your code you whiners!!

I think any changes on the VB side to come more into align with the rest
of the programming community should be welcome.

If code-maintenance is your concern, KEEP using VB6 until you can afford/warrant
the conversion time/cost to go all the way to .NET;

Chances are your applications could stands some architectural changes to
take advantage of all the new features available (finally) to VB in .NET.
This alone should outweigh the effects of any .NET-specific changes to the
VB core language.

Re: Bad programming practices encouraged.... namely VB!

"b.a.h." wrote:
>
> VB introduced some bad, non-standard programming practices... now they are
> going to allow for this continuing bad practice...
>
To be fair, VB didn't introduce using numbers for true and false. It
was mandatory under QuickBasic. Other languages get by without boolean
types, too, and just use numbers. However, they pretty much all use
the same numbers.

Honestly, I wasn't bothered by the value of true in any real way, but
it still bothered me to look at the same SQL-Server table through an
Access link, and directly in Query Analyser, and see different values
in the fields.

Re: Bad programming practices encouraged.... namely VB!

> If those who were writing code to compare for true/false had simply used
> the *NAMED* constants, not the values, in their code they would have been
> fine under .NET.... but noooo... let's belly-ache and moan and get MS to
> concede to the people who wrote BAD CODE to begin with...

The change to the value of CInt(True) (and that is all this change is) will
not adversely affect anyone (if you think I am wrong, please tell me).

--
Kathleen
(MS-MVP)
Reply in the newsgroup so everyone can benefit
--

Re: Bad programming practices encouraged.... namely VB!

On 9 Apr 2001 09:45:28 -0700, ""b.a.h."" <no.spam@yahoo.com> wrote:
>
>VB introduced some bad, non-standard programming practices... now they are
>going to allow for this continuing bad practice...
>
>If those who were writing code to compare for true/false had simply used
>the *NAMED* constants, not the values, in their code they would have been
>fine under .NET.... but noooo... let's belly-ache and moan and get MS to
>concede to the people who wrote BAD CODE to begin with...
>
>Fix your code you whiners!!

Learn the language, you whiner. The value of the "constant" has
little to do with it.

The *intrinsic* value of true is the issue. That is, the result of a
comparison: "A>B" must be 0 or -1 for existing *perfectly proper*
code to work.

If MyValue% And MyMask% And A>B Then ' masked bits with a switch

Learn more about the issue before you start spouting off and you won't
look so much the idiot. Start here if you'd like:

Actually, I think we need to make some more changes with these
objectives in mind. Both VB and MSIL have "And" as the bitwise
operator... perhaps C# needs to be in compliance?
>If code-maintenance is your concern, KEEP using VB6 until you can afford/warrant
>the conversion time/cost to go all the way to .NET;
>
>Chances are your applications could stands some architectural changes to
>take advantage of all the new features available (finally) to VB in .NET.
>This alone should outweigh the effects of any .NET-specific changes to the
>VB core language.

These changes have *nothing* to do with architecture. Again, learn
more before opening your mouth and removing all doubt.

Re: Bad programming practices encouraged.... namely VB!

Kathleen
> The change to the value of CInt(True) (and that is all this change is)
will
> not adversely affect anyone (if you think I am wrong, please tell me).

You are not wrong.

The whole debate is a mask for the reactionaries to cry behind. I wish they
would shut up and talk about something useful. I come to this NG to learn
something but all I read is hyper-technical clap-trap that is useless to me
as I struggle in a new paradigm trying to get my WebForm to work.

Its a guy thing I think, an ego thing, a frightened little boy thing, but at
least the logic is simple - If I spend 8 hours a day writing boring rubbish
about BitShifting then:

1). People will think I am cool
2). I don't have to learn .NET just yet.

Re: Bad programming practices encouraged.... namely VB!

What a bady written document. The only thing it makes clear is the extent to
which you assume other coders give a toss about your pathetic obsession.
Why, I have to ask myself, in all my years of VB coding, have I never given
a moments thought to the issues you imagine are seared into all our minds?
Perhaps its because I am not a frustrated C++ coder like you are, or perhaps
its because I am more concerned with producing code than I am defining
myself through esoterica.

Re: Bad programming practices encouraged.... namely VB!

"Reasonable people adapt to the world.
Unreasonable people persist in trying to adapt the
world to themselves. Therefore, all progress
depends on unreasonable people."
--George Bernard Shaw

"b.a.h." <no.spam@yahoo.com> wrote in message
news:3ad1e728$1@news.devx.com...
>
> VB introduced some bad, non-standard programming
practices... now they are
> going to allow for this continuing bad
practice...
>
> If those who were writing code to compare for
true/false had simply used
> the *NAMED* constants, not the values, in their
code they would have been
> fine under .NET.... but noooo... let's
belly-ache and moan and get MS to
> concede to the people who wrote BAD CODE to
begin with...
>
> Fix your code you whiners!!
>
> I think any changes on the VB side to come more
into align with the rest
> of the programming community should be welcome.
>
> If code-maintenance is your concern, KEEP using
VB6 until you can afford/warrant
> the conversion time/cost to go all the way to
..NET;
>
> Chances are your applications could stands some
architectural changes to
> take advantage of all the new features available
(finally) to VB in .NET.
> This alone should outweigh the effects of any
..NET-specific changes to the
> VB core language.
>
>

Re: Bad programming practices encouraged.... namely VB!

On Mon, 9 Apr 2001 20:23:59 -0700, "Jonny" <jonny@joyofvb.com> wrote:
>Dan
>
>> http://www.mvps.org/vb/tips/truth.htm
>
>What a bady written document. The only thing it makes clear is the extent to
>which you assume other coders give a toss about your pathetic obsession.

Sorry it wasn't a help to you. If you find something is incorrect
I'll be glad to fix it. FWIW, I didn't assume other coders cared...
it started out as a response to *questions*.
>Why, I have to ask myself, in all my years of VB coding, have I never given
>a moments thought to the issues you imagine are seared into all our minds?

Perhaps because that is the defined behavior of the language? Silly
thought I know, but strangely enough a lot of developers actually want
to know how the language is supposed to behave.
>Perhaps its because I am not a frustrated C++ coder like you are, or perhaps
>its because I am more concerned with producing code than I am defining
>myself through esoterica.

FWIW, I'm not a frustrated C++ coder. If you don't know the language
behavior I think your code may be a bit unpredictable. I strongly
suggest you learn the defined behavior of *whatever* language you're
using. If you are relying on experimentation then it is quite
possible you are relying on side effects (undefined behavior).

Re: Bad programming practices encouraged.... namely VB!

On Tue, 10 Apr 2001 14:23:38 -0700, "Sjoerd Verweij"
<nospam.sjoerd@sjoerd.org> wrote:
>> Sorry it wasn't a help to you. If you find something is incorrect
>> I'll be glad to fix it. FWIW, I didn't assume other coders cared...
>
>Rest assured, some do. I thought it was an excellent document.

Thanks. Glad it was helpful.

I found myself repeating that stuff, in bits and pieces, way too much
in replies. It's helped a lot just to be able to point to it.

Re: Bad programming practices encouraged.... namely VB!

Dan
> Sorry it wasn't a help.

Apology accepted.
> I'm not a frustrated C++ coder.

Know thyself before all others.

Dan, you have issues, I advise you to deal with them before your cognitive
dissonance further reveals itself in damaging ways. My advice would be to
stop fearing failure and let go of VB. It is obvious from all that you write
that you are simply not interested in conveying useful information
preferring instead to concentrate on subjects you perceive as carrying high
peer-status. Unfortunately the majority of real VB coders would consider
your personal bete-noirs as marginal topics at best.

Lets be brutally honest - only a wannabe C++ coder could possible lose sleep
over the syntax of bitwise operators. It is precisely because I never wanted
to deal with such topics that I decided to learn BASIC (I guess the clue is
in the acronym).

Infact I would bet a dead horse that most VB coders have never bit-shifted a
binary digit in their lives, probably because they were too busy building
database front-ends for a living. I wonder if .NET makes DB front-ending
easier? No point asking you of course since your concerns lie in the
important areas of, um .. BitMasking and Bitwise Operator Precedence (if I
smirk its only because its so ironic).
> If you are relying on experimentation then it is quite
> possible you are relying on side effects (undefined behavior).

Re: Bad programming practices encouraged.... namely VB!

Hi Jonny,
> Lets be brutally honest - only a wannabe C++ coder could possible lose
sleep
> over the syntax of bitwise operators. It is precisely because I never
wanted
> to deal with such topics that I decided to learn BASIC (I guess the clue
is
> in the acronym).

IMO, this is precisely why And, Or, Xor, and Not should be boolean
operators. Still think we know something bits, though.

Re: Bad programming practices encouraged.... namely VB!

On Wed, 11 Apr 2001 09:38:06 -0700, "Jonny" <jonny@joyofvb.com> wrote:
>Dan
>
>> Sorry it wasn't a help.
>
>Apology accepted.
>
>> I'm not a frustrated C++ coder.
>
>Know thyself before all others.
>
>Dan, you have issues, I advise you to deal with them before your cognitive
>dissonance further reveals itself in damaging ways. My advice would be to
>stop fearing failure and let go of VB. It is obvious from all that you write
>that you are simply not interested in conveying useful information
>preferring instead to concentrate on subjects you perceive as carrying high
>peer-status. Unfortunately the majority of real VB coders would consider
>your personal bete-noirs as marginal topics at best.

Perhaps you are right. Maybe you know "real VB coders" better than I
do. Whatever they are.

However, I'm fairly certain I know how *developers* feel about having
their code base trashed. There is a distinct difference in objectives
between a coder and a developer and I suggest you learn something
about that at some point.
>Lets be brutally honest - only a wannabe C++ coder could possible lose sleep
>over the syntax of bitwise operators. It is precisely because I never wanted
>to deal with such topics that I decided to learn BASIC (I guess the clue is
>in the acronym).

Maybe you should learn the language better then. Basic *only* has
bitwise operators. If you didn't want to deal with such topics then
you've made a grave mistake.
>Infact I would bet a dead horse that most VB coders have never bit-shifted a
>binary digit in their lives, probably because they were too busy building
>database front-ends for a living. I wonder if .NET makes DB front-ending
>easier? No point asking you of course since your concerns lie in the
>important areas of, um .. BitMasking and Bitwise Operator Precedence (if I
>smirk its only because its so ironic).

Dunno about database front ends. Never did one.
>
>> If you are relying on experimentation then it is quite
>> possible you are relying on side effects (undefined behavior).
>
>Its true. Please see my articles on evolutionary computation
>(http://www.joyofvb.com) for more details.

Re: Bad programming practices encouraged.... namely VB!

Dan
> However, I'm fairly certain I know how *developers* feel about having
> their code base trashed ..

Oh yes, the famous 'code base' that we all hear so much about from the
reactionaries. I have been wondering about this but cannot for the life of
me see how this can be true. In my experience the world of coding is always
moving and I am always learning, getting better. It seems that only
people/companies who are already standing still could possibly build and
then usefully use a code library.
> I suggest you learn something about that at some point.

Hah, you betray yourself. This is your tired technique - you justify
yourself via fringe knowledge and put others down in the same way. For
example, above we see you attempting to define the boundaries of peer
knowledge as being the boundaries you know thus excluding me and so
'winning' the point. I honestly feel sorry for you, to be so ossified, or
maybe the word should be petrified.
> Maybe you should learn the language better then.

And again, the same technique. Maybe I should learn more about VB-Classic,
as you suggest, but I make no claims to programming excellence and certainly
do not define my sense of worth via streams of cabalistic esoterica. I
suggest that you do define yourself in this way and that is the real reason
you are so prominant amongst the luddites and moaning minnies.
> Basic *only* has bitwise operators.

Really, gosh. Now that is a suprise to me. So now all I need to find out
what a 'bitwise operator' is and we will be laughing. Its a miracle I have
gotten this far without knowing this exssentail fact don't you think?

Dan, every statement you make backs up my point. Why don't you relax the
knot in your stomach and just accept the world is dynamic, you cannot
control the ocean so let it wash over you. Learn the new stuff then come
back and soon you will be a Guru again. Your incessant whining does nothing
except convince many people you are a not fit for the new environment.
> Dunno about database front ends. Never did one.
> I seem to spend all my time on business apps.

Business that don't use databases I presume.

You really are clutching at straws to make your points now aren't you. I
take it you deny that the majority of VB work is concerned with 2/3 tier
business applications? Perhaps in your world VB coders all sit hunched over
their Lab desks worrying over the QBit super-imposition states - heh.