Quantcast

Maximum PC

It is currently Mon Apr 21, 2014 9:02 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 60 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Thu Jun 17, 2010 5:20 pm 
Willamette
Willamette

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 1435
I think they are similar to a point... but I think when you start doing advanced techniques and applications, they differ a bit, or else Microsoft wouldn't have released 4 languages that were exactly the same, except for a semi-colon here and there... Part of it was for compatability of older applications, so that they could be updated and re-written in their "native" language, but I think there is more to it than just knowing an OOP language and being able to figure out the others. Sure, you can create some utility apps that do little things fairly easily in either language, but doing something like a full-fledged database app or web app may be more different.

VB is a bit easier to pick up because (at least in the VB6 and earlier versions) the code was a bit easier to read and understand, compared to C++ and C and Java, Pascal ,etc.

If I had to chose one that you focus on, I would say C# simply because that is what I see as what is going to be the new "hot" programming language, if it isn't already, and it's like an offshoot of the C++ language, and a bit like Java. You could then venture into Java which should be a fairly easy transition since the two can be similar in many ways (as in, how you program in them). I think the problem in VB is that you can still craete apps that don't fully take full advantage of OOP, and thus you can create an app full of modules and subroutines, which is not really how programs are written today. C# and C++ make you use OOP, and so does Java.


Top
  Profile  
 
 Post subject:
PostPosted: Thu Jun 17, 2010 8:00 pm 
Million Club - 5 Plus*
Million Club - 5 Plus*
User avatar

Joined: Sun Sep 12, 2004 6:37 pm
Posts: 4740
Location: In the monkey's litterbox
cbassett01 wrote:
If I had to chose one that you focus on, I would say C# simply because that is what I see as what is going to be the new "hot" programming language, if it isn't already, and it's like an offshoot of the C++ language, and a bit like Java. You could then venture into Java which should be a fairly easy transition since the two can be similar in many ways (as in, how you program in them). I think the problem in VB is that you can still craete apps that don't fully take full advantage of OOP, and thus you can create an app full of modules and subroutines, which is not really how programs are written today. C# and C++ make you use OOP, and so does Java.


You can create an app in any language (including C#, Java, and C++) full of modules and subroutines (via static classes and functions that return void). When you're talking about VB, remember that VB.NET is essentially a different language from VB6 due to moving onto the CLR.


Top
  Profile  
 
 Post subject:
PostPosted: Thu Jun 17, 2010 8:50 pm 
Willamette
Willamette

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 1435
I'm aware of that.... I'm just saying that VB6 was easier to use, but didn't fully support all of the OOP technologies. And, at least at the time, using things like pointers was somewhat difficult (by not impossible... but there was something called ByRef that did something similar).


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2010 10:53 am 
8086
8086

Joined: Tue Aug 04, 2009 3:42 pm
Posts: 20
cbassett01 wrote:
I think they are similar to a point... but I think when you start doing advanced techniques and applications, they differ a bit, or else Microsoft wouldn't have released 4 languages that were exactly the same, except for a semi-colon here and there... Part of it was for compatability of older applications, so that they could be updated and re-written in their "native" language, but I think there is more to it than just knowing an OOP language and being able to figure out the others. Sure, you can create some utility apps that do little things fairly easily in either language, but doing something like a full-fledged database app or web app may be more different.

VB is a bit easier to pick up because (at least in the VB6 and earlier versions) the code was a bit easier to read and understand, compared to C++ and C and Java, Pascal ,etc.

If I had to chose one that you focus on, I would say C# simply because that is what I see as what is going to be the new "hot" programming language, if it isn't already, and it's like an offshoot of the C++ language, and a bit like Java. You could then venture into Java which should be a fairly easy transition since the two can be similar in many ways (as in, how you program in them). I think the problem in VB is that you can still craete apps that don't fully take full advantage of OOP, and thus you can create an app full of modules and subroutines, which is not really how programs are written today. C# and C++ make you use OOP, and so does Java.


Believe it or not... MS did release 2 identical languages, plus F#, J#, and Managed C++. VB.NET and C# are identical, and VB.NET also forces you to use OOP too. Just to make this clear: VB <> VB.NET. And proof that they're identical - every VB.NET program, when translated properly into C#, has the exact same number of lines. And vice-versa.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2010 12:34 pm 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24218
Location: Granite Heaven
The same number of lines? What has that got to do with anything?

VB.NET doesn't have iterators and, last I checked, didn't allow operator overloading. C# has both. These are not trivial differences. Does VB.NET allow generics? Last I checked ... no. How about static classes?

How can you do serious system programming without these things?

You're looking at syntax .. frankly, this is a very weak approach to programming language comparison.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2010 1:52 pm 
Willamette
Willamette

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 1435
Operator overloading I don't think works in VB. One thing they did add in VB.Net was function overloading (where you can have the same function with different sets of parameters for each), which is very useful.

But I guess the same could be somewhat accomplished in VB6 and earlier additions by using the "Optional" keyword in front of a variable in a parameter list for a function. But it's not exactly the same as function overloading.

That, and it really depends on how you write your programs that will determine how long they are. (Generally, less code = better). I'm sure for a simple app, you'd have the same number of lines, but that, as has been said before, is a poor way to compare languages. It makes it easier to convert to another language within the .Net system, but it doesn't man that they are identical. There are multiple reasons that MS released the four languages they did for .NET. Each has its positive and negatives. I will admit that VB.Net might be a bit easier to learn than the others, but it really comes down to a matter of preference.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2010 1:59 pm 
Willamette
Willamette

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 1435
Plus, is "Managed C++" really considered a language of it's own? From what I know, it's not a different/new language of its own, but rather a modification of the C++ language.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2010 2:27 pm 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24218
Location: Granite Heaven
cbassett01 wrote:
That, and it really depends on how you write your programs that will determine how long they are. (Generally, less code = better). I'm sure for a simple app, you'd have the same number of lines, but that, as has been said before, is a poor way to compare languages.



Ack! No! The number of lines is not important .. and it certainly doesn't affect efficiency. The amount of code is irrelevant to its efficiency.

For instance, if you have an unsorted list of 300 million users ... or, say, the SSN database of the US .. and you want to find a single name, which of the following is most efficient:

Code:
for (int userSSN = 1; userSSN <= lastSSN; userSSN++) {
   if (userSSN.name == target) return TRUE;
}


This will start at 1 and iterate through the entire list of Social Security Numbers until it finds the one whose name matches the target. I can't imagine a worse way to do this.

Code:
int userSSN=1;
while (userSSN <= lastSSN) {
   if (userSSN.name == target)
      return TRUE;
   userSSN = userSSN+1;
endwhile
}


This code is functionally identical to the first example but .. shock! .. contains triple the number of lines. OMG! NOES! Actually, they both suck exactly equally.

My point is, even doing something as trivial as a brute force linear search, the number of lines is irrelevant.

Is a bubble sort written in 100 lines ever going to be faster than a quicksort written in 1,000? Maybe .. but never because of the number of lines of code.

Quote:
It makes it easier to convert to another language within the .Net system, but it doesn't man that they are identical. There are multiple reasons that MS released the four languages they did for .NET. Each has its positive and negatives. I will admit that VB.Net might be a bit easier to learn than the others, but it really comes down to a matter of preference.


VB is easier because it is a language geared to beginning programmers. In my years in IT, I've seen very few job postings and even less commercial software developed using VB. C#, on the other hand, is a great language to learn if you're interested in landing a job .. very useful and very very much in demand.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2010 3:46 pm 
Million Club - 5 Plus*
Million Club - 5 Plus*
User avatar

Joined: Sun Sep 12, 2004 6:37 pm
Posts: 4740
Location: In the monkey's litterbox
Jipstyle wrote:
VB.NET doesn't have iterators and, last I checked, didn't allow operator overloading. C# has both. These are not trivial differences. Does VB.NET allow generics? Last I checked ... no. How about static classes?


Iterators: Yes, VB.NET doesn't have anything equivalent to the yield keyword. (but you can still use IEnumerable)
Operator overloading: It's there
Generics: I've used it: (of T)
Static class: That's what a module is

And VB.NET does have nicer XML-to-LINQ support baked into the language.

Here's a fairly recent comparison of syntax


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2010 6:48 pm 
Willamette
Willamette

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 1435
ON a small scale, it doesn't really matter, but I think on larger programs, it can make a difference, and in some industries where timing is crucial, a few hundred lines of code could make a difference.

Had a friend who worked for Lucent Technologies, and they constantly made comments on how they were revamping code to try to save a few seconds off of its execution time so that it could work with the time constraints put out by the other systems that relied on it. This is an instance where less code can possibly be a benefit.

I said "generally' which would imply that there are instances where it doesn't matter, but then again, there are instances where it can make a difference (as in the example above). I'm sure that other factors will play a role in the execution of programs, but on the whole, logic would tell you more instructions would *generally* mean more work for the compiler/interpreter to run.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2010 6:54 pm 
Willamette
Willamette

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 1435
And for beginner programmers, it won't make much of a noticeable difference in speed. But in the real world, I think almost any programmers has been told to write clear and structured, but concise, code.
I guess that the .NET framework sort of helps you do this in that you can use the function built in rather than rewriting them yourself every time which has become the big thing over the past 10-15 years... reusable code.

we also have to consider what the code is doing as well. LIke you had hinted at before, a bubble sort of 800 lines may be faster than a quick-sort of 1,000 lnes, but generally the quick-sort will be faster because of the methods used to sort the data. I suppose the real determination factor is the compiler itself... how well can it optimize code.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2010 8:53 pm 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24218
Location: Granite Heaven
cbassett01 wrote:
ON a small scale, it doesn't really matter, but I think on larger programs, it can make a difference, and in some industries where timing is crucial, a few hundred lines of code could make a difference.


No. It doesn't.

Code efficiency has little / nothing to do with the number of lines. It has everything to do with the number of operations performed.

Quote:
Had a friend who worked for Lucent Technologies, and they constantly made comments on how they were revamping code to try to save a few seconds off of its execution time so that it could work with the time constraints put out by the other systems that relied on it. This is an instance where less code can possibly be a benefit.


No, this is an instance where choosing the correct algorithm and implementing it properly makes a difference. Again, those things have nothing to do with the number of lines.

A bubble sort can be quickly coded in few lines but it requires n^2 operations, on average, to sort a set of data. A quicksort requires considerably more lines to implement but it can sort the same data set in n log n.

This is basic computer science, my friend. :)

Quote:
I said "generally' which would imply that there are instances where it doesn't matter, but then again, there are instances where it can make a difference (as in the example above). I'm sure that other factors will play a role in the execution of programs, but on the whole, logic would tell you more instructions would *generally* mean more work for the compiler/interpreter to run.


Yes! But instructions != lines of code.

For instance, which runs more quickly:

print w;
print x;
print y;
print z;

OR

for (int x = 1; x < 10000; x++)
print x;



The second requires over 20,000 operations but it only takes 2 lines to code. The first uses 4 operations but twice as many lines to code.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Jun 21, 2010 4:28 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
VB.NET and C# are NOT exactly the same. Are you dense?

There are lots of differences between them, and LOC is a pretty irrelevant measure of anything anymore, especially since there is LOTS of generated code in .NET. Less code does not always mean it will run faster.

C++ managed is hardly its own language.

VB.NET is similar to VB6 but under the hood too much is different.

I'd bet a months pay that you can't make a bubble sort better than a quick sort by using a better compiler. :? Let me know when you need my paypal address for, I'll be a nice guy and accept $5k instead of what my full salary would be :)

@minitech, where on earth did you get the idea that .NET forces OOP? It certainly encourages it, but doesn't require it. You can definitely do procedural programming without issues.

How exactly is VB6 easier than VB.NET? (hint: Neither one is any easier or harder).


Top
  Profile  
 
 Post subject:
PostPosted: Mon Jun 21, 2010 1:00 pm 
Willamette
Willamette

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 1435
Gee, if VB.NET and C# were identical, then what would be the purpose of releasing both. Most people would opt for VB most likely, because it is somewhat easier to pick up (unless you skipped BASIC and went straight to C programming).

There's a reason MS has all of these different languages. VB is seens more as the hobby language, where as most of the others are more "professional" languages. I've seen a few (a very few) instances where VB was used as a primary language for developing software (and this was a while back). Most developers are using Java, C# or C++ (or some offshoot of any of them). I don't see that many positions offering VB programming jobs anymore.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2010 4:21 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
cbassett01 wrote:
ON a small scale, it doesn't really matter, but I think on larger programs, it can make a difference, and in some industries where timing is crucial, a few hundred lines of code could make a difference.


You're arguing semantics here. Lines of code doesn't carry the same token as it used too. For one, compilers do most of the work compiling to assembly so the amount of code your 1 line of C++ code produces doesn't mean you get 1 line of assembly code.

Quote:
Had a friend who worked for Lucent Technologies, and they constantly made comments on how they were revamping code to try to save a few seconds off of its execution time so that it could work with the time constraints put out by the other systems that relied on it. This is an instance where less code can possibly be a benefit.


I have friends in the financial sector doing mostly electronic trading. There's only so much that code can do before it's hampered by exogenous effects. Lines of code didn't affect them as much as optimizing their fiber lines and their network routers.

Quote:
... but on the whole, logic would tell you more instructions would *generally* mean more work for the compiler/interpreter to run.


Nope. You're missing one key component: data. I've written small apps that dealt with large data processing (often manipulating records in the millions). I wrote an app that performed data transformation and them dump the results into an Excel file. The console app wasn't that big at all, on the whole it took me about a day's worth of work and about 1,000 lines of code. The app took 8 hours to run, because of the scale of the data I was working with.

I also worked on a calculation engine. We massaged financial data using various models (about a hundred of them) and expanded a 100GB database into a 500GB database then down to the final 80GB database. The modeling engine was written very efficiently, on smaller data models it took only a few minutes to run (<5GB) but to model the data took about 10 hours because of the ginormous size. However, the kicker was after applying the models, the financial team had us run 3,000 calculations against the model. The 80GB database w/ 3,000 calculations took only 45 minutes to run. The calculation engine had about 200MB in source codes, probably in the millions of lines of code. It only took 45 minutes to run.

If I had applied your logic into the same scenario; it should have taken days, if not weeks. But again, lines of code doesn't affect the efficiency as much as other exogenous items in the system.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2010 4:28 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
cbassett01 wrote:
Gee, if VB.NET and C# were identical, then what would be the purpose of releasing both. Most people would opt for VB most likely, because it is somewhat easier to pick up (unless you skipped BASIC and went straight to C programming).


Because MS used two languages back in the day: C++ (under the banner Visual C++) and VB. VB was originally used for UI prototyping then it became a full fledged language/framework. Most UI's in the MFC days were built using VB. Visual C++ was geared towards nitty-gritty development; VB was very high level and didn't account for a lot of system level work. C++ gave developers that power, so if you wanted to access OS level calls (and even hardware), you did it through C++.

.NET changed all that; C# was the new flagship language and VB followed the C# paradigm. It still does, and Microsoft preserved VB because there are still legions of VB developers who are more comfortable developing in VB. It's almost always a moot point to argue VB v. C# because they're similar in paradigms but one is more verbose than the other.

Quote:
There's a reason MS has all of these different languages. VB is seens more as the hobby language, where as most of the others are more "professional" languages. I've seen a few (a very few) instances where VB was used as a primary language for developing software (and this was a while back). Most developers are using Java, C# or C++ (or some offshoot of any of them). I don't see that many positions offering VB programming jobs anymore.


I know what I'm about to say will offend you, but this section I quoted from you is just crap. Absolute crap.

VB was THE premiere language for Windows development. Heck, my Senior DBA who has over 30 years of IT experience (starting w/ VMS to Oracle to SQL Server) even learned VB - yes, it was THAT popular.

VB was never phased out of .NET because MS knew it would piss off millions of VB6 developers. Yes, I said millions. With C# becoming more commonplace and VB following C#'s footsteps, a lot of VB guys are transitioning to C#. Good for C# good for Microsoft, and partly why you don't see VB jobs that often. VB is a professional language...heck, what is a professional language? If I follow your definition, PHP should be a hobby language but it's being used by millions of people worldwide.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2010 2:50 pm 
Willamette
Willamette

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 1435
I was being a bit sarcastic here... There are obvious differences (and purposes) for both languages. However, many people still think that VB.NET and Visual C#.Net are backwards compatible and that you can convert your programs between the two. You may be able to, but each language has its own purpose in the suite of tools...

I mean, it makes it easier to convert programs back and forth, as many have said before, but I'm quite aware that they are not the same languages and that each has its purpose.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2010 2:55 pm 
Willamette
Willamette

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 1435
Again, I'm taking in "today's" terms. Yes, back when VB was really the only Windows-based development suite (prior to Visual C++/Java and all the others) it was the professional suite to use. But in today's society, the other languages (Visual C#.Net, Visual C++.Net, etc) are more popular (as least, I see more job offerings for those languages than I do for VB... I've seen a few, but not nearly as much as I've seen for C#, C++ and/or Java).

It doesn't offend me, because it is merely my opinion... but while VB isn't completely dead, it has been overtaken by some of the other languages... but again, this depends on the industry and the needs of the consumer/customer. I often times use VB to write quick little apps, or to make a code library quicly (that usually doesn't require anything special, such as a library of math or statistical functions, etc).

I use VB quite a bit, but am tryint to ween myself from it as a development language, and move onto C#. Someone also earlier said that VB was on its way out... I think not. OK, so maybe it isn't getting as much attention as it did 10-15 years ago, but it's still live and kicking as far as I'm concerned.'

I think VB lost some steam when (at the time) C++ and Java were making a position as computer languages. Because at the time, we were only left with (I think) VB4, 5 or 6, none of which could really take full advantage of the technologies offered by the other languages (such as true OOP). But I do have to give MS some credit that they have reworked the system so that it is as capable as the other languages in the VS.Net suite of tools--they've essentially breathed new life into VB... I just hope it sticks around because I think it's a good starting point for people who want to learn how to write Windows programs very quicky. The language it easy to read and understand (IMO) as compared with C++ or Java, although .NET is making things easier to do/interpret.


BTW, and I know PHP might be seen as a "hobby" language but it's still quite popular, just like VB, but it gets the job done, and some servers (Linux-based) don't offer the Windows-based equivalant (for obvious reasons).

I seriously don't think it really matter what language you choose to use for projects--as long as it can get the job done I think any language is fine. Sure, there are some drawbacks and positive points to each language, but really it depends on the needs of the programmer and the problem being resolved (via writing a program/script/etc). I hate to say it but even MS referrs to their VB as a language for the hobbyist programmer.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jun 23, 2010 4:22 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
C++ is older than VB.... >_<


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jun 23, 2010 6:06 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
It seems like we're beating a dead horse enough, ya know. So we'll agree to disagree on some points and agree on others. :)

VB still has life in it, but I was quite shocked that MS didn't kill off VB in .NET 2.0 (there were rumors) and was shocked to see it again in .NET 3.5 and 4.0. Personally, I think VB needs to go - not because I think it's inferior but because C# has replaced it as a flagship product.

Even in "todays" terms, I still won't consider VB a hobby language. It may no longer be the flagship language, but it has a very robust library. It's kind of like Lisp; I'm sure Lisp is seen as a hobby language by some but it's a very old and very professional language with lots of tools, toolkits and a robust framework to boot.

PHP's popularity came from the fact that it's not classic ASP. It does get the job done for web apps, but look at the evolution of PHP. Zen came late into the game and the framework was okay. It was also difficult to use and often not packaged with the language.

Needless to say, as much as I disparage VB, it is robust. Another good example is Ruby on Rails; it displaced PHP as a web app framework because as a language, Ruby may not have been as popular but the Rails framework was incredibly robust in beta as it is 2.3.

Anyways, it's nice to have discussions on languages, it's fun. :D


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 60 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group