-
Where is the Basic, in Visual Basic?
In considering the current Visual Basic offerings (.Net), I am struck by just how HOSTILE .Net is to the casual programmer... by this I mean, someone that needs to fire off a quick and dirty program... a simple interface... and not really become a "programmer". Us engineers have other things to do than to become full on code monkeys.
This is what BASIC used to mean.
You know, the B in Basic.
You could teach yourself just by looking at some code.
With .Net now at the front... it has many (most?) of the advanced OOP language features, making it vastly more complex.
So much so, I am considering learning VB6 instead (I hear it is good through Win8)
Since .Net has roughly the same learning curve as C++, C#, Java (or so I am told), what exactly it the *point* of VB.Net??? You certainly don't see a beginners language anymore, and I can't see people that need to do casual programming to support their primary activities (I have CNC LASER and robotics control that I have to accomplish, hardware AND software), being all that happy about dropping everything for a few weeks, in order to learn .Net in order to write a small program or two every year.
Again, I am NOT going to be a programmer. But I need some programs to do engineering. What should a regular Joe like me do, and why?
Is my notion of sliding "back" to VB6 a wise or a foolish choice in this instance? (I don't know VB6 or VB .Net, but I know various BASIC implementations as well as VBA)
Just doing a sanity check.
Thanks ever so much for sharing your opinion.
SMS
-
Re: Where is the Basic, in Visual Basic?
Well I would say that much of what you have said is incorrect. VB.Net does nto have the same learning curve as C++
Visual Studio is not a beginers language, It is a suite of languages ranging from Basic to C++
Both VB.Net and VB6 support the Basic language with many functions that date back to the original Basic versions and of course many new features have been added over the years that make things easier rather than harder. For example how much work would if take in GW Basic or BasicA just to get a mouse pointer to appear on the screen an then link it to the movements of the mouse? Forms, Windows, Databases on so on. many of these things are done now with little or no code where in the older forms of basic they would have taken many many hours of hard work on the part of the programmer.
VB6 has some issue installing under windows 8 but with some effort it will work. Not much point in learning it at this point though would be better to learn to use VB.Net instead.
If you know some basic then vb.net will not be that alien to you.
It is pretty simple to fire off a simple interface in either VB6 or VB.Net, much more so than it would be to do so in BasicA
-
Re: Where is the Basic, in Visual Basic?
Thanks for the feedback...
I guess where this notion of using VB.net falls short for me, is that I generally "program" by example... grab something that is similar to what I want, or has a feature I need, and I can then take care of business. I can do almost anything in VBA in minutes... I've done web browsers, camera controllers/frame grabbers, process simulators, kiosks, electrical test system controllers, report generators, visual inspection data stations, and on and on... and to tell you the truth, I'd stick with VBA, except my new robot controller and CNC controller needs VB6 or above.
With the structure in VB.net, I'm finding it VERY hard to see any "flow" to the programs themselves. The programming construction/style is alien.
I think if I go that route, I'm "stuck" having to stop my normal work... to learn the language. I was really hoping to avoid that.
Is VB6 closer to VBA than it is to VB.net? If it's closer to VB.net, then you're probably right...
SMS
-
Re: Where is the Basic, in Visual Basic?
VBA is very similar to VB6. VB.Net is substantially different. Saying that, there are many "legacy" functions included in VB.Net so it is possible for a VB6 programmer to write a program in VB.Net without too much effort. The interface is not much different, you drag your objects on to your form, double click on them to write your code and then run it.
I would recommend investing the time (not too much really) to get used to VB.Net for 3 main reasons.
1. VB6 is no longer supported and VB.Net is the language most apps are being developed in.
2. VB6 can be made to run on Windows 8 but it is very likely that it will not run under the next operating system, whereas VB.Net will.
3. This CNC controller will accept VB6 or above, your next will probably only accept VB.Net or above.
By moving to VB.Net and skipping the "obsolete" VB6, you are future-proofing yourself and the programs you write for your machines.
-
Re: Where is the Basic, in Visual Basic?
Thanks much for the replies, guys! Very helpful.
On a more philosophical note....
Now that BASIC is really ASIC (_B_eginners need not apply), doesn't this leave a beginners programming language vacuum, in terms of Microsoft offerings?
-
Re: Where is the Basic, in Visual Basic?
I understand your sentiments. I am also very comfortable with VBA and reasonably proficient in VB6. However, I have migrated to VB.Net and although I was overwhelmed at first, I quickly became used to it. Yes, there are still many things I can do in VB6 that I can't do (yet) in Vb.Net but I found the legacy functions very useful in migrating.
I do not agree that the beginners part is now obsolete, more due to the legacy functions than anything else. For me, the most difficult part for an absolute beginner is getting your head round the Object Orientated concept rather than the program logic or syntax.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
SpacemanSpiff
and to tell you the truth, I'd stick with VBA, except my new robot controller and CNC controller needs VB6 or above.
That's an interesting statement. I wonder what particular 'features' of VB6 are required that VBA cannot provide
-
Re: Where is the Basic, in Visual Basic?
You might look at Microsoft's other .Net Basic: http://smallbasic.com/
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
Doogle
That's an interesting statement. I wonder what particular 'features' of VB6 are required that VBA cannot provide
Actually, my private belief is that VBA can do anything :) And I have been tempted to try to use VBA... BUT the support/training/example code that are part of these systems are in VB and VB.net. The manufacturers won't support VBA development.
-
Re: Where is the Basic, in Visual Basic?
VBA is an embedded automation technology. If you actually mean something like using Excel to "reach out" and try to act like a real programming tool using VBA then you can probably continue to do that using the same API these vendor(s) provide for VB6. You just won't get sample Excel documents (workbooks) to hack away at.
But there is no "VBA" in the sense of a stand alone development environment. It's a macro language that only works embedded in some host application that provides an object model and widget framework.
There are some 3rd party Basic tools you might consider, but I have no idea which ones support both COM and standard DLL entrypoint calls. I've heard "PowerBASIC" is very popular with the QBasic/VBA crowd though.
-
Re: Where is the Basic, in Visual Basic?
Exactly... Excel.
And yes, I am aware that it is probably POSSIBLE, but for reasons given above (and others), have decided to not even attempt it.
-
Re: Where is the Basic, in Visual Basic?
Well if you are programming on Windows your choices are limited.
VBA and VB6 offer good support for COM and standard DLLs.
VB.Net and C# can bridge to these with some effort and use any .Net API a vendor supplies as well.
VBScript is hosted much as VBA is, but there are some basic hosts provided in Windows (WScript, CScript, MSHTA). However it has no direct equivalent of Declare so using standard DLLs requires a 3rd party bridging component.
Outside of these there are lots of choices, but be sure that any you choose can support the API technologies your vendors offer. Even Java can make use of COM and standard DLLs with enough effort - it's just a little frustrating: like using .Net only less pre-packaged for you.
VB6 might be your most logical choice, however it is hard to come by now and will have a learning curve. However you'll find that the IDE and most of the procedural syntax are both very similar to what you see in Excel VBA.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
Españolita
2. VB6 can be made to run on Windows 8 but it is very likely that it will not run under the next operating system, whereas VB.Net will.
Hah!
We hear this every time a new version of Windows comes out. I'd be less surprised to see VB.Net disappear first, and don't let the screen door hit it on the way out!
-
Re: Where is the Basic, in Visual Basic?
We actually have hardware at the lab that have drivers that require Windows 2000!
So I'm less concerned with keeping up with operating systems... in fact, process reliability often requires that operating systems DON'T change, so VB6 and WinXP are going to be good for a very long time.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
SpacemanSpiff
Since .Net has roughly the same learning curve as C++, C#, Java (or so I am told), what exactly it the *point* of VB.Net??? You certainly don't see a beginners language anymore, and I can't see people that need to do casual programming to support their primary activities (I have CNC LASER and robotics control that I have to accomplish, hardware AND software), being all that happy about dropping everything for a few weeks, in order to learn .Net in order to write a small program or two every year.
That is one lulzy statement. Don't kid yourself, VB.Net is no harder to learn than VB6 and most importantly, there isn't anything that can be done in VB6 that cannot be done much more easily in VB.Net with the exception of socket programming and even then, the VB6 Winsock control is an insult to network programming and should never have been created.
-
Re: Where is the Basic, in Visual Basic?
Another exception would be printing. In VB6 it is simply Printer.Print where as in VB.Net it is a bit more complex to say the least.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
Niya
the VB6 Winsock control is an insult to network programming and should never have been created.
That's a bit harsh. It may have some shortcomings but....
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
Doogle
That's a bit harsh. It may have some shortcomings but....
I agree, the winsock control works well for what it is. I have one piece of software that I have been distributing for over 10 years now that uses a winsock control array to handle up to 25 clients at each location and has been running at 100s of sites for years with no issues at all. I have had many positive comments as to the speed and reliability of the program. The only compliant I have gotten is that it is not designed as a service so someone must be logged in to run it.
It took quite a bit of effort to get this type of stable TCP communication in VB.Net using the Sockets class but after much hard work and testing I have several clients that are using VB.Net code to talk to the server which is still using Winsock.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
SpacemanSpiff
In considering the current Visual Basic offerings (.Net), I am struck by just how HOSTILE .Net is to the casual programmer... by this I mean, someone that needs to fire off a quick and dirty program... a simple interface... and not really become a "programmer". Us engineers have other things to do than to become full on code monkeys....
Thanks ever so much for sharing your opinion.
SMS
If by hostile you really mean different / changed, then you are correct. Could you post an example of some Q&D program that is being hampered by .Net?
I have been programming since..., well a long time. The changes and differences have been overwhelming at times, but the fundamentals are always the same, and will be so as long as the architecture is von Neumann based.
How are you communicating between the CNC / robot and the PC? Ethernet, USB, SerialPort, BlueTooth, etc...
BTW - don't call us code monkeys :wave: So I wish that programming languages would have stopped at IBM1620's SPS.
Code:
BOTTLES OF BEER PROGRAM FOR THE IBM 1620 MODEL I
*
* HAMMERS THE WHOLE THING OUT ON THE CONSOLE TYPEWRITER.
*
* A MISERABLE WASTE OF TIME ON 10/2005 BY
* CHUCK GUZIS CHUCK @ SYDEX.COM
*
* THIS CODE IS SHOWN IN ASSEMBLY-LISTING FORMAT WITH SPS MNEMONICS.
* I HAVE SPREAD THE SPS FIELDS OUT A BIT FOR READABILITY.
*
* THERE ARE SOME SPECIAL NUMERIC CHARACTERS:
* ] = FLAGGED 0
* J-R = FLAGGED 1-9
* | = RECORD MARK
* [ = FLAGGED RECORD MARK (NOT USED HERE)
*
* IF YOU'RE GOING TO RUN THIS ON THE CADET, YOU NEED TO HAVE AT LEAST
* THE ADDITION TABLES LOADED. INDIRECT ADDRESSING IS USEFUL, BUT NOT
* ABSOLUTELY NECESSARY (SEE NOTE BELOW).
*
* EXECUTION STARTS AT 00402.
*
00402 34 00000 00102 START RCTY ,,, RETURN CARRIAGE
00414 17 00626 ]0426 BTM DBEERS,*+12 ,,, SHOW COUNT
00426 39 00783 00100 WATY MSG2 ,,, OF BEER ON...
00438 34 00000 00102 RCTY ,,, RETURN CARR.
00450 17 00626 ]0462 BTM DBEERS,*+12 ,,, SHOW COUNT
00462 39 00827 00100 WATY MSG4 ,,, OF BEER.
00474 34 00000 00102 RCTY ,,, ZZZZIP...
00486 39 00847 00100 WATY MSG6 ,,, TAKE ONE DOWN
00498 34 00000 00102 RCTY ,,, ZZZIP...
00510 12 00745 ]0001 SM BEERS,1 ,,, A DEAD SOLDIER
00522 46 00578 01200 BZ EMPTY ,,, IF ALL GONE
00534 17 00626 ]0546 BTM DBEERS,*+12 ,,, SHOW COUNT
00546 39 00783 00100 WATY MSG2 ,,, ON THE WALL
00558 34 00000 00102 RCTY ,,, ZZZZZIP...
00570 49 00402 B7 START ,,, DO IT AGAIN
00577 0
00578 39 00911 00100 EMPTY WATY MSG8 ,,, NO MORE BEER
00590 34 00000 00102 RCTY ,,, ZZZZIP...
00602 48 00000 00000 H ,,, STOP
00614 49 00578 B7 EMPTY ,,, IN CASE RUN PUSHED
*
* SUBROUTINE TO DISPLAY BOTTLE COUNT AND EITHER *BOTTLE* OR *BOTTLES*
*
* THIS ASSUMES THAT THE INDIRECT ADDRESSING FEATURE IS PRESENT, BUT
* IF NOT, SIMPLY USE A "BB"(42) INSTRUCTION IN PLACE OF THE INDIRECT
* BRANCHES.
*
00621 00000 DBRET DC 5,0 ,,, RETURN ADD
00626 14 00745 ]0010 DBEERS CM BEERS,10 ,,, DISPLAY BOTTLES
00638 46 00710 01300 BNL DBEER2 ,,, 10 OR MORE
00650 38 00745 00100 WNTY BEERS ,,, 1 DIGIT
00662 14 00745 ]0001 CM BEERS,1 ,,, JUST 1?
00674 47 00722 01200 BNE DBEERS4 ,,, NO, *BOTTLES*
00686 39 00767 00100 WATY BTL ,,, SAY *BOTTLE*
00698 49 ]062N B7 -DBRET ,,, EXIT
00710 38 00744 00100 DBEER2 WNTY BEERS-1 ,,, 2 DIGITS
00722 39 00749 00100 DBEER4 WATY BTLS ,,, SAY BOTTLES
00734 49 ]062N B7 -DBRET ,,, EXIT
00741 ]0099 BEERS DC 5,99 ,,, BOTTLE COUNT
00746 | DC 1,@
00747 0
00748 0042566363534562 BTLS DAC 8, BOTTLES
00764 0| DAC 1,@
00766 004256636353450| BTL DAC 8, BOTTLE@
00782 0056460042454559 MSG2 DAC 8, OF BEER
00798 0056550063484500 DAC 8, ON THE
00814 66415353030| DAC 6,WALL.@
00826 0056460042454559 MSG4 DAC 8, OF BEER
00842 030| DAC 2,.@
00846 6341524500565545 MSG6 DAC 8,TAKE ONE
00862 00445666552300 DAC 7, DOWN,
00876 5741626200496300 DAC 8,PASS IT
00892 4159566455440020 DAC 8,AROUND -
00908 0| DAC 1,@
00910 5556005456594500 MSG8 DAC 8,NO MORE
00926 42454559030| DAC 6,BEER.@
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
Niya
That is one lulzy statement. Don't kid yourself, VB.Net is no harder to learn than VB6 and most importantly, there isn't anything that can be done in VB6 that cannot be done much more easily in VB.Net with the exception of socket programming and even then, the VB6 Winsock control is an insult to network programming and should never have been created.
I don't know... I just got VB6 LE, installed it, got an example of TCP/IP chat... and it is fully comprehensible to me. Easy to follow the code and the flow.
I have tried the same thing with Visual .Net, got a simple TCP/IP chat example, and can't make heads or tails of it.
Real world example. Results with VB6, failure with .Net.
Again, in the engineering world, where work has to be done, on schedule, with code that supports those activities, results are all that matters. .Net being theoretically as easy to use as VB6 won't cut it.
-
Re: Where is the Basic, in Visual Basic?
Quote:
don't call us code monkeys
Yeah! We're "Compilable Instruction Simians"
In all honesty, I don't think VB has been very "BASIC" for some time... I remember making the transition to VB3 for the first time... at the time I didn't think it was all that Basic any more. transitioning from procedural programming to event programming was the hardest thing for me to grasp... ever. Even OOP/OOD came easier for me than the concept of events... "OK, I get it that when I click this button, this code runs... but where the heck is the ***** code that says 'if button clicked, run this code' ... " YEah... I spent three weeks going around and around and around on that one...
an astute classmate of mine back in the days of tech school (oddly the AF was kind enough to prepare me for just about everything but VB) noted that when you get right down to it, all languages are the same... they all have variable declarations, they all have some kind of loop structure, control structures, blocks, conditional statements and the same basic data types... they only differ in syntax.
I tell you it was a light bulb going on... that was my ah-ha moment. With the exception of my struggle with event-driven programming, after that moment, picking up new languages has been fairly simple... except Perl... that still confuses me... but I think that was the point behind it, to be as confusing as possible .. but picking up C++, PHP, even C# ... I may not be fluent or as quick in those languages as I am in VB, I can still read code and understand what's going on.
Quote:
Another exception would be printing. In VB6 it is simply Printer.Print where as in VB.Net it is a bit more complex to say the least.
Yes and no... reason it isn't as simple as it used to be is because you have more control... things that used to be difficult with the old printer object are now easier... it allows for greater control then previously possible... so, yeah, it takes more code than it used to. That's why I simply go with a reporting too to take care of all that for me.
In terms of VB classic... VBScript is probably the most stripped-down, simplest form of VB. VBA would be the next step up from there. And then the next step up is VB6. Since VBA is basically a subset of VB6, anything you can do in VBA is going to be supported in VB6 ... mostly... there are some areas where it's not so direct, since VBA runs in context of Office, there are some things you have access to that you don't instantly have access to in VB6... at least not until you add the appropriate references.
-tg
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
dbasnett
If by hostile you really mean different / changed, then you are correct. Could you post an example of some Q&D program that is being hampered by .Net?
I have been programming since..., well a long time. The changes and differences have been overwhelming at times, but the fundamentals are always the same, and will be so as long as the architecture is von Neumann based.
How are you communicating between the CNC / robot and the PC? Ethernet, USB, SerialPort, BlueTooth, etc...
BTW - don't call us code monkeys :wave: E]
We're connected via LAN... to both machine vision systems, and the robots themselves.
"Code monkeys" was meant only with the greatest love and affection :)
We use the term here at work to refer to the engineers that got stuck writing code more than doing their engineering job.
I don't want that to be me :)
What I see is that programs that stray farther from plain spoken language are harder to learn/comprehend.
BASIC used to be at one end of the scale, assembly at the other, and everything else in between.
I was looking at VB6 examples this weekend, and I can "see" the design intent in the example, and comprehend all of the code, even though I am not "up to speed" with the language.
Similar .Net examples are simply incomprehensible to me.
In practical terms, since I have to get *results* in short order, investing the time necessary to develop a little proficiency in .Net may turn out to be impractical.
I understand that one can write code in an older (traditional?) BASIC sensibility in .Net, but as I said before, I have to stand on the shoulders of giants... look at the code of others, and adapt it for my own use. This is a very typical learning mode, and gets me from a to b in rapid fashion.
Those well versed in .Net write code that conforms to a vastly more complex model.
In another thread, I asked for an example, of as few lines of code as possible, to show TCP communications in .Net.
Nobody offered this up... but I was pointed to a supposedly "simple" TCP chat program. Three forms and I think about 6 or 7 code modules later.... I'm banging my head on the wall.
I'm of the mind that opening a port on an address and sending a string should take only a few lines of code. With VB6, I have now demonstrated that I can do that. It took minutes.
No such success with .Net
And yes, we can all agree that if I learned .Net, then it would (by definition) become vastly easier...
Notice how the iPhone doesn't need a manual? It is comprehensible as is. You don't need to study it. You just use it. I find VB6 is a lot closer to that paradigm, and I think there is a legitimate need for languages that operate that way. It's not just programmers that need to control their hardware.
Regards,
RS
-
Re: Where is the Basic, in Visual Basic?
The fundamental concepts of event programming and multi-programming / threading have also been around a long time. What was hard for me was that you could only diddle with controls on the UI thread and all of the BS that went along with that. My past kept fighting with it. In the old days if multiple processes wanted to share a resource it was up to the individual to make certain that only one process at a time accessed it. I still don't like it. I wish that MS had just put a caveat on all the controls that said don't access the control from multiple threads simultaneously.
-
Re: Where is the Basic, in Visual Basic?
There is a company in the UK named Matrix Multimedia that has a product called FlowCode. I can't write PIC code, but I learned FlowCode quickly, and it knew how to write PIC code. They have the fundamentals down; variable declarations, loop structures, control structures, blocks, conditional statements, and basic data types. Almost all of it is done drag and drop.
-
Re: Where is the Basic, in Visual Basic?
For comunicating over a lan the Winsock control in VB6 is much easier to grasp than the Sockets class or TCPListener/TCP Client classes in VB.Net and for simple projects the Winsock control will do but the classes in vb.net are much more powerful and give you much greater control.
Speaking of older versions of basic the only version of VB that resembles basic is VB For Dos. It is basically like Quick Basic with a seperate forms designer added in for the visual part. VBDos gives you the option to write programs with or without using the Visual designer. If you stay away from the visual part then it is totally Basic. Even after programming in VBDos for quite some time VB3 had a bit of a learning curve after which VB 5 and 6 where not hard to pick up. VB.Net again had a learning curve and I still use VB6 for many projects, especially those I do for my own uses but it only took a few hours to see that there were things that could be done easily in VB.Net that would be a nightmare in VB6 and others than were simply not possible in VB6.
The communications via TCP was difficult to get right using the sockets class but once I managed to get it right it is now just a class I drop into my programs and is even easier to use than the winsock control in VB6 while still allowing me to control things that were not possible using the control and with a side bonus of being able to use the same class on mobile devices as well.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
dbasnett
There is a company in the UK named
Matrix Multimedia that has a product called FlowCode. I can't write PIC code, but I learned FlowCode quickly, and it knew how to write PIC code. They have the fundamentals down; variable declarations, loop structures, control structures, blocks, conditional statements, and basic data types. Almost all of it is done drag and drop.
Just had a look at FlowCode...
Impressive. Thanks for this... (as I also have to code for Arduino at times)
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
RyderS
Just had a look at FlowCode...
Impressive. Thanks for this... (as I also have to code for Arduino at times)
I had v4 of FlowCode and was impressed, but as I said I didn't know PIC coding so it didn't take much. I managed to create an RS232 application with all kinds of inputs, and I even had a clock that was fairly accurate that ran on the board. Good luck!
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
dbasnett
My past kept fighting with it.
I sure hear that, brother. Since I can't be a programmer full time (or anything close to that), the evolution of languages has out-paced me... and my past becomes a heavy anchor. It's harder to reorient your thinking than it is to start fresh, I think.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
dbasnett
My past kept fighting with it.
I sure hear that, brother. Since I can't be a programmer full time (or anything close to that), the evolution of languages has out-paced me... and my past becomes a heavy anchor. It's harder to reorient your thinking than it is to start fresh, I think.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
SpacemanSpiff
In considering the current Visual Basic offerings (.Net), I am struck by just how HOSTILE .Net is to the casual programmer... by this I mean, someone that needs to fire off a quick and dirty program... a simple interface... and not really become a "programmer". Us engineers have other things to do than to become full on code monkeys.
Well I have made a special form of Visual Basic, BASIC, Pascal, C++, DHTML, PHP and Director typed programming language...
!! Click Here !!
PS: Just wait for the newer versions of the Build to be posted on the Website, by me!!
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
DataMiser
Another exception would be printing. In VB6 it is simply Printer.Print where as in VB.Net it is a bit more complex to say the least.
Oh ya, forgot about that one...printing in VB6 can be done with like 2 lines of code.
Quote:
Originally Posted by
Doogle
That's a bit harsh. It may have some shortcomings but....
I didn;t think I was harsh enough.:bigyello:
Quote:
Originally Posted by
DataMiser
I agree, the winsock control works well for what it is. I have one piece of software that I have been distributing for over 10 years now that uses a winsock control array to handle up to 25 clients at each location and has been running at 100s of sites for years with no issues at all. I have had many positive comments as to the speed and reliability of the program. The only compliant I have gotten is that it is not designed as a service so someone must be logged in to run it.
It took quite a bit of effort to get this type of stable TCP communication in VB.Net using the Sockets class but after much hard work and testing I have several clients that are using VB.Net code to talk to the server which is still using Winsock.
I wrote an auto update app a few years ago in VB6 that composed of a client and a server. The server was responsible for updating instances of software that resided on its own private network. Its a fairly complicated piece of software with its own protocol of my making but at its heart it was basically a file transfer. The fact that it could transfer files was particularly useful so I was being asked constantly to add features to it that related less to updating software. Problem was, the program was hacky. This thing was truly a nightmare to extend. I mean it worked and has been stable and without crashes for years but it has become unmanageable. Its no longer safe to go tinkering around in its code. It can be easily broken. But the really stupid thing was the fact that its hacky nature was a necessity. In hindsight I realized that I should never have attempted this in VB6. The source of my problem revolved around the fact that VB6 was incapable of multi-threading. Couple that with the fact that that the only way to get data was to wait for the DataArrival event and without multi-threading, it means that you could only receive data while the there were no functions or subs currently executing. This makes implementing a protocol very difficult. DoEvents became a necessary evil and as a rule I could not use loops extensively. In place of loops I had to use Timers and maintain loop like states using class level variables. This was the most frustrating thing about the whole experience. When I had to use loops, DoEvents and busy-waits became necessary. DataArrival and DataSent would not fire without it. Reentrancy problems caused by DoEvents, plagued me to near insanity. I wouldn't wish this on my worst enemy.
Recently a mysterious problem began showing up. Its transfer rates were reduced severely. It was transferring at something like 10 bytes per second. I was asked to fix that but I knew in my heart that the chickens would come home to roost eventually. It worked well for years but it was such a patch job of a program that I wasn't the least bit surprised. Nonetheless I sure as hell wasn't going back in there to fix anything. Trying to debug a program that feigned multi-threading using DoEvents is not a trivial thing to do.
So, I started working on a VB.Net version of this. In fact its my current project and let me say the results so far have been spectacular. Features I could only dream of implementing in my VB6 version were natural and elegant to implement in VB.Net. Multi-threading ensured I could receive data anytime without using DoEvents to yield. That bit was really key. This new version while complicated is much much cleaner and easier to extend than its predecessor and I didn't have to use any crude DoEvents hack to get something to work. It was beautiful.
To be fair though. If I had to do it again in VB6, I think I could do it without DoEvents. It would have to be completely asynchronous and I have to make use of many more Timers and instead of using single functions and subs to do simple communication tasks like sending a list of files, I'd have to make entire classes instead because implementing looping semantics while allowing yields for DataArrivals and DataSents to be raised would require Timers and class level variables. This would make the implementation far more bloated than its VB.Net counterpart but it would be cleaner. Point is, in this case there is no escaping how inferior VB6 is to VB.Net.
Quote:
Originally Posted by
RyderS
I don't know... I just got VB6 LE, installed it, got an example of TCP/IP chat... and it is fully comprehensible to me. Easy to follow the code and the flow.
I have tried the same thing with Visual .Net, got a simple TCP/IP chat example, and can't make heads or tails of it.
Real world example. Results with VB6, failure with .Net.
Again, in the engineering world, where work has to be done, on schedule, with code that supports those activities, results are all that matters. .Net being theoretically as easy to use as VB6 won't cut it.
It wasn't easy for me too. In fact at first I would have settled for similarly simple control like the one in VB6. With multi-threading in VB.Net I figured I could mitigate at least some of the problems I had with it in VB6. I mean Winsock in VB.Net looked really scary.....but alas, know how long it took me to figure out how to use Winsock.Net ? Something like 1 1/2 hours....yes thats right. It really wasn't that complicated after all. I'm sure you could at least spend an 1 hr to learn something new despite the urgency. I was thinking like you when I first came upon Winsock.Net but when I started using it I realized why they didn't bring back the simplicity of the VB6 Winsock control.....it wasn't good for serious network programming. Winsock.Net is far superior. The added complexity is quite worth it in my opinion.
-
Re: Where is the Basic, in Visual Basic?
I can't help feeling we've gone somewhat off topic here and are exhibiting exactly the problem the OP is experiencing. He's struggling to get simple examples to work from so drowning him in the relative merits of multi threading in VB6 and .Net has probably just fried the last few brain cells he's got left.
Given this statement:-
Quote:
I guess where this notion of using VB.net falls short for me, is that I generally "program" by example... grab something that is similar to what I want, or has a feature I need, and I can then take care of business
...I suspect RyderS hit the nail on the head right here:-
Quote:
I understand that one can write code in an older (traditional?) BASIC sensibility in .Net, but as I said before, I have to stand on the shoulders of giants... look at the code of others, and adapt it for my own use. This is a very typical learning mode, and gets me from a to b in rapid fashion.
Those well versed in .Net write code that conforms to a vastly more complex model.
VB.Net is capable of writing code every bit as simple as VB6 or VBA ever were. In fact, it contains their libraries (with a few very minor ommissions) so you can write VB6 code in .Net if you wish. There's also no need to write object orientated code in .Net, it fully supoprts modular procedural code. Hell, it'e even still got GOTO in it so you can get really retro and pretend it's the 80s if you want to.
Your problem isn't that the language isn't simple enough, it's that the examples you're finding are too complex. You probably don't care that the MVP pattern will allow greater separation of responsibilities and enable dependency injection for test driven development. You probably do care about how to write a loop that will exit when you want it to, a bit of file handling and how to talk to your CNC's API. With that in mind I'd suggest that your best source of knowledge is probably forums like this one. Instead of going looking for the examples you want, get onto the .Net forum and ask for them. Be prepared for the fact that just asking for code outright tends to get a bit of a cold shoulder because people like to think your making an effort yourself (we get way too many students asking us to do their assignements for them)but, as long as you explain your situation, aren't afraid to admit you're a noob (we all were once) and are polite you'll generally get the the help you need.
Or you could indeed continue to use VB6. I'm not sure I'd recommend it because I think you'll find .Net every bit as easy as 6 for a quick bit of hacking once you've learned the basics (which won't take long). On top of that .Net is likely to offer you much more in the long run. But I still do some work in VB6 because it's not worth the effort to migrate some of the stuff I've got. I just live with the risk that it might get dropped at some point.
Do NOT click there! Trust me, just don't.
-
Re: Where is the Basic, in Visual Basic?
The OP made a statement, "...someone that needs to fire off a quick and dirty program." If the OP would post an example it would help us understand the issues. What is quick and dirty?
-
Re: Where is the Basic, in Visual Basic?
BTW - Where can I get a copy of VB6? Is it free? Is it supported by MS?
-
Re: Where is the Basic, in Visual Basic?
You can get it from Microsoft or you may be able to find it on the Net.
No it is not free.
No it is not supported.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
FunkyDexter
I can't help feeling we've gone somewhat off topic here and are exhibiting exactly the problem the OP is experiencing. He's struggling to get simple examples to work from so drowning him in the relative merits of multi threading in VB6 and .Net has probably just fried the last few brain cells he's got left.
Yes, you understand the situation entirely... and I have brain cells left, but they are reserved for hardware design/Cad/Fabrication... and robot native code and machine vision scripting.
One of the reasons I ***LOVE*** VBA work, is that the examples are plenty, *and* they tend to use less sophisticated methods/structures. It probably doesn't promote the best programming style, but is generally laid out right in front of you in a single module and maybe a userform.
You set up a little control structure, bang in a few standard interface objects, slap some logic on top of that, and you're golden. It's not a platform to run a global enterprise from, but it tells a robot what to do just fine.
Someone asked for an example of what's going on...
Well, the robot has it's own language. I've had to learn that. BUT this language has no interface capability... other than a console for text. The interface implementation is available through VB...
So a pretty front end for manufacturing technicians to use is required... buttons, text boxes, images, check boxes, all that jazz. Select the program you want to run, a couple of options, then go. Not much more than that.
BUT...
Additionally, we have an automated electrical test system... code that drives test instruments... it generates pass/fail data and measurement data, among others.
Depending on the test results, the robot might need to do different things... perform a re-test... place a part in a reject bin, whatever....
This means that the robot and the test system have to be able to have a very simple conversation... TCP style, over the lan. "ready", "fail", "retest", "task complete", "serial:1234", etc.
Finally, vision systems also have something to say. These cameras have their own IP addresses, and they need to be told which of their internal "recipes" to run, and to report back "pass/fail" and OCR data (they know how to read barcodes, for example)
All of the hard parts are coded in the robot's native language, the perl test code, and the vision system recipes.
I want to tie this all together at a single interface... graphical, intuitive... and simply coordinate a conversation for all of these activities.
Once I have comms working fine, the rest is a walk in the park.
So, I dive into .Net, trying to find the most basic, stripped down TCP code... and leverage that. The best working example I could find has three forms and several modules. I can see things happening in the code... but attempts to condense/alter things to work for me end up breaking everything.
Contrast: I have VB6 sending things to and fro with ease. Literally a few lines of code... a couple of events.
I hear what people are saying... that stepping up to .Net has rewards... being overwhelmed with the .Net implementation of a TCP socket is a small price to pay for its greater power for good in the universe... and I *am* trying, but learning .Net, the proprietary robot language, and the proprietary vision system scripts and command set all at once is overwhelming.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
FunkyDexter
VB.Net is capable of writing code every bit as simple as VB6 or VBA ever were.
That's where I'm going wrong, I didn't realise that it wrote the code for you (tee hee) :D
As an ex-Engineer, I understand OP's issues, but one can't stick one's head in the sand and expect everything to be 'as it was'. Time moves on and we have to adjust. Unfortunately that might mean a struggle up a learning curve and cost, but ..........
I suppose there's still some PDP11s out there whirring away doing exactly what's required of them day after day but one day, well who knows?
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
Doogle
That's where I'm going wrong, I didn't realise that it wrote the code for you (tee hee) :D
As an ex-Engineer, I understand OP's issues, but one can't stick one's head in the sand and expect everything to be 'as it was'. Time moves on and we have to adjust. Unfortunately that might mean a struggle up a learning curve and cost, but ..........
I suppose there's still some PDP11s out there whirring away doing exactly what's required of them day after day but one day, well who knows?
There is NO such expectation.
BUT, the point of BASIC, with a "B" was to fill a particular niche, which to my way of thinking, it is failing to do as implemented by MS. Other languages are available with the more powerful and complex structures... so let the power programmers use those... and not co-opt BASIC, and shove it into the company of C#, C++, etc.
Here is an article that I think has merit: http://msdn.microsoft.com/en-us/magazine/jj133828.aspx
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
Doogle
That's where I'm going wrong, I didn't realise that it wrote the code for you (tee hee) :D
As an ex-Engineer, I understand OP's issues, but one can't stick one's head in the sand and expect everything to be 'as it was'. Time moves on and we have to adjust. Unfortunately that might mean a struggle up a learning curve and cost, but ..........
I suppose there's still some PDP11s out there whirring away doing exactly what's required of them day after day but one day, well who knows?
I hear that brother. Its funny, from my almost fanatic belief in .Net as a progressive technology, I'm sure it would surprise many of you that I was among the most adamant in my refusal to move from VB6 to VB.Net. You had to hold a gun to my head to move. I can't remember what finally got me but I do remember cautiously putting my foot in the .Net world only to be sucked in by how easily and quickly I can get the most ridiculously simple tasks done in VB.Net.
Gone were days where I had to use ugly boilerplate "Redim Preserve" code to simply add items in an array, there was List(Of T). Gone were the days where I had to hunt constants in C++ header files for use in an API, the most common things I needed the Win32 API for were implemented natively in the framework. Gone were the days where I couldn't create a control when I want and place it where I want, .Net allows you to instantiate controls just like any other object. Gone were the days where I had to write functions that altered arrays multiple times for each type of array, .Net had generics. Even without generics, reflection could be used. Gone were the days where I had to alter the behaviors of controls by repeatedly copying and pasting event handling code every where I wanted the behavior, I could place the behavior code in one place using inheritance.......I could go on and on, but I'll leave it at that. The point is, I am now left to wonder, how in God's name I could have lived without this.
To be fair though, there is a great downside. If the day comes where I may need to program for some other OS like Linux or MAC I probably couldn't. The Visual Studio IDE and the .Net framework makes everything so comfortable and clean that I doubt the development infrastructure on other platforms can measure up. After getting used to such comforts it may be a great pain to use anything that falls short. As of now, its really a royal pain in my rear to code anything in VB6 despite the fact that I've way more experience using VB6 than VB.Net. Visual Studio and VB.Net spoils you rotten....ain't that something.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
RyderS
What a ridiculous article. This in particular is laughable:-
Quote:
Visual Basic 6 accomplished its goals by abstracting away the complexity of the underlying Windows OS. Simple things were very simple to accomplish. On the other hand, complex things, such as dealing with threads, were impossible. My rule of thumb for Visual Basic 6 was: if I couldn’t do it within 10 minutes, I couldn’t do it at all.
Imply that this isn't so in VB.Net. This article reads like it was written by someone with years of experience in VB6 but only dabbled in VB.Net for all of 5 minutes. Its bias is utterly insulting.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
Niya
What a ridiculous article. This in particular is laughable:-
Imply that this isn't so in VB.Net. This article reads like it was written by someone with years of experience in VB6 but only dabbled in VB.Net for all of 5 minutes. Its bias is utterly insulting.
Well, that's rather dismissive... perhaps because of biases of your own?
And biases are not inherently wrong. They are often there for good reason.
What explains the appearance of Lightswitch?
And is there any debate at all that VB6 still thrives? If true, then an explanation for it seems in order. What is your explanation?
-
Re: Where is the Basic, in Visual Basic?
Agreed that quote is laughable. If I were to adopt an attitude of "if I couldn’t do it within 10 minutes, I couldn’t do it at all. " I would have been out of a job many years ago.
The fact is that you can write a simple program in VB6 or VB.Net or any other form of Basic in a very short period of time. Communications programs are not simple programs though VB does make it fairly simple with the use of The MSComm control, Winsock Control or in the case of .net Serial Port class and TCP Client/Listener classes. These things would be much more difficult in the older forms of basic and from the quote above would not be possible.
The thing is with the newer forms of VB is that they have added 100s and 1000s of things to the basic language yet the basic language is still there and all the new stuff is done in such a way that if you understand Basic you will be able to pick them up easily. Sure there is much to learn but that is a good thing because there is much you can do and much of it in just a few minutes.
One thing is for sure I could write a program today in VB6 or VB.Net in a day or 2 that would have taken months in the older versions of basic if it were even possible.
-
Re: Where is the Basic, in Visual Basic?
Personally, I couldn't get out of VB6 fast enough. It took a complete change in employers before I could finally shake the last of VB6 off of me... I am a lot faster and more productive in VB .NET than I ever was in VB6. Serializing a class to XML? I farted around for 6months trying to get something to work properly in VB6... had we done it in VB.NET, we could have had it done and coded, tested and released in two months...
I don't wax nostalgic for VB6... for what I do, it wasn't powerful enough. .NET is... and the fact that I get to choose between two languages is just a bonus.
Yes, that power comes at the cost of simplicity, but that's fine with me... I am at the point in my career that simple no longer cuts it. I'm constantly blowing past the envelope of normalcy. Sometimes it's within the language itself, sometimes it's the application framework (we have an internal framework upon which everything is built).
That being said, the comment was made at some point above, I just want to re-iterate it... at the heart of it all VB is still BASIC ... Yes, MS has added to it... and that's the part of VB that makes it VB rather than just BASIC... but that's their prerogative, and why shouldn't they? If languages were left to be stale and not updated to reflect new technologies and changes in patterns and time, I'd be entering this post from a punch card, and y'all would be reading it in green or amber color...
Times have changed. Languages evolve. No language is immune from it except the ones no one uses anymore. For some people VB6 still "jsut works" for them... fine... use it, I don't care... but don't crap on my parade because I chose to evolve with the times and learned a new trick. I understand that it's not always possible to move on - I'm sure my employer from two lifetimes ago is probably STILL running their app in VB6 ... and it was falling apart even in 2008 when I left ... but there was no manpower or time or money (all customization development would have had to stop, meaning there would be no money coming in), and so we were left to using scotch tape, bubble gun and duct tape to keep it going.
Niya - nothing about you surprises me....
As for David Platt... he's been dabbling in .NET for more than 5 minutes (click his name in the by line to get some of his other articles)... in fact I don't think he's extolling VB6 and holding it up as the be-all, end-all... but simply saying, hey, MS has offered to continue to allow VB6-era apps continue to run on Win8... and that's good new for some, here's why. As well as the "here's why VB6 seems to continue to limp along"...
Op-ed pieces like that though are like statistics... you can make them an argument for or against anything you want if you grab the right sound bite.
-tg
-
Re: Where is the Basic, in Visual Basic?
What I think I am seeing is that people are focusing on languages... and I think that is missing the point... "languages evolve", "new tricks" etc. etc.
What DOESN'T evolve is that class of user that is not and never will be a programmer. They don't want to be. They have no interest.
But they do have a need.
Languages don't exist just to exist. They exist to fill a need.
If you can't see the class of people that don't need or want to program (which is most living people), but want to solve small problems that take computational logic and can manipulate their hardware or data to some degree, then you probably won't catch the need for which a certain language might exist.
Again. Explain Lightswitch. Why does it exist.
Here is a great video of a technically focused (read "narrowly") individual, coming up against what would be one of the wealthiest and most successful men to ever live, and the difference in their focus: https://www.youtube.com/watch?v=FF-tKLISfPE
-
Re: Where is the Basic, in Visual Basic?
Basic is not intended for people who are not and don't wnat to be a programmer. It is intended to be a language that can be easliy understood compared to the others. If Then Else and such are pretty easy to understand just by reading the code and always has been.
they do make tools for those who do not want to learn to write programs but just accomplish a task. The company I used to work for created one of these and sold quite a few copies. Basically it was just point and click and the application would write the program for you. This tool was written in VB and as an added bonus we included a VBA script engine that would allow those who did know how to write code to write some VBA for data processing if course when you got into this part you were starting to learn to program yourself.
If Basic would not have evolved then it would be pretty much useless in the modern world of programming, not much call for writing slow console programs with no mouse support, threading or network support anymore. The additions that have been added make for a very powerful language that still uses BASIC syntax and intructions but have been expanded greatly. It is a great tool and keeps getting better.
Remember that the A in basic stand for ALL PURPOSE and for this to be true it must continue to evolve
-
Re: Where is the Basic, in Visual Basic?
Quote:
LightSwitch (originally codenamed "KittyHawk") is the name for Microsoft's tool for building business applications for the desktop, the Web and the cloud. The HTML rendering capability is aimed at developers interested in building touch-oriented apps using HTML5.
Microsoft updates 'Napa' and 'LightSwitch developer tools
So you can probably safely ignore it, and it just went through another round of churn anyway. These things are moving targets requiring constant developer re-education.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
DataMiser
Basic is not intended for people who are not and don't wnat to be a programmer. It is intended to be a language that can be easliy understood compared to the others.
Right, we agree... but here is the magic. The language, kept attractive on a beginner level because it is restricted thus, gets people in the door so to speak. They may discover that they have a knack, that it wasn't as scary as they thought... that they actually do want to become serious programmers.
Or not.
All I was describing was the NEED, in PEOPLE... while you are still focused on the language. The need exists.. and it nudges people toward a language. The issue then is, which language to they run into first? Who is it intended for. I'm starting with the people, you are starting with the language.
Nobody can look at me with a straight face and say that VBStudio.Net isn't a language for programmers. It very much is. It should be called PASIC.
A Beginner is specifically someone that is not a programmer.
After learning an introductory language like BASIC, a new programmer should then move on to programmers languages, leaving BASIC behind for the next person, instead of getting MS to drag it into a full on programming language where the examples and user experience levels they run into are so far past them as to be meaningless to them.
You talk about basic evolving... again language focused, rather than people focused. Of course it would evolve, but the task, to be true to the B in Basic, is to have an evolved language with limited control and data structures, such that the totality of the language is never very far away. For programmers that evolve.... their task should be to LEAVE the beginners language behind, not reconfigure it to suit their evolution.
Evolution doesn't have to mean more complex, or more complete, or more advanced.
And sure, there are those kind of tools from 3rd parties... we all know that. But in this context, I was specifically examining a hole in the microsoft offerings.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
RyderS
What I think I am seeing is that people are focusing on languages... and I think that is missing the point... "languages evolve", "new tricks" etc. etc.
What DOESN'T evolve is that class of user that is not and never will be a programmer. They don't want to be. They have no interest.
But they do have a need.
Languages don't exist just to exist. They exist to fill a need.
If you can't see the class of people that don't need or want to program (which is most living people), but want to solve small problems that take computational logic and can manipulate their hardware or data to some degree, then you probably won't catch the need for which a certain language might exist.
Again. Explain Lightswitch. Why does it exist.
Here is a great video of a technically focused (read "narrowly") individual, coming up against what would be one of the wealthiest and most successful men to ever live, and the difference in their focus:
https://www.youtube.com/watch?v=FF-tKLISfPE
Just because YOU can't come up with a reason for a particular language, doesn't mean someone else doesn't otherwise, as you so rightly pointed out, it wouldn't exist (except Perl, I think it simply exists just to exist and for no other reason) ... OK... so you find .NET unweildly and doesn't fit your needs. again, so what? VB6 works for you, fine, have at it. I look at it like this, VB6 is your standard ordinary wood saw... VB.NET is a power saw. For some people, the old tried and true saw is all they need and all they'll ever use... but for me, I'd rather have the power (insert Tim Allen "arr arr" sound here), I find VB6 lacking in a lot of ways... so why can't that just be that? They are tools, no different from the ones in my toolbox. I'm not going to go around using a nail gun to put picture hangers into the wall... but I'll use it to put together the base for a train layout table.
Yeah, sure people, just need something to put together small and quick an app that does a task and be done with it. and VB6 does that nicely, I don't think anyone is going to argue that. But at the same time, to try to use it at this point to put together an enterprise type system, which is what a lot of us do during the day, is suicidal.
But, yes, there is a definite segment out there of people that aren't programmers and have no ambition to be... but do know how to write macros and bend Office to their will ... and they probably out number us "pro" developers by quite a bit... and this is the reason I suspect that VBA is still part of Office, even though the plan was originally to cull it from the suite and add .NET support instead... and not just a subset, but it was going to be full-on .NET support within Office. That was supposed to happen in Office 2010 ... yeah... that didn't happen did it? And I haven't seen or heard that it ever will. My suspicions are that it never will. because the Office audience aren't programmers... they don't NEED or WANT .NET support.
All that said, I have my other suspicions as to why VB6 keeps getting continued support in each version of Windows... and why it will keep going until Win 9 or even 10 .... I wouldn't be surprised to find out that a number of MS developers (on what ever team) probably have their quick and dirty little VB6 apps that does something that they can't live without...
-tg
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
RyderS
Right, we agree... but here is the magic. The language, kept attractive on a beginner level because it is restricted thus, gets people in the door so to speak. They may discover that they have a knack, that it wasn't as scary as they thought... that they actually do want to become serious programmers.
Or not.
All I was describing was the NEED, in PEOPLE... while you are still focused on the language. The need exists.. and it nudges people toward a language. The issue then is, which language to they run into first? Who is it intended for. I'm starting with the people, you are starting with the language.
Nobody can look at me with a straight face and say that VBStudio.Net isn't a language for programmers. It very much is. It should be called PASIC.
A Beginner is specifically someone that is not a programmer.
After learning an introductory language like BASIC, a new programmer should then move on to programmers languages, leaving BASIC behind for the next person, instead of getting MS to drag it into a full on programming language where the examples and user experience levels they run into are so far past them as to be meaningless to them.
You talk about basic evolving... again language focused, rather than people focused. Of course it would evolve, but the task, to be true to the B in Basic, is to have an evolved language with limited control and data structures, such that the totality of the language is never very far away. For programmers that evolve.... their task should be to LEAVE the beginners language behind, not reconfigure it to suit their evolution.
Evolution doesn't have to mean more complex, or more complete, or more advanced.
And sure, there are those kind of tools from 3rd parties... we all know that. But in this context, I was specifically examining a hole in the microsoft offerings.
let me ask this... since you want to concentrate on the person... 1) what does Merv look like? What does he do and what does he know? 2) For this alleged hole, what is the solution? What would a language in this hole look like? What would it do? What wouldn't it be able to do? You lament that fact that BASIC is "dead" but it isn't... you can take 35 year old BASIC code, plop it into a VB (6 or .NET) console application, and with minor changes, it will run. BASIC as a language hasn't changed. It's still there. That's why we still have On Error Resume Next, it's why GOTO 10 will still work, it's the reason why you still have to Dim your variables... and it's why Dim a$ will get you a string variable. Those are all part and parcel of the BASIC language itself, and none of that stuff is going anywhere. The rest of it, that's all add-ons and extensions.
You want to talk about people and this mythical non-developer... that's fine, but you have to put in context... what does Merv look like? Because the secretary at Howie, Cheatum & Dewey has a different need from you...
Although, I'm still not sure where the failing it... you've been using VBA all these years and quite happily... so why not the big fuss? The next step up from VBA is going to be VB6 ... the next step up from there is going to be .NET in some form. That's going to be the natural progression...
-tg
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
techgnome
you've been using VBA all these years and quite happily... so why not the big fuss? The next step up from VBA is going to be VB6 ... the next step up from there is going to be .NET in some form. That's going to be the natural progression...
-tg
VBA is of course contained to operate in a specific environment... you can't just send someone a VBA program. It's a macro language implementation.
VB6 is no longer. Sure it exists, like the Atari 2600, but it's not for sale or supported by the manufacturer.
.Net is the progression of the language. Classes, methods, namespaces, inheritance, assemblies, accessibility modifiers, enumerations, collections (of two types!), and on and on and on...
There is power there. Is power really the emphasis here?
But to pretend that .Net is still simple (and thus suitable for beginners) because it is still backward compatible with most earlier BASIC expressions (seldom used), would be like saying medical care is still simple because they still use bandages.
-
Re: Where is the Basic, in Visual Basic?
Now who is concentrating on the language? I don't recall ever saying that VB is simple... but it isn't supposed to be... the reason it's Visual BASIC is largely historical and tradition... it's a nod (of sorts) to its heritage...
I know .NET isn't simple, I don't WANT it to be simple... If I did, I'd stick with VB6 or even VB4...
.NET CAN be suitable for beginners... but that depends on a number of factors... so the question I have is - what SHOULD be there? what SHOULD the beginner's language be? What should be the first programming language someone learns?
-tg
-
Re: Where is the Basic, in Visual Basic?
-- I just wanna ask this: "Did anyone download the zip from my website???"
-
Re: Where is the Basic, in Visual Basic?
Quote:
Originally Posted by
ThEiMp
-- I just wanna ask this: "Did anyone download the zip from my website???"
No, after seeing your posts about it and the questions you were asking while trying to create it I would think that it is not something I would have a use for.
-
Re: Where is the Basic, in Visual Basic?
Well, "I" like VB6 (now attempting to learn .NET). I didn't start with it, nor with FoxPro (the language I learned before VB), nor with C, the language I learned before that. Before that I learned programming on a Radio Shack's Tandy (CoCo1) by typing in code from a monthly pamphlet to which I subscribed, and then I MOVED UP by ordering the magnetic TAPE which included the programs found in the pamphlets! In DOS, remind you, using the great tool edlin (a line by line editor). BUT, before that, many, many years ago, I learned to program using 80-column punch cards. It was very difficult carrying around hundreds of cards in boxes for a simple little program....and you sure didn't want to drop them....like today, getting things out of order just won't work. SO, what IS the place to start? I say ANYWHERE....(but C is a good choice to learn the BASICS of programming).
-
Re: Where is the Basic, in Visual Basic?
hehe I had forgotten about the old edlin program, been a long time.
My first exposure was on a Timex Sinclair 1000 that my brother picked up at a yard sale. I then moved to a C64 and started learnign Commadore Basic, then moved to Basic, BasicA, GW Basic, C, Pascal, and eventually Visual Basic for Dos and those that followed which is what I use for most projects though I also use C#, C++ when needed as well as a few not so well know languages for specific tasks.
-
Re: Where is the Basic, in Visual Basic?
If you don't require deep access to the Win32 platform there are plenty of alternatives.
There are tons of Basic-based languages slanted toward beginners such as RealBASIC, Power Basic, NS Basic, not to mention (again) Microsoft's Small Basic.
I have no idea where RealBASIC is now in terms of COM and API access, last time I looked at it was 2005. Power Basic is one I know little about. NS Basic/Desktop had fairly good COM and API access but I don't know how actively supported the product is now.
But if your concern is 3rd party device vendor API support these won't help much without a deeper understanding of things than a VBA plinker is going to have. Vendors tend to support the mainstream, and from there rely on the developer to be able to abstract information and APIs for other programming systems.
Delphi programmers whinged about this a lot in the past, wanting sample code, docs, etc. for Delphi instead of VB6. So perhaps none of the 3rd party programming tools is any help to you either.
I just don't think there is going to be any resolution you're satisfied with. If working from vendor-supplied VB6 materials doesn't help you in Excel VBA you're sort of screwed. Since the only other thing they support is .Net (?) then biting that bullet may be your only answer.
If you do go shopping for VB6 you might broaden your scope to VB5 as well. While VB5 was never as big a seller as VB6, there may still be some copies out there being resold by people cleaning out their attics. Even VB5 Standard Edition might be "good enough" for your purposes.
Heck, even VB5 Control Creation Edition (which was free) might be good enough even if it can't compile your programs and only runs them within the IDE. With some searching you can probably still find mirrored downloads for that, even if Microsoft pulled it from their own Downloads site years and years ago.
-
Re: Where is the Basic, in Visual Basic?
Isn't the issue here one of adaptation and embracting new technology?
There's a bit of a contradiction going on. OP has a brand new all singing, all dancing CNC Machine plus whatever, latest technology and whizz-bangs which they are happy to embrace yet they're not happy about having to adapt to the new technology that will make it work.
Perhaps somewhere in the Procurement cycle a Risk Assessment and corresponding Contingency Plan was missed: "There's a risk that we will have to re-train someone to program the new machine in a different computer language to that we've been using and there will be a time and financial cost involved"
Isn't the phrase "Lack of planning on your part does not constitute a crisis on mine" ? :)
EDIT: and of course, 20/20 hindsight is a wonderful thing.
-
Re: Where is the Basic, in Visual Basic?
Well that Visual Basic 6.00 is coming again to the COM/.NET platforms. However there will be superficial changes to the way that the code functions. Which means that you only have to put in less code to do the very same things that you were doing inside the COM platform, when Visual Basic was in it's hay day. However Microsoft told me this, about three years ago and then there wasn't very much said after that, part of the matter that we are speaking here inside this Thread...
-
Re: Where is the Basic, in Visual Basic?
I've been following this thread and people get caught up in nostalgia over old languages and/or the need for the complexity and power of modern Basic. However, the crux of the matter is "Can a non-programmer write a quick and dirty app to do what they need?"
The answer is yes, as techgnome pointed out.
Quote:
Originally Posted by
techgnome
... you can take 35 year old BASIC code, plop it into a VB (6 or .NET) console application, and ... it will run.
Basic BASIC is still there. All the "bells and whistles" can be ignored by non-programmers so it doesn't matter how complex the language becomes. You can still run your quick and dirty app without getting caught up in the more advanced aspects of the language.
-
Re: Where is the Basic, in Visual Basic?
Quote:
Yes, you understand the situation entirely
Understanding the problem was the easy bit, it's suggesting a solution that's going to be a struggle. I still maintain that .Net can be every bit as simple as VB6 or VBA before it but, unfortunately, you've chosen network programming as your place to start. VB6 was pretty limited in that regard: you had winsocks. VB.Net offers you soooo much more. And, for you, that's the problem right there: you don't want co much more, you just want winsocks.
So search for an example on VB.Net TCP communication and you'll drown in information about a thousand ways of achieving your goal, all of which is irrelevant to you. But fear not, heres a page that gives a very simple explanation. He shows one form that implements a TCP server and one that shows a TCP client, its about 30 lines of code in total and only about 15 of those are doing the work you're really interested in.
The real question is, how did I find that in about 2 minutes when you just drowned in a cascade of noise. The answer is simple and unfortunate, I knew what to search for and you didn't. I didn't go looking for VB.Net TCP, I went looking for TCP socket and this was the first link. Knowing the difference is mainly about experience which you won't have because, quite rightly, you're concentrating on the engineering bit. My suggestion to fill that gap is to come to forums like this and post a question. But don't ask for code, ask what you should be looking for. You'll find plenty of people happt to point you in the right direction. You'll still get sent on a few blind alleys and you'll still be frustrated at times but I'm afraid that's just life.