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

I wish people who paid lots of government money for things were always forced to do so out of their salary. For example: we will pay you $X per year in exchange for giving you the responsibility to make up to 10 big purchases; each time you purchase however, 1% of the proposed sum comes out of that $X salary; now then, how judicious will you be?

One thing Ron Paul did in Congress years ago, after one of those stupid “let’s spend taxpayer money on a bunch of medals” proposals or something, was to rephrase that expense: he challenged Congress to simply donate a percentage of their own salaries to make it happen. After all, if it was so wonderful (echoing all the things other Congress members had stood up and said about the idea before then), and so worthwhile, surely they would personally not mind chipping in something, right? Predictably, a very small number of congresspeople were suddenly willing to go quite that far.

comment 10y ago · link · parent

Code doesn’t usually exist in a vacuum; it has dependencies on an environment that keeps moving forward. If your old commented-out code is calling any functions, those functions may have changed. It probably used a bunch of libraries. It probably needed a certain compiler or interpreter version. And if it ran on just one OS or hardware, you might have a hard time even finding the right system to run the old code.

In other words, unless you are also keeping your entire universe in revision control (all code changes, lists of program and library versions, old machines, etc.), then there isn’t much point in just preserving code. That code probably won’t copy/paste into the current environment with the same behavior, and it’s almost worse if it does “fit” because the behavior may now be misleading.

comment 10y ago · link · parent

I’m not defending the implementation (I hate most of std::iostream), just that "\n" is not exactly equivalent so switching to that may cause surprising behavior and create problems. Auto-flush has its uses.

If the main purpose of a program is to generate output then it ought to know what it’s doing anyway and know how to avoid poor performance. For most programs, I’d say that Unix rules of thumb apply: if you are already trying to be “silent on success”, your program will either print nothing or maybe an error or two and not have to worry about print performance. If your program might only print one error and that doesn’t even show up because a flush didn’t happen before a crash, there is a big problem.

comment 10y ago · link · parent

The problem with Facebook is the same feeling I get when any random store, event or web form asks for an E-mail address: “oh great, what unsolicited crap will you start sending me?”. And it is the same mentality that led to ad-blocking.

If entities could be trusted not to be total jerks with over-marketing, maybe people would share and Like things more.

Instead, a simple “Like” is virtually guaranteed to result in new spam.

A very simple thing Facebook could do: mandate that each Page (and even itself) may not send more than one message per MONTH. Period. And set a maximum length. Hire some editing people if you must, and make that message count. Don’t just assume you can send hourly updates to all your “followers” as if they care more about you than their own families.

comment 10y ago · link · parent

Don’t optimize prematurely, especially since debugging time is a factor here.

If a long-running program crashes, a missing flush can be the difference between seeing or not seeing an important detail that preceded the crash. Instead of going straight to the cause, you might be wasting time exploring something that happened a bit earlier, or you may be forced to rerun the long program again to see the same issue with better logging.

Then there’s the inconsistency aspect; if you become used to "\n", and see it “work” all the time for streams that happen to go to the terminal, you will be confused when “the same” thing does not have the same behavior for a file stream. Use the abstraction ("endl") until you know you need it to be different.

comment 10y ago · link · parent

Apple clearly has some frequency of updates (10.11.x updates, security updates, etc.) so the fact that they’re a corporation or using closed-source, etc. is not necessarily relevant. If they want to patch something tomorrow, they can.

Since they haven’t changed this package, there may be another reason besides security. For example, some important group at Apple or a big customer may have created a dependency on "git" functionality, and they want to carefully test any change on a large scale before proceeding. Just because it isn’t wise for important things to depend on fragile environments doesn’t mean they can ignore those environments when making changes.

The problem with simple versions is that an update seems to be all or nothing: you can’t easily fix a small security hole when starting from a few versions ago because you have to consider anything else that changed. Ideally, systems are designed in enough layers that small updates really are practical without affecting other features.

comment 10y ago · link · parent

I know it’s Apple’s style to try to do everything themselves but search has simply never been their strong suit. (Even now, I work around Spotlight using 3rd party software; and Spotlight integration in things like Apple Mail is so messed up that I see it inanely failing to find words in messages that I am currently LOOKING AT.)

It is time to team up with Bing and/or Google and just make external search the default.

It should be possible to use things like "appstore:ios" as a filter term much like "site:xyz.com", etc. and just offload the entire summary page of every app for indexing. The summaries for apps seem to be rendered as web pages anyway, since the App Store acts like some kind of web view.

And when search results are constructed from such filters, all the default links would be formatted by Bing/Google to open the appropriate app store page.

All this stuff exists in bits and pieces now, and has for years, it just hasn’t been put together anywhere. It really does seem as simple as dumping every app web page somewhere, indexing it with Google, converting all the results links to use an app-store URL, and saying “done”.

comment 10y ago · link · parent

Yep. A really simple thing they could do is have like a “one hour timer before payment” that basically says you have a chance to download and tinker with something first, and if you delete the app then you will never pay for it.

comment 10y ago · link · parent

It works really well in a class scenario. A professor can just show a notebook on the screen “live”: walk through it, or even change things and demonstrate the effects. And when finished, the whole thing can be posted as a file for students to download and try themselves.

comment 10y ago · link · parent

A digital signature is reasonable if it can be used to produce a warning but not a denial.

In other words, if my computer wants to pop up a “This will void your warranty!” warning the first time I plug in a cheap peripheral that has not been validated, I think that is fair use and buyers are free to continue and accept any consequences. On the other hand, I do not think the original manufacturer has the right to outright prevent the use of unsigned-but-standards-compliant devices, since that wanders into “you actually leased and never owned your device” territory.

comment 10y ago · link · parent

There is nothing inherently wrong with a short URL, provided that supporting infrastructure has proper security.

Even now, if you connect to your favorite “trusted” long domain names, nothing stops that from being totally hijacked by an untrustworthy Internet service provider or other entity that has access (or more insidiously, inserting crap like ads that were not in the original source).

And heck, long URLs are suspicious as well. I’m sure by now everyone has received one of those ridiculous "important@facebook.com.kdsjfksdjfkdsfjdskfjdskfjdskfjdskfjdskfjdskfjdskfs.oopsmalware.com".

The push should be for broader adoption of mechanisms that make it hard to subvert what you download, and easy to verify what will happen when you click a link.

comment 10y ago · link · parent

This misses some crucial observations.

One, good UI takes time, even for experts. UI redesigns that are easily described can be hard to reprogram (e.g. “replace those dialog elements with a table!” may mean switching to entirely different programming interfaces, there may be no sane data model that matches both without rework, and the new method may have new bugs). If your manager is asking you to finish something and move on, you need to make trade-offs.

Two, historically there had been no serious shell in Windows environments for a very long time. When you have no other way to easily set a bunch of options, a crappy dialog that maps GUI elements directly to all possible options would have been a quick and practical way to expose all functions. I am not saying that these GUIs are good in any way but it makes perfect sense why they were created this way.

Third, low-level interfaces such as the command line are an EQUALLY important part of all UI. A “design” should not just focus on how to rearrange some buttons. Low-level options for tweaking a program can help immensely to edit down what belongs in the GUI. On Mac OS X for example, it is really cool that one can use "defaults write" for a bunch of stuff because you can implement a lot of options without cramming them into your GUI. On a web site, a thoughtful layout for service URLs and JSON data formatting is far better than something that seems hastily-constructed and full of structural problems and other inconveniences.

And also, this post is not showing convincing counter-examples.

That “SiteNabber” redesign from part 3 is not really fixing the real issue. If you’re going to create a graphical replacement for a tool that deals with web sites, exposing “site url” to users is still broken. Why not make it a browser plug-in where you can simply view the web site you want, and click a toolbar button to save what you are looking at (or long-press that button for a menu that exposes a dialog version of the save with a few common options)?

comment 10y ago · link · parent

Especially when they say “<Someone You Know> commented on X” and the only link is to a page with thousands of comments that doesn’t highlight your friend’s actual comment.

comment 10y ago · link · parent

The feed algorithm is now an utter mystery: they somehow manage to show me things twice, and there is lots of interspersed garbage. The endless scroll makes it very obvious very quickly that this is now a “chore” so I just stop. I also log in far less than before; certainly not every day as I once did…perhaps weekly (and even then, I somehow see updates from 2 or 3 friends tops).

The mobile interface is also ridiculous. My friend’s phone was hot and he complained about his battery not lasting…he wanted to upgrade his iPhone 6 because of it! What was the real problem? The Facebook app, ALONE, consuming upwards of 30% of his battery!!!

Then there is the automatic distrust I feel these days whenever I see “log in with Facebook” or similar things. I just assume that this can’t be a good idea, kind of like receiving a scam E-mail. That kind of pattern is going to tarnish Facebook’s prospects long-term.

And why is Facebook chat supposed to be so great? What is new about this? I am so tired of technology falling into “pits”, where just because a company has your data you are supposed to suffer through whatever software stack they create. Microsoft did this with documents, now I am supposed to use a Facebook app just to reach anybody? No.

We used to know how to create standalone clients and open protocols...let’s get back there again and let Facebook die.

comment 10y ago · link · parent

No, it reflects how much tolerance you have for laziness.

The point of grammar is to be understood. Good grammar shows that the writer is trying to help the reader. Poor grammar shows that the writer doesn’t care, and the reader is forced to figure everything out.

Arguably, mistakes that don’t affect understanding can be overlooked without any comment. For example, some words are pretty unique; you can seriously misspell them and still recognize them. On the other hand, you have to be careful with changes to words or even punctuation that can drastically alter the meaning of a sentence.

I can also forgive things that are frankly inconsistent in the language. For instance, although I know when to use "its" versus "it’s", I certainly get why someone would think that "it’s" may be correct for possession; and, since it is very unlikely that "it is" will make any sense as a replacement, I can also figure out what was intended every time. No big deal.

comment 10y ago · link · parent

If your build reaches the point where you feel you need a wide variety of strange "make" constructs, you don’t necessarily need a new build system; you need to be smarter about the setup. For example: do everything in two phases, where the more “magical” version generates a less magical, verbose, static makefile with more rules that are relatively easy to understand and debug.

And, besides: a huge impediment to improving the state of build systems is that new build mechanisms won’t be installed on most platforms by default. If you must explore new ways to build, be sure to implement that in terms of what is already there (Perl/Python/whatever) and make sure to ship your new build system WITH your code.

When I download some "neat-project-1.0.tar.gz", the last thing I want is to have to futz with setting up your special build system that Probably Nothing Else uses or will ever use. If it’s not in the tarball, I will already lose a lot of interest; I know most things can "configure, make, make install" in minutes but I don’t know how much time will be wasted installing whizbang-build-0.1 first and I probably won’t even try.

comment 10y ago · link · parent

Ah, demonstrating yet again how insane it is that we hand so much power to people who know so little about the domains they control (and worse, seem to do little to change their lack of understanding). Will bills like this spur people into action to change how the government operates? I suspect at the very least, this will pointlessly cost technology companies millions as they desperately try to counteract the bill.

What would we do if this passed? I suppose I would winnow and chaff the hell out of my data, sending literally 42 gigabytes of garbage bytes for every one-kilobyte file. That way, if somebody wants to decrypt it, they will at least have to sift through tons and tons of garbage to do so.

comment 10y ago · link · parent

A great idea. See, the point is to be understood by everyone. Nothing is gained by making crazy sentences out of words that most people have never heard of. Is that supposed to impress people?

I had a friend who seemed to start replacing dead-simple phrases like “seriously!?” with “are you being facetious!?”. Ugh, this doesn’t help at all. It will either scream “hey, everyone, I learned a new word!!!” to the people who know what you said, or “say what!?” to anyone else; and they will be too busy parsing your words to hear whatever you say next.

And this advice isn’t because everyone you meet will be 6 years old or a high school drop-out. Simple words are: (1) WAY easier to pick up for everyone, and (2) many people are not using their native language, including very smart people in fields where people like big words.

comment 10y ago · link · parent

And when people talk about how companies skirt taxes, there is rarely any discussion about the major costs to the livelihoods of the people doing this financial work.

It isn’t just about finding creative ways to not pay money, it is about companies practically working their tax accountants to death in order to do it.

I knew someone who worked in taxes for a huge company and it was utterly insane: he worked, nearly literally, all the time: like 6 am to midnight, 7 days a week, for the entire damned quarter. Then the company thinks they’re doing them some kind of favor by giving them like ONE day off before they start feeling pressure to begin work on the next quarter’s numbers. All about the numbers. He described all these tricks used to shuffle things around the world. And those people were suffering mentally as well: I heard about constant screaming matches at work, colleagues on average ending their relationships in divorce, etc.

comment 10y ago · link · parent

One-sided negotiation is a cost riser. The last thing a client should be able to tell is that the payer has very deep pockets; if I know you can afford billions, I might ask a ridiculous price and expect you to not know any better or not care about paying it.

An excellent use of secrecy technologies would be government contracts: partition problems into pieces that don’t necessarily reveal the final purpose or customer (e.g. “choose uniformly between A and B” is too vague to be guessed as a requirement from only a government agency). Then, anonymously ask for bids. That way, you might actually get the developer who offers a measly price for a trivial task, and only finds out later that his check is from the government.

comment 10y ago · link · parent

This advice should probably extend to a variety of form elements.

Like DRM and a lot of other efforts to “control” things, aggressive validators invariably punish people who are just trying to do legitimate things. Don’t piss off your real customers.

I used to live in a town with a 12-letter name, and more than once a form decided that it knew the Universal Sensible Maximum Length of Town Names and wouldn’t let me type the last couple characters. And it usually doesn’t stop there, because once a site is incapable of storing things sensibly it invariably starts to have trouble matching things, giving errors that are just plain stupid (e.g. “this other thing doesn’t match what you entered”, well no shit...).

There is also too much thought put into what constitutes a person’s “name”. Generally, to work across all possible cultures, use a single, very long text field that can contain whatever the person decides to type. After accepting their input as-is, feel free to internally perform parsing logic to try to allow additional database queries but under no circumstances should your page make any assumptions.

The real “you should be fired as database administrator” mistake though is to store modified data without telling the user. This usually happens with passwords; I use a site for months and then one day accidentally hit Return too soon and my password works anyway, meaning they just CLIPPED whatever strong password I entered and stored whatever they felt like (usually 8 characters). NEVER do things like that without telling the user.

comment 10y ago · link · parent

Agreed. I find things like "youdont@needmyemail.com" usually work, and then if they ever bother to read what’s in their database they may get a hint.

1493.

The Phenomenon of Mixed Naming Styles

1 points · by makecheck · 10y ago · discuss

comment 10y ago · link · parent

In theory, this could be in the realm of a copyright violation:

https://help.github.com/articles/dmca-takedown-policy/

Although (and I am no expert) when your license is sufficiently broad and allows for behaviors you saw (e.g. “please include the original header” is not the same as “you must include the original header”), GitHub might decide that there is no violation, technically.

Unfortunately there are lots of behaviors in the world that are legal even though they’re despicable. Your best bet is to be very clear what you want people to do with your projects, e.g. state copyrights, add licenses that are not too liberal if you want restrictions.

comment 10y ago · link · parent

In fairness, wouldn’t that have less to do with custom behavior and more to do with the limited size of a phone’s screen? Seems that Apple is just trying to avoid ridiculous scaling and making a reasonable judgment call.

comment 10y ago · link · parent

I’ve been asked for examples so here is a shot, although I am sure the list could become even longer if I spent more time to think about it (and I’m sure many people have thought about this):

- Localized text doesn’t work with "iostream" sequences because one language says "A foo B" and another "B bar A". The entire concept of a sequencer like "<<" was wrong from the beginning but they kept it. All I really expect is a formatting method that accepts tuples. Apple made object formats work in Objective-C simply by adding "%@", and they have a solution for internationalization by embedding numeric order.

- Not only are stream operators awkward to use but they are awkward and vague when customized. For years, until compilers basically hacked in ways to inline "friend" functions, you had to put the entire implementations for these operators in inconvenient places outside of classes. And what does it even mean to "operator <<" an object? For many classes, there are at least two useful streamed-out interpretations: a literal version of the object’s primary value(s) from the user’s viewpoint, and a full state representation for developers. The C++ standard library manages to create a very complex way to do something that is not even sufficient!! Many languages and environments have ways to generate multiple object representations. C++ should deprecate "operator <<" and create more grep-able functions that can produce variations (e.g. std::print_obj<T>(std::ostream&, T&) and std::print_debug<T>(std::ostream&, T&), where a default template implements the 2nd using the 1st).

- The "iostream" classes are full of poorly named/located things. Often there are duplicate values with similar names so you have to remember which goes where and hope mistakes don’t compile (e.g. "f << std::hex" and "f << std::ios::hex" are completely different but the compiler allows both). And heck, "good()" does not have the exact opposite meaning of "bad()"! To this day, I see people screwing up and not handling edge-case stream failures correctly; that is an insane problem to have in a widespread standard class that every programmer should be able to learn correctly (and hasn’t, because the class has so many quirks).

- As others have said, std::string lacks practical international support for sources like UTF-8 (which is ironic considering how the class template tried so hard to be adaptable for whatever they thought strings might need). And std::string does not have any really useful methods, especially after considering internationalization. I would say the least useful feature of std::string is size variance; I would hope for a new UTF-8-only class that just expects to be bytes, using good ideas from modern environments to present views of those bytes to programmers.

- STL algorithms probably should not have been implemented in terms of iterators. For instance, if someone writes a template on "container", "container.find(x)" will not work for both sets and vectors; since "find(container.begin(), container.end(), x)" technically compiles with both, a naive programmer may choose to force that approach in every case and incur unnecessary O(n) complexities. Systems are typically so layered with generics that you cannot possibly know if this type of mistaken slowdown has been forced into your code. Assuming you want anything generic at all here, what you really need in the standard is something of the form "find(container, x)" so there is at least a chance for optimal behavior within the magic.

- Ultimately, I wish that more of standard C++ would simply build on or improve standard C. The core C functions should be first-class, with object-oriented peanut-buttering added later where useful instead of baking functionality only into awkward classes that are found later to have design flaws. Even if the C++ version wants to take advantage of C++ "inline" or std::function<>, etc. it should still start as a function and work toward a class. Functions would also create more opportunities to get away from this insane syntax prediction problem that templates have, where you don’t really know if "x.f()" or "f(x)" is required (or if both are available, or worse if they do different things).

comment 10y ago · link · parent

Good. C++ still badly needs to go through a phase of tuning, deprecation and removal before adding much more.

As I have said before, there have been shockingly poor design decisions in some of the oldest and most fundamental standard libraries. Little to no work has been done to introduce replacement APIs (or even replacement classes) that would allow the deprecation of stupid features to begin.

comment 10y ago · link · parent

Command-line tools are great but graphical displays can be useful, too. The real problem is that pane/window management on OSes is years behind where it should be.

What I want is a way to take any view I please, from any application, and arrange it anywhere in a standard way with keyboard support and sensible omissions of chrome. If this means 65% of my screen is terminals, 20% web browsers, 10% some graphical view from Xcode and 5% notifications, that should be perfect fine. Instead, the most the Mac has been able to cobble together is a simple split screen view and that is only for Full Screen.

And, we also have: Xcode with its own completely custom and quirky pane/tab management scheme, terminals with their own pane/tab scheme, browsers with their own tabs, etc. Individual applications continue to feel some need to over-engineer their own pane/window management to compensate for lack of system support.

There are some signs of hope though. The direction Apple is going with Mac view controllers could theoretically put them in a position to finally turn individual views into first-class citizens that would be feasible to interleave arbitrarily across applications. At that point, command-line tools could integrate very nicely in arbitrary ways with elements that really benefit from being graphical. We’ll see.

comment 10y ago · link · parent

Yeah, the timing is definitely something that could use feedback.

I think they should have at least done something similar to the pull-to-refresh animation (where the shape isn’t “complete” until you’ve pulled far enough). Why couldn’t they pop up a tiny circle or something under your finger that turns like a clock and shows you how much longer you have to press to activate a 3D Touch?

1
495051
98