Python versus VB

S

Simon Foster

I am meeting with a potential client next week to
discuss starting a new project. His preference is for
VB whereas I would prefer Python for obvious reasons ;-)

Could anybody come up with a short list of the pros and
cons of the two languages (I am not terribly familiar
with the strengths/weaknesses of VB). This will be a
general-purpose text-processing type application with no
GUI required.
 
J

Jegenye 2001 Bt

Text processing with VB? Dear me...

Well, try to explain to them how nice Python is and how ugly VB is. :)
Python is portable, VB is not.
Python is easily readable -> maintainable vs VB which is..

my two cents...

Miklós
 
C

Cy Edmunds

Simon Foster said:
I am meeting with a potential client next week to
discuss starting a new project. His preference is for
VB whereas I would prefer Python for obvious reasons ;-)

Could anybody come up with a short list of the pros and
cons of the two languages (I am not terribly familiar
with the strengths/weaknesses of VB). This will be a
general-purpose text-processing type application with no
GUI required.

Visceral Basic is a very old fashioned language which doesn't hold a candle
to Python. Even Microsoft is soft peddling it. But I'm interested in why
your client prefers VB. If he is just going to run your code without looking
at the internals why does he care? If he is planning to maintain it himself
and doesn't know Python VB might actually be the right choice. For your sake
I hope not.
 
J

Jay O'Connor

I am meeting with a potential client next week to discuss starting a new
project. His preference is for VB whereas I would prefer Python for
obvious reasons ;-)

Could anybody come up with a short list of the pros and cons of the two
languages (I am not terribly familiar with the strengths/weaknesses of
VB). This will be a general-purpose text-processing type application
with no GUI required.


The inly possible use for VB would be for GUI development tools. If this
is a no-GUI app, VB is a waste
 
T

Todd Stephens

Could anybody come up with a short list of the pros and cons of the two
languages (I am not terribly familiar with the strengths/weaknesses of
VB). This will be a general-purpose text-processing type application
with no GUI required.

I use VB every day at work. It is about as suited to text-processing as
COBOL is to making the next office suite. Sure, you could probably do it
eventually, but why do that when you have others so well suited? If there
is no GUI required, I don't see why they would prefer VB over anything
else anyway.
 
G

George Kinney

Simon Foster said:
I am meeting with a potential client next week to
discuss starting a new project. His preference is for
VB whereas I would prefer Python for obvious reasons ;-)

Could anybody come up with a short list of the pros and
cons of the two languages (I am not terribly familiar
with the strengths/weaknesses of VB). This will be a
general-purpose text-processing type application with no
GUI required.

FWIW, I ditched VB in favor of Python precisely because I ran into
a lot test pre-processing that needed done. VB was the clear loser
because:

It is expensive and non-portable, and has nil for functionality as shipped.
You're going to have to write your own modules and classes to get real work
done.
With Python, the module library is huge and well rounded, and once you
write your code
you can deploy it to any box you feel like. (win32, linux, OS/400, etc.)

VB is fragile. You can break a working VB app just by applying MSs own
OS and Office updates. (Changes between development and target machine
can also cause it blow up.) Python is self-contained, it doesn't interfere
with
the OS on any platform that it runs on AFAIK.

VB has classes and you can make COM objects and DLLs, but they are a pain in
the a**
to use compared to 'import something'.

At any rate, I deleted VB and tossed the install disks in the trash 2+ years
ago
and have never missed it at all. VB sucks.
 
M

Max M

Simon said:
I am meeting with a potential client next week to
discuss starting a new project. His preference is for
VB whereas I would prefer Python for obvious reasons ;-)


You should just give him two fair offers for the project. One price for
the Visual basic version and one for the Python version.

That should show him why the VB version is a bad idea.

If you are in doubt as to the difference in time, because you don't know
VB well enough, you can just use the "General Python PI Approximation".

"Any piece of code written in Python, will take at minimum PI times
longer time to write in any other language."

So if the project will take 8 hours in Python, it will take at least:

8 * 3.1416 = 25,132 hours in VBScript.

But that is far to much precision, and will make the client grumpy if
you are even one hour late. So better round that off to the closest half
day and tell the client that it will take approximately 3 1/2 day.

Then the extra 1/2 day you will be using debugging the othervise working
programme on the clients system will not seem like such a big delay.

;-)

regards Max M
 
M

Mark Carter

I am meeting with a potential client next week to
One might argue that clients should rarely be specifying how a problem
is solved. On the other hand ... he who pays the piper. It might be an
idea to ask the client *why* he thinks that VB is the solution. The
chances are, it wont be an especially well-informed answer. If you can
counter with some other argument (robustness, maintainability, cost,
whatever), then you may be able to get away with using Python.

A couple of ohter points to remember: is the client from a big
company, and does the product have to be installed on many machines?
Big companies tend to have paranoid IT support staff, and may baulk at
installing Python. Mind you, they'll also probably baulk at VB, too. I
know, I have to do a lot of development in Excel, because we're "not
allowed to install software".

If the software has to be installed on many machines, then you may
find a VB app to be a better bet. It'll be more click-n-go.
 
M

Martin Franklin

One might argue that clients should rarely be specifying how a problem
is solved. On the other hand ... he who pays the piper. It might be an
idea to ask the client *why* he thinks that VB is the solution. The
chances are, it wont be an especially well-informed answer. If you can
counter with some other argument (robustness, maintainability, cost,
whatever), then you may be able to get away with using Python.

A couple of ohter points to remember: is the client from a big
company, and does the product have to be installed on many machines?
Big companies tend to have paranoid IT support staff, and may baulk at
installing Python. Mind you, they'll also probably baulk at VB, too. I
know, I have to do a lot of development in Excel, because we're "not
allowed to install software".

If the software has to be installed on many machines, then you may
find a VB app to be a better bet. It'll be more click-n-go.


If you use py2exe you get just as much click-n-go :) and the client
could be convinced (lied to!) that the application was somehow 'native'
after all it's in a .exe file!
 
A

Alex Martelli

Simon said:
I am meeting with a potential client next week to
discuss starting a new project. His preference is for
VB whereas I would prefer Python for obvious reasons ;-)

Could anybody come up with a short list of the pros and
cons of the two languages (I am not terribly familiar
with the strengths/weaknesses of VB). This will be a
general-purpose text-processing type application with no
GUI required.

I see you've already received many responses, but I just
wanted to point out another argument that might perhaps
help you convince the client that Python is better for
them: VB is undergoing a wrenching transition. VB6, the
one it's easy to find cheap maintainers for (I suspect
that may be part of your client's motivations for wanting
it), is dying. VB.NET is very different from, and not
very compatible with, VB6 (the syntax LOOKS similar but
the semantics have been very substantially changed).

If your client insists on VB6 they'll clearly be cut off
from the future, whether that future develops like MS
would want it to, or like MS's enemies would:). If they
insist on VB.NET, they'll be using a newish and still not
all that stable language AND infrastructure, probably not
able to support older PC's they might have around, and NOT
easy to find people skilled in, either (it seems most .NET
experts prefer C# and most VB experts are very reluctant
to sacrifice their hard-won experience to jump onboard the
latest-craze VB.NET). Neither choice between these two
incompatible languages named "VB" is very appealing.

If your client accepts Python, the application will be
able to run just about anywhere (not sure if we have a
version for toaster ovens yet, but, watch this space) --
older versions of Windows (why, even *DOS*!!!), all the
way to the newest ones, _AND_ nonWindows machines as well
should your client ever decide to try one in the future.

VB's alleged advantages include a GUI painter (no matter
given the "no GUI required" situation), and lots of sort-of-
programmers for hire cheap (but only for VB<=6, and those
s-o-p's abilities may sometimes not be all that good).
"alleged" because Python has such tools too (e.g., the
BlackAdder IDE integrates with Qt Designer for GUI painting,
etc), indeed a great choice of commercial and free ones,
AND Python is so easy to learn that maintaining Python code
isn't costly (perhaps cheaper than any other languages, all
other things being equal). If your client focuses on "making
an EXE" (w/supporting DLLs etc), Python can do that just as
well as VB (w/3rd party tools such as py2exe -- free ones!).

Python's advantages include portability, simplicity, power,
programmer productivity, huge choice of 3rd party extensions
and tools (mostly free, a few good commercial ones too),
stability (no troublesome VB6 -> VB.NET transition, at least
not right now:), ease of learning, readability, ...


Alex
 
B

Bruno Desthuilliers

Simon said:
I am meeting with a potential client next week to
discuss starting a new project. His preference is for
VB whereas I would prefer Python for obvious reasons ;-)

Could anybody come up with a short list of the pros and
cons of the two languages (I am not terribly familiar
with the strengths/weaknesses of VB). This will be a
general-purpose text-processing type application with no
GUI required.

VB pro : easy for small gui developpement
VB cons : VB6 is dying, VB.NET is maybe not that stable, VB is not
portable, VB as really weak support for text-processing (regexp,
parsers, functional programming facilities etc).

Python con : it's not (now) a wide standard.
Python pros : it's really hi level, esay to write, read, maintain, well
suited for text processing :regexp, parsers, fp support, etc (see
David's Mertz excellent "Text processing in Python" book). Also, Python
has a good support for MS technos like COM etc.

You just can't compare the two languages, specially for a non-gui,
text-processing oriented app.

My 2 cents...
 
F

Frithiof Andreas Jensen

Simon Foster said:
with the strengths/weaknesses of VB). This will be a
general-purpose text-processing type application with no
GUI required.

No, Problem is the details:

If the above is really all, then VB is a waste of time (*any* language and
especially Python can do text processing)!

If OTHOH the appliaction needs to integrate with MS-Office VB may be the
simplest.
 
S

Simon Foster

I am meeting with a potential client next week to
discuss starting a new project. His preference is for
VB whereas I would prefer Python for obvious reasons ;-)

Could anybody come up with a short list of the pros and
cons of the two languages (I am not terribly familiar
with the strengths/weaknesses of VB). This will be a
general-purpose text-processing type application with no
GUI required.

Thanks to everyone for their comments, I think that should give me
enough to be going on with.
 
J

Jeff Hinrichs

Frithiof Andreas Jensen said:
No, Problem is the details:

If the above is really all, then VB is a waste of time (*any* language and
especially Python can do text processing)!
Try implementing some of the projects listed in Text Processing in Python
and you will see while you statement is technically true, it is also
misleading. Ever try and write a simple editor in FORTRAN?
If OTHOH the appliaction needs to integrate with MS-Office VB may be the
simplest.
FUD - VB doesn't offer anything you can't get at with Python. In fact there
are no evil genies, pardon me, wizards, that make office automation easier
in VB than Python. You're still stuck with a COM interface.

As someone who dropped VB 2+ years ago in favor of Python, you can take that
to the bank. All standalone development in our company is done in Python.
If a "legacy" VB app needs new features we rewrite the whole thing, with the
new features in Python in the same amount of time it would have taken to
just add the feature with VB. We do boatloads of integration,
interconnecting shipping manifest systems, accounting and CRM systems and
more, all of it fully orchestrated with Python. We deal with multiple data
sources, web based api's, xml, MS-SQL, MySQL, Pervasive. These apps are
easily maintainable because of their readability. This is the single
biggest win in the whole deal; Having to come back to code you've written a
year ago is a breeze with Python.
 
M

Michael Geary

I am meeting with a potential client next week to
Thanks to everyone for their comments, I think that should
give me enough to be going on with.

Just to add one more comment...

I was one of the original authors of VB, and *I* wouldn't use VB for a text
processing program. :)

There's one exception: For a program that had to run as a Word or Excel
macro, then sure, I'd consider using VBA. But for a standalone program, no
way!

-Mike
 
F

Frithiof Andreas Jensen

misleading. Ever try and write a simple editor in FORTRAN?

Nah - why would I? Masochism?

That sort of thing is what Python is *for* - it is actually not bad at all
for Numeric Modelling, since you mentioned Fortran, either - given that one
can buy GHz CPU's cheaper every week and kind Python people have provided us
with plenty of batteries to stick in our applications..
FUD - VB doesn't offer anything you can't get at with Python. In fact there
are no evil genies, pardon me, wizards, that make office automation easier
in VB than Python. You're still stuck with a COM interface.

Ahem - The point I was trying to make was: It all Depends what you need to
*do* does it not?

If, say, all the OP needs to achieve is some massaging of strings between
one MS-office app, say Access - for example to circumvent that entirely
stupid and undocumented by MS 1 second minimum time resolution hardcoded
into Access, and maybe a MS-Word form then certainly it will be easier to
hack something up with the tools that are already lurking inside the
platform IMO.
As someone who dropped VB 2+ years ago in favor of Python, you can take that
to the bank.

I believe you - for *advanced* tasks I think Python would be better too;
Does the OP need it for the task at hand?
 
J

John J. Lee

Frithiof Andreas Jensen said:
news:BUGob.15745$d87.8065@okepread05... [...]
Ahem - The point I was trying to make was: It all Depends what you need to
*do* does it not?

If, say, all the OP needs to achieve is some massaging of strings between
one MS-office app, say Access - for example to circumvent that entirely
stupid and undocumented by MS 1 second minimum time resolution hardcoded
into Access, and maybe a MS-Word form then certainly it will be easier to
hack something up with the tools that are already lurking inside the
platform IMO.
[...]

Not if you don't already know about where that stuff lives, and some
minimal amount of VB. It could well be easier in Python in that case,
as the overhead in boilerplate code is small.


John
 
S

Simon Foster

Just to add one more comment...

I was one of the original authors of VB, and *I* wouldn't use VB for a text
processing program. :)

There's one exception: For a program that had to run as a Word or Excel
macro, then sure, I'd consider using VBA. But for a standalone program, no
way!

-Mike

That should just about clinch it!!
 
Y

Y2KYZFR1

I am meeting with a potential client next week to
discuss starting a new project. His preference is for
VB whereas I would prefer Python for obvious reasons ;-)

Could anybody come up with a short list of the pros and
cons of the two languages (I am not terribly familiar
with the strengths/weaknesses of VB). This will be a
general-purpose text-processing type application with no
GUI required.

if there is no gui required then Python is a no brainer. Unless the
support and maintance staff refuse to learn Python.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,169
Messages
2,570,920
Members
47,462
Latest member
ChanaLipsc

Latest Threads

Top