C vs. Java vs. VB
This is page 3 of the discussion. Read the opening post
Web Development
This is page 3 of the discussion. Read the opening post
VB is far from obsolete. MS attempted to enforce it's obsoloscence but the market for once has not paid attention.
That said I still wouldn't recomend it as a language to learn to program in. Learn in a proper language you can pick up VB very quickly, that after all is it's strength.
by apotheon
It's technically (as in: technologically) obsolete, but it's not obsolete according to market demands. C'est la vie.
Maybe, in another ten years of the current rate of mutation, VB will have turned into a worthwhile language. I'd rather that it just die now and save us all the growing pains, though.
by ju1ce
I suggest you read my post again, speed and memory aside.. Processes are the same..
An if statement is an if statement is an if statement.
A for loop is a for loop is a for loop.
A case is a case is a case.
Assign a variable is assigning a variable is assigning a variable.
Using a property of an object is using a property of an object..
Concepts my dear boy.. Concepts.
by ju1ce
Yeah they have come a long way since, but the "gui" portion of the language lacks.. It makes any scripting language look like a compiled language.
It resembles SQL that is correct...
"Even computational logic is far less elegant using line-oriented commands."
Oh yes.. I was part of a team of programmers who created a whole ERP system from the old character to new age GUI progress. :P You want to see frustrations.. DO that. :)
The easiest way to explain it.. Try creating a full featured ERP system with VB/Java script. :) Now imagine how frustrating that would be.
"That's where my gripe with VB comes in. The UI designer is great, but when it comes to coding the logic, you have to fight the language more than you should."
I guess this is where we differ.. Now don't get me wrong.. I like programming in a variety of languages. It's great to know more than one.. The only "reference" another poster made and that you are making is scientific computations.
This is where I will agree where I lack on because I've never had to create complicated scientific computations. Just accounting, algebraic computations, and various complicated algorithms. I've never had a problem, because I code to be as optimal as the language will allow.
I'm not a graphics programmer, so I've never had to utilize graphics in my programming.
Now I know VB's weakness is still with graphics a la pointers, so this I won't disagree with. But it has come a long way from it's pre-decessor's.
What I do find funny as I have mentioned, is people saying that C# is better when even MS's own development team says there is no real differences between the languages other than some odd's and ends (some that are larger than others obviously) but you get the jist of it I'm sure.
by ju1ce
But I believe the reason VB has such a bad rap is because it's such a widely used language, by mostly mediocre and newbie programmers.
VB has a much larger "bell curve" than C#. Hence most VB programmers aren't very good and have a hard time of grasping encapsulation, OOP principles etc.. Their first thoughts go towards procedural actions? Know what I mean?
Either way.. I belive you have good programmers in VB and you have good programmers in C#, but majority of the case.. Good programmers are in C# since it's still a relatively newer language (and this is where I'll deffinitly agree). Most C# programmers come from a C/Java background and most understand the concepts of OOP which is a big bonus in RAD development.
(Just to note.. If I interviewed a VB programmer and a C# programmer for a job.. I'd lean to the C# programmer).
I mean they are far and few between in the VB world..
I'll leave it at that.. just for the mere fact, that the VB vs C# debate has and will rage on for the life of both products. :)
by apotheon
C# and VB are not, in any way, the same language. They share a framework and a set of built-in APIs. That's it. This means that as long as you toe the line and do what the MS guys expect, you'll be able to accomplish the same thing in both languages, but even then you'll do so without the same readability, maintainability, encapsulation, abstraction, rapid development capability, learning curve, and other important characteristics.
The reasons for this are two-fold:
1. As sterling pointed out, syntax is wildly divergent between the two languages. Hell, I look at VB source and get frightening reminders of COBOL. It's awful.
2. More importantly even than syntax is semantic structure. A language's semantics, to a fair degree, mandate certain approaches to syntax. The biggest failure on the semantic front for VB is its line-oriented structure, of course, but that's not the only problem. It's the semantic structure that makes it so difficult to integrate OOP, good recursion, pleasant iterative constructs, and basically anything else that doesn't violate the principle of least surprise. Why do you think VB's learning curve is so prohibitive? It's the fact that all the useful language features are in direct conflict with the language's semantic structure.
by ju1ce
by oknightowl
by mat hancock
by evmafau
When I did Java, I used both Visual Studios and Netbeans as IDEs. Just got VS 2005, so I'm guessing I could probably keep using that.
What about for Perl, Python, and Ruby? I hadn't heard of the languages until this discussion, so I've got no base of reference for those.
by apotheon
These languages tend to be included in support by IDEs that aren't very oriented toward a specific language.
Visual Studio supports Python and Perl by way of the Visual Python and Visual Perl plugins. Other IDEs that support Perl, Python, and/or Ruby include Komodo, Toucan (for PalmOS development), Arachno, EPIC, Eclipse, Wing IDE, Open Perl IDE, PerlEdit, Perl Builder, and EnginSite's Perl Editor.
That's mostly just for Windows. For Linux-based development, there are more options. I tend to use vim and bash on Linux, personally.
I was disappointed to find that the latest version of my favorite editor, SlickEdit, does not include support for Ruby. Although, it is planned for the next version:
I am also largely self-taught when it comes to programming, having fallen into the industry completely by accident (or was it Providence -- wait, that's another discussion). In my early days, I just hacked out whatever would work. Later, I tried to be as clever as possible. Much of that clever code has come back to haunt me, and I've often been fooled by my own cleverness! Then came structured programming and an emphasis on maintainability. OOP expanded on that concept (or should I say, exploded it). I became obsessed with programmer productivity (including maintenance) to the point where performance began to be neglected. Then I began to realize that performance is another requirement of software. No more than another requirement, but also no less. Now I try to tailor my style to achieve all of the software requirements (including performance) in the most natural, concise, and understandable terms. I think this reaches towards the idea of "elegant" given by apotheon in his recent blog on the subject (a very thoughtful treatment of the topic):
https://www.techrepublic.com.com/5254-6257-0.html?forumID=99&threadID=173898&messageID=1915531&id=3923716
Sometimes the urge to be extra clever can't be overcome, but in those cases I am now at least careful to comment fully!
by apotheon
Just before I got to your reference to elegance (and the (appreciated) advertisement for my blog post), I was thinking "This reads like the story of his discovery of elegance!"
I try to aim for code that's clear enough it doesn't really need comments, though, so if someone else (or me on a lazy day) comes along later and changes code without editing comments, it won't make the code less maintainable. Once in a while, though, code needs comments no matter how much you strive to make it self-documenting -- and making code self-documenting can be taken too far, as amply demonstrated by the horrors of COBOL.
Speaking of which, one of the most distasteful things about VB for me is that every time I look at a sufficiently complex bit of VB code, it reminds me frighteningly of COBOL in some ways.
by apotheon
by apotheon
Since I don't know the language in question (or even what language it is), I don't know if this is possible, but:
It might make sense to demonstrate OO concepts first by writing a text-based UI class library, which should be relatively simple, then move on to showing how to utilize the GUI library (or libraries) that already exist(s) so that they don't get the impression they have to reinvent the wheel all the time.
In fact, something I tend to find annoying about programming tutorials is that they'll teach language syntax and programming concepts by reinventing the wheel one step at a time, and utterly fail to explain how to make use of the stuff that's already there. Both approaches need to be addressed, I think, for someone to really get a grasp on how to use a language effectively.
by apotheon
Delphi is much [b]much[/b] prettier than Visual Studio, but that's not why I'd recommend Object Pascal over Visual Basic. The reason I'd recommend Object Pascal over Visual Basic is, as I indicated in my previous post, that Object Pascal is generally a better language and teaches better programming practice than Visual Basic.
Don't think that just because Delphi is a prettier IDE than Visual Studio I wouldn't recommend it over VS. I would -- it just has little or nothing to do with how pretty it is.
The language is Synergy/DE: http://www.synergex.com
I've had a hand in the language's development since the 80's, and have been their primary architect for the user interface API (which is cross-platform) for the last 15 years (don't even ask me about the Windows migration in the 90's -- the pain is still too fresh). They are just now adding OOP to the language, so of course the UI library has no OOP as yet. My great temptation would be to rewrite or wrap the entire library in objects, which would map pretty well (the original design was sort of proto-object-oriented), but that would be a considerable effort. Ideally, Synergex would want to do this too, but I don't think they will (they see UI programming moving over to the web and .NET -- their next big project is a CLR compiler for their language so they can back up Windows/Web Forms and otherwise interact with the .NET framework). So, I think I'll have to bite my hands and keep the example out of those efforts, except maybe for some outermost wrappers.
by apotheon
"[i]I mean when I went from Borland C to Java.. It was syntax.. When I went from Java to VB it was merely syntax again[/i]"
Furthermore, some languages have else, and even elsif (or "else if" in some cases); some languages have foreach; some languages don't have switch/case statements at all; some languages allow pointer manipulation while others don't; some languages have statically typed variables, lexical variables, duck-typed variables, dynamically typed variables, strongly typed variables, or weakly typed variables; some objects have multiple inheritance, others have mix-ins; some languages don't have objects; some have poorly implemented OOP (such as VB and PHP) while others have well implemented OOP (such as Ruby and Smalltalk); some have Lisp-style macros, but most have no idea what that means; some have symbols while others have interned strings, and still others have nothing of the sort; some languages are functional; some languages are declarative while others are imperative; and so on.
Languages are anything but equal. Many programming concepts simply don't port between languages worth a damn. Most languages are direct descendants from the Turing Machine, but some are not -- such as the Lisp family which, amazingly, comes from the original Lisp definition, which wasn't originally meant to be implemented for real-world programming at all.
Go learn Haskell and Scheme, then come back here and tell me the concepts are all the same. Of course, if you do learn Haskell and Scheme, and still say the concepts are all the same, you won't merely be ignorant any longer: you'll be lying.
by cklondon
You are correct in your statement that there are things different between languages, including (but not limited to...) performance, ease of use, semantics, syntax, etc. BUT, the "big picture" is still more important. Whatever language does the job when it is needed is the best for that particular task.
VB is great for quick and dirty. You may think that VB programmers are weak, but that is not always true. PLUS... Not every company can afford to hire a high-fallutin' Java or C++ programmer to build an enterprise system for them. Sometimes, a duck really just needs to be a duck and not a world-wide aviation tracking system. Not many languages allow you to build a GUI interface with DB connectivity as quickly as VB. Is it the most efficient with regards to system resources? Maybe not, but the $50,000 saved on developers comes in handy when buying new servers/workstations.
Would I use VB to attempt to build an enterprise-wide CRM app? Not likely, that's where Java is great. How about super-efficient code to run automation systems in a factory? Give me C/C++ or Assembler.
It all depends on the particular need, not the ego of the developer. I have worked on some systems for customers using a Microsoft Access back end, and and it worked just fine for their needs. They don't need any more than that. If they ever needed an enterprise database, Access is quite easy to migrate to SQL Server. (and I won't even get into the SQL vs Oracle debate, that is just one more example of too much testosterone overflowing... :-)
I don't know about anyone else, but I couldn't sleep at night if I were to recommend to a potential customer a solution that was beyond their needs/budget. Give them what they need, just make sure you don't back yourself into a corner when it comes to scalability.
Chris
by apotheon
1. I agree that you use the language for the job. I never said otherwise. If possible, you use the [b]best[/b] language for the job. Some languages aren't the "best" language for pretty much anything, however.
2. VB isn't "great for quick and dirty": it's mediocre for it. Compared to some languages, that might [b]seem[/b] great for quick and dirty development, but such languages are meant for other things. Compared to languages that [b]actually are[/b] great for quick and dirty, however, VB is crap. Try comparing VB to bash, Perl, Ruby, Logo, Python, Javascript, classic BASIC, and perhaps best of all PHP for "quick and dirty" some time. It doesn't get any quicker or (especially) dirtier than PHP.
3. Who said anything about hiring Java and C++ programmers? It's faster to train someone conversant in HTML to do a passable job with a reasonably complex development project in PHP than it is to get the application written from scratch in VB by someone that already has a year's experience. Learning PHP is a job of an afternoon for a programmer: it's about three days for someone with a solid grasp on markup. When you can do the same thing with PHP in a week that it takes a month to do in VB, there's a problem. No Java or C++ needed. Of course, the program isn't particularly better in PHP than it would be in VB, but it sure did get finished faster.
4. If you want real industrial-strength software, using VB is a losing proposition. A minimum-wage VB developer will take twice as long as a $20/hr Java programmer to do the same job half as well. Where's the savings? If you want it to be even better than that, find a good Lisp hacker, and he can do it in a few days, because he'll probably get clever and write code that writes his code for him. Try doing [b]that[/b] with VB. You'd first have to implement a Lisp parser using VB which, I can tell ya, won't be easy.
5. If you haven't tried Rails (or equivalent), you don't know what rapid development of GUI database-backed applications means. VB? Don't make me laugh. It might be faster than doing it with Fortran, COBOL, or even C++, but those aren't rapid development languages. Compare apples to apples, not apples to aircraft carriers.
If all your examples are Assembler, C++, Java, and VB, with Access, MS SQL Server, and Oracle as your only examples of databases, I can see why you think VB is actually "good" at anything: your experience is so limited that you can't imagine a better language for lightweight development. Sorry to hear it.
by apotheon
Every computer science major should be required to learn a logical programming language like Prolog, shortly after taking a course in formal symbolic logic. In fact, all those years of trigonometry and calculus that most CS majors have to study should be [b]replaced[/b] by logic and logical programming courses.
The only reason I can see for requiring trig and calc is that trig is a prerequisite for calculus, and calculus is (for some asinine and wholly broken reason) a common prerequisite for linear algebra (which, in turn, actually [b]is[/b] useful to a computer scientist, and has almost nothing at all to do with calculus). These degrees should stick more to stuff that actually helps, like algebra and logic.
The "perfect" CS degree would require learning some Lisp, some Prolog (or equivalent), and an OOP language (I vote Ruby), probably with some C as well (not C++, or C#, or even Objective C, unless the language in question is being used as the OOP language for the degree).
by jmgarvin
I know I learned C for the first year and then I was introduced to Perl, Lisp, Assembly, and Prolog the second year. You are introduced to symbolic logic in the first year, but you really get into it in year two. As for the rest of the time, you hone your skills and take courses like algorithmic analysis (which is a must) and finite state automata (another must that seems to have fallen by the way side).
I also was annoyed that I had to take a year of calculus just to take courses like combinatorics and linear algebra.
by apotheon
Absolutely right. VB has, from the top, favored making RAD simple. But that should be RPD (Rapid Prototype Development) instead, because even though it is very simple in VB to create a form, populate it with controls, and add some basic event code, expanding that into a full-blown, working application creates reams of code filled with (IMHO) kludges.
I agree with the COBOL flavor, apotheon. After a couple of hundred lines of reading the code for an app like that, you get the same mantric "we've said this twelve times now, are our sins finally forgiven?" haze forming over your eyes.
What software operating system and application enviornment will you be working in? What kinds of things do you want to program?
If you want to program web pages then java is your best be. If you work with Windows and MS Office then VB is the best language to use. VB6, VBA and VBScript is used to create quick, easy, powerful solution in the Windows/Office enviornment.
by cklondon
Hi again evmafau:
If you really want to get to know a new language, the way I have found works best for me is to get an intro course somewhere (preferably have your employer cover the costs if it is relevant...), then try and build something "real-world" with it. The intro courses are great at introducing the language, but usually weak on showing you how to make anything tangible out of it.
Try identifying a relatively simple need that you have at your office and building a solution with your new-found knowledge. Then you will have some direct questions to ask/research when it comes to looking for help. Once that first small project is done, find another, slightly more complex, and start again. Eventually, you will start identifying strengths and weaknesses in the language and also grow your own experience/strengths.
Good luck!
Chris
Back in the old days, when programming languages were much simpler, I would start reading at the front of the language reference manual. When I had read enough that I thought I was prepared for "Hello world" (1-3 chapters, depending on the language and the author) I would stop reading and start writing programs. If there was any real-world example code lying around that I could study, I would pore over that and use the manual as a reference to help me decipher it. All the while, I would continue to read the manual, until I reached the back cover.
Nowadays, I find that languages are a bit too complex and time is too precious to use that same approach. Instead, I look for a good summary of the benefits of a new language and how it differs from languages I already know. Then I jump right into deciphering example code and writing some of my own, using the remainder of the documentation as reference. Along those lines, I was very pleasantly surprised recently when I decided to learn Ruby and discovered "Programming Ruby: the Pragmatic Programmer's Guide", which is included in the download of Ruby 1.8.2. It starts with exactly that type of overview, followed by more detailed reference. The download also includes quite a few elucidating examples.
by cklondon
Wow, that brought back memories...
I remember learning C, with all its quirky structures, pointers, et al, using Borland's Turbo C compiler... the "Good old days" :-)
Chris
by ju1ce
by arjee63
by brian.rhee
If you really want to learn programming start out by learning Scheme or LISP and every other programming language will become second nature.
There is a free online book called "The Structure and Interpretation of Computers"
It's part of the intro course on computer science for MIT undergrads and many other universities, probably one of the hardest computer sciences courses you will take...But only because of the steep learning curve that it goes through in making that mental leap of learning how to truly program for the first time.
Here's a link to free online version of it...
http://mitpress.mit.edu/sicp/full-text/book/book.html
Thank you for your comments. I have started writing some serious code with Ruby now, and so far so good. The most interesting part of this exercise for me is expanding my imagination to think of better ways of doing things via the mechanisms available in Ruby. The old standard OOP ways of doing things seem a little too mechanical now. Dare I say that I'll hate to have to go back to C#?
Contrary to my earlier post about how to learn a language, I do intend to finish reading "Programming Ruby: The Pragmatic Programmer's Guide". It's good reading, as well as informative.
by mat hancock
by mat hancock
It seems as though all these people are far too intelligent and knowlegable to get to the idiot factor....
USING A LIBRARY OF COMPONENTS.
Your program...
Make a window... (call make a window library thingy)
Display something (call the display some stuff in that window thingy)
The user clicks something (call the window thingy and the click thingy)
Do something (call the do something thingy)
That's all good, because when any part has to be reused, or any part goes wrong, it's a small part to check.
Of course, when something goes wrong - you get to know right?? sort of..
You programmed all that stuff, and it cleans up after itself, but when you double click and nothing happens.....
It's a matter of being blessed by the creators to make their money for them.
by mat hancock
If a property was property was a property, a function was a function was a function, a method was a method was a method - you get my drift.
There's VB, VB script, and VB for Apps. one example of the 'you fix it your the expert' help from the application vendors, which is of course completely different when it comes to Java, or am I confusing that with (oh how many?) another programming language?
by mat hancock
The safe and easy language for sharing information on the web.
Not anymore.
Is there even a twinkle in the eye of programmers when it comes to standardising Object Oriented Libraries?
Every single language trying to do everything all at once, with the compatability issues jam packing hard drives everywhere with unused components, the features, functions and possibilities remain so far from the average user that it may create a permanent resentment of technology so ingrained that the possibility of actually creating the programs may be lost to all.
by rayjeff
by gijoemarine
by hi_min2
All they did was move the dependancy,switched it to the JVM, not what I'd call progress, seeing as there more JVMs than there are platforms
Marketable skill, most definitely, terrible choice for first language though.
This discussion is closed to new replies.
Sort by Trending