Back in the old days, when there used to be book stores, I used to marvel at the girth of the C++ books on the shelf. After having programmed C++ for many years, did I really know all the stuff in one of those fat books? Probably not...
Having used both extensively, I can tell you that it is much more difficult to write slow, bloated, overly complex code in C than in C++. It keeps you honest in that way. Also, most of the good things of C++ such as object-oriented programming and templating can be done at a basic level in C. For example, in C++, a class function is just an ordinary function with a hidden pointer to a (class) structure. Why not just pass in a pointer to a class structure in C? And class member privacy can easily be a matter of naming convention rather than something the compiler enforces.
C++ has its value, and may be better suited for building large, complex, systems such as GUI frameworks, but C is a great choice for cases where speed and minimal size are paramount, such as most embedded code as well as the Linux kernel. In principle, it's possible to write fast, small code in C++ by using its features selectively. However, if you do that, you're left with mostly just the features you could have emulated in C anyway.
Oh, and did I mention that in its current form C is the "perfect" programming language? Other languages have their own goals, but judged in terms of its own goals, C does what it's trying to do better than just about any other language - far better than C++ meets its goals. There's a reason that changes to C over its many years have been very minimal, and virtually always for the better.
I'm a fan of C++ overall, but it seems to me that C++ templates are a bit of a disaster. They're so complex that I doubt that anybody but you and P. J. Plauger *fully* understands them. Also, when they're actually used, they often result in bloated, slow code - as I recently experienced when stepping through some STL string functions. Further, they bring on a lot of portability issues, evidently due to the difficulty that even the compiler folks have had in understanding and implementing them. Therefore, many programmers minimize their use of templates, both in their own code and in their use of templated library code.
Compared to the complexity of C++ templates, the C macro preprocessor provides a rudimentary form of templating via its very simple and powerful paradigm of text substitution. I've had some success implementing a limited form of generic (type independent) programming in C using just the C preprocessor. I've had much less success doing generic programming via C++ templates.
If you had templates to do all over again, what would you do differently? Was all the complexity of C++ templates (e.g. "partial specialization") really necessary to achieve its goals? Were the goals maybe too ambitious?
Right! Digital imaging is just technology, but the way a chemical image suddenly "pops" out of nothing is truly magic. It was a thrill for me every time.
That said, each time I spent an evening slaving away in the darkroom, I ended up with just a small stack of not-so-great prints to show for it. Very discouraging.
I learned what little I know about the darkroom from a short community ed course many years ago, but if I had a teacher available who could have taught me how to make a really good print, it might have been a different story. Now, though, it's hard to beat the speed and convenience of digital printing - even if the magic - and artistry - is lost.
The folks who designed my desktop computer were really thinking ahead on this one: it was built without a speaker. Besides enhancing security, an auxiliary benefit of their clever "no-speaker defense" is that saved the manufacturer cost and space.
OK, I'll bite. Value Investors take the contrary point of view, and many of us have been successful with that approach. But that's another story. Just for fun, I'll take your side on this one, but with a twist.
I've long thought that stocks were a lot like fiat currencies: - They can be created or destroyed at will by a central authority - a corporation rather than a central bank - Their (market) value is largely based on supply and demand. - Supply is controlled by a central authority, the corporation: it can issue or buy back stock at any time, or do forward or reverse splits at will. - Demand is affected by the overall economy - in this case by the economy of the corporation rather than the economy of a nation. - The currency (stock) can be exchanged for other currencies at any time in the market. Specifically, you can exchange a corporation's currency for your local national currency via buying and selling in the stock market. - A variety of instruments are available in the market to protect yourself from and/or exploit unwise actions of the central issuing authority.
As with any fiat currency, the stockholder depends on the central authority (the corporation) to manage the currency wisely. Also, the stockholder only wants to get involved in a currency whose associated economy is stable. In other words, the value of the stock is related to the economics of the corporation as well as how well the corporate managers manage it.
Given the thousands of fiat currencies that exist in the form of corporate stocks, it's not surprising that someone could invent a new fiat currency, the Bitcoin. It will be interesting to see if a fiat currency whose supply is controlled by a formula rather than managed by humans can thrive and prosper in the long term.
Do you think that the bad guys never thought to read the source before now?
[head slap!] Gosh, maybe you're right - maybe they did think of reading the source code to a library that's widely used to help enforce security. In fact, being bad guys and all, that sounds like exactly the kind of thing they would do. Now, why didn't I think of that?...
Actually, I was just trying to make the point that this kind of issue draws particular attention to the offending library. Sorry if I didn't spell that out clearly enough for the casual reader.
Good point. But maybe they would have been missed by the bad guys, too. Maybe open source makes it easier for the good guys to find bugs but it also makes it easier for the bad guys to find bugs that the good guys haven't found yet. I don't know if there are bad guys who are scouring open source code for things like this, trying to find it first, but bad guys who enjoy finding exploits like this (or get paid to), might prefer to look at open source than disassembly.
My point isn't that open source is or isn't better than closed in this regard, but that the important factor is who finds an exploit first - whether it's in open source or not. And that probably depends mostly on who's focusing their attention on it.
That said, if I were a bad guy, the rest of the OpenSSL library's open source would seem like a pretty juicy read right now. Then again, it probably sounds like fun to the good guys too.
Wouldn't it be VBX controls? IIRC, that was the Hot New Thing they wanted everybody to use at one time...until they replaced VBX with ActiveX. That's about the time I lost all interest in all of Microsoft's binary component technologies.
I did manage to get myself roped into MFC, though, many years ago. I'm still stuck using that due to having a large code base that's written for it (and isn't economical to convert to something like WxWidgets). Fortunately, Microsoft has supported MFC faithfully...for now.
After reading the article, it sounds like they have a good theory about what happened during the Big Bang, but I didn't see anything in the article that offered proof that something came from nothing.
Proof likely will appear from nowhere sometime in the next few billion years.
When I read that, I heard it in Mr. Krabbs voice. But Mr. Krabbs is a lot easier to work for than Linus, me boy. Linus is more like the Flying Dutchman, without the loveable part.
Given the current volatility, it seems like anything that's priced in terms of a fixed Bitcoin amount involves an element of speculation on the part of the seller. That went against you in this case, but it might have worked out in your favor on some other day - which is the nature of speculation.
In conventional currencies and commodities, derivatives are available to hedge risk in the instrument itself for those who want that. A quick Internet search indicates that derivate markets for Bitcoin currently are in the formative stage, but if Bitcoin really takes hold, they'll become part of its landscape.
A quick read of TFA indicates that the Square folks are providing a service in terms of accepting Bitcoin from buyers and providing dollars to sellers. The seller gets to set the price in dollars and then receives that number of dollars for the sale, less commission. Charging a commission for providing the service of a currency exchange (or a commodity exchange, if you prefer) sounds like a Square deal to me, depending on the commission.
AP - Social networking giant Facebook announced plans Thursday to buy the popular multiplayer game Minecraft from its creator, Markus "Notch" Persson, for $3 Billion, its latest in a series of high-profile acquisitions. Persson will receive compensation in the form of cash, stock, and an undisclosed number of Oculus Rift headsets.
Asked why he is selling Minecraft to Facebook following his statements that he would cease development of Minecraft for Oculus Rift when Facebook's purchase of Oculus recently was announced, Persson said, "Look, they offered me a lot of headsets in this deal. I simply couldn't turn that down. I also get a seat on the board. Although that doesn't give me any actual input into Facebook's future, the seat itself is extremely comfortable - and the boardroom has some really nice paneling."
When asked about the deal, Facebook CEO Mark Zuckerberg commented, "Minecraft is yet another in a series of strategic acquisitions as we evolve Facebook from a social gaming platform into a social gaming platform. Also, Markus will make a fine addition to Facebook's board; I know we'll receive some top-notch input from him as the board continues to consider future options for the seating and paneling in our boardroom."
Back in the old days, when there used to be book stores, I used to marvel at the girth of the C++ books on the shelf. After having programmed C++ for many years, did I really know all the stuff in one of those fat books? Probably not...
Having used both extensively, I can tell you that it is much more difficult to write slow, bloated, overly complex code in C than in C++. It keeps you honest in that way. Also, most of the good things of C++ such as object-oriented programming and templating can be done at a basic level in C. For example, in C++, a class function is just an ordinary function with a hidden pointer to a (class) structure. Why not just pass in a pointer to a class structure in C? And class member privacy can easily be a matter of naming convention rather than something the compiler enforces.
C++ has its value, and may be better suited for building large, complex, systems such as GUI frameworks, but C is a great choice for cases where speed and minimal size are paramount, such as most embedded code as well as the Linux kernel. In principle, it's possible to write fast, small code in C++ by using its features selectively. However, if you do that, you're left with mostly just the features you could have emulated in C anyway.
Oh, and did I mention that in its current form C is the "perfect" programming language? Other languages have their own goals, but judged in terms of its own goals, C does what it's trying to do better than just about any other language - far better than C++ meets its goals. There's a reason that changes to C over its many years have been very minimal, and virtually always for the better.
I'm a fan of C++ overall, but it seems to me that C++ templates are a bit of a disaster. They're so complex that I doubt that anybody but you and P. J. Plauger *fully* understands them. Also, when they're actually used, they often result in bloated, slow code - as I recently experienced when stepping through some STL string functions. Further, they bring on a lot of portability issues, evidently due to the difficulty that even the compiler folks have had in understanding and implementing them. Therefore, many programmers minimize their use of templates, both in their own code and in their use of templated library code.
Compared to the complexity of C++ templates, the C macro preprocessor provides a rudimentary form of templating via its very simple and powerful paradigm of text substitution. I've had some success implementing a limited form of generic (type independent) programming in C using just the C preprocessor. I've had much less success doing generic programming via C++ templates.
If you had templates to do all over again, what would you do differently? Was all the complexity of C++ templates (e.g. "partial specialization") really necessary to achieve its goals? Were the goals maybe too ambitious?
Do you think AI will start replacing junior programmers in the foreseeable future, similar to car drivers and call center operators?
Why ask Dr. Stroustrup and wait for an answer? Siri could tell you now...
"Never ascribe to conspiracy that which can be adequately explained by incompetence." (Or something like that.)
That's nice. Now, I no longer need to remember "12345" for Slashdot - I can go back to just using "pass".
Right! Digital imaging is just technology, but the way a chemical image suddenly "pops" out of nothing is truly magic. It was a thrill for me every time.
That said, each time I spent an evening slaving away in the darkroom, I ended up with just a small stack of not-so-great prints to show for it. Very discouraging.
I learned what little I know about the darkroom from a short community ed course many years ago, but if I had a teacher available who could have taught me how to make a really good print, it might have been a different story. Now, though, it's hard to beat the speed and convenience of digital printing - even if the magic - and artistry - is lost.
The folks who designed my desktop computer were really thinking ahead on this one: it was built without a speaker. Besides enhancing security, an auxiliary benefit of their clever "no-speaker defense" is that saved the manufacturer cost and space.
...but with much of academic programming there's no rear-end.
I guess that explains why Sir Mix-a-Lot left academia to pursue a career in the popular arts.
OK, I'll bite. Value Investors take the contrary point of view, and many of us have been successful with that approach. But that's another story. Just for fun, I'll take your side on this one, but with a twist.
I've long thought that stocks were a lot like fiat currencies:
- They can be created or destroyed at will by a central authority - a corporation rather than a central bank
- Their (market) value is largely based on supply and demand.
- Supply is controlled by a central authority, the corporation: it can issue or buy back stock at any time, or do forward or reverse splits at will.
- Demand is affected by the overall economy - in this case by the economy of the corporation rather than the economy of a nation.
- The currency (stock) can be exchanged for other currencies at any time in the market. Specifically, you can exchange a corporation's currency for your local national currency via buying and selling in the stock market.
- A variety of instruments are available in the market to protect yourself from and/or exploit unwise actions of the central issuing authority.
As with any fiat currency, the stockholder depends on the central authority (the corporation) to manage the currency wisely. Also, the stockholder only wants to get involved in a currency whose associated economy is stable. In other words, the value of the stock is related to the economics of the corporation as well as how well the corporate managers manage it.
Given the thousands of fiat currencies that exist in the form of corporate stocks, it's not surprising that someone could invent a new fiat currency, the Bitcoin. It will be interesting to see if a fiat currency whose supply is controlled by a formula rather than managed by humans can thrive and prosper in the long term.
Do you think that the bad guys never thought to read the source before now?
[head slap!] Gosh, maybe you're right - maybe they did think of reading the source code to a library that's widely used to help enforce security. In fact, being bad guys and all, that sounds like exactly the kind of thing they would do. Now, why didn't I think of that?...
Actually, I was just trying to make the point that this kind of issue draws particular attention to the offending library. Sorry if I didn't spell that out clearly enough for the casual reader.
Good point. But maybe they would have been missed by the bad guys, too. Maybe open source makes it easier for the good guys to find bugs but it also makes it easier for the bad guys to find bugs that the good guys haven't found yet. I don't know if there are bad guys who are scouring open source code for things like this, trying to find it first, but bad guys who enjoy finding exploits like this (or get paid to), might prefer to look at open source than disassembly.
My point isn't that open source is or isn't better than closed in this regard, but that the important factor is who finds an exploit first - whether it's in open source or not. And that probably depends mostly on who's focusing their attention on it.
That said, if I were a bad guy, the rest of the OpenSSL library's open source would seem like a pretty juicy read right now. Then again, it probably sounds like fun to the good guys too.
Darn. That method came up with 3.13, but I've already had 3.14 tattooed to the bottom of my foot...just in case...
Wouldn't it be VBX controls? IIRC, that was the Hot New Thing they wanted everybody to use at one time...until they replaced VBX with ActiveX. That's about the time I lost all interest in all of Microsoft's binary component technologies.
I did manage to get myself roped into MFC, though, many years ago. I'm still stuck using that due to having a large code base that's written for it (and isn't economical to convert to something like WxWidgets). Fortunately, Microsoft has supported MFC faithfully...for now.
After reading the article, it sounds like they have a good theory about what happened during the Big Bang, but I didn't see anything in the article that offered proof that something came from nothing.
Proof likely will appear from nowhere sometime in the next few billion years.
Size matters?
I've tried termites at home. They did more harm than good.
His problem is that he believes he is right in all things and has a huge ego.
Sounds like necessary qualifications for the job to me.
Linus just talks like a sailor.
Arrh, I dun think so me shiverin' matey!
When I read that, I heard it in Mr. Krabbs voice. But Mr. Krabbs is a lot easier to work for than Linus, me boy. Linus is more like the Flying Dutchman, without the loveable part.
The early bird catches the worm. The early worm gets eaten.
The dog will return it to you soon with additional encryption applied.
Given the current volatility, it seems like anything that's priced in terms of a fixed Bitcoin amount involves an element of speculation on the part of the seller. That went against you in this case, but it might have worked out in your favor on some other day - which is the nature of speculation.
In conventional currencies and commodities, derivatives are available to hedge risk in the instrument itself for those who want that. A quick Internet search indicates that derivate markets for Bitcoin currently are in the formative stage, but if Bitcoin really takes hold, they'll become part of its landscape.
A quick read of TFA indicates that the Square folks are providing a service in terms of accepting Bitcoin from buyers and providing dollars to sellers. The seller gets to set the price in dollars and then receives that number of dollars for the sale, less commission. Charging a commission for providing the service of a currency exchange (or a commodity exchange, if you prefer) sounds like a Square deal to me, depending on the commission.
Facebook Purchases Minecraft for $3 Billion
AP - Social networking giant Facebook announced plans Thursday to buy the popular multiplayer game Minecraft from its creator, Markus "Notch" Persson, for $3 Billion, its latest in a series of high-profile acquisitions. Persson will receive compensation in the form of cash, stock, and an undisclosed number of Oculus Rift headsets.
Asked why he is selling Minecraft to Facebook following his statements that he would cease development of Minecraft for Oculus Rift when Facebook's purchase of Oculus recently was announced, Persson said, "Look, they offered me a lot of headsets in this deal. I simply couldn't turn that down. I also get a seat on the board. Although that doesn't give me any actual input into Facebook's future, the seat itself is extremely comfortable - and the boardroom has some really nice paneling."
When asked about the deal, Facebook CEO Mark Zuckerberg commented, "Minecraft is yet another in a series of strategic acquisitions as we evolve Facebook from a social gaming platform into a social gaming platform. Also, Markus will make a fine addition to Facebook's board; I know we'll receive some top-notch input from him as the board continues to consider future options for the seating and paneling in our boardroom."
When somebody approaches you at a mall asking you to sign a consent form for this, just get out - fast!