• Dr Nightmare (unregistered)

    What's that "dim" in the code mean? What do they want to dim? Is it because the language designers weren't very bright?

    Captcha: yummy

  • (cs) in reply to danixdefcon5
    danixdefcon5:

    Good developers write programs. Bad developers write nightmares. Stupid developers write in Visual Basic.

    Too bad Micro$oft didn't go ahead and axe VB during the .NET launch. Forcing everyone to use C# would have weeded out the stoopid ones.

    You forgot one: ignorant people make statements like the above.

    Can we all at least pretend that we want to have an intelligent discussion regarding programming? Enough with this crap. Go somewhere else, AOL has lots of great chat rooms for ignorant, redundant, uneducated statements like this.

    You know, its OKAY to dislike language X (or operating system X and so on...), and actually let a day go by without trying to come up with a reason to justify your feelings. Just let it go. Enough is enough ,this site used to be great to read, funny and informative, and now it is just the same old stuff over and over. The ironic thing is, these people demonstrate very quickly and effectively just how knowledgeable and experienced they are when it comes to programming, and not in the manner in which they expect, when they make idiotic statements like these.

    Sorry for the rant. Let's all pretend that we are adults and move on from this juvenile VB-bashing. Bring something to the table, people, don't keep quoting what some "l33t hack3r" in some AOL chat room taught you about programming.

  • (cs) in reply to themagni
    themagni:
    I program mostly in C for embedded systems. I've used VB6 and VB.NET to make interfaces for the devices. VB6 is easier to use, since it's got native COM port use.

    .NET 2.0 introduced the great and powerful System.IO.Ports.SerialPort object, solving your reason to stick with VB6. You can thank me later.

  • kaukomieli (unregistered) in reply to VBGuy
    VBGuy:
    if they suck, they suck in any language.

    i am surprised to find this insight on a geek site ;)

    scnr...

    captcha: scooter, that was all it took 20 years ago to research the field of sucking...

  • Ultimape (unregistered) in reply to tmountjr

    There is a vast diffrence between logical equals, boolean equals, and assignment equals.

  • TravisO (unregistered) in reply to Joseph Newton
    Joseph Newton:
    C# != C C == VB + C-style syntax

    If you're going to insult something, at least type it correctly. Perhaps you meant the following:

    C# != C++ C# = VB & C++ style syntax

  • GSquared (unregistered) in reply to Volmarias
    Volmarias:
    Rich:
    AbbydonKrafts:
    So just because I do most of my development in VB6 makes me stupid?

    You appear to have hit the question mark by accident at the end of that sentence.

    I certainly know that when I delved into VB once, I felt the IQ points slipping away...

    Rich

    I agree. Whenever I have to do anything with VB, I feel like I'm programming in Retard, simply because of the byzantine and non-sensical methods of doing things. = for evaluation AND assignment? Argh!

    I truly feel sorry for you. I have trouble imaging being too stupid to understand the word "is" in the English language. "Is" does both evaluation and assignment, and if you can't grasp the idea of a symbol that does that, you must have terrible problems with communication.

    I just can't imagine what it must be like to be confused by sentences like, "is the car red?" (evaluation) and "the car is red" (assignment).

    Truly, I feel for you, and for everyone else who has trouble understanding symbols with more than one meaning.

    Less sarcastically and more directly, symbols with context-sensitive meanings are a basic part of how the human mind works. Deciding that your IQ is getting lower because of encountering one is really just a sign of a serious ego problem.

  • kanna (unregistered) in reply to GSquared
    GSquared:
    I just can't imagine what it must be like to be confused by sentences like, "is the car red?" (evaluation) and "the car is red" (assignment).

    Actually, to keep it related to programming, those two phrases are syntactically different. So, you're actually not showing an example of the same syntax being used in both cases.

  • Zaphod Beeblebrox (unregistered) in reply to kanna

    If we're going to be nit-picky, he says the symbols mean the same thing, not that the syntax is the same.

    In the sentences, the symbol "is" is the same, and you glean its meaning from the context.

    In the code snippets "if x=1 then ..." and "x=1", the symbols (=) are also the same, but you (and the compiler) can tell the difference from the context.

  • l0sr (unregistered) in reply to AbbydonKrafts

    didn't you read his comments?

    YES! It does make you stupid ... ya dummy.

  • (cs) in reply to kanna
    kanna:
    GSquared:
    I just can't imagine what it must be like to be confused by sentences like, "is the car red?" (evaluation) and "the car is red" (assignment).

    Actually, to keep it related to programming, those two phrases are syntactically different. So, you're actually not showing an example of the same syntax being used in both cases.

    Well, "the car is red?" and "the car is red." are the same. The ? and . aren't used in verbal (i.e. processing) communication and should be considered similar to comments. In fact, you can use further inflection to have the negative comparator. For example, "the car is red?" shows that the car should not be red.

  • kanna (unregistered) in reply to Zaphod Beeblebrox

    Meh, I was just screwing around anyway. I don't get picky about what language I use, so long as the solution fits the problem.

  • Morbii (unregistered)

    We have one of those - we pass around CSOD during the week when we find something abominable (and some of the stuff I've found is BAD).

  • (cs) in reply to Dr Nightmare
    Dr Nightmare:
    What's that "dim" in the code mean? What do they want to dim? Is it because the language designers weren't very bright?

    Captcha: yummy

    I believe it stands for "Dimension"

  • (cs) in reply to TravisO
    TravisO:
    Joseph Newton:
    C# != C C == VB + C-style syntax

    If you're going to insult something, at least type it correctly. Perhaps you meant the following:

    C# != C++ C# = VB & C++ style syntax

    Actually.. since when is it VB plus anything? The .NET framework is just that - a framework. The syntax varies by language, but C# is definitely not "VB" (implying 6 or below) and something else. Even if you say it's "VB.NET" and something else, it would still be wrong. They got most of the syntax style from Java (take a look at the blogs for the developers involved with creating C#)

  • Jeff (unregistered) in reply to Anita Tinkle
    Anita Tinkle:
    Code blocks like that one are primarily why most shops will leave VB6 and go to C#.NET and NOT make the transition to VB.NET since most people making the transition not only have to suffer the indignation of learning a Java-syntactically equivalent language, but then also have to learn more about what an object framework is and actually use one

    So you're saying that it's easier to teach them both the syntax and OO model as opposed to just teaching them the OO model? Fair enough argument.

    But that's what most people that bash VB don't get - I can use VB.NET to create a beautiful OO app just as well as C#. The difference is that a lot of people, yours truly included (in early iterations of .NET) can bastardize VB.NET into a wholly non-OO, event driven, VB6 style language. But you can do that in other languages, too.

    Anita Tinkle:
    That, and Visual Basic is such a pain on the hands to write--I get carpal tunnel after writing it for a few hours. It's a PITA.

    No doubt, C-style is much easier to code. I still think VB is more readable, though. We've done most stuff lately in C#, but our customer has now made their standard VB.NET. Ugh, now we have to switch back again.

    captcha: bathe <thanks for the reminder!>

  • Franz Kafka (unregistered) in reply to GSquared
    GSquared:
    I truly feel sorry for you. I have trouble imaging being too stupid to understand the word "is" in the English language. "Is" does both evaluation and assignment, and if you can't grasp the idea of a symbol that does that, you must have terrible problems with communication.

    I just can't imagine what it must be like to be confused by sentences like, "is the car red?" (evaluation) and "the car is red" (assignment).

    Truly, I feel for you, and for everyone else who has trouble understanding symbols with more than one meaning.

    Less sarcastically and more directly, symbols with context-sensitive meanings are a basic part of how the human mind works. Deciding that your IQ is getting lower because of encountering one is really just a sign of a serious ego problem.

    We don't program in english specifically because we want to control what meaning is applied to what symbols. Regarding your bit about IQ points, i'll just ask how many VB programmers use 'ON ERROR DO NEXT' or whatever it is. That's why using VB makes people feel stupid - all the morons who have gone before.

  • BillyBob (unregistered) in reply to Thief^
    Thief^:
    I had the opposite problem a few years ago, MSVC++ 2003 was optimising the million iteration loop to a single assignment, and disabling optimisations made other languages seem faster (redundant memory reads and assignments instead of using registers etc). Using a different c++ compiler that wasn't as good at optimising sorted it and showed that C++ really was the superior language.

    So you're:

    • Comparing (MS) C++ and C++,
    • Comparing language implementations rather than language itself.

    And concluding that C++ is a superior language....

  • Kankus (unregistered)

    The funniest thing about VB based WTFs are the WTF comments that always follow.

    Its like people who don't know Chinese scoffing over Chinese typos or grammatical errors, and then asserting that French is definitely a better language than Chinese.

  • BillyBob (unregistered) in reply to Kankus
    Kankus:
    The funniest thing about VB based WTFs are the WTF comments that always follow.

    Its like people who don't know Chinese scoffing over Chinese typos or grammatical errors, and then asserting that French is definitely a better language than Chinese.

    character with 2 lines = day, same character with 3 lines = devil... your example proves VB's crappiness ;-)

  • iw (unregistered)

    See, he's just a curious hacker! He likes to take strings apart and see if he can put them back together again. That way he can learn how strings work! Plus strings are always sturdier if you disassemble and rebuild them.

  • JW (unregistered)

    I don't really see the big deal with this code. The first part does indeed forgo the use of a good class library function. But path parsing libraries have been conspicuously absent until recently in mainstream languages. As far as I know, even C++ doesn't have path parsing except through Boost::path.

    The "rebuilding" aspect is dumb. But it can be the result of any number of common blunders.

    I want to see the real travesties on the CodeSOD, not just some poor schmoe's mistake.

  • Maarten (unregistered) in reply to snoofle
    snoofle:
    Philosophical question: can you ever really waste cpu cycles that have already been bought and paid for? I have a box sitting here that does who-knows-how-many millions of nop's every second. And the company won't let me donate them to research *sighs*

    They are not already paid for. Modern operating systems actually use halt or other more efficient idle instructions. Donating "nop's" toresearch would actually increase your employer's electricity bill.

  • (cs) in reply to danixdefcon5
    danixdefcon5:
    Aaron:
    see.... I wish they would have made VB a little bit harder to learn, to keep away the stupid people. Or at least make it not a viable language to use for production-level programming!

    frist

    captcha: darwin -- if ONLY!!!

    Good developers write programs. Bad developers write nightmares. Stupid developers write in Visual Basic.

    Too bad Micro$oft didn't go ahead and axe VB during the .NET launch. Forcing everyone to use C# would have weeded out the stoopid ones.

    The unfortunate reality is, there are just as many "stupid" people developing in C#. And I can tell you programming language of choice does not confer programming skills. First hand experience. Absolutely none.

  • (cs) in reply to kanna
    kanna:
    GSquared:
    I just can't imagine what it must be like to be confused by sentences like, "is the car red?" (evaluation) and "the car is red" (assignment).

    Actually, to keep it related to programming, those two phrases are syntactically different. So, you're actually not showing an example of the same syntax being used in both cases.

    Well, then 'x = 5' by itself and 'if x = 5' are syntactically different too.

    They got most of the syntax style from Java (take a look at the blogs for the developers involved with creating C#)

    Where do you think Java got most of its syntax?

    Sure, there are a number of things that Java does that C++ doesn't, but there are also a lot of things that C# does that C++ also does but Java doesn't or didn't.

    JW:
    As far as I know, even C++ doesn't have path parsing except through Boost::path.

    Just for interest's sake, I believe C++0x (or 1x, whatever) is slated to include a filename library.

  • (cs) in reply to themagni
    themagni:
    Not at all. Your programming language doesn't mean a thing in terms of your programming ability. Some people say it's a tool. You don't see carpenters talking about whether a hammer is a better tool than a saw. (I think it's more like choosing a wood, but that's just going to lead to comments about balsa wood or MDF.)

    MDF SUCKS!

    (Sorry)

  • (cs) in reply to iw
    iw:
    See, he's just a curious hacker! He likes to take strings apart and see if he can put them back together again. That way he can learn how strings work! Plus strings are always sturdier if you disassemble and rebuild them.

    Thankfully someone in the comments today had a sense of humor.

    When some of you one-language-to-rule-them-all elitists build a skyscraper with only a screwdriver and a hammer then please do a write-up on it so that we may all avoid that type of gross ignorance in the future by laughing in disbelief at it on the building science version of this website.

    Personally, I'm a fan of C# style syntax, with Java, and C++ behind them (citing some diffs b/w itself and C#). Then LISP is somewhere off in left field, slightly behind Python. ADA, Pascal, and Fortran are hanging around but they don't socialize with the others too much. Then there's SQL who only plays well with large groups of people.

    Syntax is a personal choice generally, but the ease of using a language to perform a certain task varies. You use the tools that are best for the job whenever you can, when you can't you hack the tools you've got together until they perform the task.

    Maybe it's an English thing, but just because one only uses a single language and can never see the need to learn another doesn't make the other useless ;o) . Nor does it mean you can't use parts of the other languages. Why use the annoyingly long and complex English versions of hara kiri, coup de grace, déjà vu, bris, and schmuck when the other language does just fine? Or in the toolbox metaphor, why use a 12oz hammer to tear down a skyscraper or a wrecking ball to take apart some legos (other than to say you did it)?

    Imagine writing a inventory management app in machine code or trying to write an embedded app in SQL (that'll be on here one day). Neither is going to work. Given you could use C for both, but why would you torture yourself with writing a db app in C? Maybe the better example is why would you write a db app in C++ when you have no need for the confusion of pointers and why would you write a 3D game in VB6 when you have no control over the low level tweaks? Or why would you write a MUD using VC++? What are you gaining from the Visual aspect? Etc etc.

    VB generally starts people on programming that didn't really mean to start programming and as thus tend to never get formal training in it. Why? Because they can do what they want to do to meet their demands, oblivious to how many better ways there were to do something.

    Not everyone has your specific knowledge. I'm pretty sure that everyone on this website has at least one thing that they know more about than anyone else. That's life. Just because someone doesn't do something to your standard or your way doesn't make them a moron.

    Maybe I'm wrong, but I don't see this website a platform to make fun of the people responsible for the content of the posts, but as a learning tool to show you what NOT to do. You can learn from it and maybe have a laugh at it or you can be a prick on your soapbox. Your choice. You were ignorant at some point and you still are on other topics.

    steps off his prick soapbox

  • (cs) in reply to jokeyxero
    jokeyxero:
    Thankfully someone in the comments today had a sense of humor.
    Amen!
  • (cs) in reply to MrBester
    MrBester:
    BASIC born 1963. Utilises the "Let" keyword so it's bleedin' obvious that "Let x = 1" is an assignment. Let later dropped because it was bleedin' obvious by way of context of statement what was going on to anyone that speaks English. C born 1972. Thinks all this statement context is a load of hooey and introduces new comparator. JavaScript born around 1995 (originally called LiveScript). Thinks that == just isn't enough in some instances and gets around having to do separate object equivalence checks with a new comparator of ===. Used when you REALLY need to ensure something is null or 0 (see Doug Crockford) or some object constructor is completely utterly and irrefutably Array...

    And this is called "progress"?

    http://www.defmacro.org/ramblings/equality.html.

    I don't agree completely with the author, but computer languages do need to be mathematically precise, unlike English. And yes, sometimes you really need to ensure that something is false, not just any value that happens to evaluate to false because you're using a weakly typed language. And don't tell me weak typing sucks, because most of the time I really don't care about the distinction between null and 0. But sometimes it's essential.

  • (cs) in reply to EvanED
    EvanED:
    themagni:
    Not at all. Your programming language doesn't mean a thing in terms of your programming ability. Some people say it's a tool. You don't see carpenters talking about whether a hammer is a better tool than a saw. (I think it's more like choosing a wood, but that's just going to lead to comments about balsa wood or MDF.)

    MDF SUCKS!

    (Sorry)

    What is MDF, please ?

  • (cs)

    I didn't read all comments (I'm in a bit of a hurry), but this looks definitely like VB.net. Not my kind of language, but I try to give an example how I would've solved this... splitting problem (sorry, I'm not familiar with the correct syntax):

      Dim fileData As new FileInfo(myDialog1.FileName)
      Dim filePath As String = fileData.DirectoryName
      fileName = fileData.Name
    A short look in the framework reference should've opened his eyes. But maybe I ask for too much...
  • JamesIJ (unregistered) in reply to cklam

    MDF = Medium Density Fiberboard

  • Sven (unregistered) in reply to Dr Nightmare
    Dr Nightmare:
    What's that "dim" in the code mean? What do they want to dim? Is it because the language designers weren't very bright?
    Back in the early days of BASIC, you didn't actually need to declare variables. You just used them, and you indicated their type with a suffix (so just A or A! was a float, A% was an int, A$ was a string, etc.)

    The only exception was that for arrays you did need to declare their size, for that you needed the DIM keyword (which as someone already mentioned is short for "dimension", since you're declaring the dimensions of an array), e.g. "DIM A(5)"

    Dim was later adapted to be used for declarations as well.

    As for using = for both comparison and assignment, at least it prevents the accidental assignment in if statements bug.

    It can at times be a bit confusing though, e.g. "x = y = 5" is not a chained assignment like in C; instead you're comparing y to 5 and assigning the result of the comparison (true or false) to x.

    The main reason why I still prefer VB over C# for some things even today is the WithEvents/Handles syntax. It drastically simplifies some aspects of Windows Forms and (especially) ASP.NET programming, even more so if you're not using a designer.

  • (cs)

    While we are comparing C++ with Java, the fact that C++ doesn't have a feature as part of its standard library does not mean that it cannot be done in C++. There are many good open-source libraries to do these things, of which boost is perhaps the best known for low-level stuff.

    The one biggest issue that makes Java easier to work with is integrating in 3rd party libraries - in Java you need only one build (a .jar file) while in C++ you need the correct build for your platform and chosen compiler. If C++ had a standard runtime library and name-mangling it would make shared-object libraries / DLLs far more portable. Ok, you couldn't port a shared-object between Solaris and Linux but you would only need one build for each platform. Even then Java would have its advantage as long as you have a VM.

    Java addresses the one issue that seems to baffle most in C++ - memory handling - and C# also does.

    However with C++ you do have the option of using boost (or Loki or even your own) smart-pointers and one should use the standard vector class instead of arrays, and string instead of arrays of char so really memory leaking is never an issue in my C++ apps, plus with automatic destructors it is easier to ensure exception safety with regards to mutex locks, file handles etc so with proper use of RAII, C++ is actually a more powerful and deterministic language as far as releasing resources is concerned.

    In Java you have to put lots of try..finally statements around, plus if resources are allocated in the middle, you might need to do null pointer testing (and yes they are pointers, otherwise why are they called nullPointer exceptions?).

    I've heard people say that Java enforces OO but from my experience of seeing people's Java code it is just not the case. Ok they have to put their method inside a class, but the class often has no feature other than to host the function, and I've seen such classes with one function of 800 or so lines of code.

    Unfortunately it will stay this way at least until the recruitment procedure (in this country at least) is based far more on programming ability rather than adding up numbers of years using particularly languages or tools and selling yourself due to that. I am concerned that there is still no professional organisation for software engineers based on general software engineering rather than one particular system (although one may specialise in that particular system). That is the real WTF in the industry.

  • Jake (unregistered) in reply to MrBester

    I can't wait for the ==== operator.

  • Nelle (unregistered) in reply to Earl Purple
    The one biggest issue that makes Java easier to work with is integrating in 3rd party libraries - in Java you need only one build (a .jar file) while in C++ you need the correct build for your platform and chosen compiler.

    Not really, there are native libraries for Java as well, that have to (at least) be built for particular platform ...

  • DeeMaGlee (unregistered) in reply to AbbydonKrafts
    AbbydonKrafts :
    Are you just trying to sound cool, or do you really believe that?

    The guy is just a troll and you're feeding him. He raised my ire with this dumb comment too though. Judging by his name (defcon5) he's probably some defense contractor programmer who is very good at what he does (programming in assembly), but the rest of us really enjoy having A LIFE while also getting the job done.

  • sol (unregistered) in reply to Joseph Newton
    Joseph Newton:
    danixdefcon5:
    Aaron:
    see.... I wish they would have made VB a little bit harder to learn, to keep away the stupid people. Or at least make it not a viable language to use for production-level programming!

    frist

    captcha: darwin -- if ONLY!!!

    Good developers write programs. Bad developers write nightmares. Stupid developers write in Visual Basic.

    Too bad Micro$oft didn't go ahead and axe VB during the .NET launch. Forcing everyone to use C# would have weeded out the stoopid ones.

    I don't mean to pick on you in particular, since there's a lot of this going around, but this is really silly. Get it straight:

    C# != C C == VB + C-style syntax

    I'll admit, I have not made much use of C#, but all it really takes is to look through the documentation for VS.Net.

    The sample programs all basically have parallel examples for VB and C#. The only discernable difference is in the syntax. The logic is exactly the same.

    So which end of the egg do we crack?

    Let me tell you. VB is an excuse for bad programming. I am a C# programmer who has been forced to go back to VB/VB.NET by his boss. The things I can do in C# the just flat out can not be done in VB.Net would blow your poor little VB mind.

    C# is a pure access to the framework VB.Net is a stupid access to it. The language may be non important but VB has to support all those old stupid flaws that VB has always had. You know why? So a VB programmer can use it.

    In C# I can attach events on the fly to runtime created objects in VB I have to write a huge I MEAN HUGE SELECT CASE to catch every event and say um is the an on the fly event..? Which do you think will run faster? Even better look at SELECT CASE and switch() every single thing in C# is faster to work with more clear and less of a WTF than VB. If you say I'm wrong you full of shit.

    On Error Resume Next

    70000000 levels of code depth later it's never had On Error Goto 0 set.. why doesn't it behave properly when I do my error handling??? Because you are a VB programmer.

    I programmed VB for 8 years and C# for 5. I think I know what I'm talking about. But, that doesn't mean you can understand it does it???

    And, I can write pointer code and access the stack directly in C# vb do that??? _unmanaged{} looks a bit like _asm{} go figure..

    the real WTF Managed C++ why the hell would I even want to try and hack my way through the insanity of __gc class{public: *System::Boolean WTF = true;} when I have C#..? oh you want to cleanly port Win32API to .net??? ha good luck let me know when you get CopyMemory to stop overwriting the source memory address that every object foo is instance from.....

    VB is for noobs and people who can't handle C# which are ya?

  • Craig (unregistered) in reply to sol
    sol:
    The things I can do in C# the just flat out can not be done in VB.Net
    I don't believe you. Please provide us with such C# code, the IL it generates, and a proof why you can't write VB code to generate the same IL.
  • the tony (unregistered) in reply to danixdefcon5

    language snob!!

  • Steve (unregistered)

    I remember a contract in New York in '79. Take over a program for logging credit card transactions to tape on an IBM Series/1.

    "The contractor who was working on it has moved on but it's almost working, look, you can see the tapes turning".

    Turns out she had just used the demonstration program from the manual on how to make the tapes turn. Not surprised she moved on... ;-)

  • prof_hobart (unregistered) in reply to Volmarias
    Volmarias:
    simply because of the byzantine and non-sensical methods of doing things. = for evaluation AND assignment? Argh!
    So a language where accidentally putting = rather than == reassigns your variable instead of testing it is far better?
  • (cs) in reply to prof_hobart

    Ah yes, the typical VB hate thread. Whoopee. I don't like VB (or VB.net), but the truth is that (a) WTFs can be written in any language, (b) VB.net is mostly equivalent to C# although (imo) uglier, and (c) the original code may well have been translated to VB.net for the WTF anyway.

  • sol (unregistered) in reply to Craig
    Craig:
    sol:
    The things I can do in C# the just flat out can not be done in VB.Net
    I don't believe you. Please provide us with such C# code, the IL it generates, and a proof why you can't write VB code to generate the same IL.
    public unsafe static void Main() {
    		int iData = 10;
    		int* pData = &iData;
    		Console.WriteLine("Data is " + iData);
    		Console.WriteLine("Address is " + (int)pData );
    	}
    

    note the word unsafe.

    Button clicky = new Button();
    clicky.onClick += new EventHandler(MyAsm.Common.RepeterEvents.Edit);
    clicky.onClick += new EventHandler(this.OpenPopup);
    clicky.onClick += new EventHandler(this.SayVBIsWEAK);
    

    note in vb I have to declare a control WithEvents or I have to catch and proccess events myself. Get your own IL I'm not here to teach you that you don't know what I mean. Also, note all 3 events will fire in C#. Maybe you can show me how to do it in VB? Please, please do, I would be grateful.

    CAPTCHA: onomatopoeia WTF WHY

  • Jonno (unregistered) in reply to sol

    Having never used VB.NET in my life, a quick Google found "AddHandler" and "RemoveHandler"; it seems that the second part of your code can be achieved in VB.NET with

    Dim clicky As New Button
    AddHandler clicky.Click, AddressOf MyAsm.Common.RepeaterEvents.Edit
    AddHandler clicky.Click, AddressOf Me.OpenPopup
    AddHandler clicky.Click, AddressOf SayVBIsWEAK
    

    :)

  • barf indeedy (unregistered) in reply to KG2V
    KG2V:
    I look around, and some of the worst code I see is OLD 16bit VB code, that has been ported, and ported, and used - often being maintained by good coders which are trying to keep the big ball of mud working - refactoring as they get time

    ;_; wahhhhhhhhhhhhhhhhhhhhhhh

    Please don't make me lose my sanity by bringing up the recent past of nightmarish vb3 legacy code I've had to work on.. I'm going to go cry in a corner now.

  • sol (unregistered) in reply to Jonno
    Jonno:
    Having never used VB.NET in my life, a quick Google found "AddHandler" and "RemoveHandler"; it seems that the second part of your code can be achieved in VB.NET with
    Dim clicky As New Button
    AddHandler clicky.Click, AddressOf MyAsm.Common.RepeaterEvents.Edit
    AddHandler clicky.Click, AddressOf Me.OpenPopup
    AddHandler clicky.Click, AddressOf SayVBIsWEAK
    
    :)

    thanks, I needed that hell ton of extra vb typing last week

  • sol (unregistered)

    So not only can VB make VB programmers do stupid things it can make ill informmed C# programmers do things... I rest my case.

  • Terminator (unregistered) in reply to sol

    I used to work with someone like sol - an angry fat single GAY man with no friends - very smart, but a total VB Basher as well.

    I use C, C++, C#, VB.NET, and JAVA, and frankly, I dont give a crap which language I use. Its the end result that counts - getting the job done for the client in the most efficient way.

    sol:
    Joseph Newton:
    danixdefcon5:
    Aaron:
    see.... I wish they would have made VB a little bit harder to learn, to keep away the stupid people. Or at least make it not a viable language to use for production-level programming!

    frist

    captcha: darwin -- if ONLY!!!

    Good developers write programs. Bad developers write nightmares. Stupid developers write in Visual Basic.

    Too bad Micro$oft didn't go ahead and axe VB during the .NET launch. Forcing everyone to use C# would have weeded out the stoopid ones.

    I don't mean to pick on you in particular, since there's a lot of this going around, but this is really silly. Get it straight:

    C# != C C == VB + C-style syntax

    I'll admit, I have not made much use of C#, but all it really takes is to look through the documentation for VS.Net.

    The sample programs all basically have parallel examples for VB and C#. The only discernable difference is in the syntax. The logic is exactly the same.

    So which end of the egg do we crack?

    Let me tell you. VB is an excuse for bad programming. I am a C# programmer who has been forced to go back to VB/VB.NET by his boss. The things I can do in C# the just flat out can not be done in VB.Net would blow your poor little VB mind.

    C# is a pure access to the framework VB.Net is a stupid access to it. The language may be non important but VB has to support all those old stupid flaws that VB has always had. You know why? So a VB programmer can use it.

    In C# I can attach events on the fly to runtime created objects in VB I have to write a huge I MEAN HUGE SELECT CASE to catch every event and say um is the an on the fly event..? Which do you think will run faster? Even better look at SELECT CASE and switch() every single thing in C# is faster to work with more clear and less of a WTF than VB. If you say I'm wrong you full of shit.

    On Error Resume Next

    70000000 levels of code depth later it's never had On Error Goto 0 set.. why doesn't it behave properly when I do my error handling??? Because you are a VB programmer.

    I programmed VB for 8 years and C# for 5. I think I know what I'm talking about. But, that doesn't mean you can understand it does it???

    And, I can write pointer code and access the stack directly in C# vb do that??? _unmanaged{} looks a bit like _asm{} go figure..

    the real WTF Managed C++ why the hell would I even want to try and hack my way through the insanity of __gc class{public: *System::Boolean WTF = true;} when I have C#..? oh you want to cleanly port Win32API to .net??? ha good luck let me know when you get CopyMemory to stop overwriting the source memory address that every object foo is instance from.....

    VB is for noobs and people who can't handle C# which are ya?

  • sol (unregistered) in reply to Terminator

    Hey I resent being called fat... I'm only 3 tons...

    Terminator:
    I used to work with someone like sol - an angry fat single GAY man with no friends - very smart, but a total VB Basher as well.

    I use C, C++, C#, VB.NET, and JAVA, and frankly, I dont give a crap which language I use. Its the end result that counts - getting the job done for the client in the most efficient way.

    sol:
    Joseph Newton:
    danixdefcon5:
    Aaron:
    see.... I wish they would have made VB a little bit harder to learn, to keep away the stupid people. Or at least make it not a viable language to use for production-level programming!

    frist

    captcha: darwin -- if ONLY!!!

    Good developers write programs. Bad developers write nightmares. Stupid developers write in Visual Basic.

    Too bad Micro$oft didn't go ahead and axe VB during the .NET launch. Forcing everyone to use C# would have weeded out the stoopid ones.

    I don't mean to pick on you in particular, since there's a lot of this going around, but this is really silly. Get it straight:

    C# != C C == VB + C-style syntax

    I'll admit, I have not made much use of C#, but all it really takes is to look through the documentation for VS.Net.

    The sample programs all basically have parallel examples for VB and C#. The only discernable difference is in the syntax. The logic is exactly the same.

    So which end of the egg do we crack?

    Let me tell you. VB is an excuse for bad programming. I am a C# programmer who has been forced to go back to VB/VB.NET by his boss. The things I can do in C# the just flat out can not be done in VB.Net would blow your poor little VB mind.

    C# is a pure access to the framework VB.Net is a stupid access to it. The language may be non important but VB has to support all those old stupid flaws that VB has always had. You know why? So a VB programmer can use it.

    In C# I can attach events on the fly to runtime created objects in VB I have to write a huge I MEAN HUGE SELECT CASE to catch every event and say um is the an on the fly event..? Which do you think will run faster? Even better look at SELECT CASE and switch() every single thing in C# is faster to work with more clear and less of a WTF than VB. If you say I'm wrong you full of shit.

    On Error Resume Next

    70000000 levels of code depth later it's never had On Error Goto 0 set.. why doesn't it behave properly when I do my error handling??? Because you are a VB programmer.

    I programmed VB for 8 years and C# for 5. I think I know what I'm talking about. But, that doesn't mean you can understand it does it???

    And, I can write pointer code and access the stack directly in C# vb do that??? _unmanaged{} looks a bit like _asm{} go figure..

    the real WTF Managed C++ why the hell would I even want to try and hack my way through the insanity of __gc class{public: *System::Boolean WTF = true;} when I have C#..? oh you want to cleanly port Win32API to .net??? ha good luck let me know when you get CopyMemory to stop overwriting the source memory address that every object foo is instance from.....

    VB is for noobs and people who can't handle C# which are ya?

Leave a comment on “Putting It All Together”

Log In or post as a guest

Replying to comment #:

« Return to Article