• QilPhil (unregistered) in reply to Zygo
    Zygo:
    JamesKilton:
    rgz:
    mav:
    And the raven, never flitting, still is sitting, still is sitting On the pallid bust of Derrick Pallas just above my chamber door; And his eyes have all the seeming of a demon's that is dreaming, And the lamp-light o'er him streaming throws his shadow on the floor; And my soul from out that shadow that lies floating on the floor Shall be lifted - nevermore!

    That's pretty neat! Did you made it?

    I do support captcha reporting, but captchas are only funny when they funny (du'h) and when they are related to the subject or comentary.

    This one was neither.

    /sigh. What is happening to this country (yes, I'm assuming the person above is American)? People aren't taught who Poe is? Or at least this, his most famous poem?

    I'll admit that I only know this because it was used in a Simpsons episode.

    But at least I do know it, and who originally wrote it...

    Quoth the poet Poe: "A Poem, pah"

    Me no native speaker am

  • Patrick (unregistered)

    VB just sucks.

  • Maciej (unregistered) in reply to H|B
    H|B:
    AFAIK, after Kurt Gödel (or Alan Turing?), there is no way of knowing the smallest possible program for any given task...

    I'm not sure that's entirely true. Assuming that you know of a valid solution, the set of programs of smaller length is finite, and can thus be exhaustively searched for shorter solutions.

  • aStudent (unregistered) in reply to JamesKilton
    JamesKilton:
    /sigh. What is happening to this country (yes, I'm assuming the person above is American)? People aren't taught who Poe is? Or at least this, his most famous poem?
    Of course we know! "Winnie-the-Poe" is that bear with his friends Christopher, Tigger, Piglet and Eeyore...

    Or do you mean "Mr. Hankey, the Christmas Poe"? [image]

  • ThingGuy McGuyThing (unregistered) in reply to jread
    jread:
    Wow, I'm glad to finally see some VB.NET code on here.

    Also, why does everyone think that VB is a "lesser" language? That gets really annoying. VB.NET and C# are (functionally) the same damn language.

    I'll throw out the same answer I do every time I see this question:

    The pseudocode: if false and deleteEverything() ...

    VB: Deletes everything

    Every other language in existence: Does nothing

    Just from personal experience, VB is uncomfortable to use. I was able to dive into PHP, Python, Lisp - hell - bash scripting too - and felt pretty comfortable once I got up to speed. I spent just as much time working in VB, and it still felt wrong. There's nothing I can really put my finger on - just a whole lot of small things that add up to a language that is not fun to program in.

    The only language I've enjoyed less was ColdFusion.

  • (cs) in reply to H|B
    H|B:
    Strings should be way more difficult to use and not as ubiquitous as they are.

    .toString() is like a drug:

    • you think you know how to use it harmlessly
    • it leaves the impression that it makes everything easier
    • soon you will be using it uncontrollably everywhere
    • people who don't "do it" feel sorry for you and think you have deep problems
    Agreed. It is so ubiquitous that even some languages are implicit string cast crazy (like VTL -- a template language for Java). You have to pay attention that it's not calling .toString() everywhere. This can be like black-ice for coders.
  • (cs) in reply to ThingGuy McGuyThing
    ThingGuy McGuyThing:
    jread:
    Wow, I'm glad to finally see some VB.NET code on here.

    Also, why does everyone think that VB is a "lesser" language? That gets really annoying. VB.NET and C# are (functionally) the same damn language.

    I'll throw out the same answer I do every time I see this question:

    The pseudocode: if false and deleteEverything() ...

    VB: Deletes everything

    Every other language in existence: Does nothing

    Just from personal experience, VB is uncomfortable to use. I was able to dive into PHP, Python, Lisp - hell - bash scripting too - and felt pretty comfortable once I got up to speed. I spent just as much time working in VB, and it still felt wrong. There's nothing I can really put my finger on - just a whole lot of small things that add up to a language that is not fun to program in.

    The only language I've enjoyed less was ColdFusion.

    Ok, I'm not a VB coder, but even I know that VB.NET introduced new short-circuiting operators andalso and orelse. Yes I think they're cumbersome, but they wanted to maintain compatibility, so changing the meaning of and/or was not an option....

    Yes VB is verbose, and to a non-VB coder it seems strange. But perl seems strange to a C++ coder, and a python seems strange to a C# developer. French seems strange to a person that speaks Japanese, but both can convey the same ideas....

    If you don't like the language, then don't use it and shut up about it.... Enough of the VB sucks threads, geez.

    The point is the code snippet sucked, and it would suck in whatever language it was written in.... A good developer can write good code in any language they choose. A shitty developer will write shitty code every language they choose.... It's the skill of the developer, not the capabilities of the language.

    -Me (stepping off the soapbox now....)

  • (cs) in reply to ThingGuy McGuyThing
    ThingGuy McGuyThing:
    I'll throw out the same answer I do every time I see this question:

    The pseudocode: if false and deleteEverything() ...

    VB: Deletes everything

    Every other language in existence: Does nothing

    If a statement executes, then the whole statement is going to execute. You're compressing a second conditional into your if-statement, since you only want to execute deleteSomething() as

    if false then... if deleteEverything() then...

    You can certainly stick some "shortcuts" behind an immediate return language, but not knowing enough about the language you are writing in is no excuse for criticizing it.

  • dolo54 (unregistered) in reply to rgz
    rgz:
    I apologize for the incoming spelling mistakes, because apologizing is easier than reaching a dictionary.
    jread:
    Wow, I'm glad to finally see some VB.NET code on here.

    Also, why does everyone think that VB is a "lesser" language? That gets really annoying. VB.NET and C# are (functionally) the same damn language.

    Yes but in VB you have Subrutines, Functions, and Functions that not return a value, and you can asign the return value to the function name, or not. It has class less methods which is not a wtf, but an inconsistency with c#.

    And is awfully verbose, you have to write 'Dim mfoo as Foo' when 'Foo mfoo' could sufise and 'new Foo()' instead of 'Foo()' and of course that means that you would have to write 'Dim mFoo as Foo = new Foo()'! then to cover up for this insanity shortcuts are invented and you end up with more syntax like 'Dim mfoo as new Foo()' which is still too long, 'mfoo as Foo()' could be a perfect declare+initialize idiom.

    It's deciving, 'Dim foo, bar, baz as String' declares to generic object variables and a String variable. The ternary operator works different across versions, operating buzyly or lazyly with unspected results. And when it works lazily it makes even less sense since it uses the syntax of function calling. Array indexing is indistiguible from function calling.

    Casting is cumbersome. Initializing Arrays is cumbersome

    No multiline string means you have to concatenate long messages, inserting new line objects in between since it doesn't understand about \n.

    The ide fills in this for you but you have to put 'ByVal' and 'ByRef' for each parameter in the function declaration, and yes it is the function and not the caller who decides if it works on objects or only their values.

    No intelligent line wraping means you can't breakup a complicated instruction into several lines with a continuation character that must be placed correctly for it to work right.

    I haven't learn how to do templating, but i bet it will be full of wtf. I have the language and I hate that I have to code it for a living.

    Still looking for a Pythonist job. Might as well start a Python shop myself.

    "I pity the Foo!"

  • brian (unregistered) in reply to Maciej
    Maciej:
    H|B:
    AFAIK, after Kurt Gödel (or Alan Turing?), there is no way of knowing the smallest possible program for any given task...

    I'm not sure that's entirely true. Assuming that you know of a valid solution, the set of programs of smaller length is finite, and can thus be exhaustively searched for shorter solutions.

    Actually I believe it's that there is no universal solution of "what's the shortest program solution for this problem". That is, you can't feed any program into a black box and have it spit out the absolute optimal solution. However, within the constraints of a given problem (say multiplying by two) you can look at the problem and realize the optimal solution (bit shifting).

  • dolo54 (unregistered)

    who you callin an mfoo foo?

  • brian (unregistered) in reply to Maciej
    Maciej:
    H|B:
    AFAIK, after Kurt Gödel (or Alan Turing?), there is no way of knowing the smallest possible program for any given task...

    I'm not sure that's entirely true. Assuming that you know of a valid solution, the set of programs of smaller length is finite, and can thus be exhaustively searched for shorter solutions.

    Actually I believe it's that there is no universal solution of "what's the shortest program solution for this problem". That is, you can't feed any program into a black box and have it spit out the absolute optimal solution. However, within the constraints of a given problem (say multiplying by two) you can look at the problem and realize the optimal solution (bit shifting).

  • (cs)
    Private Shared ...
    
    

    This is my favorite part :)

  • mav (unregistered) in reply to Derrick Pallas
    Derrick Pallas:
    JamesKilton:
    rgz:
    mav:
    And the raven, never flitting, still is sitting, still is sitting On the pallid bust of Derrick Pallas just above my chamber door; ...
    That's pretty neat! Did you made it?
    /sigh. What is happening to this country? People aren't taught who Poe is? Or at least this, his most famous poem?

    If it makes you feel better, I had "the pallid bust of Pallas" as the caption for a photo on my home page a couple of years ago.

    Yeah, I'm sorry, but every time I read anything by "Derrick Pallas" I think of the Raven, and I could avoid posting the poem no longer.

  • mav (unregistered)

    Oh, and I do in fact have a bust of you above my chamber door. Sometimes I throw darts at it when I don't agree with you. ;-)

  • anon (unregistered) in reply to H|B
    H|B:
    AFAIK, after Kurt Gödel (or Alan Turing?), there is no way of knowing the smallest possible program for any given task...

    You need to be more precise. As stated, this is nonsense. Maybe what you're going for is something like

    "In a formal system one cannot prove that a particular series of digits is of a complexity greater than the number of bits in the program employed to specify the series." -Chaiten/Kolmogorov

  • Spectre (unregistered) in reply to rgz
    rgz:
    Yes but in VB you have Subrutines, Functions, and Functions that not return a value, and you can asign the return value to the function name, or not.

    Functions that do not return a value? What's that? You can assign to the function name indeed, but since when did this become a WTF? It's quite different from Return'ing, because it doesn't return immediately.

    rgz:
    It has class less methods which is not a wtf, but an inconsistency with c#.

    If you're talking about modules, then: a) VB wasn't designed to be consistent with C#, and existed long before C#'s creation. b) AFAIK, MS added the 'static classes' (read: modules) to C#. So it's really C# that tries to be consistent 8=]. Besides, modules are a feature, not a bug. Not very OO, but not everyone wants to do OOP.

    rgz:
    And is awfully verbose, you have to write 'Dim mfoo as Foo' when 'Foo mfoo' could sufise and 'new Foo()' instead of 'Foo()' and of course that means that you would have to write 'Dim mFoo as Foo = new Foo()'! then to cover up for this insanity shortcuts are invented and you end up with more syntax like 'Dim mfoo as new Foo()' which is still too long, 'mfoo as Foo()' could be a perfect declare+initialize idiom.

    First, it's more readable, because once you stumble upon 'Dim' you know it's a variable declaration. Syntax highlighting helps a lot too, because Dim is a keyword, and most type names are not. Second, after you type 'As', IntelliSense is able to understand that you're writing a declaration, and to suggest a list of types. When type name is the first thing to type, you have no such luxury. Oh, and 'Dim mfoo as Foo()' declares an array of Foo.

    rgz:
    It's deciving, 'Dim foo, bar, baz as String' declares to generic object variables and a String variable. The ternary operator works different across versions, operating buzyly or lazyly with unspected results. And when it works lazily it makes even less sense since it uses the syntax of function calling.
    Wrong. It declares three strings. And there's no ternary operator.
    rgz:
    Initializing Arrays is cumbersome
    Oh, really? Dim a() As Integer = {1, 2, 3} How cumbersome is this?
    rgz:
    The ide fills in this for you but you have to put 'ByVal' and 'ByRef' for each parameter in the function declaration,
    Wrong again. The specification states that no By??? keyword indicates ByVal.
    rgz:
    and yes it is the function and not the caller who decides if it works on objects or only their values.
    Erm, I don't understand. It seems that it's like that in all major languages.
    rgz:
    No intelligent line wraping means you can't breakup a complicated instruction into several lines with a continuation character that must be placed correctly for it to work right.
    Surely, placing an underscore *correctly* requires a tremendous amount of intellect as well as a ruler with micron marks. 8=]

    To sum up, I suppose that's just another case of Tool Blame. Let the flames begin!

  • ThingGuy McGuyThing (unregistered) in reply to its me
    its me:
    <snip>

    Yes VB is verbose, and to a non-VB coder it seems strange. But perl seems strange to a C++ coder, and a python seems strange to a C# developer. French seems strange to a person that speaks Japanese, but both can convey the same ideas....

    If you don't like the language, then don't use it and shut up about it.... Enough of the VB sucks threads, geez.

    <snip>

    Yes, all true.

    But the original post was about why VB has such a bad rep - I threw out my ideas on that. I think my last point was the significant one. There's no one thing I can point to and say "This is why VB sucks". It simply is not as enjoyable to program in than other languages.

    I picked up VB after having programmed in Java, Python, Perl, sh, C++, PHP, Coldfusion, Javascript - maybe a few others I haven't listed. I've jumped from language to language, and while I may have found the huge leap between C++ and Perl "strange", I certainly never found it uncomfortable. I found VB and ColdFusion to be in a class apart from the rest - the class where programming becomes work and mechanical - not fun and art.

    And that's why - for me - VB has a bad reputation.

  • (cs) in reply to anon
    anon:
    H|B:
    AFAIK, after Kurt Gödel (or Alan Turing?), there is no way of knowing the smallest possible program for any given task...

    You need to be more precise. As stated, this is nonsense. Maybe what you're going for is something like

    "In a formal system one cannot prove that a particular series of digits is of a complexity greater than the number of bits in the program employed to specify the series." -Chaiten/Kolmogorov

    Yep, Chaitin is the one I was thinking of. My "conclusion" as quoted was derived from his writings (which I like very much, although not completely understanding them <grin>). For a more detailed explanation, I recommend going straight to the source -- http://www.cs.auckland.ac.nz/CDMTCS/chaitin/sciamer.html . A valuable excerpt can be found under Minimal Programs and Complexity.

  • (cs)

    I learned how to program. Then I learned VB.Net.

    For some people it is concurrent or the opposite. That is the only issue with VB.Net.

    As plenty of people have already mentioned, VB.Net has low barriers to entry for most kids who are goofing around and want to become programmers (assuming they are OK with pirating VS.Net). There is nothing fundamentally wrong with VB.Net.

  • maht (unregistered) in reply to H|B

    You got that the wrong way round.

    Strings should be everywhere and more solid support at CPU level for string processing.

  • maht (unregistered) in reply to akatherder

    VB.Net has low barriers to entry for most kids who are goofing around

    Almost every other non-MS environment has a lower barrier.

    There is nothing fundamentally wrong with VB.Net. Grown ups call it "vendor lock in"

  • (cs) in reply to maht
    maht:
    You got that the wrong way round.

    Strings should be everywhere and more solid support at CPU level for string processing.

    By string processing, do you mean "performing date/time operations" too?

  • (cs) in reply to kimos
    kimos:
    EmmanuelD:
    Steve:
    Just out of curiousity, in what language is this written?
    Very Basic. I think.

    Every time see a post about something written in VB or whatever.NET I think that the language is the WTF.

    Pre-.NET VB? Okay, I can somewhat buy that. Though I still maintain it was good for prototyping, and not a terrible language for learning on as long as you had a good reference.

    But whatever.NET? Even VB.Net is decent now, and C# is in contention for best-in-class language IMO.

  • (cs) in reply to H|B
    H|B:
    maht:
    You got that the wrong way round.

    Strings should be everywhere and more solid support at CPU level for string processing.

    By string processing, do you mean "performing date/time operations" too?

    Yeah, SNOBOL, bay-bee!

  • Spectre (unregistered) in reply to maht
    maht:
    > > There is nothing fundamentally wrong with VB.Net. Grown ups call it "vendor lock in"

    Did you know that:

    ... Mono has a VB compiler now?

    (And compiled applications would run happily even before that.)

  • Joshua Bowers (unregistered) in reply to Spectre
    Spectre:
    rgz:
    Yes but in VB you have Subrutines, Functions, and Functions that not return a value, and you can asign the return value to the function name, or not.

    Functions that do not return a value? What's that? You can assign to the function name indeed, but since when did this become a WTF? It's quite different from Return'ing, because it doesn't return immediately.

    Far be it for me to put thoughts into the OPs head, but I think his point is that there is an inconsistency in how methods are declared in VB versus how they are declared in C#: in VB, there are two completely separate keywords (with two completely separate syntaxes) for defining two concepts which are, essentially, special cases of one-another; in C#, arguably, there is only one syntax (the only difference being that "Sub"s are void functions).

    Also, as of VS2005, VB does not really complain about functions which do not, in fact, return a value on all code-paths; C# flags this as an error and terminates the compilation. (I cannot remember off of the top of my head whether VB flags a warning; I have not dabbled in that language for about a week, for which I am thankful.)

    rgz:
    It has class less methods which is not a wtf, but an inconsistency with c#.

    If you're talking about modules, then: a) VB wasn't designed to be consistent with C#, and existed long before C#'s creation. b) AFAIK, MS added the 'static classes' (read: modules) to C#. So it's really C# that tries to be consistent 8=]. Besides, modules are a feature, not a bug. Not very OO, but not everyone wants to do OOP.

    Sure, but static classes do not dump their static methods all up in the global namespace, something that VB modules do splendidly.

    rgz:
    And is awfully verbose, you have to write 'Dim mfoo as Foo' when 'Foo mfoo' could sufise and 'new Foo()' instead of 'Foo()' and of course that means that you would have to write 'Dim mFoo as Foo = new Foo()'! then to cover up for this insanity shortcuts are invented and you end up with more syntax like 'Dim mfoo as new Foo()' which is still too long, 'mfoo as Foo()' could be a perfect declare+initialize idiom.

    First, it's more readable, because once you stumble upon 'Dim' you know it's a variable declaration. Syntax highlighting helps a lot too, because Dim is a keyword, and most type names are not. Second, after you type 'As', IntelliSense is able to understand that you're writing a declaration, and to suggest a list of types. When type name is the first thing to type, you have no such luxury. Oh, and 'Dim mfoo as Foo()' declares an array of Foo.

    IntelliSense in C# 2005 is vastly superior to the IntelliSense in VB 2005: in most cases, if you are at a context in which you can define a new variable, the moment you start typing, IntelliSense brings up a menu of available keywords --- including all known types. Further, if you are going to play the syntax-highlighting card, C# actually highlights type/class names (and is able to highlight primitive types differently than class types, to boot), whereas VB does absolutely nothing. Readability is in the eye of the beholder: blatant verbosity, I find, gets in the way of expressing whatever it is that one is attempting to say, anyway. (Which is why I generally prefer type-inferred or duck-typed languages; all that type information, while useful for the compiler to optimize things, mostly just gets in the way, from a readability perspective.)

    To sum up, I suppose that's just another case of Tool Blame. Let the flames begin!
    There are two reasons why I advocate C# over VB: anonymous methods (which allow for (albeit imperfect) closures and continuations) and fantastic (although, again, imperfect) nullable-type support; I find that the lack of those two concepts in VB --- at least, for the moment --- makes using VB very tedious. I have read a few blog entries that suggest some form of support for these two concepts is on the way with Orcas, but until that officially drops, I prefer to use the language which actually supports them.
  • foo (unregistered) in reply to mav
    mav:
    And the raven, never flitting, still is sitting, still is sitting On the pallid bust of Derrick Pallas just above my chamber door; And his eyes have all the seeming of a demon's that is dreaming, And the lamp-light o'er him streaming throws his shadow on the floor; And my soul from out that shadow that lies floating on the floor Shall be lifted - nevermore!

    brilliant

  • (cs) in reply to maht
    maht:
    > VB.Net has low barriers to entry for most kids who are goofing around

    Almost every other non-MS environment has a lower barrier.

    There is nothing fundamentally wrong with VB.Net. Grown ups call it "vendor lock in"

    To start with VB.Net you install VS.Net and you're up and running. It dumbs things down and abstracts thing ridiculously far (big pluses and minuses of course). Then you start dragging and dropping and you have a webpage.

    Now let's install PHP. Ok I opened the zip file... now what? Oh I have to install Apache or IIS. Well I've heard of IIS before, let me try that. Ok, let me scroll through all these errors where it says this is incredibly unsecure to run... WHOA! That's a lot of comments on how to get this to work and they're all different. After 3 days of playing around with ISAPI filters and permissions, you realize most people use PHP and Apache together. Ok, so let me do this Apache thing.. ah hell this was obviously made for linux. Here are some comments and help on the online doco site... WHOA! That a lot of comments and they're all different again. Ok, let me look through this 800 line httpd.conf file and see if I can figure out which of the 200 directives apply to me. Oops I changed one I wasn't supposed to, let me download that again and retry this. What the hell, I just write crap in notepad now?

    I've set them both up dozens of times. If VS.Net blows up... you're in trouble. But if it works it's a million times easier the first time around. Throughout the years I have enlisted the help of several PHP "gurus" and I got a whole bunch of "Let's try this... shoot. Ok let's try this... DAMNIT that worked last time! Let's try this..."

  • A. N. Consultant :p (unregistered) in reply to akatherder

    Just to throw a coffee table and a camera into the equation ->

    PHP.NET on channel 9

  • rgz (unregistered) in reply to Spectre

    Hang on, while I put on my fire suit.

    Spectre:
    Functions that do not return a value? What's that?

    A function that returns a reference type returns Nothing when you fall off the definition body. Functions return Object' -- a reference type -- by default.

    Spectre:
    You can assign to the function name indeed, but since when did this become a WTF? It's quite different from Return'ing, because it doesn't return immediately.
    It is a WTF the first time you encounter it, it is one of the many, many, many little pointless rules you have to learn when you are getting into vb which is the reason I insist that it isn't a basic language by any stretch. Anyway, the implicit return variable of functions is a left over for a time when VB didn't have functions as is the distinction between functions and subs.
    Spectre:
    modules are a feature, not a bug. Not very OO, but not everyone wants to do OOP.

    I think so too but I was pointing to a gotcha between C# and VB.NET for that person that said they are the same.

    Spectre:
    First, it's more readable

    "I do the action that is having with this object which is a cat that is of black which is a color"

    -- does not read easier than -- "I have a black cat"

    More words != More readable

    If you insist on using a keyword at least don't use an insult and it still uses a word too many and reads and looks backwards, yeah I know you are going to say this is subjective, ok so look at this:

    Dim Name as String Dim Surname as String Dim Nickname as String

    compare that to

    my string Name my string Surname my string Nickname

    And tell me it doesn't look tighter, cleaner, shorter and, well less "Dim Wit".

    Spectre:
    IntelliSense is able to understand that you're writing a declaration, and to suggest a list of types. When type name is the first thing to type, you have no such luxury.

    I have never found myself not knowing beforhand what kind of variable I want to declare when Im about to declare a variable. I doubt the situation arises that often.

    Spectre:
    Oh, and 'Dim mfoo as Foo()' declares an array of Foo.

    I don't remember stating otherwise.

    Spectre:
    Wrong. It declares three strings.

    Is that so? Sorry I fell into one the countless gotchas of VB, if only I didn't to be a fucking expert to use the language.

    Spectre:
    And there's no ternary operator.

    I belive the behavior of iif was changed recently, if I'm wrong I'm sorry i'll go do more of the action which is of kind memorising.

    Spectre:
    rgz:
    Initializing Arrays is cumbersome
    Oh, really? Dim a() As Integer = {1, 2, 3} How cumbersome is this?

    Try with something without native sintax as Datatables, and arrays of more than one dimension. It doesn't scale at all.

    Spectre:
    rgz:
    The ide fills in this for you but you have to put 'ByVal' and 'ByRef' for each parameter in the function declaration,
    Wrong again. The specification states that no By??? keyword indicates ByVal.
    rgz:
    and yes it is the function and not the caller who decides if it works on objects or only their values.
    Erm, I don't understand. It seems that it's like that in all major languages.

    No, other languages, including VB.NET use a reference system. It has reference types and value types, the caller must decide to box or unbox a value type if they want so, why making a distinction between value types and reference types if you are going to ignore it?

    Spectre:
    rgz:
    No intelligent line wraping means you can't breakup a complicated instruction into several lines with a continuation character that must be placed correctly for it to work right.
    Surely, placing an underscore *correctly* requires a tremendous amount of intellect as well as a ruler with micron marks. 8=]

    Well I tend to type operators without spaces but the underscore doesn't work that way and it bothers me, but it still doesnt make it nice to jump over the actual issue, having to write continuators even when is obvious the expresion is still open, like inside of parens.

  • Stewart (unregistered) in reply to akatherder
    akatherder:
    To start with VB.Net you install VS.Net and you're up and running. It dumbs things down and abstracts thing ridiculously far (big pluses and minuses of course). Then you start dragging and dropping and you have a webpage.

    I cannot imagine a better argument against using VB.NET.

    True -- I'm not so hardcore as to use vi, but give me a command shell and PHP over an IDE any day. It's like coding HTML by hand -- you have to think about what you're doing when you have to type it out yourself...

    Oh, and for an insanely easy WAMP platform that can be used as a frontend for autorun CDs and such, use Server2Go. Yes, you still have to use Notepad, unless you don't want to...

    You know, just sayin'...

  • (cs) in reply to RonaldRoss
    RonaldRoss:
    H|B:
    Strings should be way more difficult to use and not as ubiquitous as they are.

    .toString() is like a drug:

    • you think you know how to use it harmlessly
    • it leaves the impression that it makes everything easier
    • soon you will be using it uncontrollably everywhere
    • people who don't "do it" feel sorry for you and think you have deep problems
    Wow, that's an amazing quote. Five Stars!!
    Definately! Another five from me!

    Like someone else here said, apparently some people aren't thinking about what properties the objects have they want to manipulate but how the serialization looks like.

    Thus "how do I negate that number?" becomes "how do I get that funny line-y thing there?"

  • (cs) in reply to Stewart
    Stewart:
    I cannot imagine a better argument against using VB.NET.

    True -- I'm not so hardcore as to use vi, but give me a command shell and PHP over an IDE any day. It's like coding HTML by hand -- you have to think about what you're doing when you have to type it out yourself...

    Oh, and for an insanely easy WAMP platform that can be used as a frontend for autorun CDs and such, use Server2Go. Yes, you still have to use Notepad, unless you don't want to...

    You know, just sayin'...

    Yes you can write cleaner code by using notepad. As far as learning though, an IDE will always win over a plain text editor as long as you can control it.

  • (cs) in reply to PSWorx
    PSWorx:
    Thus "how do I negate that number?" becomes "how do I get that funny line-y thing there?"

    Easy!

    public int NegateNumber(int number)
    {
       StringBuilder sb = new StringBuilder(number.ToString());
    
       if (number > 0)
          sb.Insert(0, "-");
       else if (number < 0)
          sb.Remove(0, 1);
    
       return int.Parse(sb.ToString());
    }
    
  • jbinaz (unregistered) in reply to kimos
    kimos:
    Every time see a post about something written in VB or whatever.NET I think that the language is the WTF.

    Why? Such a monstrosity could have been done in C# just as easily. The only difference is that most C# users have moved from C or C++, meaning they have development experience. VB users that move to VB.NET may have been some bozo that thought "I can draw a pretty interface".

    Just like "guns don't kill people, people kill people" you could say that "VB doesn't create crappy code, crappy coders create crappy code".

  • Carlos G (unregistered)

    I learned to code with VB.NET. I found that it is easier to understand for someone that doesn't know the syntax of the language. For example

    Public Function DoSomething(ByVal arg As Object) as Whatever 'VB Code End Function

    is much easier to understand for someone that has never seen VB in its life than

    Public Whatever doSomething(Object arg) { //Java Code }

    Why?? In VB you have much more information... You know first off that it is a function because it clearly says so. Instead in Java you MUST know (or be able to infer... something someone new to programming most of the time is not capable of doing) that after the Scope of a method comes the Type. Also in Java you must know that the braces define a block of code (something I find less obvious than End Function). Finally using the example above, with VB.NET you also know if the argument is passed by reference or by value. In Java you MUST know that arguments are always passed by reference, if not you might do typical newb (no insult intended) that changes a variable that should have been input only (you can also use Final, but hey... you MUST also know that).

    In the end, I believe that VB is great for someone that doesn't know its syntax, since it’s not as obscure as Java or C#, or any other C for that matter. But I must recognize that if everyone is fully proficient in a language's syntax, then the benefit of VB's verbosity is greatly reduced.

  • barf indeedy (unregistered) in reply to kimos

    If I had a dollar for every time someone said that...

    Honestly, I like the framework (especially 2.0). Can't say I like VB syntax and some of its differing idiosyncrasies, but c# is wicked awesome.

  • barf indeedy (unregistered) in reply to barf indeedy
    barf indeedy:
    If I had a dollar for every time someone said that...

    Honestly, I like the framework (especially 2.0). Can't say I like VB syntax and some of its differing idiosyncrasies, but c# is wicked awesome.

    Yeah, I am the WTF. Meant to quote someone dissing on VB AND the .NET framework.. now I'm just quoting myself. In the end, I shoulda seen it coming, it always does here, doesn't it?

    Battle of the languages!

    Ha, won't matter in 10 years. All your languages will be long dead, or changed beyond current recognition. :)

    Power to the LINQ!

  • Joshua Bowers (unregistered) in reply to Carlos G
    Carlos G:
    [...]In VB you have much more information... You know first off that it is a function because it clearly says so. Instead in Java you MUST know (or be able to infer... something someone new to programming most of the time is not capable of doing) that after the Scope of a method comes the Type. Also in Java you must know that the braces define a block of code (something I find less obvious than End Function). Finally using the example above, with VB.NET you also know if the argument is passed by reference or by value. In Java you MUST know that arguments are always passed by reference, if not you might do typical newb (no insult intended) that changes a variable that should have been input only (you can also use Final, but hey... you MUST also know that).

    That's not exactly what ByVal means; in .NET, as long as an object is a reference type (which, by the bye, most types are; "value" types are generally primitive types), it is always passed by "reference" to a method. ByVal/ByRef (and the C# cousins, ref/out, although a subtle distinction exists here) simply alter whether or not you can assign to the original reference that was passed in; they do nothing to prohibit altering the properties of variables which are passed in. This differs from, for example, C and C++, where the passed variable is only updated if it were passed by reference or via a pointer.

  • A. N. Consultant :p (unregistered)

    All this VB trolling made me think ... why do we use different languages at all. I use many different languages on a daily basis, the answer is we use what is practical. You wouldn't use a F1 car to do the weekly shop and you wouldn't take a station wagon to do the Indy 500. Yes I did steal that old OS paradigm but what if programming/scripting/markup languages were cars:

    FORTRAN : Ford Model T (first mass production) COBOL: < no idea - suggestions pls > LISP: < no idea - suggestions pls >

    C : Dragster (most likely to cause you serious head injury) C++ : Ferrari (elegant - well bred, desired by many, understood by so few - often wrapped around a tree)

    VB 3/4/5/6 : ?EITHER

    Station Wagon (slow poor handling but still useful nevertheless. Nobody wanted one but everybody got married and had to buy one.)

    OR

    VW Beetle ( One for the masses, Built on the back of a fascist dictatorship, the engine's air cooled in the back - never gonna get you very far, very fast)

    JAVA : Skoda (slow, ugly, but runs in most environments)

    VB.NET - dodge from "the blues brothers" C# - the General Lee

    JavaScript = Reliant Robin (a british oddity famed in "Only fools and Horses" - unsafe and missing a wheel but will get you somewhere 'undefined')

    HTML = Citroen 2CV (stupid and ugly yet innovative. Rendered absolutely useless after 3years of it's ridiculous life)

    XML = Toyota Corolla (ugly, yet popular, gets the job done but still something bugs you about it, slows down if you try to put too much in the trunk)


    I would like to apologise in retrospect for the length of this post, I got carried away. I strongly encourage additions and modifications to this informal list ;)

  • brendan (unregistered) in reply to Carlos G
    Carlos G:
    I learned to code with VB.NET. I found that it is easier to understand for someone that doesn't know the syntax of the language. For example

    Public Function DoSomething(ByVal arg As Object) as Whatever 'VB Code End Function

    is much easier to understand for someone that has never seen VB in its life than

    Public Whatever doSomething(Object arg) { //Java Code }

    Why?? In VB you have much more information... You know first off that it is a function because it clearly says so. Instead in Java you MUST know (or be able to infer... something someone new to programming most of the time is not capable of doing) that after the Scope of a method comes the Type. Also in Java you must know that the braces define a block of code (something I find less obvious than End Function). Finally using the example above, with VB.NET you also know if the argument is passed by reference or by value. In Java you MUST know that arguments are always passed by reference, if not you might do typical newb (no insult intended) that changes a variable that should have been input only (you can also use Final, but hey... you MUST also know that).

    In the end, I believe that VB is great for someone that doesn't know its syntax, since it’s not as obscure as Java or C#, or any other C for that matter. But I must recognize that if everyone is fully proficient in a language's syntax, then the benefit of VB's verbosity is greatly reduced.

    But the question is should someone who doesn't know the language be programming in that language? After all, 99.9% of the WTFs are due to the programmer not knowing the language and it's libraries.

  • Stewart (unregistered) in reply to akatherder
    akatherder:
    Yes you can write cleaner code by using notepad. As far as learning though, an IDE will always win over a plain text editor as long as you can control it.

    Yeah, but the issue is one of "best practices", which an IDE won't "teach". I like syntax highlighting and (limited) code completion. But I don't like my programming environment getting in my way or adding things to my code that I didn't ask for. What can I say? Old habits die hard, and when I started coding HTML, every K counted...

  • Gaxx (unregistered) in reply to barf indeedy
    barf indeedy:
    hey, check it out... Maybe for some odd reason they were calling this function over and over and over, and realized the power of stringbuilder over string concatenation in the .net world... They just saved themselves a whole lot of needless GC!!

    The irony (in the US sense anyway) is that they didn't even get that right. In .net there's only really an efficiency gain for stringbuilder over string if the number of concatonations is arbitrary. For a case like this where the chere are a set number of concats there's no efficiency gain. In fact, it migth even hamper the compiler from rolling them all into one operation at MISL level.

  • Anonymous (unregistered) in reply to H|B
    H|B:
    PSWorx:
    Thus "how do I negate that number?" becomes "how do I get that funny line-y thing there?"

    Easy!

    public int NegateNumber(int number)
    {
       StringBuilder sb = new StringBuilder(number.ToString());
    
       if (number > 0)
          sb.Insert(0, "-");
       else if (number < 0)
          sb.Remove(0, 1);
    
       return int.Parse(sb.ToString());
    }
    

    No no no! You're not consistent with yourself. It should have been (I don't know .NET, so let's assume strings have a charAt method just like Java):

    public int NegateNumber(int number)
    {
       StringBuilder sb = new StringBuilder(number.ToString());
    
       if (sb.charAt(0) == "-")
          sb.Remove(0, 1);
       else if (sb != "0")
          sb.Insert(0, "-");
    
       return int.Parse(sb.ToString());
    }
    

    :D

  • CaffeineAddict (unregistered) in reply to kimos

    Your basing that on...?

    I've used many porgramming languages, and if we're sticking strictly OO, .Net is actually the cleanest OO implementation i've ever used. It doesn't have the annoying hacks, bugs and eccentricities that C++ has, its far more useful than Java (just compare the depth and usefulness of the base class libraries!)...need I go on?

    If you don't like the syntax of VB.Net (and, to be fair, my preffered language is C#) then you can use whateverdamn language you like, if they've written a compiler to target the platform.

    Thats kinda that whole point.

    On the VB Note, i've always thought of two types of people who use VB - "Programmers" and "Developers". VB Programmers think they can program because they learned how to drag, drop and click stuff in VB. These people are dangerous, and should be ejected from the profession on sight. Developers are programmers who know several languages, understand programming, program well, and choose to use VB for a specific task where it can be applied usefully.

    After all, it is a RAD tool, which is sometimes what you need. No point in spending ages writing something in C, for instance, that you can do in five mins in VB, if thats all the task requires.

  • CaffeineAddict (unregistered) in reply to CaffeineAddict
    CaffeineAddict:
    Your basing that on...?

    I've used many porgramming languages, and if we're sticking strictly OO, .Net is actually the cleanest OO implementation i've ever used. It doesn't have the annoying hacks, bugs and eccentricities that C++ has, its far more useful than Java (just compare the depth and usefulness of the base class libraries!)...need I go on?

    If you don't like the syntax of VB.Net (and, to be fair, my preffered language is C#) then you can use whateverdamn language you like, if they've written a compiler to target the platform.

    Thats kinda that whole point.

    On the VB Note, i've always thought of two types of people who use VB - "Programmers" and "Developers". VB Programmers think they can program because they learned how to drag, drop and click stuff in VB. These people are dangerous, and should be ejected from the profession on sight. Developers are programmers who know several languages, understand programming, program well, and choose to use VB for a specific task where it can be applied usefully.

    After all, it is a RAD tool, which is sometimes what you need. No point in spending ages writing something in C, for instance, that you can do in five mins in VB, if thats all the task requires.

    By the way, that was in reference to

    Every time see a post about something written in VB or whatever.NET I think that the language is the WTF.

    which the forum software decided not to include in the post.

  • Watson (unregistered) in reply to brian
    brian:
    Maciej:
    H|B:
    AFAIK, after Kurt Gödel (or Alan Turing?), there is no way of knowing the smallest possible program for any given task...

    I'm not sure that's entirely true. Assuming that you know of a valid solution, the set of programs of smaller length is finite, and can thus be exhaustively searched for shorter solutions.

    Actually I believe it's that there is no universal solution of "what's the shortest program solution for this problem". That is, you can't feed any program into a black box and have it spit out the absolute optimal solution. However, within the constraints of a given problem (say multiplying by two) you can look at the problem and realize the optimal solution (bit shifting).

    Your task now is to write a program capable of "realising" that a given program does the same thing as another. Considering some of the comments that come up in response to CodeSODs, I'm going to guess that it's not an easy thing for humans to do. Even for small programs.

    Incidentally: as someone whose principal .NET language is C#, and whose last experience with anything BASIC-related was classic ASP VBScript in 2001 (and hated it) - a condition that is unlikely to change - is there any incentive for me to learn VB.NET? Basically, what's VB.NET got going for it that would make it attractive for the non-VB programmer?

  • Watson (unregistered) in reply to akatherder
    akatherder:
    maht:
    > VB.Net has low barriers to entry for most kids who are goofing around

    Almost every other non-MS environment has a lower barrier.

    There is nothing fundamentally wrong with VB.Net. Grown ups call it "vendor lock in"

    To start with VB.Net you install VS.Net and you're up and running. It dumbs things down and abstracts thing ridiculously far (big pluses and minuses of course). Then you start dragging and dropping and you have a webpage.

    Now let's install PHP. Ok I opened the zip file... now what? Oh I have to install Apache or IIS. Well I've heard of IIS before, let me try that. Ok, let me scroll through all these errors where it says this is incredibly unsecure to run... WHOA! That's a lot of comments on how to get this to work and they're all different. After 3 days of playing around with ISAPI filters and permissions, you realize most people use PHP and Apache together. Ok, so let me do this Apache thing.. ah hell this was obviously made for linux. Here are some comments and help on the online doco site... WHOA! That a lot of comments and they're all different again. Ok, let me look through this 800 line httpd.conf file and see if I can figure out which of the 200 directives apply to me. Oops I changed one I wasn't supposed to, let me download that again and retry this. What the hell, I just write crap in notepad now?

    I've set them both up dozens of times. If VS.Net blows up... you're in trouble. But if it works it's a million times easier the first time around. Throughout the years I have enlisted the help of several PHP "gurus" and I got a whole bunch of "Let's try this... shoot. Ok let's try this... DAMNIT that worked last time! Let's try this..."

    Fascinating. I just download the PHP zip file and unpack it, download the Apache installer and run it, add three lines to httpd.conf and I'm done. But then, I guess I stop to think first and don't expect things to be dumbed down for me.

    "Oops I changed one I wasn't supposed to, let me download that again and retry this."

    Because naturally the first thing you do after you install something for the first time is that you delete the downloaded installer.

  • Watson (unregistered) in reply to rgz

    [quote user=rgz]I have never found myself not knowing beforhand what kind of variable I want to declare when Im about to declare a variable. I doubt the situation arises that often. [/quote] Conversely, I've often found myself wanting to type a variable name before I've declared it. Intellisense actively hinders me there. The frequency with which I have to hit 'escape' makes me think someone's trying to send me a message.

Leave a comment on “Time for Consultants”

Log In or post as a guest

Replying to comment #:

« Return to Article