Well, true enough, I haven't looked at anything Google in about 5 years. I exaggerate about caring that much about the style guide - the truth it, Google is a despicable, evil company, and while I might work there to avoid starving, that's only because I'm weak.
But fuck using * for out params with a cactus soaked in Tobasco sauce. The return value of the function is for returning values, which you can do if you do waste it because you're scared of the terrible exception-monster in the closet (and for multiple return values, a non-const reference is non-const). And fuck only having trivial constructors, because, you can't throw exceptions, so you can't do RAII. The 80s had fun music, but the coding style of the 80s needs to go away.
I know the "proton-sized black hole with a positive charge" with an electron orbiting it has been studied - but I don't know what was concluded. But you won't get "orbits" out to maybe 3x the radius of a black hole, so no danger of that for the Everest hole.
The LHC uses two beams colliding from opposite directions, so the total momentum of a collision is low. If most of the energy of collision goes into making the black hole, then the mass of the black hole would be much higher than whatever collided, and thus it's velocity would be much lower than the difference in momentum of those two particles.
TrueHD needs to die in a fire. DTS is CD-quality audio, while TrueHD and DTS HD-MA are just a waste of space. The latter is always mastered such that you can trivially rip the DTS track when you're ripping the DVD, but TrueHD leaves you with just the AAC track if you don't want to double the size of your rip. TrueHD is a copy-protection measure, nothing more.
Hey, I have been married for more than 20 years and have two children and I'm on slashdot.... He/She can have a girlfriend...
No, no,/.ers can totally be "married for several years", or have no girlfriend at all - either way you're not getting laid. It's that in-between zone that we don't see here. (There's an old joke: put a pebble in a jar every time you have sex until your first anniversary. Remove a pebble from the jar every time you have sex after that. The jar will never be empty.)
I remember when it was spelled auto_ptr (OK, OK, they're not quite the same). But unique_ptr's just part of using RAII - you need to know shared_ptr as well, was my point.
Yeah, I've done that trick before: it's not quite the same. It's been a while since I tried, but I remember it not working for some operators and implicit conversion the way it would with a simple public data member - complexities of type inference.
There was actually a provision for this originally, sort of: by overloading the -> operator you can change what foo->bar returns, but you can't change what foo.bar returns, and since I almost never pass pointers around I rarely use the -> operator
It says that a 3K black hole has a mass of 4x10^22 kg, a bit larger than the Everest-sized black hole.
The moon is just over 7x10^22 kg.
m not quite sure how to solve for one that would be hot enough to suck in the earth before evaporating
The hard part is determining the rate at which a small black hole would consume matter. Very small black holes simply don't have the cross-section to consume matter fast enough to live. The hole would have to live long enough (and still have a cross-section large enough) for the few seconds needed to fall through the ground and get deep enough to pass the water table and into denser crust. From that point it's a matter of its cross-section, speed, and the density of the rock its passing through.
My best estimate for the Mt Everest mass is 4*10^15 kg, which gives a radius of 6 pm - seems big enough to eat silicon and iron atoms.
I propose we adopt "mass of Mt Everest" as a new Slashdot standard of measument - measuring mass in Libraries of Congress was always awkward.
I believe the mass of Mt Everest estimate is correct for the Earth-destroying black hole - it's the point at which matter infall at the density of the Earth's interior exceeds Hawking radiation. In a vacuum, the magic mass is about the mass of the moon - the point at which the Hawking radiation is cooler than the CMBR, and so you won't have a net loss for 10^lots years.
(You can't "compile with RAII turned off", as RAII is a coding style: you're probably thinking of RTTI. But the RAII style might not be good for a realtime system, as it can hide expensive work to release resources.)
The abomination that is Google's C++ coding conventions is why I hang up on their recruiters. (Though I hear an internal war has been raging for a couple years within Google over their 80s-night coding conventions). Actually, I'm not sure what's you'd use from C++ beyond "C with classes" if you're writing C-style code. If you're not comfortable with exceptions, and are following an "allocate at the top, clean up at the bottom, never return from the middle" mindset, C++ is damned awkward - you won't be using the standard libraries much, you won't have non-trivial constructors, and so on.
Oh fuck yes. But that's easy to explain to a new-hire - it's just a tedious convention, not really a mindset thing. IMO, the single most annoying flaw in C++ was not making all members and parameters "const&" by default. (Passing an int by value instead of by const reference is just the optimizers business, not a semantic change). I'd much rather declare the non-const exceptions!
And while I'm wishing, C++ really needs C#-style properties - a way to optionally intercept "foo.bar = 4" to add a non-trivial setter, without cluttering code with getBar() and setBar() functions "just in case".
. Java is superior to C++ in almost every reasonable use of C++ *except* the ones which call for programming in C
That's just, like, your opinion man!
Seriously, though, C++ was never intended to be "C with a little extra", but instead a Java-like (but native code) language with backwards compatibility with existing C code. You can see that throughout Stroustrup's writings, including how he says C++ should be taught (start with std::vector and std::string - don't even teach arrays and char* until people have the basics internalized).
IMO, C++ properly written is a better Java - no worries about resource cleanup (Well, now Java has try-with-resources, so it's not so bad), vastly less boilerplate, a great standard algorithms library, and so on. Java's advantage is in its easy learning curve, and standard cross-platform libraries, which led to a vast selection of open-source tools. If the C++ standard had included more cross-platform system libraries earlier, Java might not have the library advantage. While C++ finally has threading in the STL, it's missing so much other systems-level stuff. But at least I can have a freaking unsigned int in C++ if I want to!
As others have pointed out: the "pedestrian detection" feature is completely unrelated to self parking. That feature would not have engaged here. Self-parking already checks for obstacles, but if the driver asserts control, self-parking lets the driver drive. And that's what happened here - the idiot drove into people.
Vastly more: almost every "unintended acceleration" in history had in fact been "pedal misapplication". Why admit fault when you can just sue someone for a pretend-faulty product/.
For non-ducks, the most important things to know about C++ aren't list in the summery: RAII and shared_ptr<T>
C++ is not C. C++ written like C tends to be crap code - just an overly complex and distracting language for that coding style. If C++ is the right tool for the job, you need to be using a coding style very similar to C# and Java: throwing exception when errors are encountered, writing exception-safe code all the time, returning from functions in the middle, and never, ever, worrying about cleaning up at the bottom of a function what you allocate at the top.
If all of that sounds wrong to you, congrats, you're a C coder, and there's nothing wrong with that. Good C code is good code. But C++ is designed to be used with "scoped objects", that is, every object cleans itself up when you exit scope, so you really have to internalize the tools for that, and that mindset.
So you're saying that our educational system should focus on not leaving any children behind? What a startlingly original idea - I can see no flaw in that plan!
I think that mixing the smart kids in with everyone else is just misguided in the first place - that it's a passing symptom of the "participation trophy" culture (which has IMO passed it's peak and already started the other way). Do you think the old-school system would work well if it were all smart kids?
IMO it would - it would in fact let you socialize properly with people smart enough to get your jokes (or at least, that was always my problem). And the nice part is: it scales down well - for smaller schools who otherwise couldn't make a gifted&talented program work, combing a few grades just might. I know I was greatly held back because I didn't have other smart kids to mentor me - my parents gave 0 fucks about my education, and before the internet, in a small town with a crappy library, well, self-education sucked.
Honestly, with how important education is; it's probably better that it's more or less off the table. Let the educators teach, let the politicians do.. whatever it is they do.
Musk isn't a politician, and this isn't a new idea. The current, regimented-by-grade system was explicitly invented to train kids to be good little manufacturing workers (back when those were the bast jobs most people could get, it was a good enough plan). But before that, before we twisted the educational system into a manufacturing-job-training system, you didn't divide kids up by age like we do today.
The old way had the teacher directly teach the older kids an the age rage, who would then be responsible for teaching the younger kids themselves. This is a great system: you learn better through mentoring, you develop better critical thinking skills when the person teaching you is sometimes wrong, and you likely develop leadership skills along the way.
There may be a better system for the modern era, but the old-school (heh) system seems vastly better than what we have.
You design systems to be robust in terms of the components behaving badly. Any fool can design a system that works if the components all work the way you'd like them to.
CIO is an "IT" Job. That's a shitty career, but we were discussing software development. But if you work for Amazon, Apple, Facebook, Google, Microsoft, Oracle, VMware, probably just as many big names I've forgotten, there is a technical track that leads there in the second half of your career. Those jobs are quite rare so far, as so few devs are over 40 still, and will likely never be more than the top 5% (of the few who can make it in those companies to begin with), but still, it is a path. I know people in that pay grade at 4 of those companies.
Of course in banking, you have to be deep into investment banking or a quant to make good money, and just like being an ER doc: no matter how good the pay is, you won't do it for long.
software dev pays well, but compare the pay to those of the fields you compared it to. All of them make significantly more than software devs do. Friend of mine, his wife is a dentist, she's pulling in nearly 300k a year
Yes, dentists are well paid - eventually - but they start earning late, a few years after a software dev, they have a much larger school debt to pay off, and just like a software dev, the early years don't pay so well.
You can't just look at peak earning power, but at lifetime earnings at a given age, and it takes a long, long time for a dentist or doctor to pull ahead. BTW, you can certainly make $300k as a software dev at a big company - that's common for tech track paygrades equivalent to a second-level manager at the big names. Of course, there are far fewer such positions than there are dentists in America, and for someone capable of both I'd recommend dentistry, but the gap isn't as big as you might think.
The problem with this is that companies don't really pay that well for the labour, skills, experience, talent and education necessary to succeed in IT.
"IT" is a crap career no one should enter. Answering calls on the helpdesk? No thanks - well, better than starving, but so are a lot of things. But we were talking about software development
Why would girls want to sit in front of a computer for hours on end, sometimes, even evenings and work also on weekends in order to launch etc.?
Check out the hours lawyers work, or the oncall duties as a surgeon (or a vet - but dentists, that's the job!). It's not the hours that's the problem, it's the lack of dignity of the profession. When the field was doubling every few years, that meant most software developers were in their 20s, and management could get away with treating all of us like college students. My work environment is more like a dorm room or college lab than a professional office environment - that's what we need to push back against.
As far as pay, after your first 5 or so years in the field, jobs that pay well are there for the taking, though you may need to move to where the work is. If you're past your apprenticeship in the field and you're not making at least 1.5x the national median income, you're likely at a bottom-tier employer: shop around. While we may top out lower than the doctors and lawyers, they don't hit peak earning potential until later in life - a doctor or dentist is typically in his 40s before lifetime earnings net of school costs put him ahead of a plumber or other skilled tradesman.
Personally, I think many women are put off by the limited social interaction involved in the job, or at least that's my theory for why so many female software developers choose career advancement into management or product management over the dev tech track.
Well, true enough, I haven't looked at anything Google in about 5 years. I exaggerate about caring that much about the style guide - the truth it, Google is a despicable, evil company, and while I might work there to avoid starving, that's only because I'm weak.
But fuck using * for out params with a cactus soaked in Tobasco sauce. The return value of the function is for returning values, which you can do if you do waste it because you're scared of the terrible exception-monster in the closet (and for multiple return values, a non-const reference is non-const). And fuck only having trivial constructors, because, you can't throw exceptions, so you can't do RAII. The 80s had fun music, but the coding style of the 80s needs to go away.
Did you know that a Bluray is a disc, holding video, in a digital format? It's true!
I know the "proton-sized black hole with a positive charge" with an electron orbiting it has been studied - but I don't know what was concluded. But you won't get "orbits" out to maybe 3x the radius of a black hole, so no danger of that for the Everest hole.
The LHC uses two beams colliding from opposite directions, so the total momentum of a collision is low. If most of the energy of collision goes into making the black hole, then the mass of the black hole would be much higher than whatever collided, and thus it's velocity would be much lower than the difference in momentum of those two particles.
DTS is CD-quality. AAC isn't - you can hear the difference between AAC and DTS. Beyond DTS is a gimmick.
TrueHD needs to die in a fire. DTS is CD-quality audio, while TrueHD and DTS HD-MA are just a waste of space. The latter is always mastered such that you can trivially rip the DTS track when you're ripping the DVD, but TrueHD leaves you with just the AAC track if you don't want to double the size of your rip. TrueHD is a copy-protection measure, nothing more.
Hey, I have been married for more than 20 years and have two children and I'm on slashdot.... He/She can have a girlfriend...
No, no, /.ers can totally be "married for several years", or have no girlfriend at all - either way you're not getting laid. It's that in-between zone that we don't see here. (There's an old joke: put a pebble in a jar every time you have sex until your first anniversary. Remove a pebble from the jar every time you have sex after that. The jar will never be empty.)
I remember when it was spelled auto_ptr (OK, OK, they're not quite the same). But unique_ptr's just part of using RAII - you need to know shared_ptr as well, was my point.
Yeah, I've done that trick before: it's not quite the same. It's been a while since I tried, but I remember it not working for some operators and implicit conversion the way it would with a simple public data member - complexities of type inference.
There was actually a provision for this originally, sort of: by overloading the -> operator you can change what foo->bar returns, but you can't change what foo.bar returns, and since I almost never pass pointers around I rarely use the -> operator
It says that a 3K black hole has a mass of 4x10^22 kg, a bit larger than the Everest-sized black hole.
The moon is just over 7x10^22 kg.
m not quite sure how to solve for one that would be hot enough to suck in the earth before evaporating
The hard part is determining the rate at which a small black hole would consume matter. Very small black holes simply don't have the cross-section to consume matter fast enough to live. The hole would have to live long enough (and still have a cross-section large enough) for the few seconds needed to fall through the ground and get deep enough to pass the water table and into denser crust. From that point it's a matter of its cross-section, speed, and the density of the rock its passing through.
My best estimate for the Mt Everest mass is 4*10^15 kg, which gives a radius of 6 pm - seems big enough to eat silicon and iron atoms.
Is it really C++, or "C with classes", though?
Not any more than owning a chisel makes you a sculptor. If I had a dime for every init() method I've seen ...
I propose we adopt "mass of Mt Everest" as a new Slashdot standard of measument - measuring mass in Libraries of Congress was always awkward.
I believe the mass of Mt Everest estimate is correct for the Earth-destroying black hole - it's the point at which matter infall at the density of the Earth's interior exceeds Hawking radiation. In a vacuum, the magic mass is about the mass of the moon - the point at which the Hawking radiation is cooler than the CMBR, and so you won't have a net loss for 10^lots years.
(You can't "compile with RAII turned off", as RAII is a coding style: you're probably thinking of RTTI. But the RAII style might not be good for a realtime system, as it can hide expensive work to release resources.)
The abomination that is Google's C++ coding conventions is why I hang up on their recruiters. (Though I hear an internal war has been raging for a couple years within Google over their 80s-night coding conventions). Actually, I'm not sure what's you'd use from C++ beyond "C with classes" if you're writing C-style code. If you're not comfortable with exceptions, and are following an "allocate at the top, clean up at the bottom, never return from the middle" mindset, C++ is damned awkward - you won't be using the standard libraries much, you won't have non-trivial constructors, and so on.
Oh fuck yes. But that's easy to explain to a new-hire - it's just a tedious convention, not really a mindset thing. IMO, the single most annoying flaw in C++ was not making all members and parameters "const&" by default. (Passing an int by value instead of by const reference is just the optimizers business, not a semantic change). I'd much rather declare the non-const exceptions!
And while I'm wishing, C++ really needs C#-style properties - a way to optionally intercept "foo.bar = 4" to add a non-trivial setter, without cluttering code with getBar() and setBar() functions "just in case".
. Java is superior to C++ in almost every reasonable use of C++ *except* the ones which call for programming in C
That's just, like, your opinion man!
Seriously, though, C++ was never intended to be "C with a little extra", but instead a Java-like (but native code) language with backwards compatibility with existing C code. You can see that throughout Stroustrup's writings, including how he says C++ should be taught (start with std::vector and std::string - don't even teach arrays and char* until people have the basics internalized).
IMO, C++ properly written is a better Java - no worries about resource cleanup (Well, now Java has try-with-resources, so it's not so bad), vastly less boilerplate, a great standard algorithms library, and so on. Java's advantage is in its easy learning curve, and standard cross-platform libraries, which led to a vast selection of open-source tools. If the C++ standard had included more cross-platform system libraries earlier, Java might not have the library advantage. While C++ finally has threading in the STL, it's missing so much other systems-level stuff. But at least I can have a freaking unsigned int in C++ if I want to!
As others have pointed out: the "pedestrian detection" feature is completely unrelated to self parking. That feature would not have engaged here. Self-parking already checks for obstacles, but if the driver asserts control, self-parking lets the driver drive. And that's what happened here - the idiot drove into people.
Vastly more: almost every "unintended acceleration" in history had in fact been "pedal misapplication". Why admit fault when you can just sue someone for a pretend-faulty product/.
NONE! Find a real language! *ducks*
For non-ducks, the most important things to know about C++ aren't list in the summery: RAII and shared_ptr<T>
C++ is not C. C++ written like C tends to be crap code - just an overly complex and distracting language for that coding style. If C++ is the right tool for the job, you need to be using a coding style very similar to C# and Java: throwing exception when errors are encountered, writing exception-safe code all the time, returning from functions in the middle, and never, ever, worrying about cleaning up at the bottom of a function what you allocate at the top.
If all of that sounds wrong to you, congrats, you're a C coder, and there's nothing wrong with that. Good C code is good code. But C++ is designed to be used with "scoped objects", that is, every object cleans itself up when you exit scope, so you really have to internalize the tools for that, and that mindset.
So you're saying that our educational system should focus on not leaving any children behind? What a startlingly original idea - I can see no flaw in that plan!
I think that mixing the smart kids in with everyone else is just misguided in the first place - that it's a passing symptom of the "participation trophy" culture (which has IMO passed it's peak and already started the other way). Do you think the old-school system would work well if it were all smart kids?
IMO it would - it would in fact let you socialize properly with people smart enough to get your jokes (or at least, that was always my problem). And the nice part is: it scales down well - for smaller schools who otherwise couldn't make a gifted&talented program work, combing a few grades just might. I know I was greatly held back because I didn't have other smart kids to mentor me - my parents gave 0 fucks about my education, and before the internet, in a small town with a crappy library, well, self-education sucked.
Honestly, with how important education is; it's probably better that it's more or less off the table. Let the educators teach, let the politicians do.. whatever it is they do.
Musk isn't a politician, and this isn't a new idea. The current, regimented-by-grade system was explicitly invented to train kids to be good little manufacturing workers (back when those were the bast jobs most people could get, it was a good enough plan). But before that, before we twisted the educational system into a manufacturing-job-training system, you didn't divide kids up by age like we do today.
The old way had the teacher directly teach the older kids an the age rage, who would then be responsible for teaching the younger kids themselves. This is a great system: you learn better through mentoring, you develop better critical thinking skills when the person teaching you is sometimes wrong, and you likely develop leadership skills along the way.
There may be a better system for the modern era, but the old-school (heh) system seems vastly better than what we have.
You design systems to be robust in terms of the components behaving badly. Any fool can design a system that works if the components all work the way you'd like them to.
fact, when the average CIO doesn't break $200k
CIO is an "IT" Job. That's a shitty career, but we were discussing software development. But if you work for Amazon, Apple, Facebook, Google, Microsoft, Oracle, VMware, probably just as many big names I've forgotten, there is a technical track that leads there in the second half of your career. Those jobs are quite rare so far, as so few devs are over 40 still, and will likely never be more than the top 5% (of the few who can make it in those companies to begin with), but still, it is a path. I know people in that pay grade at 4 of those companies.
Of course in banking, you have to be deep into investment banking or a quant to make good money, and just like being an ER doc: no matter how good the pay is, you won't do it for long.
software dev pays well, but compare the pay to those of the fields you compared it to. All of them make significantly more than software devs do. Friend of mine, his wife is a dentist, she's pulling in nearly 300k a year
Yes, dentists are well paid - eventually - but they start earning late, a few years after a software dev, they have a much larger school debt to pay off, and just like a software dev, the early years don't pay so well.
You can't just look at peak earning power, but at lifetime earnings at a given age, and it takes a long, long time for a dentist or doctor to pull ahead. BTW, you can certainly make $300k as a software dev at a big company - that's common for tech track paygrades equivalent to a second-level manager at the big names. Of course, there are far fewer such positions than there are dentists in America, and for someone capable of both I'd recommend dentistry, but the gap isn't as big as you might think.
The problem with this is that companies don't really pay that well for the labour, skills, experience, talent and education necessary to succeed in IT.
"IT" is a crap career no one should enter. Answering calls on the helpdesk? No thanks - well, better than starving, but so are a lot of things. But we were talking about software development
Why would girls want to sit in front of a computer for hours on end, sometimes, even evenings and work also on weekends in order to launch etc.?
Check out the hours lawyers work, or the oncall duties as a surgeon (or a vet - but dentists, that's the job!). It's not the hours that's the problem, it's the lack of dignity of the profession. When the field was doubling every few years, that meant most software developers were in their 20s, and management could get away with treating all of us like college students. My work environment is more like a dorm room or college lab than a professional office environment - that's what we need to push back against.
As far as pay, after your first 5 or so years in the field, jobs that pay well are there for the taking, though you may need to move to where the work is. If you're past your apprenticeship in the field and you're not making at least 1.5x the national median income, you're likely at a bottom-tier employer: shop around. While we may top out lower than the doctors and lawyers, they don't hit peak earning potential until later in life - a doctor or dentist is typically in his 40s before lifetime earnings net of school costs put him ahead of a plumber or other skilled tradesman.
Personally, I think many women are put off by the limited social interaction involved in the job, or at least that's my theory for why so many female software developers choose career advancement into management or product management over the dev tech track.