I am happy for your enlightenment! It amazes me how many people don't get this, and want to write a PHP "Front Controller" that uses a querystring parameter to select the "page", and then slap a mod_rewrite rule on top to clean up the URL. Instead of—as it sounds like you discovered—putting each page in its own file in the filesystem and letting Apache "route" the request.
On a 3g connection in a grocery store on a hand-held, you're not going to get great response.
...but your proposed alternative is 20 request-response pairs? OK sure, at some point a full page load can be too heavyweight compared to JSON async payloads. But why not just do one async load on a batch submit, get better performance, and still support graceful degradation?
...some anachronistic submit button...
People still batch-process things, in life. It's not an anachronism.
When I select 20 items to be removed, I don't have to wait for 20 page reloads on a slow connection.
In the old days, you would select 20 checkboxes, and then submit a form for batch removal. That was 1 full-page reload, rather than 20 concurrent "fragment" (probably JSON response, I dunno) reloads. Nobody worth copying was forcing 20 serial page reloads for such an activity.
...and the entire job is done in about a second
"About a second" is certainly not enough time for a user to select twenty items, so I'm going to assume that you mean that "about a second" means time from the first async submit to the last async response. That is TERRIBLE latency.
... prevent Iraq setting up a Euro-ba[s]ed petroleum exchange,... the price of the dollar is pinned to the price of oil by the fact that almost all oil sales of any note are done in dollars.
The "lead" crude oil contract is a US-based product, but the European runner-up is still traded in USD and not EUR. If Iraq tried to force trading in a different currency by setting up their own exchange, they would still have to draw enough trading interest to unseat the other two contracts.
The most important part of college wasn't what you learned - it was probably nearly obsolete when they were teaching it to you - but learning how to learn.
The fundamental material in a computer science program is math. That is the type of subject which does not go out of style but is instead built upon, layer by layer.
I've never met someone working in a theater making more than minimum wage.
Every projectionist that I've ever met has made more than minimum wage. They are worth paying well (better than the average theater employee, at least) because of the cost of mistakes.
I will buy the distance argument if Venus's current temperature is believed to be independent of its current cloud cover, but I don't believe that is the case (Venus is by far the hottest planet in the Solar System). It sounds like Venus is hotter given its cloud cover than would be expected without, which implies that Earth will also get hotter in similar conditions. Maybe not 300C hotter, but even 10C hotter is world-changing.
You will also get more water vapor ( another greenhouse gas ) in the atmosphere, but that will - eventually - be countered somewhat by the albedo effect of the large scale clouds that will form.
I understand the reflective effect of cloud coverage, but isn't that useless if the steady-state temperature is very different from current temperatures? What prevents extreme greenhouse effects from pushing Earth into a Venus-like state?
I am a frequent traveler and speaker and really do need something you can drop from 6 feet and pour coffee over have it keep working.
I know you're a normal person, but when I read that I imagined a huge fucking guy fumbling his tablet from shoulder-height, getting mad as hell, and throwing his coffee after the poor thing.
My point was sarcastic, I don't know if you missed it (non-native language?) or if you responded in-kind. Plainly, prohibition and licensing are not the same thing. An unlicensed "operator" is prohibited yes, but the cost of licensing is always goint to be lower than the cost of a black-market solution (by its nature; the black market solution is not attractive if it is worse, because of the inherent risk!) Therefore, the net result is more regulatory control when licensing is an option vs. total prohibition.
Ultimately, my point is that (1) comparing licensed driving to the War on Drugs is not valid, because (2) increased license requirements would serve to change the economics of learning how to drive rather than just imposing randomized penalties.
This doesn't sound anything like greenwashing; greenwashing is a PR move to appear more "eco-friendly". This is simpler to explain as a rational economic decision: There are forms of non-renewable energy that are not harvested only because the energy cost to extract them exceeds the energy value they provide. If the energy costs to extract them can be brought down to near-zero, it is to Shell's economic benefit to extract and sell the heavy crude.
Your argument that the oil should "stay in the ground" is totally unrelated. I do not have an informed opinion in the matter of heavy crudes, but please don't use it as a rebuttal.
I see that it is in C99. But it wasn't when I was learning C in the 1980s.
Well! I'll get off your lawn now. I learned on C99, I did not know that the guarantee was new.
Don't use a language that encourages pointer calculations. If you're working in the kernel or hardware drivers maybe.
That is hardly an argument against sizeof as a language feature. I think we both agree—outside of the first learning experience—developers who are getting tripped up by sizeof should't be using C in the first place; but it is not the fault of the language or a misfeature.
If you think all strings can be defined as const char arrays
Lucky for both of us, that's not what I think. I specifically said "string literal", which is a const array and not a pointer. This is relevant for the sizeof discussion because the operator is evaluating the size of the array (therefore the entire string) and not just evaluating the size of a pointer.
Since almost every computer nowadays implements IEEE floating-point, they can all store 1.0 exactly. From the link:
Any integer with absolute value less than 2^24 can be exactly represented in the single precision format, and any integer with absolute value less than 2^53 can be exactly represented in the double precision format.
it should return the size of a memory pointer on the target machine, since that is what a "string" is in C.
A string literal in C is of type char[N] (where N is the minimum value required to store the whole string, including the null terminator). String literals degrade to pointers quite easily, so yours is a common error. So...
const char direct[] = "string";
const char *const indirect = "string";
sizeof(direct) == 7;
sizeof(indirect) == sizeof(char*);// 4 or 8 on most 32- or 64-bit architectures, respectively
So to allocate a string you have to multiply sizeof with strlen and add 1 for the null terminator?
Since you specifically mentioned strlen, I can tell that you are doing the wrong thing. It is guaranteed that sizeof(char) == 1, so you can skip the sizeof. And then instead of allocating strlen(x)+1, you could use the standard function strdup.
Aside from this particular example, what is your beef with sizeof? Do you know an alternative for compile-time size calculations?
What's wrong with optimizing something by hand if it's so blatantly simple?
In what situation will an application of DeMorgan expected to actually be an optimization? I expect the compiled code would just end up using inverted comparison instructions and swapping ands/ors around. Net benefit: nada. In such a situation, the effort of optimization is a total waste and any resultant obfuscation is also a total waste, so that's what is wrong.
Nobody programs fast enough to fill data-centers with 'new programs'.
I don't read that as "new program text" i.e. the storage for newly-released executables. I read it as "storage for [data generated by] new programs," where the new programs are "programs" from a TLA organization's perspective and not individual executables. From that perspective, it is quite believable that the NSA would be capable of filling new datacenters with new programs.
try to explain the intricacies of Java garbage-collection to an equity-options trader...
If that is a problem in your organization, this would probably be a good start: "The equity-options traders that understand the role of technology in their trades will inevitably be eating your lunch."
You just plainly CANNOT build anything out of the pieces but exactly what you are sold.
Several years ago, I would have agreed with you. Now it just sounds like you aren't looking hard enough, or haven't looked recently—check out the Creator series. Almost all of my newer lego collection is from those box sets, and they are very good about providing reusable pieces.
I knew it. I'm surrounded by assholes!
I am happy for your enlightenment! It amazes me how many people don't get this, and want to write a PHP "Front Controller" that uses a querystring parameter to select the "page", and then slap a mod_rewrite rule on top to clean up the URL. Instead of—as it sounds like you discovered—putting each page in its own file in the filesystem and letting Apache "route" the request.
People still batch-process things, in life. It's not an anachronism.
"José", not "hose A". Er... it looks like slashcode is going to mutilate that, it should look like "Jose" with an acute accent over the 'e'.
In the old days, you would select 20 checkboxes, and then submit a form for batch removal. That was 1 full-page reload, rather than 20 concurrent "fragment" (probably JSON response, I dunno) reloads. Nobody worth copying was forcing 20 serial page reloads for such an activity.
"About a second" is certainly not enough time for a user to select twenty items, so I'm going to assume that you mean that "about a second" means time from the first async submit to the last async response. That is TERRIBLE latency.
The "lead" crude oil contract is a US-based product, but the European runner-up is still traded in USD and not EUR. If Iraq tried to force trading in a different currency by setting up their own exchange, they would still have to draw enough trading interest to unseat the other two contracts.
The fundamental material in a computer science program is math. That is the type of subject which does not go out of style but is instead built upon, layer by layer.
Every projectionist that I've ever met has made more than minimum wage. They are worth paying well (better than the average theater employee, at least) because of the cost of mistakes.
I've heard of South African Dutch, but never Kenyan Irish!
I will buy the distance argument if Venus's current temperature is believed to be independent of its current cloud cover, but I don't believe that is the case (Venus is by far the hottest planet in the Solar System). It sounds like Venus is hotter given its cloud cover than would be expected without, which implies that Earth will also get hotter in similar conditions. Maybe not 300C hotter, but even 10C hotter is world-changing.
I understand the reflective effect of cloud coverage, but isn't that useless if the steady-state temperature is very different from current temperatures? What prevents extreme greenhouse effects from pushing Earth into a Venus-like state?
A man like Gandhi doesn't need conscripts.
I know you're a normal person, but when I read that I imagined a huge fucking guy fumbling his tablet from shoulder-height, getting mad as hell, and throwing his coffee after the poor thing.
My point was sarcastic, I don't know if you missed it (non-native language?) or if you responded in-kind. Plainly, prohibition and licensing are not the same thing. An unlicensed "operator" is prohibited yes, but the cost of licensing is always goint to be lower than the cost of a black-market solution (by its nature; the black market solution is not attractive if it is worse, because of the inherent risk!) Therefore, the net result is more regulatory control when licensing is an option vs. total prohibition.
Ultimately, my point is that (1) comparing licensed driving to the War on Drugs is not valid, because (2) increased license requirements would serve to change the economics of learning how to drive rather than just imposing randomized penalties.
This doesn't sound anything like greenwashing; greenwashing is a PR move to appear more "eco-friendly". This is simpler to explain as a rational economic decision: There are forms of non-renewable energy that are not harvested only because the energy cost to extract them exceeds the energy value they provide. If the energy costs to extract them can be brought down to near-zero, it is to Shell's economic benefit to extract and sell the heavy crude.
Your argument that the oil should "stay in the ground" is totally unrelated. I do not have an informed opinion in the matter of heavy crudes, but please don't use it as a rebuttal.
Yeah, because prohibition and licensing are the same thing!
Well! I'll get off your lawn now. I learned on C99, I did not know that the guarantee was new.
That is hardly an argument against sizeof as a language feature. I think we both agree—outside of the first learning experience—developers who are getting tripped up by sizeof should't be using C in the first place; but it is not the fault of the language or a misfeature.
Lucky for both of us, that's not what I think. I specifically said "string literal", which is a const array and not a pointer. This is relevant for the sizeof discussion because the operator is evaluating the size of the array (therefore the entire string) and not just evaluating the size of a pointer.
Since almost every computer nowadays implements IEEE floating-point, they can all store 1.0 exactly. From the link:
A string literal in C is of type char[N] (where N is the minimum value required to store the whole string, including the null terminator). String literals degrade to pointers quite easily, so yours is a common error. So... // 4 or 8 on most 32- or 64-bit architectures, respectively
const char direct[] = "string";
const char *const indirect = "string";
sizeof(direct) == 7;
sizeof(indirect) == sizeof(char*);
Since you specifically mentioned strlen, I can tell that you are doing the wrong thing. It is guaranteed that sizeof(char) == 1, so you can skip the sizeof. And then instead of allocating strlen(x)+1, you could use the standard function strdup .
Aside from this particular example, what is your beef with sizeof? Do you know an alternative for compile-time size calculations?
In what situation will an application of DeMorgan expected to actually be an optimization? I expect the compiled code would just end up using inverted comparison instructions and swapping ands/ors around. Net benefit: nada. In such a situation, the effort of optimization is a total waste and any resultant obfuscation is also a total waste, so that's what is wrong.
Well duh! Rock on.
I don't read that as "new program text" i.e. the storage for newly-released executables. I read it as "storage for [data generated by] new programs," where the new programs are "programs" from a TLA organization's perspective and not individual executables. From that perspective, it is quite believable that the NSA would be capable of filling new datacenters with new programs.
If that is a problem in your organization, this would probably be a good start: "The equity-options traders that understand the role of technology in their trades will inevitably be eating your lunch."
Several years ago, I would have agreed with you. Now it just sounds like you aren't looking hard enough, or haven't looked recently—check out the Creator series. Almost all of my newer lego collection is from those box sets, and they are very good about providing reusable pieces.