In fairness, I don't actually use assert() - I have my own macro that I use that is turned on in both debug and release mode. But in effect it's an assert() that always runs.
You're right, though - that's one of the more annoying "features" of assert. Luckily assert() is not a particularly hard thing to rewrite.
Why "must"? Almost all C code compiles fine as C++ code, and the few things that won't (generally involving implicit casts to void*, as I understand it) aren't too hard to fix.
I mean, unless you're using K&R C, in which case I feel very sorry for you.
Fair enough. His post was talking about C++, and I'm a C++ coder myself, so I wasn't aware of the weird C problem.
I guess if you're forced to use pure C, it could be an issue, but I would personally just compile it as C++ (remember, you don't have to use all the C++ features if you don't want to.)
I thought I'd make two comments on things that I think he got a bit wrong.
Tip 2: Don't use #define. Avoid it as best as you can. Use const int. That's what it's for. It will be typechecked by the compiler, it's much harder to produce bizarre errors, and 99% of the time it's better.
const int NUM_ALIENS_TO_KILL_TO_END_WAVE = 20;
Tip 4: Warning messages don't work. Don't bother with them. Use assert() - if it triggers, your program will crash with a useful error message. Now that's an incentive to make things work!
In my current project, out of 25,000 lines of code, I have almost 1100 asserts. And the first number counts whitespace. Any bugs I have get found and squashed pretty much instantly.
The problem is that, for many kids, they don't have any realistic legal way of providing for themselves. Someone having to follow your every command and not being legally able to leave is pretty much the definition of slavery.
That said, it can be beneficial, if the rules and requirements aren't onerous and the child is considered, at least on some levels, as an equal. But I've also seen cases where the kid really was being treated essentially as the parents' slave. Sadly, there isn't any easy way to divide the two. It's a vague fuzzy area.
If there was some way for 12-year-olds to get a job and leave the house I'd agree, because then it would be the kid's choice. But, in America at least, it essentially isn't.
Personally, my goal is to defeat BoB or destroy CCP trying. If CCP has to cheat blatantly and repeatedly in order to defeat us, people are going to notice - and we'll end up with story after story on Slashdot, each one exposing CCP as The Company Running The Rigged MMORPG. And each time, people are going to unsubscribe, and people who were going to subscribe are going to change their minds.
Here's a screenshot of a thread where one of the developers involved with the scandal asked why their login numbers were going down. The responses are, to say the least, amusing. I'm told the thread was locked and deleted soon afterwards.
Not as experienced and wise, perhaps, but I've known kids who were smarter than their parents. It happens.
b) as long as your parents are providing for your ass, they get to tell you what to do.
I've always had a problem with this one, because it's basically slavery. The parents do get to give suggestions, but the parents most definitely don't get to order the kids around.
I had some bad periods in my childhood, and looking back on them, the worst by far was when I felt like I had no control over my life and circumstances. If a parent is telling their kids exactly what to do, and the kids have no say, you'll end up with rebellious angry kids. I've got a lot of that left in my still, and honestly my mom was pretty good in most ways.
Personally, I'm about 99% certain that in my lifetime we'll either have techniques to prolong life effectively indefinitely (namely, until we have the next life-prolonging technique), or techniques to preserve people in stasis of some kind until we have the ability to revive them and prolong their life effectively indefinitely. Like with the various cryogenic companies, for example.
I fully plan to live right up until the minute I decide I'm done with this life.
Most people, I suspect, want plastic discs to install software off. It's far easier conceptually to deal with. Linux really doesn't handle that case well.
Personally, I agree - I vastly prefer package management or online downloading. I suspect there will be some user re-training needed to get most people to understand that, however.
Actually, most Windows apps take advantage of autoplay, which means it really is "put the CD in, push the big flashing button that pops up, click next a whole lot because none of that text could be important, wait".
To my knowledge, Linux doesn't have autoplay. While I agree that autoplay is awful, it does make things easier for endusers.
I don't know if OSX has autoplay or not, but in any case with OSX it tends to be "put disc in, double-click the disc icon that just showed up". I haven't seen any equivalent for Linux - you usually have to find the install program or similar. God help you if you have a package manager - then you have to search for what you want to install!
People's brains freeze up when confronted with a computer. They'd much rather just put a shiny disc in and let the magic computer do its work. Seriously, you could sell "Linux application install discs" which are just a pack of CDs where each one has "aptitude install gimp", maybe a hudnred bytes each, and people would buy them.
Does this remind anyone of how copyright law gets legislated?
"Hey, you Internet radio people! The normal radio people are paying $$. You should pay $$$$ because it's New and Different and it can be copied all over the place. And now we're getting a law passed for it." "Okay, okay, here you go." "Hey, normal radio people! Internet radio people are paying $$$$. You guys should be paying $$$$$$, I mean we can't even measure how many people you reach! And now we're getting a law passed for it." "Okay, okay, here you go." "Hey, Internet radio people! Normal radio people pay $$$$$$, why are you only paying $$$$?"
While I agree with basically everything you've written here, I do have to mention that I'd be very very surprised if you'd truly never driven under the speed limit. I mean that's just impressive. How hard is it to order and pick up food from drive-ins without dropping below 5mph? Or do you just drive straight through supermarkets once in a while to get food? Do you sleep while doing 30mph circles in a residential neighborhood? How do you ever refuel?
The article's writer appears to have gotten this confused. As I'm sure everyone on this site knows, WoW isn't a Web application - it doesn't listen on port 80 and doesn't communicate with web browsers (barring a few status pages - you certainly can't play the game that way.) AOL Instant Messenger wasn't originally either. There are now web-based interfaces available, but he's not talking about those, he's talking about the original service which - again - didn't listen on port 80 and couldn't communicate with web browsers.
Amusingly, his screenshot of "Hotmail" runs into the exact same problem. He's apparently decided to take a screenshot of someone using Microsoft Outlook to log into Hotmail - not a web browser. While you can obviously use Hotmail with a web browser, and I suspect the majority of people do, that screenshot is particularly badly chosen.
I do the same thing - I have an old apartment with a lot of 40-watt sockets, most of which are now filled with "200-watt" CFLs that only draw something like 30 watts of actual power. The biggest problem I had was making them fit in the sockets, they're fucking huge.
It's interesting how it's essentially impossible to do business without breaking laws now. If they hadn't given away this information, they would now be having the Chinese government talk about how Yahoo must hate freedom and doesn't respect the laws of their country.
I know a lot of people must be thinking "well, the decision is obvious, they should have followed the American laws instead since ours are more free", but remember that Yahoo actually has workers in China. If Yahoo didn't conform to Chinese laws, they would undoubtedly be hit with some kind of penalties, likely trickling down to their employees. This is probably not an issue they thought of when they opened offices in China.
Of course, Google has offices in China also. It'll be interesting to see what their solution is if the Chinese government gets sufficiently pissed off at them.
"Microsoft isn't passing this cost directly on to the consumer"? Of course they are. It's being passed on in the form of less money spent productively on the OS itself.
How much better would Vista have been with 5%-10% more programmer-hours (and tester-hours!) spent on it? I don't know, but if MS isn't raising the cost thanks to patents, they're doing less work on it.
Warren Ellis did an issue of Hellblazer about school shootings (which DC then didn't publish). You can find the pages available here. I highly, highly recommend reading it - I feel it has serious insight into at least one aspect of why these things happen.
The scan is a bit blurry, and the server is having some trouble right now (404's - just hit refresh and it'll fix itself). If anyone can mirror it on a better server it would be appreciated.
It's not actually that unreasonable. In my code I do my best to detect invalid input and fail gracefully if possible, but if there's something I haven't thought of I have checks deeper inside that end up cleanly crashing the program if something really unexpected occurs. The fact that it gets past the first checks, and has to crash, is a bug. The fact that it crashes may very well be designed behavior, though, and far better than the alternative.
Of course, their public statement is stupid. What they should be saying is "yes, you have found a bug, the crash is a safe error handling system designed to prevent any security holes, there is nothing to worry about with this bug besides annoyance but we're working on a patch."
That's not actually true. There may have been a small gap on the right, just enough to pass someone if you're feeling dangerously suicidal and stupid, with cars on either side that he's continuing to pass. Nobody would ask someone to move into the right lane for all of ten seconds just because "omg you're not passing someone at this precise second". He would, of course, shift into the right lane when he sees someone coming up behind them, but they may already be moving into that lane with the intention to slalom through traffic.
None, really. However, the problem is that right now we're looking at cells which are more like twice as efficient, half the material, and ten times the cost.
Both of your examples would have the same $/watt ratio, and yes, they're equivalent in that sense.
You don't have any way of knowing whether he was passing someone on the right or not. I frequently hang out in the fast lane while passing people steadily, but when someone comes up behind me going a lot faster than I am I'll shift a lane right so they can get past me.
In fairness, I don't actually use assert() - I have my own macro that I use that is turned on in both debug and release mode. But in effect it's an assert() that always runs.
You're right, though - that's one of the more annoying "features" of assert. Luckily assert() is not a particularly hard thing to rewrite.
Why "must"? Almost all C code compiles fine as C++ code, and the few things that won't (generally involving implicit casts to void*, as I understand it) aren't too hard to fix.
I mean, unless you're using K&R C, in which case I feel very sorry for you.
Fair enough. His post was talking about C++, and I'm a C++ coder myself, so I wasn't aware of the weird C problem.
I guess if you're forced to use pure C, it could be an issue, but I would personally just compile it as C++ (remember, you don't have to use all the C++ features if you don't want to.)
I thought I'd make two comments on things that I think he got a bit wrong.
Tip 2: Don't use #define. Avoid it as best as you can. Use const int. That's what it's for. It will be typechecked by the compiler, it's much harder to produce bizarre errors, and 99% of the time it's better.
const int NUM_ALIENS_TO_KILL_TO_END_WAVE = 20;
Tip 4: Warning messages don't work. Don't bother with them. Use assert() - if it triggers, your program will crash with a useful error message. Now that's an incentive to make things work!
In my current project, out of 25,000 lines of code, I have almost 1100 asserts. And the first number counts whitespace. Any bugs I have get found and squashed pretty much instantly.
The problem is that, for many kids, they don't have any realistic legal way of providing for themselves. Someone having to follow your every command and not being legally able to leave is pretty much the definition of slavery.
That said, it can be beneficial, if the rules and requirements aren't onerous and the child is considered, at least on some levels, as an equal. But I've also seen cases where the kid really was being treated essentially as the parents' slave. Sadly, there isn't any easy way to divide the two. It's a vague fuzzy area.
If there was some way for 12-year-olds to get a job and leave the house I'd agree, because then it would be the kid's choice. But, in America at least, it essentially isn't.
Because, in some ways, we're now at war with CCP.
Personally, my goal is to defeat BoB or destroy CCP trying. If CCP has to cheat blatantly and repeatedly in order to defeat us, people are going to notice - and we'll end up with story after story on Slashdot, each one exposing CCP as The Company Running The Rigged MMORPG. And each time, people are going to unsubscribe, and people who were going to subscribe are going to change their minds.
Here's a screenshot of a thread where one of the developers involved with the scandal asked why their login numbers were going down. The responses are, to say the least, amusing. I'm told the thread was locked and deleted soon afterwards.
a) you're not.
Not as experienced and wise, perhaps, but I've known kids who were smarter than their parents. It happens.
b) as long as your parents are providing for your ass, they get to tell you what to do.
I've always had a problem with this one, because it's basically slavery. The parents do get to give suggestions, but the parents most definitely don't get to order the kids around.
I had some bad periods in my childhood, and looking back on them, the worst by far was when I felt like I had no control over my life and circumstances. If a parent is telling their kids exactly what to do, and the kids have no say, you'll end up with rebellious angry kids. I've got a lot of that left in my still, and honestly my mom was pretty good in most ways.
Nope, sorry. I'll give it to my descendants. Or a charity that I like.
Personally, I'm about 99% certain that in my lifetime we'll either have techniques to prolong life effectively indefinitely (namely, until we have the next life-prolonging technique), or techniques to preserve people in stasis of some kind until we have the ability to revive them and prolong their life effectively indefinitely. Like with the various cryogenic companies, for example.
I fully plan to live right up until the minute I decide I'm done with this life.
Most people, I suspect, want plastic discs to install software off. It's far easier conceptually to deal with. Linux really doesn't handle that case well.
Personally, I agree - I vastly prefer package management or online downloading. I suspect there will be some user re-training needed to get most people to understand that, however.
Actually, most Windows apps take advantage of autoplay, which means it really is "put the CD in, push the big flashing button that pops up, click next a whole lot because none of that text could be important, wait".
To my knowledge, Linux doesn't have autoplay. While I agree that autoplay is awful, it does make things easier for endusers.
I don't know if OSX has autoplay or not, but in any case with OSX it tends to be "put disc in, double-click the disc icon that just showed up". I haven't seen any equivalent for Linux - you usually have to find the install program or similar. God help you if you have a package manager - then you have to search for what you want to install!
People's brains freeze up when confronted with a computer. They'd much rather just put a shiny disc in and let the magic computer do its work. Seriously, you could sell "Linux application install discs" which are just a pack of CDs where each one has "aptitude install gimp", maybe a hudnred bytes each, and people would buy them.
Does this remind anyone of how copyright law gets legislated?
"Hey, you Internet radio people! The normal radio people are paying $$. You should pay $$$$ because it's New and Different and it can be copied all over the place. And now we're getting a law passed for it."
"Okay, okay, here you go."
"Hey, normal radio people! Internet radio people are paying $$$$. You guys should be paying $$$$$$, I mean we can't even measure how many people you reach! And now we're getting a law passed for it."
"Okay, okay, here you go."
"Hey, Internet radio people! Normal radio people pay $$$$$$, why are you only paying $$$$?"
The article's writer appears to have gotten this confused. As I'm sure everyone on this site knows, WoW isn't a Web application - it doesn't listen on port 80 and doesn't communicate with web browsers (barring a few status pages - you certainly can't play the game that way.) AOL Instant Messenger wasn't originally either. There are now web-based interfaces available, but he's not talking about those, he's talking about the original service which - again - didn't listen on port 80 and couldn't communicate with web browsers.
Amusingly, his screenshot of "Hotmail" runs into the exact same problem. He's apparently decided to take a screenshot of someone using Microsoft Outlook to log into Hotmail - not a web browser. While you can obviously use Hotmail with a web browser, and I suspect the majority of people do, that screenshot is particularly badly chosen.
Bad, bad writer.
I get my bulbs at BuyLighting, who seemed to be competent. The bulbs I got have zero warm-up period and give off great light. Recommended.
The ones sold by them in the Bay Area are absolutely horrible, I've never tried such bad bulbs. I no longer use them at all.
:)
I don't know if that means they're not the same globally, or if you're just insane, though
I do the same thing - I have an old apartment with a lot of 40-watt sockets, most of which are now filled with "200-watt" CFLs that only draw something like 30 watts of actual power. The biggest problem I had was making them fit in the sockets, they're fucking huge.
They work great.
It's interesting how it's essentially impossible to do business without breaking laws now. If they hadn't given away this information, they would now be having the Chinese government talk about how Yahoo must hate freedom and doesn't respect the laws of their country.
I know a lot of people must be thinking "well, the decision is obvious, they should have followed the American laws instead since ours are more free", but remember that Yahoo actually has workers in China. If Yahoo didn't conform to Chinese laws, they would undoubtedly be hit with some kind of penalties, likely trickling down to their employees. This is probably not an issue they thought of when they opened offices in China.
Of course, Google has offices in China also. It'll be interesting to see what their solution is if the Chinese government gets sufficiently pissed off at them.
"Microsoft isn't passing this cost directly on to the consumer"? Of course they are. It's being passed on in the form of less money spent productively on the OS itself.
How much better would Vista have been with 5%-10% more programmer-hours (and tester-hours!) spent on it? I don't know, but if MS isn't raising the cost thanks to patents, they're doing less work on it.
Money's gotta come from somewhere.
Warren Ellis did an issue of Hellblazer about school shootings (which DC then didn't publish). You can find the pages available here. I highly, highly recommend reading it - I feel it has serious insight into at least one aspect of why these things happen.
The scan is a bit blurry, and the server is having some trouble right now (404's - just hit refresh and it'll fix itself). If anyone can mirror it on a better server it would be appreciated.
Now, what happens when it crashes directly into the plant aimed precisely for where it needs to go ... ... (elevator music) ...
The plane vaporizes, and the wall remains intact.
I don't think that's the answer you expected, but that is the truth.
It's not actually that unreasonable. In my code I do my best to detect invalid input and fail gracefully if possible, but if there's something I haven't thought of I have checks deeper inside that end up cleanly crashing the program if something really unexpected occurs. The fact that it gets past the first checks, and has to crash, is a bug. The fact that it crashes may very well be designed behavior, though, and far better than the alternative.
Of course, their public statement is stupid. What they should be saying is "yes, you have found a bug, the crash is a safe error handling system designed to prevent any security holes, there is nothing to worry about with this bug besides annoyance but we're working on a patch."
That's not actually true. There may have been a small gap on the right, just enough to pass someone if you're feeling dangerously suicidal and stupid, with cars on either side that he's continuing to pass. Nobody would ask someone to move into the right lane for all of ten seconds just because "omg you're not passing someone at this precise second". He would, of course, shift into the right lane when he sees someone coming up behind them, but they may already be moving into that lane with the intention to slalom through traffic.
None, really. However, the problem is that right now we're looking at cells which are more like twice as efficient, half the material, and ten times the cost.
Both of your examples would have the same $/watt ratio, and yes, they're equivalent in that sense.
You don't have any way of knowing whether he was passing someone on the right or not. I frequently hang out in the fast lane while passing people steadily, but when someone comes up behind me going a lot faster than I am I'll shift a lane right so they can get past me.