What Language to Learn ? (VB / VC / C# ... or ?

Discussions about custom-built testing platforms written in C, C++, or Java.
Robert Nio
Senior Member
Senior Member
Posts: 41
Joined: Thu Apr 17, 2003 11:34 am
Location: Palo Alto, California

What Language to Learn ? (VB / VC / C# ... or ?

Post by Robert Nio » Thu May 29, 2003 5:04 pm

Karakoram wrote:I am currently trying to decide if I should learn C++ (and later, visual C++.net, or C#.net) vs. VB.net

you mentioned that you found some Dev tools limiting in VB.net vs. C++
viewtopic.php?t=116

WOuld you mind elaborating on what you found/your thought process.
I learned Fortran back in the early 90's as an engineer, and haven't done a lot of "real" programming since then (just Sneazy Language), so learning a new language is a big committment for me. I intend to write my trading strategies, from scratch, and/or use some of the currently available tools such as Libraries for C++. I intend to backtest large portofolios, with buy/sell, pyramiding in and out, posiition sizing, etc. Then, once testing is completed generate orders for real time trading.

I am really on the fence about if I should learn C++ or VB.Net
Karakoram, I took the liberty to reply to your pm in public ... I hope you don't mind ;-)

Here are the few VB "hick-up" I ran into:

- Code Size limitations
- DLL Support was difficult at the time I used it VB6
- No real CLASS support and difficulties to integrate C++ libraries
- Speed

Even though I love VB as a RAD tool, I did not like to workaround the challenges I faced. If you "speak" one language than it is not difficult to express your ideas (this is the bigger issue) in any language ... besides learning the grammar and vocabularies (this is the smaller issue).

Microsoft is pushing C# as the "best" of both worlds: VB "features" and C++ strength. You can learn and apply VB very quickly ... but might run into "more" work later. C++ on the other hand, has a longer "ramp up" period, but makes your life easier in the long run. … HOWEVER, at the end of the day the grass is not greener on the other side. It all depends on your preferences … usually you exchange the pros & cons with just another set.

I decided for C++ as it leaves me more choices down the road, I can port my system much easier to other systems / OSes and have a bigger supply for add-ons (libraries / classes) readily available. In return, I got new challenges (memory management issues / debugging etc.)

Did it help?

Robert

Karakoram
Roundtable Knight
Roundtable Knight
Posts: 127
Joined: Wed Apr 16, 2003 11:01 pm
Location: Reno, NV
Contact:

Post by Karakoram » Thu May 29, 2003 5:18 pm

No problem posting my questions, thank you for replying.
Here are the few VB "hick-up" I ran into:

- Code Size limitations
- DLL Support was difficult at the time I used it VB6
- No real CLASS support and difficulties to integrate C++ libraries
- Speed
I was under the impression that VB.NET fixed all of the above except for class support and integration of C++ libraries?

What, in your opinion, are the trade offs of C#.Net vs C++ ?

zippiguy
Contributor
Contributor
Posts: 1
Joined: Thu May 29, 2003 5:55 pm

VB Limitations?

Post by zippiguy » Thu May 29, 2003 6:22 pm

Hi,

I am a professional software developer and thought I would address these concerns with VB:

- Code Size limitations

In late versions of VB (versions 5 & 6) and VB.NET, there are no practical limitations. Older versions such as VB3 did have some limitations that could be problematic. I don't remember exactly what the current limitations are, but I can assure you that although I have a tendency to push things to the limit, I have not run into limitations regarding code size in late versions of VB.

- DLL Support was difficult at the time I used it VB6

Yes, we call it DLL Hell. This problem has been addressed in VB.NET which allows different versions of DLL to exist along side each other.

- No real CLASS support and difficulties to integrate C++ libraries

Also solved in VB.NET. You may need to wait for the "trickle down effect" as developers adapt their legacy code to .NET

- Speed

VB6 is probably the most optimized version of VB. Although VB is slower than C++, I never ran into a performance problem in VB6 that I couldn't find a way to optimize. In VB5 , I once wrote a simple dll in C++ to speed up a really long calculation. This is the only time I ever could not solve an optimization problem in VB.

Yes, older versions of VB are slow. But, not VB6.

As far as VB.NET is concerned, I am a bit unhappy with performance here. So are a lot of other developers. I have heard that the latest version of VB.NET (just released) is much better. Since I haven't used the new VB.NET yet, I cannot answer to that. However, keep in mind that in Visual Studio Professional and up you can still write stuff in C++ that is compatible with VB.NET if you need to optimize. Also, If you turn off code management, you risk more bugs, but the code performs a lot faster. Also, some people forget to turn off Debug mode in the compiler before releasing. This by itself is the biggest reason why some people complain about performance.

All in all, I believe that some of the performance problems in VB.NET are outweighted by the advantages of using VB.NET. Historically, Microsoft has been known to build a product and then fine tune it in later releases. I am guessing the latest release is going to address most of these complaints.

Jester

Lame question

Post by Jester » Tue Jun 24, 2003 5:37 pm

I have a really lame question.
I'm as dumb as the next guy, how hard is it to learn a programming language like C++?

Jester
:P

Karakoram
Roundtable Knight
Roundtable Knight
Posts: 127
Joined: Wed Apr 16, 2003 11:01 pm
Location: Reno, NV
Contact:

Post by Karakoram » Tue Jun 24, 2003 6:11 pm

I can shed a little light. I learned Fortran back in 1991 (FORMula TRANslation).

I am currently learning VB.net, and intend to learn some C++.net. VB is easier, and is not case sensitve like C++

Imagine writing code, like in Tradestation easy language where "Plot" was valid, but "plot" is not. That is part of C++ It is closer to assembly than basic.

I think C++ is hard, and is not for beginners. But it is powerful. These days computers are so fast that speed is less of a factor. VB has the advantage of "rapid prototyping" so you can create software quickly, but it may not give as fast performance as the same program written in C++. However, if you can't get the pogram to even work in C++ its a moot point. My programming freinds told me, that writing something in C++ is no guarantee that it will perform the best.

If you have never learned a programming language before, or if you are as rust as me, learn VB.net. YOu can always learn C++ later.

Mark Johnson
Roundtable Knight
Roundtable Knight
Posts: 122
Joined: Thu Apr 17, 2003 9:49 am

Post by Mark Johnson » Tue Jun 24, 2003 7:17 pm

Funny you should mention FORTRAN. By a startling coincidence there are two guys in my office who both started programming in 1974, both using FORTRAN, and are now both trading baskets of commodities using well known vendor systems (one in an IRA, the other in a cash account).

Victor Niederhoffer claims in his new book Practical Speculation, to have learned programming in FORTRAN 40 years ago. Certainly it's possible; both he and the language go back further than that.

Chuck B
Roundtable Knight
Roundtable Knight
Posts: 469
Joined: Thu Apr 17, 2003 6:34 am

Post by Chuck B » Fri Jun 27, 2003 8:14 pm

Yep, I learned FORTRAN in CSC111 class when I was a sophomore in engineering school in 1978, and it was old then. I have always liked the simplistic nature it has of programming mathematical algorithms. Of course this was in the punch card days so most programs were not very lengthy at that time as they can be now, especially considering you only had a few megs of memory your program could access on the System/370. Nothing like standing in line to use the punch card machines at 2 in the morning either :D .

Sir G
Moderator
Moderator
Posts: 243
Joined: Wed Apr 16, 2003 12:21 am
Location: Salt Lake City, Utah

Post by Sir G » Sun Jun 29, 2003 10:59 pm

Hi Karakoram-

Throwing in my two cents worth….

I’ve programmed in VB for about 7 years or so now. I’m retooling my platform to take advantage of the powers of .net. I haven’t come across any limitations. Again, I’m not a real programmer so I have no real opinion of the pros & cons that would be of any value.

The description of your project is a major undertaking. You are dealing with a number of tasks, the first being learning a new language, followed by how the data needs to flow for each step of your code, then to figure out the code that is needed to accomplish it all. There will be many simple issues that I’m sure you will be surprised at how they branch off in so many directions. When you are done with the application, then you finally get to the meat and potatoes and that is designing your trading systems. That is where the money is.

Starting from scratch I would assume you are looking at a multi year project. I’m certainly not trying to dissuade you, just an offering from my perspective. Before beginning this journey are your thoughts for the program so unique that it needs it’s own environment? Are there tools that in whole or part accomplish what you are looking to do? Would it be easier for you to plunk down some money, instead of plunking down your time? Let’s say your project is going to take 24 months to accomplish and you will work an average of 30 hours a week on the project, that is learning the language to completing your final version… is the app going to be “worthâ€

Karakoram
Roundtable Knight
Roundtable Knight
Posts: 127
Joined: Wed Apr 16, 2003 11:01 pm
Location: Reno, NV
Contact:

Post by Karakoram » Mon Jun 30, 2003 1:07 pm

Sir G,

THank you for the advice, it is much appreciated. I agree, the difference between VB.net and C++.net is mostly a moot point. I have Visual Studio, the full developer's version, so it came with everything. Its simply a matter of learning and practice for me.

I considered all the the things you said back when I decided to learn a new language (I decided about 3 or 4 weeks ago), and I also contacted my trading mentor, who is highly automated with his trading. He told me (much to my surprise at the time), that he is converting all of his stuff to VB.net He told me that the current version of VB will do everything I need.

Also, I looked and tried all of the best software packages, (TS, Trading Recip, Behold, Wealth Lab, etc.). The only think I havn't demoed is VeriTrader, however, I asked many questions. I found that none of the above does what I want. Yes, none of them. Some have elements I want, but not in combination with other elements. I could take the band-aid approach and use the closest, with some speically written add-ons, or supplements, but It would be just as much work as starting from scratch. My mentor told me as much, 3 years ago, but I was unwilling (at that time), to learn a real programming language and start from scratch. Now I am kicking self, because I ended up doing just that now.

I am working my way through the Microsoft press books on learning VB.net and I have to say, this is a whole different animal from programming back in the 80s when I learned Apple Basic, Apple Pascal, and later, Fortran!

I like all of the built-in features, and I am finding VB.net very easy to learn.

Later, I plan to learn some C++.net, or possibly, C#.net

One book I have "Code Complete" advocates rapid prototyping in one langage (such as basic), then later coming back and writing an optimized version of the program in a different language (such as C++). I just may end up doing this, or I may write some modules of the program in C++, to help speed up number crunching.

Of course, I could just buy a faster computer! :D

So that is where I am at now. Thank you for the welcome to the "brotherhood".

Chris
Karakoram

Sir G
Moderator
Moderator
Posts: 243
Joined: Wed Apr 16, 2003 12:21 am
Location: Salt Lake City, Utah

Post by Sir G » Sat Jul 05, 2003 2:03 pm

Hi Karakoram-

I'm glad you are starting your journey with a good foundation.

When you find yourself perplexed, look at http://www.vbcity.com
and its forum, http://www.vbcity.com/forums/

From soup to nuts they have it covered and some of the folks over there are very knowledgeable and very generous. I'm constantly amazed with the coding skills that c.f. & MJ have and you'll find folks just like them at that forum helping the rest of us out with our VB issues.

As always it is good practice to search the forum prior to posting as odds are the answers are already posted. Also, check the FAQ section.

Kindly keep us posted on your progress!

Gordon

gfullmer
Full Member
Full Member
Posts: 18
Joined: Sun Jul 06, 2003 5:39 pm
Location: Phoenix, AZ
Contact:

Java, C++ and .NET stuff

Post by gfullmer » Mon Jul 07, 2003 9:06 am

Hi all,

It seems that language selection might be like religion. There might be one true religion, but we all have different needs when it comes to a programming language. I am very slow to change. It took me 3-4 years before I even looked at Java. I really like it. It can do everything that I need a language to do, but there is a price to pay. Speed, and compatibility. Yes, it is slower than most anything else (with maybe the exception of VB) and there are differences in implementation and changing versions. Because of what MS has done to the language, it is probably on its way out. C++ is my next choice and if one is careful with how one uses it probably is as portable as Java. I resisted using any Microsoft products (except Excel) on principle, but that is starting to change although I really like Linux and will probably not give it up any time soon no matter what Mr. Gates does. Give me Emacs, a good C++ compiler, a set of good C++ object libraries and I am in programmer's heaven. The dotNet stuff will take me a while - it has only been a couple of years since I first saw it - I might come around but am not yet converted!

Glen

Sir G
Moderator
Moderator
Posts: 243
Joined: Wed Apr 16, 2003 12:21 am
Location: Salt Lake City, Utah

Post by Sir G » Sat Aug 02, 2003 5:33 pm

Hi Karakoram-

I hope you are enjoying your journey.

Take a look at the product SmartQuant at:
viewtopic.php?t=440&highlight=

It might make your life easier.

Cheers. Gordon

Karakoram
Roundtable Knight
Roundtable Knight
Posts: 127
Joined: Wed Apr 16, 2003 11:01 pm
Location: Reno, NV
Contact:

Post by Karakoram » Sat Aug 02, 2003 9:12 pm

Thank you, that is awesome!

Exactly what I need.

Karakoram
Roundtable Knight
Roundtable Knight
Posts: 127
Joined: Wed Apr 16, 2003 11:01 pm
Location: Reno, NV
Contact:

Post by Karakoram » Tue Aug 05, 2003 2:49 pm

I looked more carefully at smart quant, and I decided that it introduces other limitations.

It still appears that the scratch built approach is the way to go.


there is a tool set for C++ programmers, http://www.ta-lib.org

Does anyone know of somthing similar for VB.net, or any .net language ?

Sir G
Moderator
Moderator
Posts: 243
Joined: Wed Apr 16, 2003 12:21 am
Location: Salt Lake City, Utah

Post by Sir G » Tue Aug 05, 2003 3:33 pm

Hi Karakoram-

I'm sorry to hear SQ isn't going to work out for you.

May I ask, what limitations you found?

Cheers. Gordon

Chris Murphy
Roundtable Fellow
Roundtable Fellow
Posts: 84
Joined: Thu May 29, 2003 12:11 pm
Location: Eugene, OR
Contact:

Post by Chris Murphy » Tue Aug 05, 2003 4:44 pm

Karakoram,

Here is a website that has C# source code for technical analysis:

http://www.modulusfe.com/welcome.asp

Note, that currently they do not provide a backtesting engine. Later this year they are coming out with one though.

As Sir G. is, I'm also curious what about QuantStudio won't work for you. You can code whatever you want so I'm a little confused.

Also, my thinking has been to do backtesting with QuantStudio and then build a full application using Moduls's TA-SDK and StockChartX.

Chris

Chris Murphy
Roundtable Fellow
Roundtable Fellow
Posts: 84
Joined: Thu May 29, 2003 12:11 pm
Location: Eugene, OR
Contact:

Post by Chris Murphy » Tue Aug 05, 2003 5:14 pm

Here is a link to the TA-LIB C#.NET version:

http://cvs.sourceforge.net/cgi-bin/view ... ib/dotnet/

Chris

Karakoram
Roundtable Knight
Roundtable Knight
Posts: 127
Joined: Wed Apr 16, 2003 11:01 pm
Location: Reno, NV
Contact:

Post by Karakoram » Tue Aug 05, 2003 6:33 pm

I found that if you write an application in QuantStudio, you could not share or sell the software with others, unless they have quantstudio.

They don't provide the source code, unless you pay thousands (from what I hear, upper thousands) of dollars.

I don't like limitations, and I learned that the hard way with TS, TR, etc.

Also, I need to be able to share my written applications with my friends that trade, especially since they will help me test the application.

Chris Murphy, thank you for the links, I will check them out!

Anyone: Has anyone tried this: http://www.modulusfe.com/tasdk/dotnet.asp ?

Chris Murphy
Roundtable Fellow
Roundtable Fellow
Posts: 84
Joined: Thu May 29, 2003 12:11 pm
Location: Eugene, OR
Contact:

Post by Chris Murphy » Tue Aug 05, 2003 8:48 pm

Ok, I understand. Its not that the program is limited but that its transferability to others is limited. I thought about that as well. Since it was only $99 ( goes up to $599 in October ) I figured it was a great deal for doing the testing part. Later on I will dive in and do the hard coding. I don't really know a lot of C# so while I do some easy backtesting with QuantStudio I'm learning the C# part. Hopefully when my testing is done I'll be a C# commando and ready for the real battle 8)

Chris Murphy
Roundtable Fellow
Roundtable Fellow
Posts: 84
Joined: Thu May 29, 2003 12:11 pm
Location: Eugene, OR
Contact:

Post by Chris Murphy » Wed Aug 06, 2003 10:57 am

Another C#.NET Library is at:

http://quantlib.org/

enjoy 8)

Post Reply