- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
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
Admin
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.
Admin
.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.
Admin
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...
Admin
There is a vast diffrence between logical equals, boolean equals, and assignment equals.
Admin
If you're going to insult something, at least type it correctly. Perhaps you meant the following:
C# != C++ C# = VB & C++ style syntax
Admin
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.
Admin
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.
Admin
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.
Admin
didn't you read his comments?
YES! It does make you stupid ... ya dummy.
Admin
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.
Admin
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.
Admin
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).
Admin
Admin
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#)
Admin
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.
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!>
Admin
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.
Admin
So you're:
And concluding that C++ is a superior language....
Admin
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.
Admin
character with 2 lines = day, same character with 3 lines = devil... your example proves VB's crappiness ;-)
Admin
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.
Admin
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.
Admin
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.
Admin
Admin
Well, then 'x = 5' by itself and 'if x = 5' are syntactically different too.
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.
Just for interest's sake, I believe C++0x (or 1x, whatever) is slated to include a filename library.
Admin
MDF SUCKS!
(Sorry)
Admin
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
Admin
Admin
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.
Admin
What is MDF, please ?
Admin
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):
A short look in the framework reference should've opened his eyes. But maybe I ask for too much...Admin
MDF = Medium Density Fiberboard
Admin
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.
Admin
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.
Admin
I can't wait for the ==== operator.
Admin
Not really, there are native libraries for Java as well, that have to (at least) be built for particular platform ...
Admin
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.
Admin
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?
Admin
Admin
language snob!!
Admin
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... ;-)
Admin
Admin
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.
Admin
note the word unsafe.
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
Admin
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
:)
Admin
;_; 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.
Admin
thanks, I needed that hell ton of extra vb typing last week
Admin
So not only can VB make VB programmers do stupid things it can make ill informmed C# programmers do things... I rest my case.
Admin
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.
Admin
Hey I resent being called fat... I'm only 3 tons...