Better HN
topnewbestaskshowjobs
Log inSign up

makecheck

12,740 karma · joined Feb 17, 2008 (18y ago) · 2,917 submissions

Submissions

comment 10y ago · link · parent

It is so frustrating to see a lot of the “solutions” being proposed by the administration: wanting to hire more screeners, blaming passengers for bringing too many pesky bottles of water and pocket knives, etc. They are missing the obvious solution that should be at the top of the list, right in front of their faces: we must REMOVE “safeguards” to speed things up.

The probability that a bottle of water or anything that looks like water will cause an airline disaster is effectively ZERO. It is not a risk, and not even slightly concerning, period. This is not worth checking even once, even at random, much less millions of times a day.

And pocket knives? They SERVE FOOD WITH KNIVES on planes. They literally give you a knife in first class. If it was someone’s goal to obtain a knife on board, they would not need to bring it through security. And frankly, one could argue that knives are the opposite of risky: a few passengers with knives to defend themselves may very well be able to prevent a handful of hijackers from doing anything. Either way, I am strongly on the side of “teach people to band together and defend themselves”, not “cower and be fearful of everything”.

And don’t even get me started on having to take off shoes. It is frankly sad that we have been so fixated on ONE piece of clothing, for years and years and years, as a reaction to ONE passenger out of millions who couldn’t even carry out his “threat” successfully.

Besides, the entire concept of “prohibited items” does not eliminate risk. There are human beings who are powerful enough and skilled enough to cause serious damage or death all by themselves. They don’t need “prohibited items”, they simply are deadly. A group of passengers that knows how to band together and fight back can subdue anyone, even a passenger that is deadly all by himself.

comment 10y ago · link · parent

Yep. These would be faster than human beings even if the cashiers heard your order perfectly the first time. Sadly, more often than I’d expect, they would not. It’s like they have a series of questions in their head and they like to ask those questions regardless of what you say, e.g. I say “number 1 combo TO GO” and still they say “for here or to go?”.

comment 10y ago · link · parent

That could be true but consider that on the desktop we have had “files” and “applications” for years without much of a problem. In fact, any time a document tried to do too much (ahem Adobe Reader) it turned into a bloated mess and we preferred simpler formats.

comment 10y ago · link · parent

I think a more interesting way to do streaks would have been to acknowledge and even encourage occasional time off. Treat them a bit like roller coasters.

For instance: the first contribution in a vacuum is 1 point; contributions for X days in a row are worth 3 points each; if you then “miss” only a day or two, you still get 2 points for the next contribution (unless you wait like a month, in which case it becomes 1 again). And to discourage absurd amounts of continuous work and burnout, contributions could also fall to 2 points after something like 14 consecutive days, where they might return to 3 if you take just 1 day off.

comment 10y ago · link · parent

Or maybe, it is well past time for browsers to have two concepts: “page” and “application” windows.

That way, web sites that are really trying to be applications can have one set of logical keystrokes, default security models, etc. and plain web pages can have another set. They could be further distinguished by some kind of difference in window frame.

comment 10y ago · link · parent

Over 3,000 top sites using the font technique, and from the description this sounds really wasteful (choosing and drawing in a variety of fonts for no reason other than to sniff out the user).

Each font is probably associated with a non-trivial caching scheme and other OS resources, not to mention the use of anti-aliasing in rendering, etc. So a web page, doing something you don’t even want, is able to cause the OS to devote maybe 100x more resources to fonts than it otherwise would?

A simple solution would be to set a hard limit, such as “4 fonts maximum”, for any web site; and, to completely disallow linked domains from using more.

comment 10y ago · link · parent

It is great to be knowledgeable about energy consumption and conservation methods and to try to spread that knowledge. Realistically however, any action is negligible unless it is done by industries that will have a huge effect on the environment (airlines, for instance).

If you want to achieve X, it is ultimately best to spend your time convincing a certain number of local businesses to do X, or petitioning governments, etc.

comment 10y ago · link · parent

Boycotts won’t help because not enough people ever participate. If any airline starts to suffer, it will be bought out by another airline.

And if by chance a significant number of people did stop flying, the TSA would just expand into whatever people are using (train stations; bus stops; or heck, maybe the TSA starts building their own “checkpoints” on highways — you know, to ensure “transportation security”).

Competition can also be a good motivator. If you want to fix the TSA, cut their responsibilities in half at a particular airport and assign the other half to some startup that offers the same services. Then you come up with a few common-sense ways to measure how good they’re doing, and you pit them against each other. May the most efficient, cost-effective and customer-satisfying organization win.

comment 10y ago · link · parent

This seems “helpful” but here’s what I think will happen: a few people will accidentally write scripts that depend on the typo version, then a future maintainer of NPM will scrap this feature and cause those scripts to break.

Rather than promoting multiple interfaces, pick one correct name and force people to use it. And this isn’t just for typos; in Subversion for instance, it is ridiculous that "svn blame", "svn praise" and "svn annotate" all refer to exactly the same operation. Which probably means that someone has to make sure "man" page queries with any of those names will all work, etc. Useless extra effort.

I set up shell aliases for typos that I find myself making frequently, which are probably not the same typos that other people make. In the case of "npm install", there are probably a series of equally-probable ways to make a mistake: "onstall", "nistall", "unstall" or heck even "instal". Therefore, don’t cater to any of them. Let me fix my own typos in my own shell, and don’t give people a chance to introduce those things into scripts.

comment 10y ago · link · parent

A lot of missteps in the early days of web technologies have made stable URLs impractical, unfortunately.

One problem is that someone decided to include file name extensions. Maybe this happened naturally because web servers made it so easy to expose entire directory structures to the web. And yet, this continues to be used for lots of other things. It is so ridiculous that a ".asp" or ".php" or ".cgi" causes every link, everywhere to depend on your arbitrary implementation details!

Another problem is that many software stacks are just not using brains when it comes to what would make a useful URL. Years ago I was very frustrated working with an enterprise software company that wanted to sell us a bug-tracking system and they didn’t have simple things like "server.net/123456" to access bug #123456; instead, the URL was something absolutely heinous that wouldn’t even fit on a single line (causing wrapping in E-mails and such).

Speaking of E-mail, I have received many E-mails over time that consisted of like TWELVE steps to instruct people on how to reach a file on the web. The entire concept of having a simple, descriptive and stable URL was completely lost on these people. It was always: 1. go to home page, 2. click here, ..., 11. click on annoying “content management system” with non-standard UI that generates unbookmarkable link, 12. access document. These utterly broken systems began to proliferate and it rapidly reached the point where most of the content that mattered (at least inside companies) was not available in any sane way so deep-linking to URLs became pointless.

comment 10y ago · link · parent

One aspect of C++ lambdas that I really don’t like is the visual confusion caused by allowing "return", since at a glance this seems to affect the parent function. I have already found myself adding comments inside lambdas like "return x; // return-from-lambda" to make sure that I see what is really happening. Python by contrast does two things better: Python makes it really hard to write long expressions as lambdas, and no "return" is used in a Python "lambda". Of course, Python also allows "def" inside a "def" as a convenient way to write longer one-time functions.

I also found that while I could use C++ lambdas for things like iteration, e.g. "object->forEachThing([](Thing const& t, bool& stop){ ... })", this makes the keyword problem worse. In this type of call, if I want to implement something that is logically like a "break" or "continue" of the loop, it has to use the "return" keyword (from the lambda only) with special conditions attached such as a "bool" variable to request the break. And that is confusing to read, even though conceptually it is similar to the Objective-C NSArray "enumerateObjectsUsingBlock:" that takes a similar approach (in that the block takes a "stop" argument).

comment 10y ago · link · parent

The biggest mistake with these objects is over-using them. They are very helpful for internal memory management but they should definitely be avoided in APIs unless the point of the API is to do something like transfer ownership (e.g. factory method returning std::unique_ptr<T>).

Raw pointers continue to be fine in a wide variety of cases. Suppose the object model has something like a type T with APIs to access pointers to types A, B and C, the lifetimes of A, B and C are always tied logically to the lifetime of T and everything you do with the pointers to A, B and C is in the context of some T. This does not require special magic pointer objects to “share” A, B and C pointers because their safety is ensured transitively. So you might wrap T but you don’t need to wrap the others.

Besides, pointer objects are still annoying to use: sometimes they’re pointer-like (e.g. "if (somePtr)" works) and sometimes they’re not (requiring a ".get()"), and they seem to “infect” entire call chains. If you have previous API dependencies on boost::shared_ptr<>, you can’t easily replace those with std::shared_ptr<> either. Use them very judiciously, and always try the simplest thing that would work, first.

comment 10y ago · link · parent

Heh, great. I used to put an ellipsis into a programming example to mean “fill in whatever you actually do here”, and now C++ went and made it mean something. :)

comment 10y ago · link · parent

You would have to combine copying and reference management, e.g. "[=]" and std::shared_ptr<>. It definitely requires the programmer to pay more attention though, compared to other languages/constructs.

comment 10y ago · link · parent

The first example’s remedy seems to be wrong.

I am not aware of any reason to test for "nil" in Objective-C, as that remedy suggests. Sending the "doSomething" message to "nil" should do nothing.

If SIGSEGV does occur for an object, it is probably for the exact opposite reason: you have a pointer that is NOT "nil" but it refers to something that has been freed. (Or, the SIGSEGV is not related to objects at all, and is caused by some other access such as plain C code.)

comment 10y ago · link · parent

It is hard to accurately compare software to any other craft because changes are requested practically forever. (Nobody asks a woodworker to go back and add a 4th drawer to a dresser that was built 6 months ago.)

I find that highly-granular revision control systems go a long way toward avoiding cruft and they remove the temptation to cut corners. When you are halfway through a huge change and you encounter something that is causing problems, carve out the problem into a separate commit and fix it! Similarly, if something that was expected to be a simple feature turned out to require general architectural changes, carve out the general changes and commit them first.

comment 10y ago · link · parent

Actually, it’s a story in itself that a problem noted by an older article is still relevant enough to be discussed. In the 6 months since, has the industry even looked at this or is it even worse?

A fast-moving industry needs equally-fast solutions. If 6 months can pass and people are still talking about a problem as if it was yesterday, then not enough has happened. Some ideas of more that could be done: talk to your web-developer friends; have them talk to their managers; start publicly shaming bloated web sites; submit issues and/or pull requests to web browser projects with ideas for how to fix HTML; or something.

comment 10y ago · link · parent

The article lists a lot of major issues with suburbs, and I saw them all when I used to live in one.

Something that wasn’t really mentioned is how utterly boring some of the everyday life choices are. And yet, because none of the choices necessarily sucks, people remain “just happy enough” and never really yearn for anything better. I’m sure this setup is great for corporations but it is sad for human beings. Just observe: I mean, every single shopping center seems to have nearly exactly the same chain restaurants and a Starbucks…EVERY ONE! And if by some miracle you do find something different, it is usually a “choice” between Home Depot and Lowe’s or a “choice” between McDonald’s and Wendy’s or something.

Plenty of variety still exists outside of suburbs. The problem is that for people in suburbs, it would mean driving 45 minutes to even reach the alternatives, much less enjoy them regularly. And if you are averaging long drives all the time to/from work or to do anything else, the last thing you feel like you have time for is another long drive to experiment.

I felt it sucking my soul. Long drives expose you to more traffic which leads to anger, etc. Driving wastes a lot of money (cars are expensive even when fuel is not high-priced). And I found myself slowly accumulating garbage to fill a large space. Ultimately I felt that it was a lot more sane to live smaller, in an “expensive” place closer to civilization. While it did cost a lot more per square foot, I saved money after not too long and I definitely felt better. And I have more variety now.

comment 10y ago · link · parent

I never edit a crontab directly. I use external files and reinstall them with "crontab filename" as needed. Then of course the files can be revision-controlled.

Also, I name the files according to host so I remember exactly where they were installed in a networked environment (e.g. "host1.crontab", "host2.crontab").

comment 10y ago · link · parent

In some sense it is nice to see a push for progress on IPv6. And yet, it is also painfully clear that these networks are not ready, even for the big sites like Google.

For instance, there are Google machines that are apparently IPv6 only. Over the last several months I have had major issues reaching Google domains like Google.com, YouTube, etc. from my home Internet. It will either work seamlessly, or hang seemingly forever when trying to look up one of the URLs (which is oh so fun when I am trying to search Google frequently). It only hangs for Google domains.

I dug up a forum post that was over a YEAR old where people finally figured out that all of this crap was due to IPv6! They were literally turning off IPv6 entirely on their Macs in order to make Google searches work again. The symptom is a trace-route stumbling on the way to 1e100.net (one of Google’s backbone domains). Sadly, I can imagine people screaming at their ISPs over stuff like this.

I haven’t gone as far as to kill all of my IPv6 connections but I do have to turn off WiFi and turn it back on to force some kind of a network reset whenever this shit starts happening on my MacBook. Even then, the problem will eventually return, and is pretty much guaranteed to return by closing the lid and coming back later (how foolish of me to expect the Internet to be useful when I open the lid?). Networking on the Mac is a mess, to say the least. Even if this isn’t entirely Apple’s fault, it is entirely their problem for having poor fault-tolerance. For instance, if I were them the first thing I’d do is write a script to turn off the WiFi and turn it back on in case of a problem, since that seems to solve 90% of issues all by itself.

comment 10y ago · link · parent

I don’t understand why deletion would even be necessary in a case like this. Are people filling up their drives that quickly? If a “service” thinks that some data has become redundant, just move the original out of the way and tell the user where it went and what’s in that stash.

comment 10y ago · link · parent

By logging into a 3rd-party site using Google+, for instance, you remain logged-in to Google when you go to any other web site.

And the authenticator clearly does not require this global behavior: if you immediately log out from a Google page, you remain “logged in” at the 3rd-party site that you started from. So why doesn’t it log you out globally? Probably to convenience Google, at the expense of security when you auto-identify yourself to who knows how many other web sites before you realize what happened.

Logging into one page with one set of permissions should mean “LOG INTO THIS PAGE”, not “REVEAL MY SECRETS TO THE INTERNET”.

comment 10y ago · link · parent

I am so tired of these “takedowns” and other brute-force methods that are used to essentially squash ants. It always seems way, way too easy to do, and the collateral damage is way too high.

The Internet needs to start acting like a series of dumb pipes again: so dumb that you have no idea where information really is, and so huge so as to be impractical for anyone to control.

Consider highway systems. For roads, the only way to “shut down” somebody’s access without controlling every road, everywhere is to have some idea where your target is. And even then, you probably have to control several access points to really keep that target from moving. And unless they live at the end of a single country road that you control, being draconian about road control is usually going to be very hard and probably impossible. And that is a good thing, because if shutting down highways made any sense then a hell of a lot of people would be inconvenienced on a regular basis (or worse than inconvenienced, if they were in an ambulance or something).

Blocking Internet tools is arguably far worse than blocking highways because networks transport an almost incomprehensibly-large amount of information and the effects are vast. By the same token, seizure of a device is arguably far worse than seizure of something like a truck because a device can effectively provide access to someone’s entire life and not just the little bit of information that an authority is seeking.

Enough paranoid blocking and seizure, let’s try to focus on world progress.

comment 10y ago · link · parent

Yes, Google is actually crucial.

I didn’t realize how uniquely good Google’s programming results were until I tried Bing or DuckDuckGo and was left confused because their top results didn’t even mention some pretty significant page on a target subject.

I am however noticing a trend that I don’t like in Google results: they are trying to interpret pages more and more instead of just being a proxy. (No thanks, Google, I don’t want your attempt at a pretty summary of a Wikipedia page or StackOverflow post; the link will do nicely. Besides, it is just a little obnoxious to lift content from other sites that may prevent people from visiting those sites entirely.)

Google is not my sole search tool though. I still find it faster to search offline for a lot of things; for instance, if you have a Mac and haven’t tried something like Dash for quick access to API documentation, you are really missing a potential productivity boost. And, offline search helps a lot on airplanes.

comment 10y ago · link · parent

Also, for ages Macs have had a "Public/Drop Box" folder as a write-only way for other people to give you things (and it actually makes a lot more sense in that interpretation). It did make it a little confusing when starting to use Dropbox itself, as then you have "~/Dropbox" and "~/Public/Drop Box".

comment 10y ago · link · parent

This kind of thing is so frustrating because enormous effort has been put into solving exactly one VARIANT of a pretty general problem. The general case is: at a particular point in the code, is $THIS_DATA usable or not, for some appropriate definition of “usable” in that code?

And if “usable” has any additional meaning besides “is not null”, this entire machinery is useless because one STILL has to figure out the state of the data!

For example, what if you are sanitizing input from a user and there is a “wall” in your code beyond which a string is considered safe (e.g. decoded, evaluated by regex, or whatever is supposed to happen)? Or, what if “usable” means that a server has been connected to, or a database opened, or a calculation completed, or whatever else you want to say? What if it’s a numerical denominator and you want it to be nonzero? The list could go on and on, and none of these architectures deals with ANY of those possibilities.

comment 10y ago · link · parent

Ah yes, another law with good intentions being exploited by loopholes. Companies that “communicate” with their customers in this way are so very obviously trying to screw you over but hey, they “obeyed” the law and “told you” the real price so it’s all good, right?

Also, this crap isn’t limited to web pages. Happens in the mail too. Yet these remain “legal” because every one of them “tells you” exactly what they are: in tiniest print, in the grayest of colors, in the unlikeliest of places and in the most convoluted of words.

These laws have to be cleaned up. In the meantime I am perfectly fine with publicly shaming companies that pull these tricks. We need a lot more articles like this one.

comment 10y ago · link · parent

Profits don’t just show up one day and stay fixed. There is always risk, and always opportunity.

This type of move could address both.

One risk is that the company’s ability to manufacture may be seriously affected by the actions of a single government. If their current factories were suddenly impacted by a policy decision, future profits would definitely be hurt. By spending money now (that, incidentally, their competitors might not be able to), Apple can lower that risk; and, they would also be acting on their own terms instead of having to react to someone else.

There is also the investment side. By spending money now, they could end up with even more capacity that will enable them to develop more products for more people and increase overall profit in the future. If they don’t spend that kind of money, their competitors could catch up. The time to invest is before you have a problem.

comment 10y ago · link · parent

And Apple has one of the best chances to make real change here because they can afford to spend a hell of a lot of money without their short-term business being hurt.

They could, for instance, speculatively set up entire facilities in new areas, hire staff, and experiment with parallel development of the same products to measure how well the new bring-up is going.

comment 10y ago · link · parent

Kickbacks are a risk, though that could also be balanced with harsh penalties such as minimum sentences for being caught accepting kickbacks.
1
484950
98