Couldn't you just compile it with -fno-exceptions to not have exceptions in C++?
You could, but it wouldn't work. For example, std::string throws an exception when you pass it a null pointer. If you simply set -fno-exceptions, it would happily ignore the throw statement, and try to copy data from the null pointer to its own buffer (Segmentation Fault). If you can't throw exceptions, it affects the software interfaces—you need to error codes or a global error state such as errno.
I also don't really understand why Google wouldn't allow exceptions at all because exceptions are pretty useful
They want their code to be universally applicable. Since some projects can't use exceptions (hard realtime, embedded environments, etc.), that means they simply put a blanket rule disallowing exceptions. If you do any C++ development, I would recommend taking a look at their C++ style guidelines. I don't agree with everything in there, but it's a very good read. Another decent read (much longer and more boring, but still full of insight) is the Joint Strike-Fighter C++ guidelines (PDF).
I write my own implementation of the c standard library and the C++ standard library too, because I find they are not efficient enough and I find using the standard libraries bite me in the ass too
You're moderated as Funny, but I can't tell if that was actually your intent or not. On a lot of embedded systems, a custom version of libc is used to "trim the fat" or to add system-specific optimizations.
There are also those who fork the C++ library (or reimplement their own) because they're working in an environment that forsakes exceptions. Both the Google and Joint-Strike Fighter coding standards forbid exceptions in C++, which means libstdc++ as designed is a non-option.
Performance-wise, it's not actually that hard to beat a general-purpose libc or libstdc++, due to their extreme flexibility/generality. In some environments, it might actually be justified.
Source code is not something humans can read, except for the small number of (exceptional) humans who are trained and have basic skills with the programming language code is written in.
The same could be said for any technical field. The fact that 99% of the general population doesn't understand it has absolutely no bearing on this discussion. We're talking about the subset of people who can read and interpret source code.
If 'code' were meant for humans to read, the choice of language would have to be very different.
Do you put newlines in your code? Compilers don't need that. But I'm pretty sure it's a "swift kick to the head"-punishable offense to write your code without newlines in any organization.
Or, you could look at any number of programming languages designed with the human in mind. Python enforces scoping by whitespace. Perl has until and unless conditional constructs that are functionally identical to while and if. Whether or not you think they were successful, both of these are examples of programming language syntax catering to developers and not tools.
Source code is meant for compiler consumption. It's also meant for human consumption. It doesn't have to be either/or, it can be both.
Check out cyclomatic complexity. It basically measures the number of different execution paths you can go through in a given function. It's not quite what you're looking at, but it's close. It's also closely related to the nesting depth of conditionals/loops, which is a good way to eyeball conceptual "size".
Yeah, I shouldn't have called you a moron... sorry for that, but I also don't think that you had to say "Fuck your attitude", that was a bit rude too.
Fair enough... sorry for fucking your attitude d^:
How much would cost the port? Since it's already OpenGL and all that?
Pulling Starcraft.exe on my linux box and checking it out, here's some system-specific code that I can see...
Windows mutex code (CriticalSection)
Windows structured exception handling (to get the equivalent in a POSIX environment, you'd need to fork the process and have the parent just sit and wait for the process to die, then try to figure out why it died... you can't catch SIGSEGV on Linux)
Windows time functions
Windows filesystem functions
Windows accelerator keys
"PKWARE Data Compression Library for Win32" (not sure what that is)
some stack dump code (printf formats for EAX/EBX/ECX/EDS/ESI/EDI)
GLU and GLUE libraries (different than OpenGL itself... I'm not sure what licenses are in use)
TCP, UDP, IPX, modem networking (remember... UDP wasn't originally supported)
Windows GDI functions (looks like bitmaps only)
DirectDraw
Thread-local storage
...I'm tired of looking.
Anyways, that's a nontrivial amount of code to port, and remember the age of the codebase. Now that the Linux Standard Base has gained a fair amount of traction, it's more likely for them to consider, but there are still enough subtle differences between different Linux distros that they have a tremendous amount of testing effort in order to maintain their current level of quality (notice that almost all of their patches have to do with in-game quality and balance, rather than software quality-control issues). They could switch to using another cross-platform library, but that ends up taking control away from them, and I certainly wouldn't blame them for avoiding e.g. the C++ STL and BOOST. In some sense, it's similar to Apple—if they don't keep the platform under their control, they risk losing their rather strong reputation when weird platform issues arise.
Point is, yeah, that's either a lot of testing effort, or a lot of coding effort, or both, in order to support more platforms. Staying with Win32/MacOS keeps their set of possible platform-portability problems (say that 3 times fast) small. Most Linux users won't be happy if they come out and say "We run on Linux, but only Red Hat Enterprise 4 and SuSE 10", but the reality is that supporting Debian/Ubuntu/Mandrake/Redhat/SuSE/Gentoo/Slackware/Busybox/robotic-squirrels is still a much wider variety of platforms, even if they're all "Linux".
Game companies usually say "We want to see Linux gamers before creating any games for this platform", but how they expect to see Linux gamers if they never create the games for this platform in the first place?
If you can combine the VC funds and an aspiring game company, you could push that yourself. If you're right, you'll be rich, fast. As others have noted, Id software has historically done the "right thing" and built their software cross-platform. While it's given them a lot of goodwill, it doesn't look like it's financially sustainable. Or they wouldn't be tentatively pulling out.
Will a Linux version of Blizzard games draw enough demand to satisfy the added cost for them? That's not as obvious as you suggest, and calling me a moron doesn't make it so.
Show them that the market exists. I don't think it does. You know, Blizzard is one of the few video game companies that is still producing quality work. Fuck your attitude, I say.
If they can't use the evidence is court, they sure as heck shouldn't be able to use it as evidence to get a warrant. Hopefully, this guy gets off scott-free on this charge, to send a wake-up call to the officials maintaining these shoddy databases.
That's fine... it sounds like the officer on the ground behaved correctly according to the information available at hand. However, it was later discovered that the information previously at hand was incorrect. That should nullify the previous search and any evidence gathered therein.
The officer on the ground certainly shouldn't be punished—the court shouldn't be rewarded for a lucky clerical errer, either.
You don't need to be an economist, you just have to look at the visible effect of the most recent short-sale ban. The result for all of the instruments that couldn't be short-sold? Many players pulled out because the inability to sell short would have put them at too much risk. The markets thinned out, and the difference between the best bid and the best offer widened up because the few remaining players were on high guard. The result for average investors? Basically, higher transaction costs, since you have to buy high and sell low.
There's definitely a problem when someone bombs a slow market with short sales. For example, selling more stock than actually exists, with no intent to ever deliver said stock. That sort of behavior can destroy a company's public value and thus creditworthiness... eventually destroying the company. But that's already illegal to do, it's just a matter of enforcement.
GET requests shouldn't change anything on the server
That's not entirely accurate. GET requests should be idemponent, meaning that one request has the same effect as N identical requests. That actually has nothing to do with the server's own state, which may be caching internally or is otherwise able to handle resubmission gracefully.
In any case, GET vs POST isn't a security concern—both are equally succeptible to exploits.
Here's a little table of adult heights around the world. It's pretty easy to measure height. But as to measuring intelligence or problem-solving skills? I know of no such test. I've seen some experiments where other attributes were measured, giving some more specific differences. The results were something like this:
Men are better at spatial awareness (depth perception and local navigation
Women are better at attention to detail (identifying objects in a scene a la Kim's Game and correctly interpreting mood from facial expressions
Sorry, I don't have a source for that... it was on Discovery Channel years ago. In any case, it's silly to try to measure something as vague as "problem-solving ability"; it's equally silly to assume that men and women are identical on the inside. The middle ground keeps moving as social research continues.
It's quite reasonable from a pure-logic point of view for the GP to say both "men are better problem solvers" and "women who are good problem solvers exist" without contradicting himself. The truthiness (or not) of his statement is essentially independent from any sort of test that you could take.
Consider this analogy: Men are taller than women. This is true, on average. However, the average does not apply to a special case: it takes about 2 seconds on a busy street to find a tall woman or a short man (both of whom deviate from the average).
Many systems have moving parts that are very difficult (if not impossible) to handle from a unit-testing perspective. This is particularly true for distributed systems or even multithreaded applications, where you need execution coverage, data coverage, and all combinations of all possible race conditions.
Unit testing can give you a lot of confidence for individual isolated software components, but it was never intended to address the "system as a whole".
That grading scale only works if the material is hard enough to actually challenge most of the students. A lot of high school material is so mind-numbingly easy that many students cluster around identical scores, and attempting to normalize that will distort scores negatively and still be a useless metric.
Sorry to burst your bubble, but for most interactive tasks, a snappy response is more important than pure performance.
You just made my day! I've looked for that commmand for years! All this time, I've been using
You could, but it wouldn't work. For example, std::string throws an exception when you pass it a null pointer. If you simply set -fno-exceptions, it would happily ignore the throw statement, and try to copy data from the null pointer to its own buffer (Segmentation Fault). If you can't throw exceptions, it affects the software interfaces—you need to error codes or a global error state such as errno.
They want their code to be universally applicable. Since some projects can't use exceptions (hard realtime, embedded environments, etc.), that means they simply put a blanket rule disallowing exceptions. If you do any C++ development, I would recommend taking a look at their C++ style guidelines. I don't agree with everything in there, but it's a very good read. Another decent read (much longer and more boring, but still full of insight) is the Joint Strike-Fighter C++ guidelines (PDF).
That's absolutely incorrect. There are a number of reasons why someone would want to avoid using the STL string as-provided:
These reasons may not apply to 99% of the programming community... but for the last 1%, this is critical.
You're moderated as Funny, but I can't tell if that was actually your intent or not. On a lot of embedded systems, a custom version of libc is used to "trim the fat" or to add system-specific optimizations.
There are also those who fork the C++ library (or reimplement their own) because they're working in an environment that forsakes exceptions. Both the Google and Joint-Strike Fighter coding standards forbid exceptions in C++, which means libstdc++ as designed is a non-option.
Performance-wise, it's not actually that hard to beat a general-purpose libc or libstdc++, due to their extreme flexibility/generality. In some environments, it might actually be justified.
The same could be said for any technical field. The fact that 99% of the general population doesn't understand it has absolutely no bearing on this discussion. We're talking about the subset of people who can read and interpret source code.
Do you put newlines in your code? Compilers don't need that. But I'm pretty sure it's a "swift kick to the head"-punishable offense to write your code without newlines in any organization.
Or, you could look at any number of programming languages designed with the human in mind. Python enforces scoping by whitespace. Perl has until and unless conditional constructs that are functionally identical to while and if. Whether or not you think they were successful, both of these are examples of programming language syntax catering to developers and not tools.
Source code is meant for compiler consumption. It's also meant for human consumption. It doesn't have to be either/or, it can be both.
All of the generations of maintenance programmers following in your wake of write-only source code appreciate this attitude, I'm sure.
Check out cyclomatic complexity. It basically measures the number of different execution paths you can go through in a given function. It's not quite what you're looking at, but it's close. It's also closely related to the nesting depth of conditionals/loops, which is a good way to eyeball conceptual "size".
I believe the word you're looking for is "statements."
Fair enough... sorry for fucking your attitude d^:
Pulling Starcraft.exe on my linux box and checking it out, here's some system-specific code that I can see...
Anyways, that's a nontrivial amount of code to port, and remember the age of the codebase. Now that the Linux Standard Base has gained a fair amount of traction, it's more likely for them to consider, but there are still enough subtle differences between different Linux distros that they have a tremendous amount of testing effort in order to maintain their current level of quality (notice that almost all of their patches have to do with in-game quality and balance, rather than software quality-control issues). They could switch to using another cross-platform library, but that ends up taking control away from them, and I certainly wouldn't blame them for avoiding e.g. the C++ STL and BOOST. In some sense, it's similar to Apple—if they don't keep the platform under their control, they risk losing their rather strong reputation when weird platform issues arise.
Point is, yeah, that's either a lot of testing effort, or a lot of coding effort, or both, in order to support more platforms. Staying with Win32/MacOS keeps their set of possible platform-portability problems (say that 3 times fast) small. Most Linux users won't be happy if they come out and say "We run on Linux, but only Red Hat Enterprise 4 and SuSE 10", but the reality is that supporting Debian/Ubuntu/Mandrake/Redhat/SuSE/Gentoo/Slackware/Busybox/robotic-squirrels is still a much wider variety of platforms, even if they're all "Linux".
If you can combine the VC funds and an aspiring game company, you could push that yourself. If you're right, you'll be rich, fast. As others have noted, Id software has historically done the "right thing" and built their software cross-platform. While it's given them a lot of goodwill, it doesn't look like it's financially sustainable. Or they wouldn't be tentatively pulling out.
Will a Linux version of Blizzard games draw enough demand to satisfy the added cost for them? That's not as obvious as you suggest, and calling me a moron doesn't make it so.
Show them that the market exists. I don't think it does. You know, Blizzard is one of the few video game companies that is still producing quality work. Fuck your attitude, I say.
If they can't use the evidence is court, they sure as heck shouldn't be able to use it as evidence to get a warrant. Hopefully, this guy gets off scott-free on this charge, to send a wake-up call to the officials maintaining these shoddy databases.
That's fine... it sounds like the officer on the ground behaved correctly according to the information available at hand. However, it was later discovered that the information previously at hand was incorrect. That should nullify the previous search and any evidence gathered therein.
The officer on the ground certainly shouldn't be punished—the court shouldn't be rewarded for a lucky clerical errer, either.
You don't need to be an economist, you just have to look at the visible effect of the most recent short-sale ban. The result for all of the instruments that couldn't be short-sold? Many players pulled out because the inability to sell short would have put them at too much risk. The markets thinned out, and the difference between the best bid and the best offer widened up because the few remaining players were on high guard. The result for average investors? Basically, higher transaction costs, since you have to buy high and sell low.
There's definitely a problem when someone bombs a slow market with short sales. For example, selling more stock than actually exists, with no intent to ever deliver said stock. That sort of behavior can destroy a company's public value and thus creditworthiness... eventually destroying the company. But that's already illegal to do, it's just a matter of enforcement.
That's not entirely accurate. GET requests should be idemponent, meaning that one request has the same effect as N identical requests. That actually has nothing to do with the server's own state, which may be caching internally or is otherwise able to handle resubmission gracefully.
In any case, GET vs POST isn't a security concern—both are equally succeptible to exploits.
Sorry, I don't have a source for that... it was on Discovery Channel years ago. In any case, it's silly to try to measure something as vague as "problem-solving ability"; it's equally silly to assume that men and women are identical on the inside. The middle ground keeps moving as social research continues.
It's quite reasonable from a pure-logic point of view for the GP to say both "men are better problem solvers" and "women who are good problem solvers exist" without contradicting himself. The truthiness (or not) of his statement is essentially independent from any sort of test that you could take.
Consider this analogy: Men are taller than women. This is true, on average. However, the average does not apply to a special case: it takes about 2 seconds on a busy street to find a tall woman or a short man (both of whom deviate from the average).
Many systems have moving parts that are very difficult (if not impossible) to handle from a unit-testing perspective. This is particularly true for distributed systems or even multithreaded applications, where you need execution coverage, data coverage, and all combinations of all possible race conditions.
Unit testing can give you a lot of confidence for individual isolated software components, but it was never intended to address the "system as a whole".
FTFY
Hey, I resent that! I was generating more believable Markov chains in high school!
fantastic!
That grading scale only works if the material is hard enough to actually challenge most of the students. A lot of high school material is so mind-numbingly easy that many students cluster around identical scores, and attempting to normalize that will distort scores negatively and still be a useless metric.
I actually found the valedictorians/salutatorians at my school to be quite social.
If you're willing to go through that much effort and poop storage, you deserve the rewards.