Seconding Python. While the syntax is goofy and won't be a good bridge to other languages, it's still a great teaching language - fast to pick up, tons of libraries and open source code.
It's purely cultural. So much of what "makes you good at C code" goes away once you embrace automatic cleanup; coders would suddenly find a big chunk of what they do daily to be valueless. Plus, the ability to get the cleanup block right is a shibboleth for the harder problems you have to constantly juggle (e.g., page faults and priority inversion) while writing kernel code - people who want to use C++ are seen as too mentally undisciplined to write a driver. Cultural change is very slow.
I think one of the biggest problems we have in the country is this rampant cronyism where all these large companies are into smash-and-grab, short-term profits, and that's true even at the local level... We end up with a two-tier system. Those that have, have welfare for the rich.
Yeah, those evil Koch brothers and their country-destroying messages. Sure wouldn't want them spreading their view to the public! C'mon, viewing everything in the world through a political lens is foolish.
As anyone who lived through the dot-com bust knows: never defer taking gains for tax reasons. Better to give half to the government than lose it all when the bubble bursts.
But I highly doubt he has that many bitcoins - I suspect most of the bitcoins mined in the early days were simply lost soon thereafter, as they weren't valuable enough to be worth keeping track of. No reason to think he had a significant share of the early BTC, even if he did hold on to his own.
No offense, but you have no idea what you're talking about. In journalism, certain words have certain meanings and any journalist working for a reputable publication will adhere to those strictly.
Hahahhahaha! Reputable publication - great joke, didn't see that one coming.
Anyone who sees the news as anything but "fiction, based on a true story" is blind. And it's amazing how often we fall for this - we'll read some story we have personal knowledge of, notice that every single statement is wrong and misleading, then turn the page and believe what we read. If it's not the sports page, it's fiction.
There's no need for manufacturing workers, paper shufflers, or really unskilled labor of any kind in the decades to come. If it can be automated, it will be automated.
What we need are skills of any kind, from design engineers to interior designers. If we follow the pattern established for automation, we'll mostly be doing stuff for one another that used to be done only for the rich. Jobs with a bit of creativity required, and a lot of legwork, from personal shopper to home theater installation. Plumbers and electricians too, of course. But engineering seems to be the hard niche to fill.
There's never been a decade where the amount of manufacturing in America has dropped. The manufacturing jobs have all gone, but the whole "bring robots to automate 90% of it" thing has been happening for 30 years now, and is mostly complete. The main reason China is having a crisis with its manufacturing sector is America is finally automating the tail end of stuff we used to send to China.
Yet we still have a school system tuned for producing manufacturing workers. We're not in a good place - we're about 20 years late in transforming our schools to produce engineers and artists instead.
BTW, I think "finally" sections realy are just the same as the "goto: cleanup" target: a branch to explicit cleanup code, fraught with peril. However, there are better ways to write exception-safe code where you never explicitly clean up/free/close stuff and instead let the stack unwind handle it all for you (more than just RAII: scoped objects). Until you make it to where there's no "matching close for every open" anywhere, you're just moving the problem around, not solving it.
I actually advise the opposite, to bang your head against a problem over and over until it breaks (the problem, that is).
But most people actually give up first, and quit studying. People "turning themselves off" to the study of math is a very common problem. Most people can only take so much frustration.
Oh, we may be saying the same things then. That's fine. But people are still going to write kernel code in C, and it's still going to have gotos, and that's still not a big problem (using goto only correctly is far down the list of things you have to consistently get right to write kernel code).
Google wins indirectly from android popularity. MS wins indirectly if MS Phone takes off even if the make very little from the phones themselves. These companies have large, profitable ecosystems that they just need to draw people into.
What would that look like though. You keep asserting philosophy that's not backed by anything practical. If you have 97 levels of indention, nothing is obvious.
You test 6 things up front, and you'll bail if any of them fail. Are you indented 6 levels now to avoid goto/return? You allocate 6 more things, and must clean them up, but later allocations might fail - indented 6 more levels? You perform 10 operations in the body of the code, and want to skip to cleanup on any error - 10 more levels of indention? No one could follow that crap.
I suspect you just have an aversion specifically to the "goto" keyword, and do something equivalent to it to avoid 22 levels of indention. Microsoft C has the amusing __try, __finally, and __leave for this, but __leave is just a macro for goto, and __finally just a macro for the tag. Would that make you happy? Wrapping goto in a macro so you don't see it any more?
Sure, but Android has already won. I can't see them falling below 50% market share in any market 5 years from now. My point was that I could see 30% Win, 20% iPhone happening.
The problem with Microsoft and Nokia, is that nobody really wants a Microsoft Phone
The WinCE-based phones were pretty bad - heck, MS itself called the OS "wince". The Win8 phones are fine, and while they had a rough launch, their market share continues to grow - they outsell iPhone in (poorer) European countries. Seems credible to me that they could take second place once Blackberry is fully gone, if they can crack the Asian market, where right now you're right.
Outside of phones, Office (PowerPoint and Excel, Word no longer matters) and MS SQL have pretty good lock-in in business use, and won't be going away any time soon.
Their only new products outside of phone are the cloud stuff IMO, and who knows how big of a deal that will be in 10 years.
Calculus should always be taught in the context of physics - that's the problem it was initially invented to cope with, after all. The area under a curve representing velocity is the total distance travelled. It's easy to translate between the curve and a story about a journey (well, a 1-dimensional journey), and relate everything to the real world that way.
Sure, but the reason for goto:clanup specifically is "ease of code review". You want to make it easy to demonstrate that every open has a matching close, every alloc has a matching free, and so on. WHen the code base end up with 1000 allocs and 999 frees, the faster and easier you can spot the matching bookends, the better.
I've actually used an oddball pattern where Foo() is nothing but the error checking, allocs, and frees, and in the middle it calls _Foo(...) which can then return from the middle. But I can't get away with the in "real" code because it's all about what people are used to seeing, and in a team effort that's reasonable.
Other than the commercials, what's overinflated? OTA broadcast should by rights mean "anyone anywhere can now watch this content (unaltered) in any way they choose". Their our airways, after all. The only thing lost if any program broadcast ever anywhere was available for streaming unaltered on the internet (legally) would be the ease of counting the audience size for pricing the commercials.
Well reasoned, but I think it misses a fundamental point.
It's the public's airways/bandwidth to begin with. Broadcast on the public airwaves should by law be a grant of rights to time/place/format shift however anyone feels like for unchanged content. In private, for a fee, public performance, shouldn't matter, as long as some company isn't replacing the ads or otherwise altering the content. That's what "OTA broadcast" should mean: anyone anywhere can now watch it.
BTW, that code still returns from the middle, which is the pattern under discussion.
Seriously, it's quite common in production code to need to deal with bad input cleanly at the top of every function;
void Foo(int *low, int *high, char *name) {
if (low == NULL)
{
return ERROR_PARM1;
}
if (high == NULL)
{
return ERROR_PARM2;
}
if (*low > *high)
{
return ERROR_PARMS;
}
if (name == NULL)
{
return ERROR_PARM3;
}
That's the single most common pattern in all the code I've seen, whether it's return, throw, or goto:cleanup, you have to do something uniformly for bad input, and one way or another that "something" is "give up now, don't enter the real logic".
Proper C-style code depends heavily on the "goto:cleanup" pattern. You either write all exception-safe, all the time (not in C, obviously), or every function "allocates at the top and frees at the bottom".
Wow, have you ever actually written production code? Just wow.
There's nothing cleaner than if (input1 == null) {
return ERROR("input1 was NULL");
}
if (input2 == null) {
return ERROR("input2 was NULL");
}
if (input2 == null) {
return ERROR("input3 was NULL");
}
Substitute "throw new ERROR(..)" or "goto:error" depending on what kind of code your writing, it's the same thing any way you do it.
Nesting three levels deep before you even start to write real code? Garbage.
My calculus teacher was useless - I learned calc from my physics teacher, who was free to teach calculus any way she pleased. (But then, she always said she'd quit if she was ever forced to teach a specific way by the state, and eventually she did quit because of that.) But's that's school, which is sort of off-topic in a thread about learning.
Seconding Python. While the syntax is goofy and won't be a good bridge to other languages, it's still a great teaching language - fast to pick up, tons of libraries and open source code.
It's purely cultural. So much of what "makes you good at C code" goes away once you embrace automatic cleanup; coders would suddenly find a big chunk of what they do daily to be valueless. Plus, the ability to get the cleanup block right is a shibboleth for the harder problems you have to constantly juggle (e.g., page faults and priority inversion) while writing kernel code - people who want to use C++ are seen as too mentally undisciplined to write a driver. Cultural change is very slow.
I think one of the biggest problems we have in the country is this rampant cronyism where all these large companies are into smash-and-grab, short-term profits, and that's true even at the local level ... We end up with a two-tier system. Those that have, have welfare for the rich.
- Charles Koch
Yeah, those evil Koch brothers and their country-destroying messages. Sure wouldn't want them spreading their view to the public! C'mon, viewing everything in the world through a political lens is foolish.
I dunno, most of the unstable people I've seen posting on the internet seemed rather hung up about Walmart.
As anyone who lived through the dot-com bust knows: never defer taking gains for tax reasons. Better to give half to the government than lose it all when the bubble bursts.
But I highly doubt he has that many bitcoins - I suspect most of the bitcoins mined in the early days were simply lost soon thereafter, as they weren't valuable enough to be worth keeping track of. No reason to think he had a significant share of the early BTC, even if he did hold on to his own.
No offense, but you have no idea what you're talking about. In journalism, certain words have certain meanings and any journalist working for a reputable publication will adhere to those strictly.
Hahahhahaha! Reputable publication - great joke, didn't see that one coming.
Anyone who sees the news as anything but "fiction, based on a true story" is blind. And it's amazing how often we fall for this - we'll read some story we have personal knowledge of, notice that every single statement is wrong and misleading, then turn the page and believe what we read. If it's not the sports page, it's fiction.
There's no need for manufacturing workers, paper shufflers, or really unskilled labor of any kind in the decades to come. If it can be automated, it will be automated.
What we need are skills of any kind, from design engineers to interior designers. If we follow the pattern established for automation, we'll mostly be doing stuff for one another that used to be done only for the rich. Jobs with a bit of creativity required, and a lot of legwork, from personal shopper to home theater installation. Plumbers and electricians too, of course. But engineering seems to be the hard niche to fill.
There's never been a decade where the amount of manufacturing in America has dropped. The manufacturing jobs have all gone, but the whole "bring robots to automate 90% of it" thing has been happening for 30 years now, and is mostly complete. The main reason China is having a crisis with its manufacturing sector is America is finally automating the tail end of stuff we used to send to China.
Yet we still have a school system tuned for producing manufacturing workers. We're not in a good place - we're about 20 years late in transforming our schools to produce engineers and artists instead.
BTW, I think "finally" sections realy are just the same as the "goto: cleanup" target: a branch to explicit cleanup code, fraught with peril. However, there are better ways to write exception-safe code where you never explicitly clean up/free/close stuff and instead let the stack unwind handle it all for you (more than just RAII: scoped objects). Until you make it to where there's no "matching close for every open" anywhere, you're just moving the problem around, not solving it.
I actually advise the opposite, to bang your head against a problem over and over until it breaks (the problem, that is).
But most people actually give up first, and quit studying. People "turning themselves off" to the study of math is a very common problem. Most people can only take so much frustration.
Oh, we may be saying the same things then. That's fine. But people are still going to write kernel code in C, and it's still going to have gotos, and that's still not a big problem (using goto only correctly is far down the list of things you have to consistently get right to write kernel code).
Google wins indirectly from android popularity. MS wins indirectly if MS Phone takes off even if the make very little from the phones themselves. These companies have large, profitable ecosystems that they just need to draw people into.
What would that look like though. You keep asserting philosophy that's not backed by anything practical. If you have 97 levels of indention, nothing is obvious.
You test 6 things up front, and you'll bail if any of them fail. Are you indented 6 levels now to avoid goto/return? You allocate 6 more things, and must clean them up, but later allocations might fail - indented 6 more levels? You perform 10 operations in the body of the code, and want to skip to cleanup on any error - 10 more levels of indention? No one could follow that crap.
I suspect you just have an aversion specifically to the "goto" keyword, and do something equivalent to it to avoid 22 levels of indention. Microsoft C has the amusing __try, __finally, and __leave for this, but __leave is just a macro for goto, and __finally just a macro for the tag. Would that make you happy? Wrapping goto in a macro so you don't see it any more?
Sure, but Android has already won. I can't see them falling below 50% market share in any market 5 years from now. My point was that I could see 30% Win, 20% iPhone happening.
The problem with Microsoft and Nokia, is that nobody really wants a Microsoft Phone
The WinCE-based phones were pretty bad - heck, MS itself called the OS "wince". The Win8 phones are fine, and while they had a rough launch, their market share continues to grow - they outsell iPhone in (poorer) European countries. Seems credible to me that they could take second place once Blackberry is fully gone, if they can crack the Asian market, where right now you're right.
Outside of phones, Office (PowerPoint and Excel, Word no longer matters) and MS SQL have pretty good lock-in in business use, and won't be going away any time soon.
Their only new products outside of phone are the cloud stuff IMO, and who knows how big of a deal that will be in 10 years.
Calculus should always be taught in the context of physics - that's the problem it was initially invented to cope with, after all. The area under a curve representing velocity is the total distance travelled. It's easy to translate between the curve and a story about a journey (well, a 1-dimensional journey), and relate everything to the real world that way.
Sure, but the reason for goto :clanup specifically is "ease of code review". You want to make it easy to demonstrate that every open has a matching close, every alloc has a matching free, and so on. WHen the code base end up with 1000 allocs and 999 frees, the faster and easier you can spot the matching bookends, the better.
I've actually used an oddball pattern where Foo() is nothing but the error checking, allocs, and frees, and in the middle it calls _Foo(...) which can then return from the middle. But I can't get away with the in "real" code because it's all about what people are used to seeing, and in a team effort that's reasonable.
Other than the commercials, what's overinflated? OTA broadcast should by rights mean "anyone anywhere can now watch this content (unaltered) in any way they choose". Their our airways, after all. The only thing lost if any program broadcast ever anywhere was available for streaming unaltered on the internet (legally) would be the ease of counting the audience size for pricing the commercials.
Well reasoned, but I think it misses a fundamental point.
It's the public's airways/bandwidth to begin with. Broadcast on the public airwaves should by law be a grant of rights to time/place/format shift however anyone feels like for unchanged content. In private, for a fee, public performance, shouldn't matter, as long as some company isn't replacing the ads or otherwise altering the content. That's what "OTA broadcast" should mean: anyone anywhere can now watch it.
The slope of sin() near 0 is only 1 if the units are radians.
BTW, that code still returns from the middle, which is the pattern under discussion.
Seriously, it's quite common in production code to need to deal with bad input cleanly at the top of every function;
void Foo(int *low, int *high, char *name)
{
if (low == NULL)
{
return ERROR_PARM1;
}
if (high == NULL)
{
return ERROR_PARM2;
}
if (*low > *high)
{
return ERROR_PARMS;
}
if (name == NULL)
{
return ERROR_PARM3;
}
That's the single most common pattern in all the code I've seen, whether it's return, throw, or goto :cleanup, you have to do something uniformly for bad input, and one way or another that "something" is "give up now, don't enter the real logic".
Proper C-style code depends heavily on the "goto :cleanup" pattern. You either write all exception-safe, all the time (not in C, obviously), or every function "allocates at the top and frees at the bottom".
Wow, Slashcode totally sucks for formatting. WTF?
Wow, have you ever actually written production code? Just wow.
There's nothing cleaner than
if (input1 == null) {
return ERROR("input1 was NULL");
}
if (input2 == null) {
return ERROR("input2 was NULL");
}
if (input2 == null) {
return ERROR("input3 was NULL");
}
Substitute "throw new ERROR(..)" or "goto :error" depending on what kind of code your writing, it's the same thing any way you do it.
Nesting three levels deep before you even start to write real code? Garbage.
My calculus teacher was useless - I learned calc from my physics teacher, who was free to teach calculus any way she pleased. (But then, she always said she'd quit if she was ever forced to teach a specific way by the state, and eventually she did quit because of that.) But's that's school, which is sort of off-topic in a thread about learning.