-
Re: Bad programming practices encouraged.... namely VB!
"Zane Thomas" <zane@mabry.com> wrote in message
news:3b7080ee.508906781@news.devx.com...
> On Fri, 13 Apr 2001 20:45:29 GMT, kylix_is@hotmail.com (Mike Mitchell)
> wrote:
>
> >Hey, Jonny and Zane know each other. Kinda figures!
>
> I take it as my honor to count Jonny as a friend, so yeah it figures.
<aol>Me too!</aol>
(Let's *really* confuse MM! <snicker>)
Later... Karl
--
http://www.mvps.org/vb
-
Re: Bad programming practices encouraged.... namely VB!
"Jonny" <jonny@joyofvb.com> wrote in message news:3ad6545c@news.devx.com...
<snip>
>
> Code Reuse and the Burden of Interpretation
> ----------------------------------------------
>
<snip>
>
> From this it can be seen that code reuse would be greatly enhanced by
> preventing the coder from applying their personal interpretation to a
given
> solution. If it is the case that the incompatible boundaries between
> isomorphic solutions are indeed responsible for the lack of code reuse
then
> removing the coder will also remove inevitable variability of solution
> interpretation and so enhance the prospects of reusing solution code.
>
> The corollary to the observation that coders should not be involved with
> solution code is that code reuse is only possible with code that has been
> automatically generated by a consistent, non-interpretative framework.
Or, as is the case in most multi-developer environments, there are people
who solve problems independent of computer language -- system analysts.
The solution is then broken down so that it fits existing code bases, where
it is cost-effective to do so.
<snip>
>
> Jonny
>
>
Your point about evolutionary programming being an interesting technology is
still valid.
Regards,
Mark Hurd, B.Sc.(Ma.) (Hons.)
-
Re: Bad programming practices encouraged.... namely VB!
On Fri, 13 Apr 2001 17:44:03 -0700, "Karl E. Peterson" <karl@mvps.org>
wrote:
>(Let's *really* confuse MM! <snicker>)
Hahaha, too late!
---
Ice Z - Straight Outta Redmond
-
Re: Bad programming practices encouraged.... namely VB!
"Jonny" <jonny@joyofvb.com> wrote in message news:3ad48c40@news.devx.com...
<snip>
> 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).
>
It is clear from my experience that there are two major groups of
professional VB programmers. There are those who use it as a glue to join
components including database access. And those who use it as an application
development language.
The former is a much larger group, especially if you include VBA, which is
almost by definition included in this group.
I am not saying a database front-end is not a complete application, but the
two uses are fairly clear cut even within the one project.
There is probably now a third group, component writers and class-only
stuff -- the middle tier of a three-tiered system.
One of the best distinctions between the groups is whether they have ever
used a Declare declaration, or because of the amount of sample code out
there, whether they have ever looked at a C declaration and converted it
into a Declare statement.
My first experience with VB, was with a tax accounting application that did
not use a database to store its data. We wrote to binary files and found it
very funny when customers asked how many company files could fit on a floppy
disk. They had seen our competition which stored full databases, and so
could only have a few on a single floppy.
We had to go off and check that the answer was dozens or hundreds.
This application also implemented DDE for linking into 1-2-3 and Excel,
copying RTF to the clipboard using the API, and generally had the look and
feel of a complete Microsoft application. (Yes, without the bugs.)
This development actually caused me problems career-wise: I was there (it
was Coopers & Lybrand) for 3.5 years and we never looked at databases. So I
was a VB "expert" except for databases. I had to explain to a number of
database-based potential employers that I use VB like C, as an application
development environment, not like a database macro language.
I did find work where they were transforming a mainframe app to Windows and
the web, so I happened to be able to use my existing skills and the database
work going on at the same time caused me to understand that side too.
So back to my point: VB has a feature that is you can easily get a lot done
without understanding the complete language, or event the constructs you are
using. That is both a good thing and a bad thing, that's why I call it a
feature :-)
It does *not* preclude you from understanding in intimate detail the goings
on however. (Except for the lack of a published grammar.) Much code exists
and many mindsets have been formed based upon existing functionality.
One of these groups should *not* win over the others.
<snip>
>
> Jonny
Regards,
Mark Hurd, B.Sc.(Ma.) (Hons.)
-
Re: Bad programming practices encouraged.... namely VB!
"Jonny" <jonny@joyofvb.com> wrote in message news:3ad27c35@news.devx.com...
> 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.
Some people (who believe in explicit programming) use CInt(bBooelanVariable)
to get the value of true that may then be written to (and read from) files,
comms sockets or other external stream. The change might break these cases.
Note that I do not ask that the change to the value of True to be dropped
because of this. It is a consequential change IMO that exists only because
of the more controversial changes to logical/bitise operators from Beta 1 to
Beta 2.
Within this context the changes need to be optional so that new code can
take advantage of the more logical changes introduced in Beta 1 whilst old
code can still use VB6 sematincs.
>
> 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.
If you were trying to get web-forms working Jonny, wouldn't the MS newsgroup
for ASP.NET be a better place to go?
news:microsoft.public.dotnet.framework.aspnet
> 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.
I commend you on your incisive wit and way cool logic. Perhaps you would now
find some time (unlike these egostic little boys) to learn about WebForms.
Don't want to lower yourself to the level of the frightened bitshifters hey?
>
> ****ing Idiots.
Glad to see that *you* are not a "little boy" Jonny.
>
> Jonny
>
Kunle
-
Re: Bad programming practices encouraged.... namely VB!
"Kathleen Dollard-Joeris" <kjoeris@noemailplease.com> wrote in message
news:3ad72a53$1@news.devx.com...
> Sjoerd,
>
> > Note: most of the noted points are still more sentiment than hard fact.
> But
> > don't underestimate the power of sentiment: it's what keeps Java alive
>
> There was a reason I was asking Jonny, I hadn't heard his opinion. I have
> heard yours, and in other posts you have gotten somewhat closer than in
this
> one to my question of which/why/how. Just to clarify, what I think you did
> understand, I mean at a technical level, not an sentimental one.
>
> VS.Net has the potential to be a player with Java. But that is benefitted
by
> current VB programmers making the switch with as few subtle gotchas as
> possible.
Those same VB programmers have shown a great ability to move to Java
Kathleen. There are many VB-to-Java tools that do a good enough job. The
programmers - for that is what they are- do the rest by hand. The basic
premise that unless the new VB is virtually the same as the old VB with a
few bells and whistles is undermined by this simple fact.
Java defections showed MS how easy it could be for people to make the switch
if their most successful development language and/or environment continued
down it's misguided route. Many millions (hundreds of thousands of VB'ers at
least) did switch and now there is a real danger that as long as VB - the
language - remains essentially unchanged, they will not be coming back to
VB.
Kunle
VB: To infinity or the dump..
-
Re: Bad programming practices encouraged.... namely VB!
On Sat, 14 Apr 2001 01:14:15 GMT, zane@mabry.com (Zane Thomas) wrote:
>On Fri, 13 Apr 2001 17:44:03 -0700, "Karl E. Peterson" <karl@mvps.org>
>wrote:
>
>>(Let's *really* confuse MM! <snicker>)
>
>Hahaha, too late!
No, it's not. I'm totally confused now.
MM
-
Re: Bad programming practices encouraged.... namely VB!
"Dan Barclay" <Dan@MVPs.org> wrote in message
news:joi4dt018bh9hjttivpm17iqlgklib2j8n@4ax.com...
> 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.
Wrong Dan. Wrong big time.
PROBLEM: Lack of logical operators in VB.
CONSEQUENCE: Programmers had to use the bitwise operators as logical
operators.
SOLUTION: Introduce proper logical operators (separate from bitwise
operators) and provide a way to support code migration (Upgrade Wizard)
F***UP: Somebody felt it would be easier to just propagate a glaring
failure/omission of classic VB (lack of logical operators) rather than fix
it.
VISION: Recognizing the difficulties these fundamental issue presents, I
suggest that there the best way is to support both both only one at a time.
The programmer gets to choose which semantics to use by specifying and
Option VB6Compatibility statement or similar...
RESULT: We all live happily ever after (at least until the next issue)?.
What do you think people?. Jonny? Dan?
> If MyValue% And MyMask% And A>B Then ' masked bits with a switch
Learn to code properly please (don't just mix logical and bitwise expression
just because you can):
If (A < B) Then
If (MyValue% And MyMask%) Then
' your code goes here
' (explicit programming to the rescue)
End If
End If
> 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:
>
> http://www.mvps.org/vb/tips/truth.htm
>
> >I think any changes on the VB side to come more into align with the rest
> >of the programming community should be welcome.
>
> 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?
Now you propose that VB must be in compliance with MSIL. That is reaching
Dan, damned near fully extended and still reaching...
The removal of logically named, distinct, logical operators (from Beta 1) to
be replaced with historical VB hacks and a set of sorryass, weirdly names,
pretenders is an example of changes that VB can do without.
Code migration *has* to be deal with separately in this VB upgrade because
there is no much that has been neglected in the name of backwards
compatibility for so long. Option VB6Compatibility anyone...
>
> >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.
They are to do with the internal architecture of VB applications. Perhaps
now is the time to re-visit code that has been moulding since pre-VB1 days
(by your own admission in another thread) and see if the changes in Beta 1
can negate the hacks you have had to resort to in your
applications/components/libraries internal architecture to get them to do
anything useful. I have and it was a [mostly] joy.
>
> Dan
> Language Stability is a *feature* I wish VB had!
> (#6)
I agree VB needs to still retain the flavour of VB (whatever that is) but an
hack is a hack and an omission is an omission. No point in saying
*everything* that VB had must be protected just because it has always been
there or somebosy has used (or more commonly) misused it!
Kunle
VB: To infinity or the dump...
-
Re: Bad programming practices encouraged.... namely VB!
Kunle,
> Some people (who believe in explicit programming) use
CInt(bBooelanVariable)
> to get the value of true that may then be written to (and read from)
files,
Right, and not leaving it at -1 will cause a problem with existing files!
> Within this context the changes need to be optional so that new code can
> take advantage of the more logical changes introduced in Beta 1 whilst old
> code can still use VB6 sematincs.
You want a compatibility switch. It is the Imports on the VB6 compatibility
namespace. CInt _resides in a namespace with the word "Compatibility" in its
name! If you don't want VB6 compatibility- _don't use this namespace!!!!!_
--
Kathleen
(MS-MVP)
Reply in the newsgroup so everyone can benefit
--
-
Re: Bad programming practices encouraged.... namely VB!
And rollback to -1 can cause a problems with all subsequent development! You're
sacrificing the long-term for the short term, which is never a good trade
off....
/Pat
"Kathleen Dollard-Joeris" <kjoeris@noemailplease.com> wrote:
>
>Right, and not leaving it at -1 will cause a problem with existing files!
-
Re: Bad programming practices encouraged.... namely VB!
Hi Kathleen,
> You want a compatibility switch. It is the Imports on the VB6
compatibility
> namespace. CInt _resides in a namespace with the word "Compatibility" in
its
> name! If you don't want VB6 compatibility- _don't use this namespace!!!!!_
In my projects, CInt is available even though I do not import the
"Compatibility" namespace (neither globally nor in the code file). It's also
nowhere to be found in the Object browser (in the code, it's colored like a
keyword, so that may have to do with the latter).
Or do refer to Beta 2? Do you have more information on this?
Thanks,
Gregor
-
Re: Bad programming practices encouraged.... namely VB!
Patrick,
I am tired of this debate. CInt is inherently a compatiblity function so
should have compatiblity behavior. That is where it resides, that is what it
is. It is not sacrificing anything long term.
--
Kathleen
(MS-MVP)
Reply in the newsgroup so everyone can benefit
--
-
Re: Bad programming practices encouraged.... namely VB!
"Kathleen Dollard-Joeris" <kjoeris@noemailplease.com> wrote:
>
>I am tired of this debate.
That's too bad because you'll be hearing this debate until these inconsistancies
are fixed. And if they're not, make sure you don't spend anytime in the VB
newsgroups because you'll be explaining why VB.NET thinks 1 is equal to -1
for the next 5 to 10 years. As the saying goes, be careful of what you wish
for because you might just get it.
/Pat
-
Re: Bad programming practices encouraged.... namely VB!
Darn,
What can I say?
I was wrong. You can not remove this functionality.
I thought it was in a separate library and thus explicitly added. I was
wrong.
There is no reason to believe there are any plans for different behavior in
beta2 or in the future.
Always like to learn something and be corrected when I am wrong. Always hate
to do it in public. Ah well.
--
Kathleen
(MS-MVP)
Reply in the newsgroup so everyone can benefit
--
-
Re: Bad programming practices encouraged.... namely VB!
"Kathleen Dollard-Joeris" <kjoeris@noemailplease.com> wrote in message
news:3ad86293@news.devx.com...
> Kunle,
>
> > Some people (who believe in explicit programming) use
> CInt(bBooelanVariable)
> > to get the value of true that may then be written to (and read from)
> files,
>
> Right, and not leaving it at -1 will cause a problem with existing files!
I was explicit in my original post. I do not consider this a reason to
change the value of true to -1.
The explicit programming crowd would simple modify their code to suit the
behaviour of the new VB if they wish to take advantage of it. More work in
the short-term but better for us all in the long-term.
> > Within this context the changes need to be optional so that new code can
> > take advantage of the more logical changes introduced in Beta 1 whilst
old
> > code can still use VB6 sematincs.
>
> You want a compatibility switch. It is the Imports on the VB6
compatibility
> namespace. CInt _resides in a namespace with the word "Compatibility" in
its
> name! If you don't want VB6 compatibility- _don't use this namespace!!!!!_
Will this "Imports" statement also change the behaviour of logical/bitwise
operators to the Beta 1 behaviour?. You forget that the value of True is a
side-effect of those changes.
No I meant a true switch - an Option VB6Compatibility statement - that
changes the semantics as far as possible to VB6 semantics.
Kunle
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks