SciComp - Futures Volatility Surface Calibrator

Forum Navigation:

magazine

FORUMS > Programming and Software Forum < refresh >
Topic Title: Is Visual Basic.NET better than Visual Basic?
Created On Fri Mar 12, 04 09:57 PM
Topic View:

View thread in raw text format


CarolynT
Senior Member

Posts: 386
Joined: Jul 2003

Fri Mar 12, 04 09:57 PM
User is offline View users profile

Are there many front office and risk management office using VB.NET? Is it good at doing spreadsheet modeling? What are connections between VB.NET and VBA?

-------------------------
Live everyday as the last day of our life

Edited: Fri Mar 12, 04 at 09:57 PM by CarolynT
 
Reply
   
Quote
   
Top
   
Bottom
     



DrBen
Senior Member

Posts: 498
Joined: Feb 2003

Sat Mar 13, 04 12:07 PM
User is offline View users profile

.NET will be the nature way to program on the Windows platform if not now then certainly
when Longhorn ships in 2006-7. Later this year SQL server update and .NET v2.0 is shipped
which will make .NET the natural platform to program SQL server on.

With its market take-up maybe 30%, though I am not sure. But generally people will
care if you can solve problems and not so much what language you choose to use.

With the interop classes any .NET language has full access to the COM Office objects, just
like C++ now. I like .NET it's good for me but you should decide what is right for you.

Now .NET is a platform rather than a language and includes a rich class library, several
languages and a deployment platform/application server. Eventually Windows and Office
will be written under the .NET platform, and will most naturally be programed using .NET.
VB.NET is one of the languages under the .NET platform. If you implement a piece of logic in
VB.NET, C#.NET, C++.NET or whatever... when it is compiled it will compile down to the
SAME CLI. The CLI binary is something between source code and native code and runs
inside the .NET runtime. The runtime can offer services to the CLI, hence .NET supports
the notion of an Application server.

VBA is not a .NET language and only run's inside the "Office platform". Hence, VBA does
not have access to .NET functionality (One may think that VBA could become VBA.NET, but
there are technical problems with this, and any VBA.NET would probably end up being
closer to C#.NET than VBA).
 
Reply
   
Quote
   
Top
   
Bottom
     



jens
Senior Member

Posts: 231
Joined: Jul 2002

Sat Mar 13, 04 03:49 PM
User is offline View users profile

Later this year SQL server update and .NET v2.0 is shipped
c't said release will be postponed to mid-2005, with another beta before.

-------------------------
 
Reply
   
Quote
   
Top
   
Bottom
     



CarolynT
Senior Member

Posts: 386
Joined: Jul 2003

Sun Mar 14, 04 04:50 AM
User is offline View users profile

I am wodering how willing a bank is to invest money and people to creat and test classes and sure each class is reuseablel. What are your ideas on this issue?

-------------------------
Live everyday as the last day of our life

Edited: Sun Mar 14, 04 at 04:50 AM by CarolynT
 
Reply
   
Quote
   
Top
   
Bottom
     



PinballWizard
Senior Member

Posts: 358
Joined: Mar 2002

Sun Mar 14, 04 05:23 PM
User is offline

Carolyn,

(a) You can think of it this way: VBA is the older-generation 'procedural' ancestor to VB.Net
The previous version of Visual Basic was Visual Basic 6. This was a subset of the VBA language.
VB.Net is really VBA or Visual Basic 6 syntax cast onto the new, fully object-oriented, .Net Framework.

(b) VBA is the language of choice for spreadsheet modeling, within Excel. Manipulating spreadsheets outside of Excel can be accomplished with any number of programming languages - but there will be some overhead. The issue with VB.Net is that it is no longer based on the COM architecture (which Excel is based on) - hence it requires a bit more work to get it to play with Excel (DrBen is now the guru on this subject, he's just written a great add-in).

(c) With regards to Banks hiring folks to write & test re-usable classes: It's a matter of degree I think, and not particular to banks, but shared by any software development outfit. Proper class design and application architecture is a time-consuming business. When you're dealing with tight project deadlines, it's very easy to cut corners around the proper design and planning stages, and just 'code'. I think it varies a lot from team to team and with the make-up of the development team (e.g. are they software developers, or quant coders). Poor design usually comes back to bite you where the sun don't shine, though.


Edited: Sun Mar 14, 04 at 05:25 PM by PinballWizard
 
Reply
   
Quote
   
Top
   
Bottom
     



CarolynT
Senior Member

Posts: 386
Joined: Jul 2003

Mon Mar 15, 04 01:07 AM
User is offline View users profile

I should ask you if most of banks require quant to be able to write and design re-usable classes. What are difference between financial engineer and quant coders?

-------------------------
Live everyday as the last day of our life
 
Reply
   
Quote
   
Top
   
Bottom
     



PinballWizard
Senior Member

Posts: 358
Joined: Mar 2002

Mon Mar 15, 04 03:38 AM
User is offline

By 'quant coders' I'm refering to people who are financial engineers, analysts etc. and who also write code to implement their models. A lot of these folks are very good programmers (they're all over Wilmott), however developing software per se is generally not their main role.

By 'Software developers' I'm refering to folks whose job it is to architect and develop complete software applications, and integrate these with the rest of the IT infrastructure. Their focus is software development, as opposed to quant models.





 
Reply
   
Quote
   
Top
   
Bottom
     



DrBen
Senior Member

Posts: 498
Joined: Feb 2003

Tue Mar 16, 04 10:29 AM
User is offline View users profile

Quote

Originally posted by: PinballWizard
....DrBen is now the guru on this subject, he's just written a great add-in....


I'm not really a Guru, and the Addin is more to do with some guy called Nick rather than me (I'll try to get him to sign up to Wilmott).
I'd say however the DFDC could hbe called an Excel guru. Anyway thanks for the encouragement and let me know a all those buggies...

Edited: Tue Mar 16, 04 at 10:47 AM by DrBen
 
Reply
   
Quote
   
Top
   
Bottom
     



DrBen
Senior Member

Posts: 498
Joined: Feb 2003

Tue Mar 16, 04 10:46 AM
User is offline View users profile

Quote

Originally posted by: CarolynT
I am wodering how willing a bank is to invest money and people to creat and test classes and sure each class is reuseablel. What are your ideas on this issue?


The big question out there in software development is exactly how do we enable more reuse. People except components et all. is a good thing
and now the focus has moved onto exactly how we make this become a reality. With human consumption of "text information", there all ready is
a widely established standard with the "web page component" which enables the reuse of text, the web page (html)/http protocol is a component stack.
Resently as an abstraction from this we have Web services.....

 
Reply
   
Quote
   
Top
   
Bottom
     



DominicConnor
Senior Member

Posts: 11465
Joined: Jul 2002

Tue Mar 16, 04 11:19 AM
User is offline View users profile

I should ask you if most of banks require quant to be able to write and design re-usable classes.

Your words are precisely correct.
People are required to be able to show this ability at interview.
In nearly all cases, it is then forgotten, and in usually incentives are to avoid doing it.

Why bother ?
In an ideal world, this effort would be rewarded financially and by status. A good set of libraries for Monte Carlo, interfacing to Excel, Bloomberg access, statistical functions, finite difference et al would save huge amounts of work that is done multiple times by different groups within the firm.
Being some sort of open source, the code would be continually improved, and become far better than the work of any individual, not matter how smart he was.
I'd guess 50% of all Quant programming man hours in a large bank has been done before in that firm, but usually you don't know about it, or it isn't trusted, or you don't know how to make it do what you want.

Imagine you did build a good reusable library, perhaps for Monte Carlo.

Most likely your boss would give you hassle about not being focused upon what he actually asked you to do.
No one produces bullet proof code, and all your errors will be exposed to your peers. Given that this is big piece of work, you will learn about the subject during the project, so it won't be all that consistent.
Your documentation will be crap. Hands up here all those with professional writing skills ?
Even if you can write well, your users are dumb. all users are dumb. There is something about using computers that knocks 1/3 off the IQ of any person. They'll ring you up with dumb questions.
Some people think MC is crap, they will blame you for it's problems and also for the bugs in their own code.

The worst case scenario is that lots of people love your system.
They will demand support for it, upgrades, and that you port it to Solaris and HP/UX.
They won't pay of course, and at least some of them will have more political clout than your boss, so you'll be told to do it for the good of the firm, ie for no extra pay.
Most QP code is frankly not industrial strength, leaks memory, doesn't validate imput well, doesn't cope with different languages, and occasionaly produces totally wrong numbers. But of course QP code is transient, not structural.

Lots and lots and lots of fine detail, testing etc. Who here wants to do this ? For crap money ?

Its a managment issue, and very few managers have any idea about how or why to do this.



-------------------------
Random Walkers: Meetup for 87 Quants in a Pub
 
Reply
   
Quote
   
Top
   
Bottom
     



DominicConnor
Senior Member

Posts: 11465
Joined: Jul 2002

Tue Mar 16, 04 11:27 AM
User is offline View users profile

The big question out there in software development is exactly how do we enable more reuse.

Easy, you pay for it.
If team A, develops a good set of classes you buy it from them.


-------------------------
Random Walkers: Meetup for 87 Quants in a Pub
 
Reply
   
Quote
   
Top
   
Bottom
     



DrBen
Senior Member

Posts: 498
Joined: Feb 2003

Tue Mar 16, 04 11:44 AM
User is offline View users profile

I completely agree, one idea could be to create an inhouse market where one department/team
sells its software to another team. The principle being that a developer, department or whatever will need to
be compensated for the extra effect of creating a reuseable software asset. If they are not then "Why
would they do it?" Why spend your budge writing docs for other people.

People (including IBM) has been trying to work out a specification for what such an entity should contain.
See Reusable software specification at: www.flashline.com I think it has been submitted to OASIS or similar.

I also feel that the time to decide what needs to be written and what can be reused in when an application is
designed. Rather, than at random points during the development effort.
 
Reply
   
Quote
   
Top
   
Bottom
     



DrBen
Senior Member

Posts: 498
Joined: Feb 2003

Tue Mar 16, 04 11:51 AM
User is offline View users profile

Quote

Originally posted by: DCFC
The big question out there in software development is exactly how do we enable more reuse.

Easy, you pay for it.
If team A, develops a good set of classes you buy it from them.


I agree from this point of view. But what I was thinking was, "How can we design applications/libraries etc so that
they are easier to reuse?"

For example, the COM model and the web service model have quite different ideas concerning the components coupling. I.e. how loosely
or tightly coupled should components be? Should we have used defined types pasted between components? And so on...
 
Reply
   
Quote
   
Top
   
Bottom
     



jcambece
Member

Posts: 45
Joined: Feb 2004

Tue Mar 16, 04 12:23 PM
User is offline

Dr Ben this is a great question and there is not a short answer. I will try to be brief.

The tightly defined types that you are refering to have a name in Visual Basic framework via COM. They are called interfaces. You will see these name hanging around here and there

IUnknown, IDispatch and of course IFooBee

This is all the crap that gets wiped out when your PC gets baselined and causing none of your programs to work. Windows can not work without COM and the registery is the database "loose term" that is used to hold a bunch of key pieces of information.

The four most important pieces are the
CLSID This is the huge honking number used to uniquly identify the object
ProgID This is the "human readable" id used to identify the object
Interface ID This is the interface or typelibrary that should be used when interacting with the object
InprocServer32 This is the pointer to where the exe or dll is physically located on the disk drive

Interfaces are a contract that is established between two components on how they should interact (Ever wonder how VB knows when you type oExcelObject. and all the methods pop up?? That information is coming out of the type library that you are adding a "Reference to" in your project. There is a option in VB that deals with this that you have probably not used. Under Project properties you will see a component tab with a couple options that refer to version compatibility. This is at the heart of your question, so I though I would explain what each of the options does and you can take it from there.

No Compatability Essentially makes the component stand alone
Project Compatablity Copies over the old CLSID everytime you do a build of your source
Binary Compatability Creates a new CLSID everytime you do a build of your source

Now where the rubber hits the road.

Dim x as new FooBee.Object
'Defines a reference to a FooBee.Object.

Set x = new FooBee.Object
'Goes into the registry and finds the progid FooBee.Object and looks up the CLSID.
'The goes into the registry again and find the InprocServer32 using the CLSID and get the GUID for the Interface ID
'Then and only then does the Service Control Manager or SCM (Pronouced SCUM) creates your object and puts it into memory.

I hope this was helpful Doc. Sorry for the spelling ect, it is early here on the east coast. Feel free to follow up or say clam it you fool.


Edited: Mon Apr 02, 07 at 03:30 PM by jcambece
 
Reply
   
Quote
   
Top
   
Bottom
     



DrBen
Senior Member

Posts: 498
Joined: Feb 2003

Tue Mar 16, 04 12:56 PM
User is offline View users profile

Thanks. A component in some sense is any piece of software which admits an interface,
and as you pointed out COM supports interfaces. But we still do not know anything
about how these interfaces should be designed. There are choices to be made which will
effect the overall structure and useability of the functionality contained within the application.

Within the community three words (objects, components and services) are thrown around
which indicate different functionality granularity levels. How should such artifacts be exposed?
Personally, I do not like this rigid approach and prefer what I call an "Onion layer approach".
I outline my approach below:

The granularity of software artifacts is a continuous spectrum but we are forced to make choices
as to the finite number of granularity bands we can access by layers of interfaces of our software
objects, components and services. The choice of where these bands lie is down to domain
specific issues and developer taste. The domain matter will suggest convenient "sweet spot" levels
at which the balance between generality and easy of use makes the business problems at hand
particular amenable. The developer themselves will have their own preferences as to the level of
granularity which makes them the most productive for the type of problem they are addressing.


Edited: Tue Mar 16, 04 at 02:06 PM by DrBen
 
Reply
   
Quote
   
Top
   
Bottom
     



jcambece
Member

Posts: 45
Joined: Feb 2004

Tue Mar 16, 04 02:30 PM
User is offline

Well that is pretty simple Doc,

You want to think of Interfaces in the same way you would think about Polymophic Inheritance.

i.e.

Animal-> 4-Legged Animal->Dog

Interfaces are very similar. The main difference is that instead of saying Dog is derived or inherits from Animail we would say that Dog impliments Animal.

If this makes no sense you have not worked with Interfaces in Visual Basic. If that is the case check them out. Interface Inheritance is the path you want to wander down.
 
Reply
   
Quote
   
Top
   
Bottom
     



DominicConnor
Senior Member

Posts: 11465
Joined: Jul 2002

Tue Mar 16, 04 04:25 PM
User is offline View users profile

VB interfaces are like dogs.

To implement a VB interface you take the dog, skin it, remove all the useful bits, and are left with something that sort of looks like a dog, but can't actually do anything. After a short interval it will smell. Then maggots and other types of bug will crawl out.
That is a VB "interface".

Real true story. I used to write about development tools for various computer mags, but was retiring and helping a mate who wanted to write. I took him to the MS launch of Visual Studio 6. What you have to understand is that PR women are exactly what you think they are like. They want to do media, films or "interesting" products. VC++ and VB are not interesting to these people. So they tried to make it interesting
The theme was about the two sides of your brain being "creative" and "logical", so things like Visual Source Safe could be used "creatively". (I've seen people do version control creatively, it ain't pretty).

The large very expensive room was decorated in what I can only call the 60s psychological thriller style. This is the part of the film where the hero has been brainwashed/drugged up, and the world is a blur of fuzzy lights, and sudden irritating sounds.

Half the room was "creative", and the assembled journalists were invited to paint, express, and stand in sandpits. No, really I'm not making this up.
The "logical" half had puzzles, things like a 5 feet high connect-4 game, and various things involving shiny steel, since of course stainless steel is logic, whereas sand is of course creative.

Upon entry we were each given a 5 inch squishy brain, complete with real looking bodily fluids. Sort of a scholck horror toy.
I acquired 8, your status as a journo is defined by what you can blag.

Thus before long the journos and MS staff were hudldling in the logical part. This was not approved of. So Microsoft's PR people instructed the barmen not to serve beer to journos unless they asked for it in a "creative" way. Bizarrely this worked well.
The hacks wouldn't go near the bar, so the MS people scored points by telling the bar people "look you fuck wit arts graduate, I'm paying for this, gimme 20 beers".

But back to interfaces. The bloke whose job it was to evangelise the defective MS idea of interfaces was lurking in the "creative"bit, and my mate who is also a serious programmer, wanted to explain why they were shit. He was too inexperienced to realise that the MS person knew this just as well as he, but that he was defending the company line, which to be fair he did well.
Alas, we did this whilst being illuminated by irritating light effects whilst a MS PR girl tried to encourage us to conduct the conversation in the sandpit, and when we politely declined (well, nearly politely) went and stood in the sand up to her kness to encourage us.

Excerpt from "A Drunken Walk Down Cheapside", Wilmott Press Dec 2004.




-------------------------
Random Walkers: Meetup for 87 Quants in a Pub
 
Reply
   
Quote
   
Top
   
Bottom
     



jcambece
Member

Posts: 45
Joined: Feb 2004

Tue Mar 16, 04 04:55 PM
User is offline

While DCFC's is very funny I will politely disagree. Interface inheritance is a useful tool for developers to design application in Visual Basic.

Here is an excellent resource to get started if you are still interested.

http://www.stardeveloper.com/articles/display.html?article=2001082201&page=1


I will be careful not to read DCFC?s posts so close to lunch time.
 
Reply
   
Quote
   
Top
   
Bottom
     



DrBen
Senior Member

Posts: 498
Joined: Feb 2003

Wed Mar 17, 04 11:12 AM
User is offline View users profile

In my appinion VB is not ideal and there are more component friendly languages. However, MS should be given credit
for being the first to introduce the notion of a component with the ActiveX component model.

 
Reply
   
Quote
   
Top
   
Bottom
     

View thread in raw text format
FORUMS > Programming and Software Forum < refresh >

Forum Navigation:

© All material, including contents and design, copyright Wilmott Electronic Media Limited - FuseTalk 4.01 © 1999-2014 FuseTalk Inc. Terms & Conditions