If people only talked about what they knew, they wouldn't talk very much. Slashdot is mostly a forum for people who enjoy debating ideologies, or more accurately, stating their dogma and being affirmed by others without actually going to the trouble of backing up their arguments with facts.
As a Win32 developer, one of my pet peeves is the way the CreateWindow() call works. Client code calls CreateWindow(), and then, *BEFORE THAT CALL RETURNS* your window message function gets a few messages initially. It makes it very difficult to set up an effective wrapper around the API using C++. It is possible, but you have to use assembly language to sneak the instance pointer in. Obviously, they have some reason for blocking CreateWindow() until the message procedure sets up, but it does make life more difficult. (Perhaps the newly created window has a chance to stop the creation process?) These are relics of a procedural architecture, and it shows.
Other annoyances: not all operating system handles can be closed through CloseHandle(), such as directory enumeration handles. Naming conventions vary quite a bit - you can almost tell if an API is old or not by whether it uses Hungarian notation.
MSDN does an excellent job of pointing out these nuances, however. I can usually find what I need within the remarks section.
While we're bitching about APIs, would someone point me to a good API similar to.NET? I've used Java a bit and didn't find it nearly as intuitive as.NET. The inexpressiveness of the language ends up making life tedious (such as no support for delegates). Naming inconsistencies abound, such as.size() being used on some containers instead of.getSize(). Python, for all intents and purposes, can do a whole freakin lot but the API is one of the messiest I have ever seen.
Do you consider the Linux kernel the paragon of readability?
C's built-in types are a trainwreck. If you want to open a file, you can use a FILE structure, but then if you want to work with dates, typically there is a time_t involved there. Oh, and if you want to declare a character, use a char. If you want a wider one, use wchar_t. This makes sense how? There is no consistency here! Functions suck in the same way, but less so (strcpy vs. atoi - both deal with null strings, but they certainly don't start out the same way!) C's insistence on tight function names does not aid memory, either.
Naming conventions matter a whole lot when it comes to readability. It is 2005. Making your function names longer than 5 characters is not the end of the world!
Unfortunately, C++ saw fit to continue this idiotic trend. If you want to use a stringstream, you include a header called 'sstream' but then use std::stringstream. But if you want to open a file stream, you include 'fstream' and use std::fstream. A resizable array is not called an array, but rather a vector. A map does not contain keys and values, but rather a pair.
By now I'm sure I've blasphemed against the holy C family of languages enough. All I'm asking for is clear, expressive, predictable naming conventions.
What most people call "ten years experience" is more akin to "ten years knowing the syntax." Writing clear, idiomatic code that scales gracefully is another matter entirely.
Please don't tell me you are turning one person's string of poor choices and lack of restraint into some sort of 'medical' disorder. Doing so absolves the person of responsibility for their own actions.
Show me a psychological journal or other primary source that backs up your findings.
Asking the vague Linux community to match the donation of an extremely wealthy individual is completely asinine. Of course, I see why this article was approved, because it generates more plenty of controversy with its summary line.
Since when were corporations founded to be your friend?
They weren't. They exist to make money for their shareholders. They are *not* people. Stop trying to ascribe personality traits to them! Eventually, when it comes down to the bottom line or being 'cool' in the fickle eyes of geeks, they'll favor the bottom line.
I don't see why you believe that companies exist for any reason OTHER than to make money.
When I write libraries, I try to make them header-only. Generally users don't want to have to modify their makefiles if they don't have to, and I'll resort to compiler specific pragmas if I have to.
It depends on the size of the system. If you are using a component-based system then only the pieces of the system that are actually being modified should be compiling anyway, which cuts out a lot of compilation. However this implies there is fairly loose coupling involved. In a more conventional application, there has to be a breaking point where the amount of time to parse files is longer than the time to link them normally. Using precompiled headers on any system header will also drastically decrease the time it takes to compile, since the compiler essentially just dumps the parse tree out to disk. So much time is spent inside some system headers! (Especially Windows.h. Ugh!)
There are some tools that keep the header files in sync with source files automatically, but I don't know of any off-hand. I have seen some for C, but I'm not sure there is one for C++ that supports all the wild and crazy stuff like namespaces and templates.:)
Hee hee, this will be a great discussion! Our favorite operating system would have never done this! Even if it did, it would be a hardware glitch, and not the actual fault of the OS. Microsoft doesn't have that luxury, however, because they made lots of money and weren't always nice! I'm so bitter about them I write "M$" as an abbreviation, isn't it clever?!
discreet:
1. Marked by, exercising, or showing prudence and wise self-restraint in speech and behavior; circumspect.
2. Free from ostentation or pretension; modest. vs. discrete
1. Constituting a separate thing.
2. Consisting of unconnected distinct parts.
3. Mathematics. Defined for a finite or countable set of values; not continuous.
If people only talked about what they knew, they wouldn't talk very much. Slashdot is mostly a forum for people who enjoy debating ideologies, or more accurately, stating their dogma and being affirmed by others without actually going to the trouble of backing up their arguments with facts.
As a Win32 developer, one of my pet peeves is the way the CreateWindow() call works. Client code calls CreateWindow(), and then, *BEFORE THAT CALL RETURNS* your window message function gets a few messages initially. It makes it very difficult to set up an effective wrapper around the API using C++. It is possible, but you have to use assembly language to sneak the instance pointer in. Obviously, they have some reason for blocking CreateWindow() until the message procedure sets up, but it does make life more difficult. (Perhaps the newly created window has a chance to stop the creation process?) These are relics of a procedural architecture, and it shows.
Other annoyances: not all operating system handles can be closed through CloseHandle(), such as directory enumeration handles. Naming conventions vary quite a bit - you can almost tell if an API is old or not by whether it uses Hungarian notation.
MSDN does an excellent job of pointing out these nuances, however. I can usually find what I need within the remarks section.
While we're bitching about APIs, would someone point me to a good API similar to .NET? I've used Java a bit and didn't find it nearly as intuitive as .NET. The inexpressiveness of the language ends up making life tedious (such as no support for delegates). Naming inconsistencies abound, such as .size() being used on some containers instead of .getSize(). Python, for all intents and purposes, can do a whole freakin lot but the API is one of the messiest I have ever seen.
Do you consider the Linux kernel the paragon of readability?
C's built-in types are a trainwreck. If you want to open a file, you can use a FILE structure, but then if you want to work with dates, typically there is a time_t involved there. Oh, and if you want to declare a character, use a char. If you want a wider one, use wchar_t. This makes sense how? There is no consistency here! Functions suck in the same way, but less so (strcpy vs. atoi - both deal with null strings, but they certainly don't start out the same way!) C's insistence on tight function names does not aid memory, either.
Naming conventions matter a whole lot when it comes to readability. It is 2005. Making your function names longer than 5 characters is not the end of the world!
Unfortunately, C++ saw fit to continue this idiotic trend. If you want to use a stringstream, you include a header called 'sstream' but then use std::stringstream. But if you want to open a file stream, you include 'fstream' and use std::fstream. A resizable array is not called an array, but rather a vector. A map does not contain keys and values, but rather a pair.
By now I'm sure I've blasphemed against the holy C family of languages enough. All I'm asking for is clear, expressive, predictable naming conventions.
What most people call "ten years experience" is more akin to "ten years knowing the syntax." Writing clear, idiomatic code that scales gracefully is another matter entirely.
This is slated for C# 2.0.
Please don't tell me you are turning one person's string of poor choices and lack of restraint into some sort of 'medical' disorder. Doing so absolves the person of responsibility for their own actions.
Show me a psychological journal or other primary source that backs up your findings.
Hey, it beats having GUIs that look like ass and are sluggish (Swing).
Asking the vague Linux community to match the donation of an extremely wealthy individual is completely asinine. Of course, I see why this article was approved, because it generates more plenty of controversy with its summary line.
Good call! Maybe someone will read this and realize there is more to this world than open source software.
Since when were corporations founded to be your friend?
They weren't. They exist to make money for their shareholders. They are *not* people. Stop trying to ascribe personality traits to them! Eventually, when it comes down to the bottom line or being 'cool' in the fickle eyes of geeks, they'll favor the bottom line.
I don't see why you believe that companies exist for any reason OTHER than to make money.
That is asking an awful lot of the Slashdot readership, however.
When I write libraries, I try to make them header-only. Generally users don't want to have to modify their makefiles if they don't have to, and I'll resort to compiler specific pragmas if I have to.
:)
It depends on the size of the system. If you are using a component-based system then only the pieces of the system that are actually being modified should be compiling anyway, which cuts out a lot of compilation. However this implies there is fairly loose coupling involved. In a more conventional application, there has to be a breaking point where the amount of time to parse files is longer than the time to link them normally. Using precompiled headers on any system header will also drastically decrease the time it takes to compile, since the compiler essentially just dumps the parse tree out to disk. So much time is spent inside some system headers! (Especially Windows.h. Ugh!)
There are some tools that keep the header files in sync with source files automatically, but I don't know of any off-hand. I have seen some for C, but I'm not sure there is one for C++ that supports all the wild and crazy stuff like namespaces and templates.
"(Living Under A) Bridge Over Troubled Waters: The Life of a Troll" :)
Burn the AC, he's using logic!
Unless you're Microsoft, of course.
I never specified *which* operating system is our favorite, of course. :)
It's a story because we can all talk about how our favorite operating system could handle infinite load as if we had any experience in the matter!
I doubt it will ever load in less than 5 seconds since they insist on using crappy abstractions like XUL.
At least half of Slashdot's stories consist of preaching to the choir what they want to hear.
Hee hee, this will be a great discussion! Our favorite operating system would have never done this! Even if it did, it would be a hardware glitch, and not the actual fault of the OS. Microsoft doesn't have that luxury, however, because they made lots of money and weren't always nice! I'm so bitter about them I write "M$" as an abbreviation, isn't it clever?!
You can also code up enough abstractions to protect you from ever hosing up memory unintentionally in C++.
Weak. They should know better than that. It's not like it is hard to prevent a buffer overflow. They're using C++ for crying out loud.
The fact that this comment is marked Overrated just makes it even funnier, because that means it is true.
Free MMO? Yay!
.NET! Do we like .NET?! I can't remember what I'm supposed to think!! And the cognitive dissonance is getting to me!!
Oh wait, it's written in
At least they didn't confuse "loose" and "lose."
discreet:
1. Marked by, exercising, or showing prudence and wise self-restraint in speech and behavior; circumspect.
2. Free from ostentation or pretension; modest.
vs.
discrete
1. Constituting a separate thing.
2. Consisting of unconnected distinct parts.
3. Mathematics. Defined for a finite or countable set of values; not continuous.