Hacker Newsnew | past | comments | ask | show | jobs | submit | more phpnode's commentslogin

why?


but doesn't this happen anyway? Business requirements change, technologies change, the tool that you chose 5 years ago is probably not the best tool for the job today, regardless of whether it's a framework, a library or another piece of software in your stack.

A possible solution is to keep your business logic framework agnostic, and write thin wrappers to plug into the framework where required. In theory it should be possible to change frameworks without incurring a major rewrite. This is easier said than done of course.


that would be valid JSON, so it's not a problem. Standard tools can still parse it and reliably turn it into native objects. The same is not at all true when comments exist. People will start putting /* @annotations */ that can only be ready by certain tools which breaks the whole point of JSON - it's a data interchange format.


That sounds smart on first pass, but doesn't really help. If people were going to use /* @annotations / and instead put them in keys, either way, the other side gets a document that isn't the one intended*. So regardless if it parses or not, it doesn't really help.


Let's assume JSON supports comments, and `foo` is a JSON document with comments, what should happen here?

    JSON.stringify(JSON.parse(foo))
Presumably you'd say that it should return a plain JSON object without comments, right? However, with the current implementation this will return a JSON document that is identical to the input, modulo whitespace. This makes it easy to write tools that can, for example, increment the version number in a nodejs package.json file programatically. Doing this in a world where comments exist becomes extremely awkward or at the very least annoying, because either you have to write your own JSON parser that preserves comments, or you have to simply discard the comments when you're writing the file.

If you go with the first option, you'll inevitably run into a scenario where you have a document like this contrived example:

    {
      // this is the first ever version!
      "version": "1.0.0"
    }
And your tool goes off and increments the version number, so you end up with:

    {
      // this is the first ever version!
      "version": "2.0.0"
    }
and now your comment is a lie.

If you go with the second option, you destroy all comments whenever you write data back to the file, so they can be deemed temporary at best.

What benefit do you actually get from having comments in either scenario?


Comments are appropriate in JSON which is written by humans. If it's written by a machine, of course comments are irrelevant. Situations where you need to automatically make changes to JSON which is primarily maintained by humans are a bit of a special case that I don't think is worth optimizing for; if you feel putting comments in object fields is a better choice in this situation, you can still do that even if comments are supported.

Supporting comments makes JSON more convenient to use in more situations, and it doesn't prevent you from doing anything you can do now.


At least you can inspect the document you got with normal tools. Not so if you include comments.

And this may even encourage people into separating the data payload from the metadata, who knows?


That sounds like a "no true scotsman" argument. If comments were added to the spec then normal tools would support them just fine.

Besides, JSON has already become a common format for config files. Config files that don't allow comments are truly a step backward.


> That sounds like a "no true scotsman" argument.

I don't see how this is a "no true scotsman". Maybe a non-true "no true scotsman"?

> If comments were added to the spec then normal tools would support them just fine.

Plain comments, sure. Comments with custom annotations in them, not so much.

> Besides, JSON has already become a common format for config files. Config files that don't allow comments are truly a step backward.

Maybe this wasn't such a good idea in the first place?


How not? Comments with annotations would be ignored, just like a special annotation key. Either way, you'd end up with a parsed document that isn't what the original creator intended.


If you had /* @annotations */ and JSON allowed comments, it would still be valid JSON to do so. Using "special" keys is identical then - both require special parsers / post-processors to properly reconstruct the data.


the white logo in the header bar still looks like Y fronts![0]

0. in the UK.


The logo keeps on making me giggle. It looks like underwear to me. I don't know if I'd have seen it without reading this article, but now that it's in my head, it's hard to get out.


I didn't even know what Y fronts are and it looks like underwear. Even the new one that's not suppose to still looks like underwear.


If you happen to do the Rorschach test and only see pants, please don't blame the test conductor.


Maybe the article just put it in your head. You can't "unsee" it, so to speak.


Yeah, that. I assume their rebranding is incomplete.


https does not expose referrer, and you are logging in through https, right?


drivebyacct2 - your account has been dead for about 100 days and 200 posts, basically no one can seen your messages unless they have showdead on. Here's the "offending" post that you were banned for https://news.ycombinator.com/item?id=5982741 (hint - the ban is completely unjustified)



didn't see that, but even so, this is still a horrible punishment


it's a company that promotes gambling, it's obvious why some people would think that's unethical


No more so than, say, day trading.


Gambling (for clients) is a negative-sum game. Market indices (that are not rigged) random walk but with an underlying drift. The claim that day-traders cannot beat the market (index) does not mean they need to mathematically be negative in returns (on average).

So, this is patently false assertion.


There is a reliable indicator of whether or not people found the post useful - the number of points the submission has. To be honest, I find comments like yours far less useful, and they are not infrequent either.


i find this indicator not to be consistently reliable. anything that gets to the front page (which will never be pure crap), will always get upvotes.

but many (all?) submissions that make it to the front page get there by being manually curated there, not by accumulating upvotes first. on the flip side of the same coin, a lot of good things never make it to the front page, even if they gain a lot of points.


problem is as soon as you checkout a branch, dropbox sees a load of different files and tries to sync them. Then you switch back to another branch and dropbox tries to sync again. Do it often enough and your machine grinds to a halt


Use dropbox as a remote (bare) repo, not a working directory


I cringed reading your post, how on earth does someone get themselves into a position where they are owed 7 months salary? What happened there? I hope you managed to collect in the end


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: