12,740 karma · joined Feb 17, 2008 (18y ago) · 2,917 submissions
comment 10y ago · link · parent
Since both "varname" and "$varname" can appear almost anywhere, it is very hard to conclusively tell where something is used (or even if what you see is a mistake).
What’s that, you have a 1.5-hour job that died because of a TCL syntax error, because TCL can’t parse far enough ahead, and the stack trace is useless? Par for the course.
comment 10y ago · link · parent
Besides, there are parts of even the current standard that are broken enough to demand some replacements and deprecations. For example, "std::string" and "std::iostream" are pretty awkwardly implemented and it would be really nice to have something better.
comment 10y ago · link · parent
For a program like this, there ought to be a Sacred Core that Does Very Little and has implementations of key protocols that can’t be touched without the blessing of about 5 senior engineers and the personal seal of the CEO or some such.
In other words, it should be unbelievably hard to screw with parts of the program that are crucial, while making changes that shouldn’t have anything to do with it. (Heck, for all we know, they were adding Windows 10 Tiles™ when this screw-up occurred.)
comment 10y ago · link · parent
For instance, in a networked file system, the on/off switch for “move from version A to version B” ought to be about as simple as swapping a directory symbolic link. That way, everyone can see exactly what it is pointing to now, what it used to point to (as old version targets are probably in the same parent directory), and anyone can figure out how to roll it back instantly.
Given trivial on/off switches, the details of the rest of the system can start to gain complexity.
Also, it helps a lot to have something like a “beta flow” that is essentially a parallel replica of your production environment.
comment 10y ago · link · parent
In any technical field, it is important for the “good” and “best” people from that field to participate in group activities so that there is a better chance of sane decision-making. And in any sufficiently-complex field that has a government agency, you would certainly hope that at least some of those “good” and “best” people are working for the government. So what to do?
Perhaps one approach is to make sure no one group is over-represented, e.g. 5 different organizations that each have one vote or something.
comment 10y ago · link · parent
And you know, advertising methods are starting to look a lot like pure rudeness to me.
It wouldn’t be socially acceptable to walk up to somebody sitting on a park bench and just start randomly bothering them. It wouldn’t be socially acceptable to just start dumping signs all over someone’s front porch and gluing them to the windows of the house. Why, then, aren’t companies downright ashamed (and publicly shamed) when they create a product that feels the need to periodically pop messages in front of the user’s face that are by definition completely unnecessary to the function of the product?
Build a product; make it nice; make it functional; and make it show things to the user only when necessary. Anything else is mere distraction, and frankly taints the product’s perceived value.
We are spiraling down into a cesspool of “free” products that tax users with a thousand needles every day.
We used to know how to pay $40 for software, or even $10, and demand better. We need to return to that.
comment 10y ago · link · parent
For other languages I’m not sure it matters for inequalities.
For equality though, I always use the form "if (constant == x)" as opposed to "if (x == constant)" because in C it guarantees that the compiler will trip over an accidental-assignment typo. That is, "if (constant = x)" is a compilation error but "if (x = constant)" might be missed.
comment 10y ago · link · parent
If Apple were somehow forced to perform this “burdensome” activity, they should take their sweet time and claim one unexpected software/hardware issue after another. Why not? It is entirely plausible (lots of precedence) and since they are by definition building something they did not have before, they could even say they have no experience with what they are trying to build so they can’t know how long it would take. :)
comment 10y ago · link · parent
In an embedded system where memory is at a premium and you may have serious constraints on how long things take (e.g. for timing purposes), the ability to hard-code an address or have it entered in some way saves you from having to support an entire DNS layer in that system.
comment 10y ago · link · parent
I think this article has a lot of really practical ideas that would help a lot.
I suppose the only other thing I’d want to allow in an IPv6 address is a Perl-like underscore anywhere for visual separation that acts like a comment; e.g. Perl lets you say things like 1_000_000 to mean 1000000. The article suggests a single dot but I think that could still be combined with visual underscores for things like "dead_beef_._0001".
comment 10y ago · link · parent
comment 10y ago · link · parent
Suppose I check out a project using a version from a year ago. Project maintainers would certainly not expect me to use last year’s issue template, last year’s preferred pull request layout and last year’s rules for contributing! That is why shoving things into the "git" repository is a hack.
Having this stuff under some revision control is useful but it could be a separate, parallel repository. Frankly, I think everything for project management should be in one repository, and everything for code and documentation should be in another, and GitHub should be able to use files from both to present a project site.
comment 10y ago · link · parent
First, there is an obvious pre-technology version of this problem: I have some information in my brain, and only in my brain, that I refuse to tell you. You are unable to pursuade me to cough it up. Therefore, you never get the information.
The FBI should be forced to treat an encrypted phone as being equally opaque and inaccessible. You can see the phone, you suspect it contains something you want, you can’t get it. You can see my head, you suspect it contains something you want, you can’t get it.
Besides, Apple has the money to fight forever in legal proceedings (shouldn’t be hard...seems the FBI had to drag out an 18th-century clause to even make the request; it should only become more comical from here on out).
Also, phones are sold everywhere in the world. You don’t even need a phone to be a “phone” because anything with WiFi access can effectively communicate; it doesn’t matter if the device was purchased domestically or even has the ability to connect to cellular networks. So yeah, given these options, terrorists will obviously decide to only purchase a Certified Backdoored U.S. Cellphone™ for all their illegal activities, right!?
comment 10y ago · link · parent
People drink stuff like this in ridiculous quantities, and then make it even worse by developing a daily habit. I also find it weird that you don’t often see people set aside “half” of their beverage to finish it later; rather, they sip and sip and sip until it’s gone. By that logic, simply reducing the size of the container that you order should let you drink “all” of it and still feel satisfied. (Or, pour some of it into a cup for immediate consumption, and put the rest away. Same with food.)
comment 10y ago · link · parent
The real problem is that you don’t want to set any precedent at all. Once it’s possible to do something for the 5C, weasel words can be introduced to make claims like “well: now you must maintain the current level of access by law enforcement”. Next thing you know, that excuse can be used to interfere with all future hardware designs.
comment 10y ago · link · parent
Also, vendor names aren’t stable. What about when Flash was installed by Macromedia (but is now Adobe)? It makes no sense for products to shift around because of the company of the week.
comment 10y ago · link · parent
Now that Unicode support is becoming more common, perhaps some bold shells will bravely adopt new special characters.
comment 10y ago · link · parent
And this poison has made it over to Mac OS X, as well. Bundles should be installed directly in /Applications, because you know, they're bundles that can contain as many files as the vendor wants! But no, there's always somebody like Cisco that has to go ahead and create a stupid subfolder anyway.
comment 10y ago · link · parent
I believe this is also the entire reason that recent C++ standards introduced free-function forms of things like begin(thing)/end(thing)/etc. because it was just too hard for something like a template to operate on a value when it couldn't tell whether or not object syntax would work.
comment 10y ago · link · parent
In a sandbox, by default your software can ONLY write to a specified place like the "/some-random-globally-unique-string/yourapp/yourcrap" folder. Then, guess what: the most that "rm -Rf /" can do is obliterate your own stupid app's files. And, if you further compartmentalize features, it may only damage a segment of your app.
Adobe's still stuck in the decades-ago software development model of "well, guess I need full root permission" with no thought invested beyond that. No wonder Apple further locked down root folders in El Capitán so that you now need to restart from a special partition and essentially invoke "sudo --act-from-god --yes-I-really-know-what-the-hell-I-am-doing --no-really-yes-I-do --yes-really" to remove the protections from most root folders.
comment 10y ago · link · parent
For example, consider "operator +", which can have in-object or function implementations. The ridiculous thing is that, for any two types in an expression like "+", you can't tell from observation if it will compile! Is it only available as a member function? If so, then any primitive left-hand argument in this supposed-to-be-commutative expression must be swapped to the right side, or wrapped in a pointless object. The same problem can exist for non-operator functions.
At least now with "auto" and other implicit typing (and even tuples and std::get<needed_type>), there is a chance to write single functions that work around messes such as these.
comment 10y ago · link · parent
Just because a program has the illusion of being monolithic doesn't mean that it should shed the lessons of combining smaller, more stable parts.
comment 10y ago · link · parent
Sometimes, it's just clearer to rewrite something yourself. For instance, just because you can express just about anything in terms of algorithms in the C++ standard library, you should instead write the simpler stuff by hand. (A great example is this silly idea of “copying to an ostream iterator” just to print out some data; I don’t care if that combination of standard functions happens to produce the desired result, because the code is painful to look at!)
It's also helpful to using aliasing (e.g. C++ reference variables) to make similar code look as similar as possible; i.e. rather than have two similar blocks using entirely different variable names throughout, declare references at the top to give them the same names so that the similarities are obvious. This also makes it easier to later pull common parts into functions if desired.
comment 10y ago · link · parent
You wouldn't have to raise the bar very high, I think, to convince people that it's not worth the trouble to write a few hurtful words.
For example, maybe follow-up comments to material require completion of a tiny survey (like 2 questions) from the submitter, that must be answered 100% correctly to “prove” that a visitor at least read the material and understood it enough to comment.
And for people too lazy for that, have an alternative like “or, to post this comment, 45 cents will be deducted from your account”.