skysight-inc/HackerNews huggingface dataset:
I'd argue against using abstract classes in general (just use interfaces) and stuffing logic in domain classes. Domain classes should be simple, not contain any algorithms or logic, and preferably be immutable. If you are putting ifs in domain classes you are doing it wrong. If you are moving logic from service classes to domain classes, you are no longer separating concerns.

If you have sixteen polymorphic methods in one service class (which is of course possible), maybe using a switch statement would actually be a bit shorter and easier on the eyes. It depends. I think about this in terms of unit tests and code paths. More ifs means more paths. Units with lots of code paths are complex and hard to test. On the other hand having code paths cross many classes and methods just moves the problem. It's a tradeoff. A few other tricks you can apply here is using enums with e.g. lambdas and other feature flags. That's a nice way to tie functionality to types or associate some default functionality with domain classes without littering them with logic.

Not using abstract classes is somewhat controversial for some but I have disliked them for quite long and find I don't need them and can trivially refactor them away whenever I encounter them in an codebase. Preferring delegation over inheritance is a good thing IMHO and using inheritance generally is something I end up regretting. I find framework code (Spring, cough) that uses abstract classes to be mostly unreadable and convoluted. You have a Thingy that is also an AbstractThingy that inherits an EvenMoreAbstractThingy that implements a gazillion interfaces that are also implemented by other thingies and yet more AbstractClasses, etc. If you have to control click through six classes to actually get to a place that actually has logic, something is deeply wrong. Deep inheritance hierarchies are a good sign your type system is struggling with your abstractions and sets you up for maintenance problems when the cohesiveness of your classes drops and coupling increases as you are forced to add stuff in places where it really shouldn't be for API compatibility reasons.
Have you tried it with your morning coffee (or whatever your morning routine is)?
Which caste is looting India?
https://www.quora.com/Which-caste-is-looting-India/answer/Ad...
What was/is the startup? Reading between the snark lines it sounds like the VC thought you'd struggle to achieve your goals without resorting to cheap outsourcing
This is a good way of knowing which companies and projects are managed by brats.
Instead of passing/returning null, there are much clearer things for all your examples, depending on the situation: Optionals, Empty Containers, Errors. Just using null communicates very little.
Alternative to react, angular, jquery = ES6 Proxy
Fascinating. I've always wanted something to be done about China's trade abuses, particularly dumping, but also the human rights issues. I really don't know enough about trading tariffs but I am very curious: do these tariffs have any chance of improving China's behavior?
I'm gonna burn some karma and point out that most Nazis were only following orders while being complicit in war crimes. They could probably have protested and stepped down if they wanted. /s
I guess if you’re not familiar with Boolean operators that would be a thing?

Seriously are you saying that

if (x) {
return y;
} else {
return false;
}

is as easy to read as

return x && y;
Have you tried to use one of these old devices they claim to support?

Apple journalists don't and happily chime on about how great it is without understanding the realities.
Oil companies can still get licenses and drill in Norway, they just have to pay taxes (80%) and that won't change.

The people decided in two referendums that they do not want to be in the EU, but the politicians did not accept it and created the EAA/EØS which basically puts us in EU in all but name with very limited power to influence what happens there. It was not democratically done.

I am pro EU, but it was the wrong way to do it.
An ISP with ten million v6-only users is not on the forefront? Be fair please.
Hey that's cool. I made a B2 Ruby gem a few years back that gives a library and cli for the API. +1,000,000 for backblaze!

https://github.com/erickj/bkblz
That seriously sounds like someone that has only learnt through rote memorisation. Absolutely great at taking tests and doing things by the book but completely unable to apply the things they should have learned to a problem that falls slightly outside the examples.

Great story though, even though it makes me shudder.
A plain English introduction to JSON web tokens (JWT): what it is and isn't
ساحل نیروی دریایی ساحلی دل انگیز در پرتغال
Quietly, without much press as NASA, JAXA is doing amazing things. Sample return missions are rare and high end of space exploration. Last one was NASA Startdust 12 years ago.

Another interesting thing JAXA does is smallest rocket for orbital launches. SS-520-5 is 10 meter long, 50cm in diameter, 4kg to LEO and it successfully launched a 3U cubesat in orbit few months ago.

en.wikipedia.org/wiki/S-Series_(rocket_family)#SS-520-5

Closest competitor is Rocket Lab's Electron, 17m length, 1.2m diameter, 225kg to LEO

www.spaceflight101.com/spacerockets/electron/
Spark Plasma Sintering Manufacturer – Suppliers, PS, Plasma Sintering
Did you really have to be that guy ?
What he meant basically is using a relational database.
Please refer to the HN guidelines before commenting. It strongly encourages to have comments that add value to the discussion.
I think they give it a disgusting taste.

I rather have no filter, or much better, pipe filters.
They are ceramic, paper and charcoil.

https://www.amazon.com/Dr-Perl-Junior-Pipe-Filters/dp/B007TV...
How, if ever, you felt the lack of information freedom? Is it so polluted as it looks?
Umm I think you missed the point of my post. The Tasmanian tiger was found all over Australia until a few thousand years ago. It was the introduction of the Dingo that caused its extinction (this was not by European immigrants by the way). Only the population in Tasmania survived thanks to the rising sea level cutting off Tasmania from the Australian mainland.

The population in Tasmania was too small to support the genetic diversity required for a sustainable population - the extinction was just a matter of time due to inbreeding. On this topic while there was some hunting, the cause of the collapse of the Tasmanian tiger population is unknown and there is some thought that it might have been due to disease not hunting.

Yes the Tasmanian devil is still alive, but it has almost no genetic diversity. This is why the facial cancer is able to spread from animal to animal.

Edit. I should add the Tasmanian devils were also found on the mainland until the dingos wiped them out too.
B2 is cheaper than OVH object store?
I mean if making critical decisions about who you want to trust, where you want to store your code and data, and how you want to operate your day to day business, based on an evolving market is being a "brat" then yeah.

I'm not expecting GitHub to change much, if at all, but part of an open internet is people and companies being able to choose how they want to do things.
Ban on heterosexual civil partnerships in UK ruled discriminatory
There's a difference between working at Facebook actively being involved in the creation of such scummy designs, dark patterns, etc; and merely working on one of its open source libraries. Facebook does do some good and comparing what they're doing to war crimes ... does that really help?
Company hires more people => probability of critical human error rises => company introduces more processes and internal norms => the average individual in the company starts to feel less free => the culture shifts from "ask forgiveness" to "ask permission" => people start to think about what they can do wrong much more => it also applies to all outward communications.

I mean, it's not neccessarilly a bad thing: don't we all want to Facebook to be more responsible and cautious in what it does with our private data, for example? Of course we do. But company's culture is a non-separable thing, so we shouldn't be surprised by this corporate-speak from them now. Days of "I'm CEO, bitch" a long, long over.
Facebook’s retreat from the news business
I'm not sure if it's that simple. Sometimes, you want to guard your code with an early return, which means `if (x == NULL) return errorvalue;`. However, if the function should handle both cases, I prefer to start with the "happy path", which usually means `if (x != NULL) { happy; } else { handle_sad_case; }`.
Hiring Based on Attitude: MD of the SEO Works, Ben Foster Discusses
160 lbs loss and that being half of your weight is a huge accomplishment. Congrats! I hope you did it in a healthy and sustainable way and now feel much better than before. If you don't mind me asking - how tall are you, how long did the weight loss last and for how long have you kept the new weight?

44 lbs is about 1/4 of what you needed to do, yes, but that doesn't mean that my accomplishment is not significant. I wouldn't call a 6-month-long starvation insignificant effort. And 1/4 from a billion dollars is still a lot of money, isn't it? In my case it was 19% of my body weight that I trimmed, I am 6ft 1 and I am about 6 lbs above that previous mark, 6 months after I finished my weight-loss sprint (and this year I will continue to go down).

As I said - I wouldn't exercise to create a deficit. I would do it after I have achieved a big-enough deficit, and would replenish any calories expended through it with food.

So I don't try to argue you should "work" instead of "starve" - I am arguing that you should "starve" to get that deficit in and then "work to preserve muscle; continue burning on a good rate; eat more". Does that make sense?
Yeah, this is the ""best case"" Brexit option: the same as now, except we've excluded ourselves from all the political institutions of the EU. So we have to accept all the rules and get no say in them.

(The worst case option is the government is too disorganised to agree anything with anyone and we start running out of food, fuel and medicine...)
Technically, per IPv6 Address Allocation and Assignment Policy[1], there's no such things as a static IPv6 address, only address leased for a long enough period to be effectively static.

[1] https://www.ripe.net/publications/docs/ripe-552#4
I would pay money to have someone clean up my data online since I live in a GDPR country.

I have this weird conspiracy in my brain that big IT companies are just fronts for what the CIA/NSA/governments need to do to do their job.

I don't think those companies really care about getting your data, but government do, because governments saw and know that the internet is not something they directly control. Information is power, and it flows beyond the government's reach and proper authority. I don't really understand how those companies work so hard at great extents to get that data at the limit of the law or morality. I don't see how it's not the government doing this for security or economic reasons.

Liberty and freedom of speech are important, but until the internet, governments were able to have their eyes on sensitive tools. Now citizens have access to technologies that can do a lot of things at the speed of light, so in a way, governments are losing control, so it's natural that governments are trying to get back the control they lost.

Of course politically it's not going to please everyone, but I think that the golden age of information sharing is over.

The problem is that escaping data collection will often be seen as ambiguous, politicized or very complicated, so you can't even justify it morally, you have to consent. I'm a little worried because because at some point you could have cyber activists that could resort to "cyber-terrorism" to attack companies that do data collection, and show it to the public. Sending users their own data would be one way to stain the image of those companies. Ironically, terrorism justified data collection.

I don't think people realize how they are controlling their flow of thought and what they say when they know it can be heard. How many times I thought about what I was writing, knowing its trace could land somewhere that could have consequence on my image.
The reasoning isn't "it is owned by Microsoft"; that is just a trigger. The reasoning is thoroughly mentioned:

"[..] But independent of that, GitHub has always had a vendor lock-in with the user's issues and pull requests hidden behind a rate limited API instead of a proper export feature. And even if you managed to export it through that API, you can not host your own GitHub instance and modify it as you like because there is not even a partially open source version of it."
I know probably as little about tariffs and international trade as you, but my guess is that it might, but only if there's no viable customers left to export their steel to.

My guess is that Canada's action here, along with the EU, will be pretty influential, as China won't just be able to dump all their US-bound steel on those markets.

I don't necessarily disagree with the Trump administration's moves against Chinese economic behaviour here, but I do think that exemptions should have been made for Mexico, Canada and the EU at a minimum.

If this had been about getting China to play fair, and co-ordinated well with other major economies, I think this could have worked out pretty well. But it seems Trump's main goal here is domestic protectionism at any cost.
Huh, is this python-style logical evaluation, i.e. "x && y" need not be a boolean but could be whatever "y" is?

Regarding which way is better, there's not much benefit arguing one way or the other. This is a leaf decision. It doesn't affect the structure of other parts of the code.
Are you reading fiction or non-fiction?

One possibility might be to start with books written for young children ("early readers"), which also assume a more limited vocabulary. Then gradually ramp up to books written for somewhat older children ("middle grade") before returning to books written for adults ("young adult" fiction typically isn't written much more simply than fiction for adults; it's just that the themes and characters are aimed at a 12-17 year old audience). That's how most native speakers learned to read.

There's plenty of fiction written for these demographics. Unfortunately, nonfiction is mostly limited to biographies and very basic textbooks. You won't get business books in these categories.

I also recommend reading newspapers, which tend to use fairly limited vocabulary and simple sentence structures, aiming for an "eighth grade" reading level.
Maybe, but don't discount experience too. As one on the wrong side of 40, I'd humbly put forward that many things I simply "knew" or had to try as a youngster were just ... crazy. :D
That's a valid personal reason to not want change, and a difficult one to tackle for alternative keyboard layouts.

Only reason I'd use them is shell (Bash/Fish in my case). In gaming and Vi(m) I just use the better alternatives which require less movement of the hand.
Free Download: Johny Johny Yes Papa – Many Baby Song – Mp4 and Mp3
How are people believing this shit. Complete BS.

There's several independent variables (money / trial and error / twitter following / coding ability etc ...)

this clickbait paper makes it sound like age is the independent variable. when age is merely CORRELATED with these independent variables. Age itself is of little importance.

You may as well say:

"A person who has already started 5 startups is 4.9X more likely to found a successful startup than a person has never founded a startup before"

Google "Multicollinearity" before you vend BS clickbait.
Os Segredos Da América 2.0 – Curso Luis Miranda USA
Can you block it using a Pi-hole?
This one has come up before here on HN. Apart from the obvious fact that there are only four major points on the compass and so chance could be 100% responsible for this story, aboriginal people travelled around and would have seen these palms to the north. Take out the gods from the story and the story is exactly what would be expected - where are the palms from - oh they come from the north.
Erlang provides an 'if' expression as syntactic sugar for 'case' (switch), which must always have a true (else) clause. The 'if' form is strongly deprecated.

Even the 'case' expression is mildly deprecated in favor of pattern matching and guards in function heads (definitions).

There are no null values, no classes and no inheritance, but the presence of atoms (arbitrary tokens that can be used like null, true, false or enumerations), and pattern matching (data polymorphism and destructuring), means that conditional execution is elegantly implemented by functions.

This is the second, often forgotten, meaning of functional programming. Providing functions as first-class types, supporting anonymous lambdas (closures), and applying functions over collections are given all the glory, but deprecating conditionals in favor of pattern matching over many fine-grained functions is just as significant.
„The media‘s” recent attention to digital privacy issues seems to disprove your conspiracy theories, and to show that journalists operate separate from their publications’ business departments.
I didn't know the next version of Hayabusa bullet train can fly into space.
If one would like to, it can be considered a list of sites to block cookies from ;)
You possibly need some background concepts.

Compilers work by taking a (computer-)linguistic analysis of the source code text, a syntax tree, converting it into an intermediate representation (IR) which is then progressively lowered to the raw machine code form by a series of transformations.

A connected graph of basic blocks (BBs) is generally how such IRs work. Basic blocks have a formal structure involving them being connected to other basic blocks only at their tops and bottoms, and not being multiply-connected internally. A perhaps simplistic way to visualize them is as the polygons on a flowchart.

So the article, which assumes that you know this background, is showing what kinds of basic blocks in Clang's intermediate representation result, before any lowering and optimizations, from the syntax tree. It's skipping over the part where a syntax tree is constructed from the source code shown.

In many compilers, you don't get to see the intermediate representation. In compilers like OpenWatcom C/C++ and GCC you can always go and look at the source code to see what the IR data structures are. But the IR is in memory (or internal temporary files) and not accessible outwith the compiler programs themselves. Clang's design involves a publicly specified intermediate representation that has documented serialization formats for writing to file and then accessing with other, potentially third party, tools.

* https://llvm.org/
For the first two points, you end up overwriting the stack and most likely crash. This is how security holes were/are made.

For the third point, you have two main ways of storing strings in general. The first was called pascal style, where the length is stored first in either a byte or two and then the string data with no (or an optional) terminating null character (the '\0'). The second is referred to as c style, and is done by storing the string in a memory and denoting the end of the buffer by a null character.

The c-style enables certain nicer looking c code with loops and such, but it is more dangerous and potentially expensive if you recompute the length all the time.
You can always mix and match the way you store the string, such as in C++ where the string class stores a length as well as a null terminated string in a buffer.

For your forth point, yes, you end up corrupting the string leading to more crashes and/or it can be used as an entry point to screw around with your program's stack.
That's exactly what I've been doing: whenever I can I unset everything to basic cookies (login/account, shopping cart).

If I can't do that on mobile in under a minute I simply close the website. So far nothing of value has really been lost.
If you don't really want to smoke again, don't.

It can be very helpful as well as very hindering ... "lazy potheads".

But if the moment comes again, don't be afraid, just try a little bit in a safe, nice area and see what happens .
You're going to have to link to something if we're to have any idea what you're talking about. The only thing in TFA that seems remotely related to this racial stuff is this:

They were part of a notably diverse group. Given South Africa’s historic battle against apartheid, it was a point of pride at McKinsey that more than 60 percent of the office’s 250 employees were black South Africans.

This doesn't seem like a bad thing? Should they not have hired so many non-whites? It seems unlikely that ANC would have needed to hire management consultants to identify racial inequality as a political issue.
> I’m still at a loss as to what caused this dynamic. My best guess is that the city developed alongside a mature, well-supported rail system that could whisk people from one part of the city to another, so the advantage of being in the middle of it all was lower. Manhattan’s subway system could be described in much the same way though, so this answer is not satisfying.

I think the author is correct in saying that it's due to the rail system. The difference between Tokyo and New York is that the Yamanote line runs in a circle, whereas Manhattan's subway lines don't.

The Yamanote line not only connects most of Tokyo's major districts (Shinjuku, Shibuya, Ginza, Ikebukuro, etc.), but it's also the line that connects other train lines together. It's kind of like the beltway/orbital/ring road of a typical American city, just that it's a railway not a freeway. My understanding is that after WW2 when the city was being rebuilt, it was a conscious decision not to define a central neighborhood, and instead have all the lines connect to any station on the Yamanote line instead.

Note that this is not a Japanese thing - Osaka's tall buildings are clustered around Umeda, and Nagoya's are in the area around Shin-Nagoya station. Those cities also don't have a central circle line like the one Tokyo has.
It's simple. Some people don't want their open source projects hosted on a site owned by Microsoft, a company that extremely hostile to Linux and open source for several years was, spreading a lot of misinformation and engaging in many shady actions against it. Now, if you migrate from Github to an Azure-based platform, you are indirectly supporting Microsoft, and some people would prefer to avoid that. I don't think anyone expects MS to meddle with their data in any way.
Reposting my post from medium in the hopes that the devs see it

Thank you for sharing this! There’s really not enough data for indie devs to make good decisions regarding marketing. Had a few questions if you have the time to answer them:

1- It seems to me on the charts that weren’t any upticks in downloads. Were you overall happy with your 500K investment on marketing costs?

2- Did the award shows cause any significant upticks? I don’t see them on your chart either

3- Any idea how many people that played MV 2 also played MV 1?

4- Do you think this big a chunk of your userbase would have been Chinese had it not been for the free download? If not then it would seem prudent for other indie developers to localize their games early given the huge opportunity
Pattern 1 is impracticable: most reasons why you would add a Boolean parameter to a function is to avoid code duplication:

void blah(int x, bool logInfo) {

...

if (logInfo) ...

...

}

Pattern 2 can be horrible when applied to the wrong problem. As in: you can use polymorphism to implement fact(int x) without if statements, but it’s not going to be pretty...

Pattern 3 is not a pattern, it just says “if the if is useless remove it”...

Pattern 4 is particularly confusing, especially when you start to have nots in there:

var x = !(a || !b) // ugh

Pattern 5: doesn’t remove the if...