214 karma · joined August 5, 2012
Edit:
Instead of forcing RTFM on every new user, I don't see why new users should not have immediate tryout without reprocussions and learn the guidelines from a kindly mod or other user replying with a reason why their question is not appropriate/duplicate or whatever. That is the point of upvotes/downvotes and active moderation. This is a learning community, not a cadre of elitists.
Or is that too off-topic/closed as not constructive? /s
In the author's example in support of "Variables should not be allowed to change their type," the variable "x" is subject to coercion, but the real problem was poor scoping by using the global value instead of the parameter.
This would be the same scoping problem, even if the variable type was not changed. Any non-deterministic function that modifies existing state can be said to produce unexpected/unpredictable/unreasonable results. In this case, the unpredictability was not due to a variable changing type.
Completely disagree.
For example. I was recently trying to figure out how to make an autocomplete list faster, as the database was too slow. I already had a functional test taking in search parameters and returning results. But there would be no way to write a test for the actual implementation of the indexed/faster search classes until I figured out a real approach. In the beginning, I had no idea if this would require a separate daemon process to do indexing, or if it could index realtime, or caching, or memoization, or where it might need to keep an index once created. These are just a couple of the unknowns. Once I figured out a workable concept, I wrote tests for those classes and functions. Then I refactored multiple times, altering the tests accordingly.
These are all under the general term threading. You still have to pass messages or set up semaphores to use them. The code is still separated between main and sub/worker/thread.
> Go HTTP server
Every HTTP server lib handles requests in this way.
You cannot write an HTTP client, however, without explicit asynchronous code like callbacks, threads, or what have you.
The author is focusing on the principle privacy is not just about secret keeping things secret. Your example of people who may collaterally affected falls under this category. It's just an example of using the word private to equate secret.
Only a narrow view of reading would be limited to the physical act of moving ones eyes across a page.
Similarly, the word coding is often used to describe a plethora beyond typing if statements and for loops.
The author does have some good points despite this problem, but the entire hypothesis is based on a weak argument of semantics.
The difference becomes apparent when considering soda pop bottle versus a high-end dress shirt. The soda-pop bottle is a trivial purchase, and is generally available among many other brands offering the same thing. However, the shirt may be purchased with more effort and care, and is generally available among other clothing from the same brand.
The brand on the bottle offers identification of the individual item during purchase and later during selection for drinking. No matter if it is found in a bin among bottles from other brands, or within a section containing only bottles from one brand. Bottles are also discarded after use, so they are not identified individually, but merely as one of many copies. I have several bottles of soda pop, some Coke some Pepsi. The brand is still very relevant.
A shirt on the other hand is probably accompanied by an entire section of clothing for the same brand, and does not need individual identification. Even more so during selection for use, shirts are generally owned by a single person and cared for individually. I only have one pink broadcloth shirt, and it happens to be from Banana Republic. The brand is not as relevant.
No?
However, I would also suggest that it is a very strange, unearthly, or extrordinary phenomenon to have such a massive and fast-moving thing traversing in such silence.
For example, there are not elephants that travel so silently that they may accidentally trample rodents underfoot.
Alternatively, though, outerspace and underwater, things are much less certain regarding the danger of large masses moving quickly.