skysight-inc/HackerNews huggingface dataset:
I suspect that there were a number of things going on:

- The bundled development tools were usually still there, but they took a form that those of use who grew up with computers in the 1980s were less likely to acknowledge. Consider how web development took off soon after more traditional languages were removed.

- People are more interested in programming when new technologies appear. There are more itches to scratch, opportunities available, and the barrier to entry is lower.

- Programming simply became more complex. It used to take one line of code to do something. Between the OS and languages requiring more (initialization, boilerplate code, etc.), programming became less appealing. While tools like HyperCard addressed some of this, the distinction between "real" programs and these environments was quite clear.

All of this is driven more by the end user than by industry. And if end users are less keen on programming, why should businesses make the investment in creating tools for them?
I would agree. Putting "early out" logic at the beginning allows the one who reads the code to lower the cognitive load a bit. Basically "I know I can read the following code safely because the error handling and parameter sanitizing is done". But that only works with mundane operations (error handling, parameters sanitizing). If the operations convey some important semantics, then I prefer to see the guarded code inside an if block...
Ace to grind? The source you linked yourself says Apple is at the forefront of this issue which is industry-wide in small electronics.
A more formal name for this approach is / could be Guard Clauses: https://refactoring.com/catalog/replaceNestedConditionalWith.... This pattern has been elevated to a language construct in Swift: https://thatthinginswift.com/guard-statement-swift/
On the Unification Problem in Physics (1921)
Avoid rules, use your judgment.
24 Hours on a Cowrie Honeypot
Exactly. This led to the famous OSX double goto bug [0]

if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
goto fail;
goto fail;
... other checks ...
fail:
... buffer frees (cleanups) ...
return err;

[0] https://www.dwheeler.com/essays/apple-goto-fail.html
I'm in the same boat -- queues sound nice until the micro-picture at which point "spew it out" and "deal with it later" via message streams seems like the sane middle-ground across apps.

Hybrid cloud apps can do both, but in terms of complexity I agree: pushing increasing complexity into apps on the periphery over time seems like a big anti-pattern.
Yeah, Swift in particular really embraces that pattern.
I use the following since it keeps the abbreviated hash and date of the commit in their own "columns", making it easy to skim:

git log --date=short --pretty=format:"%C(124)%ad %C(24)%h %C(34)%an %C(252)%s%C(178)%d"
returning a wrong result is definitely wrong. It conveys some unexpected meaning and side effects...
How to avoid JPG compression on Twitter
> If you want a non-partisan debate, which I do, I think you have to look past this kind of 'who was worse' debate.

You can have a "non-partisan" debate while recognizing that there's an important distinction between applying data to disseminate information in good faith to potential voters and applying data to intentionally disseminate misinformation in concert with a foreign government.
Tokenized Securities Are Merely Digital Shares
Having an important endpoint delay every response by 1 second (assuming the 1000 are ms) is a relatively common and easy way to delay brute force attacks. E-mail servers call this tarpitting.
Ask HN: What is wrong with man pages?
Increasingly, I see projects that install man pages containing only a reference to some other form of documentation. It is frustrating when all I want to do is look up whether I want an upper-case or lower-case Y as a command-line flag.

Am I becoming a grumpy old man?

Which people do this?

Why do they do this?

Am I missing something amazing by tying myself to man pages as the first line of documentation?

Are man pages that hard to write?

Is something lost by complementing this other form of documentation with a proper man page?
Kim Dotcom wins battle in ongoing fight against U.S. extradition
convenient = lazy
Agreed. The shadow profile stuff is really creepy.
I usually prefer explicit if...else blocks even when all or some of them return, because it's always good to see the big picture with blocks that are executed only on certain condition. In other words, see the code tree almost literally.
Religious Democrats, Young Republicans: What the Stereotypes Miss About Parties
If Google+ were launching today, they might have a better chance. More people are interested in Facebook alternatives. At the time, Facebook had already supplanted MySpace and Google+ didn't offer anything attractive enough to switch again.
Here are a few YouTube channels with tutorials:

https://www.youtube.com/channel/UCNaPQ5uLX5iIEHUCLmfAgKg/pla...

https://www.youtube.com/channel/UCxboW7x0jZqFdvMdCFKTMsQ/pla...

https://www.youtube.com/channel/UChv-gaPlKNROf6iMDhxIpUA/pla... (Godot 2 videos but good)

You can also find more links here: https://godot-engine.zeef.com/andre.antonio.schmitz
Sort of agree, but I don't think

if (err) {
handleError(err)
return
}

and

if (err) return handleError(err)

are equally good. The second one doesn't really make it clear wether handleError returns a value and that value is intended to be returned.
If you have a complicated function, and several exit points where you want to bail out, they why not just put a "label: bail" and goto it?

GOTO has a bad rap IMO. There's a place for it, and the author should probably be using it.
Regulation come in many forms, and I believe the first step will be GDPR.
This is nice, but also naive. The current battle against data grabs is not about getting rid of data grabs, it's about giving the government control over data grabs, so they can compete with China and Russia when it comes to knowing their citizen. Facebooks problem is that they don't want to give the government this kind of access. So now they get negative PR, regulatory probes, etc.

Yes, decentralization would be the right solution. But this will always be discouraged by governments and corps alike, basically by everybody who has already lots of power and wants to have more power over your life.

As always you as a single person can choose to either be part of the ant swarm, giving someone else all power over you, but by that sharing in the ant swarms gains and luxuries as long as you are loyal, or by being self reliable but therefore also really be required to build everything by yourself that you really need and want to have.

If you decide for the first part there is really no reason not to give the person who has power over you also access to all your data. It's part of how a group works. And if the people at the top don't like you anymore then they will find ways to kick you out no matter what you do or keep secret. On the other hand its also part of the deal that the people above you don't use their power to peek into your life as long as you stay loyal and support their goals.

So FB either needs to accept to only live on the fringe instead of being the market dominator, or they need to accept that the government has bigger power and yield to them.

The only thing I feel one needs to be wary about is parasites who wants to keep the whole cake without sharing even a little bit with people below them. Trump is one such example. With these people you can't do either of the two paths, there's only the battle for who's stronger. And if you are like most people you don't really enjoy being in a constant struggle for survival.

It might very well be that Zuck is fighting against Trump here, and then that's the parasite situation and all Zuck could do is move out of the US, give up that market until Trump is gone again.
That's awful advice. Obviously _someone_ has to use their judgement to _create_ the rules. But if you have a large codebase that lots of people are interacting with, letting everyone "use their judgement" is going to create an unreadable mess of code, because you're going to have different patterns and approaches all over the place. It would be like writing a book and one paragraph is in English, the next in Spanish, the third in French, then the fourth goes back to Spanish, and on and on.
thanks for raising that up, it's always good to doubt anything obvious, however, it looks like it'll continue writing if-else complete code :)
"Code should be written in a way it is more readable, not shorter."

Personally I think sometimes shorter code, that gets rid of unnecessary bureaucracy, is more readable. For example, C++ recently (in the past decade...) gained range based iteration.

Previously:

for(containe_type::iterator i = my_container.begin(); i != my_container.end(); i++){
do_stuff(i);
}

Now:

for(auto& i : my_container)
{
do_stuff(i);
}

This is really context sensitive. Some code benefits from verbosity while other don't.
What is #TakeTheExit: https://medium.com/p/what-is-taketheexit-ecc8e95034eb
I do this all the time in Ruby, Python, JavaScript because the code is so easier to read. Error management tends to stick to the beginning of functions/methods and the main algorithm doesn't have to be indented.

With Ruby it's even cleaner because of the postfix conditionals.

def something()
return value2 if error1
return value2 if error2
do_something
end

The return values in case of errors stand out, the conditions for the errors do not clobber the code because they are sidelined.
We are referring to buggyness during execution (what the parent of the comment i'm responding to says) while most problems with GNU-isms come hit you at compile-time.
The goto fail snippet doesn't conform to the "one logical statement per line" guideline in the article though, so the author would advise against this style too.
> and jailbroken iphone

As someone who’s Jailbroken dozens of iPhones, I understand the appeal. That said, you seem to prefer privacy/security, and I can unequivocally state having a jail broken iphone is a huge step backwards on both.
I switched to using this style in the last few years, but it only works well where the code is reasonably good quality otherwise, in particular with short methods and classes. If you're dealing with legacy code with massive procedural style methods having return statements scattered around makes things even more confusing.
Delta Chat – open-source, email-powered chat application
`goto` wouldn't be used in a return early philosophy.
I think the point OP’s trying to make is that reducing indentation levels makes code more readable.

I don’t agree with him about removing the braces, though. That way madness lies.
This is only true if you can prove that data races will never cause any bounds checks to be wrong. The blog post linked upthread suggests otherwise, and even appears to provide a counter-example to your claim.
I am most definitely not misrepresenting you.

People like me or [1] have called you out because you keep contrasting Google and Facebook's internal security processes for no good reason, making definitive assertions like "[Google] takes security very seriously" [2], suggesting that Facebook doesn't and should do "Whatever Google does" [3].
And you're doing this not based on any specific knowledge of what the internal security process looks like at either company, but on your (flawed) perception of what engineering interns might or might not be able to do.

When people like esman1 who actually have that knowledge and context, volunteer to explain to you [4] some of the safeguards in place (and he told you the truth), instead of taking the point, you won't have any of what he says and keep going at it stubbornly.

I think this is the point where reasonable people stop arguing, and anyone else who cares can check your comments in this thread and make their own opinion.

[1] https://news.ycombinator.com/item?id=16675843
[2] https://news.ycombinator.com/item?id=16675508
[3] https://news.ycombinator.com/item?id=16675707
[4] https://news.ycombinator.com/item?id=16675670
Only your server needs to know your friends list. Unless you decide to publish this information to your friends.
You are right that you are putting a certain amount of trust your friends' server choices.
That's why having several trusted, non-commercial entities that run these nodes is important.
Awarded NZ$60,000 for “loss of dignity and injury to feelings”
haha
I think there's a lot of value to returning early out of functions when you hit an error condition. There's not much reason to go further if you're just completely hosed. (e.g. malformed arguments).

However, I don't think that coders should shy away from built-up result values for return. It makes the code more friendly to things like copying (I can feel the boos and hisses now), block restructuring, #ifdef'ing (or some equivalent), short-circuiting, and debugging. If you have one easy breakpoint to set that still has a stack so you can peek at a result, it's pretty darned convenient.

So, yes, sure, tend to error out first (this is not news), but don't just litter returns all over the place in code that's going to have to be used and modified by lots of people. The goals for practical code should revolve around the useful lifecycle of that code. Make it readable, portable, mutable, ibleable, ableible, etc.

In many cases, carrying a return value on the stack is a decent way to do this. In some contexts, particularly where branching is expensive, it can have performance implications as well.
Your basic complaint is that it isn't fair that you can't opt out of your ISP pilfering your traffic. But 1) you can use https-only services, 2) you can use a vpn, and 3) you can use a different ISP. You obviously have alternatives, so there's no reason I can see that your ISP being unfair.

I care a teeny bit about privacy, but I care a whole lot more about anticompetitive monopolistic practices. IMO, ISPs are absolutely guilty of those - but my point is, so is Google. I care when somebody changes the design of the entire web for their company's sole profit.

That's why I'm pointing out Google's practices, and how I think they're doing much worse things than ISPs. If you don't care about anticompetitive monopolistic practices, and only care about privacy, then I can see how you might not mind what Google is doing. But soon, Google will be doing to you what they're making impossible for the ISP to do.
DNS Camel
"how well can this be actually used currently to create a proper psychosocial(?) profile of an individual? What's the current state of the art? Any suggestions for books or papers to read on the matter?"

I suspect quite poorly.

It's 2018 and I've been hearing pitches and narratives to do with fancy targeting of advertisements and user profiling now for 22 years.

And what do we have ? If I search for something obscure related to an (product), I will see unbelievably blunt and almost comically generic (product) ads for a week. Even if my search makes it obvious that I am not a prospective customer.

What advertisers receive for their money on these platforms is laughable and I am sure there's a complicated sales pitch with graphs and fancy terms of art and mentions of "AI" ... and it's all just bullshit, just like it has always been.
Ski Resorts Fight Climate Change with Snow Blowers and Buses
Why Some Schools Pay More Than Others When Buying from Apple
This refactoring is so simple and obvious I don't even understand why some people don't write like this by default. I've had colleagues comment my PR on my "failed validation, return early" code saying "we generally strive to maintain one single point of return". I mean, why would you want only one return even?
Slides at https://datatracker.ietf.org/meeting/101/materials/slides-10...
Would this allow rapid realignment of the data against a given reference (graph?) model? Or is the alignment somehow baked in?
I’ve always been a fan of refactoring deeply nested if/else into a more linear less nested sequence of if/return statements.

If the function spec is a sequence of complex AND checks which must be satisfied in order to do work, an unnested sequence of “if (!x) return” statements are logically equivalent, have less indentation, and I think it’s much cleaner and easier to read comment blocks above each IF explaining the reason why each check is there.

I also really like seeing the main body of the function which is doing the real work at be bottom without any nesting/conditionals around it at all. It helps you find it if it’s always down there at the end, rather than in the middle indented way to the right.
Considering every major init system ( and process supervisor ) since IBM Aix in has process supervision and auto-restarting to some degree then yes.

Void Linux uses runit a descedent of djb's daemontools which does automatically restart services and provides a way to check if it's running by starting the daemons themselves and keeping them as direct childs.
"Unless he is certain of doing as well, he will probably do best to follow the rules." - Strunk, The Elements of Style

Your advice is unfortunately common but misguided. Without a firm and intuitive grasp of "rules" and why they exist, one cannot build a framework for making decisions with which one can use their judgment. On top of that, most programmers aren't advanced enough to have more reliable judgment than "the rules" and few working groups can possibly survive a bunch of programmers "using their judgment" all over a nontrivial codebase even when those programmers are that advanced.
is the text editor sacred?

No, it's the worst form of development, except for all those other forms that have been tried from time to time.
Overview of Pandas Data Types
For me, it is to avoid context switch. I'll have all the files I need open in different tabs and switch between them. If I need to cross reference something, I'll open it in a new pane.

Personally, I like being able to see the filename in the tab and just hit gt or Gt a few times than to bring up the buffers list (with or without Ctrl-P) and type the filename.

That being said, I love spacemacs and it doesn't have tabs (or I haven't researched that enough) where I make do with fuzzy searching through buffers.
I personally really hated the use of uC++ and would have loved to do the whole course in some MIPS dialect. I really liked how through most of second year the only language reference I really needed to look at fit on one piece of paper (https://www.student.cs.uwaterloo.ca/~cs241/mips/mipsref.pdf). The uC++ language, on the other hand, is not specified anywhere except in the enormous 600 page textbook, and even then very far from fully specified (e.g. there was a builtin function called rendezvous-something, where that string literally only appeared in the book once, and it was not defined at that place)
Since it forces you to write short methods everything you add or change on the existing code will automatically improve the code quality. Also depends on your refactoring tools, C# with ReSharper can reliably refactor without side-effects.
Thanks.

Dang: please consider removing the code-block functionality from HN.
What a strange article. Clearly disturbed by the values and _confusion_ with the term free, it doesn’t delve into the significant body of work that existed prior to 1998, except for a passing quote, and how such software enabled many things, including the Linux Kernel. I can only presume the ad space associated with this article is valuable because it certainly isn’t an historically interesting or accurate piece.
Depends on different factors, you can't just say one is better than the other. E.g. a function call itself might be quite expensive.

It's important to know both patterns though, so you are able to choose depending on your situation.
This often becomes a non-issue if your functions are short anyway. Having this discussion can sometimes be a code smell in itself.

Obviously it's impossible to completely generalise over, but sometimes it's worth asking yourself if the function is doing too much. In saying that though, early returns are great for input validation.
I don't see how either of those are "data-backed business models". Pandora/Spotify have a very clear draw for people which exists regardless of how much data they store on people. They absolutely can and do use data to _enhance_ their core offering, but if they stopped overnight it would not cripple their business immediately.
Uber exits south-east Asia with sale to rival Grab
This particular refactor (changing `if (err) { return ... }` to `if (err) return ...`) didn't actually reduce indentation levels though. It only reduced the number of lines.
Why would I not want to have media representatives (including public service media) at an industry trade show? Things like "the newest trends from CES" are generally considered newsworthy.
Before I heard about the single exit point rule, I have coded during many years using multiple exit points. I am complying with the rule for many years and I am quite happy with it. The code is slightly more nested, very slightly longer to type. But OTOH, the style checker can spot mistakes in my code and there is less thinking about how I will structure my code to make it smarter.

IMHO, the gain is small but not smaller than the cost.
Judgment is subjective so this pattern fails when there are more than one person reading the code or the same person at different time.

You end up with code written in several different styles within the same codebase. Assumptions that don't hold, etc. Much harder to reason about and maintain.
DynamoDB is not even a good replacement for Mongo. DynamoDB only lets you index two (?) fields and everything else is a full table scan.

At least go with a hosted Mongo solution.
I think most consumer electronics are advertised reasonably, and it's fairly easy for consumers to evaluate advertising claims there.

On the other hand, health products / dietary supplements seem woefully under-regulated, especially since the layperson seems to have great difficulty in evaluating health claims. It seems crazy that dietary supplement and drug advertising are treated so very differently.

So, I think in some areas we need better advertising regulation, but not across the board.

More importantly, my point is that I'm not holding my nose up at my former colleagues. Without the second half of my post, the first half could be read as having a very judgemental tone.
As a mathematician, usually I find attempts to apply abstract mathematical concepts to concrete real-world concepts clumsy and hurting both the abstraction and the concrete thing.

Is this the case with this text?
A lot of these companies - Boomi, Informatica, Snaplogic were banking on low end integration to cloud via the salesforce channel. Salesforce will package mule and then out go all these low end integrations channel for these other companies

On an average about 5- 10% sales was coming via these channels for the companies listed above.

Nice strategic move by Salesforce.
Also functional languages with function guards e.g. while Erlang/Elixir does not have a return statement (and thus early return) you can write

handle(Err, Results) when Err /= undefined ->
handle_error(Err);
handle(_, Results) ->
% etc…
.

though errors would generally be reified as the ad-hoc union of two tuples and would look more like this:

handle({error, Info}) ->
handle_error(Info);
handle({ok, Results}) ->
% handle results
.
Best Fitbit Versa Bands to Style Up Your Lifestyle
The "Avoid Else, Return Early" blog post above appears to be about JavasScript code, which (along with Java, C#, Python, Ruby etc) do not ready do "buffer frees (cleanups)" much. They have other language and runtime mechanisms for this such as GC and try...finally blocks, which work fine with early return.

Yes, in the presence of teardown code at the end of the method, as is common idiom in C, avoid early return. This appears to be the case for apple's "goto fail" code.

However, don't generalise this to all languages.