skysight-inc/HackerNews huggingface dataset:
IntelliJ completion takes into account both type and name. For example, if you have two string variables, it will suggest the one that matches or is similar to the method parameter name.

In general, IntelliJ has a lot of features that feel like magic (likely a pile of smart heuristics that have been added over the years).
oh no the "I love it" first post ... the fact this type of post is the top of so many threads leads me to believe theres more behind these posts.

the positive renforcement cheerleading to start off so that people dont get demoralized in the hateful comments, while effective also seems fake.
I did that successfully in 2001 but in 2014 nobody would give me quotes over E-mail.
Advice on Advice in Programming
It's not open source, but if you're still looking for something that isn't as much of a rip as Adobe is, have a look at Affinity (Mac and Windows, possibly WINE?). I've had to re-learn a bunch of Photoshop habits, but it has been worthwhile.
It sounds similar to what's called a shadow profile. Facebook does that[0], and it's usually considered a bit sketchy (and possibly illegal).

[0]: https://www.theverge.com/2018/4/11/17225482/facebook-shadow-...
That got a downvote? For telling the other guy he was addressing the wrong user. Ha, it's actually funny.
Its pot, not crack. There's nothing to gain from tainting it. Most of the black market stuff comes from legal states too.
Because California passed bills clearly delineating how, where, and in what quantities pot growing and selling can be done. The state issues licenses.

In America, this is federalism at work. States can choose to do things that the federal government explicitly does not allow, and states can choose to not do things that the federal government explicitly tells it to do. When there is enough of a conflict, it gets resolved by the courts. In this case, the federal government has just chosen not to dedicate resources to cracking down on California's pot industry. California still welcomes the DEA's efforts in CA to crack down on other things, such as pot coming in from Mexico and harder drugs being trafficked.
Agreed. Also, comments that emphasize the "why" over the "what" are not obviated by descriptive names.
> And then you end up with a codebase which indicate A but comments which clearly spell out B, and you as a maintainer have no idea what to believe.

Can you name a few examples where you encountered this? In my career (30 years programming) I've never seen it. I believe it's a common, poor excuse for not writing enough comments.

The benefits of comments are well-understood. For me personally they often helped compensate sloppy code, (non-obvious) assumptions and prevented bad solutions because I reconsidered while writing (embarrassing) comments.

when you have to maintain a large codebase modified thousands of times in 15+ years, every single comment is invaluable.
The lambdas in the name are definitely overkill, but also totally the kind of esoteric thing I would expect from a clojure engineer.
You just create an account with the phone number as the unique ID in the database and allow every other field to be nullable, except perhaps the messages field as you only want to create this ghost account if a message is to be sent.

Possibly best to have some logic that allows an account to only have nullable fields if it is created by an existing user signing someone else up.
Agree 100%, along with accompanying documentation that lays out architecture, rationale, challenges, etc. All of those are invaluable for any code that will outlive the tenure of the developers who built it. And given how often people in tech change jobs that's virtually all code.
I'd say it's mostly a meme. If a code review doesn't involve reviewing comments around the modified code, it's a bug in the process.

Elsewhere in this thread Ousterhout's book is mentioned; I like his advice about always placing comments in the most obvious places and as close to the code they affect as possible. This way, you can't miss them, and and it's hard to forget to update them.
That's true. You're probably still getting screwed, but quite a bit less than everyone else. If you don't want to get screwed at all, don't buy a new car from a dealership.
I like the idea of a Tesla, but I can't justify the cost.

I hope they sell a ton of them and the cars go through the usual depreciation cycle. Maybe then.
Yes, I should have said “in their place for non-Apple platforms”.
Revisiting the Apple NeXT Deal and Why It Mattered
The farming side is even funnier. The old-line potheads who are used to hiding, high margins, and inefficient farming are being pushed out by Central Valley farmers who look at it as just another cash crop.
It's very easy to miss comments, since they aren't type-checked, nor are they unit-testable.

Comments don't need to be near the code they affect. They don't even need to be in the same file - consider if you've organized your code by features, but the comment relates to a layer than spans multiple features.
that really doesnt make sense ... In California people will drive for pot if they want it. Its a very mobile state. This local sales problem would not impact sales nearly as much as you think. But I ask , have any numbers?
As much as I like the style where the code logic is commented very thoroughly, it also falls in the trap of comments no longer matching the current code, I assume some variable renaming happened.
In the function (line 320 of https://github.com/kubernetes/kubernetes/blob/ec2e767e593953...)

func (ctrl *PersistentVolumeController) syncUnboundClaim(claim *v1.PersistentVolumeClaim) error {

the variable "pvc" seems to have been renamed into "claim" and "pv" into "volume", judging from the code/comment mismatch. Comments in the lines 339, 358, 360, 370, 380, 395, 411, 422, 427 point to the old names. Furthermore in line 370 the comment reads:

} else /* pvc.Spec.VolumeName != nil */ {

while the matching if is:

if claim.Spec.VolumeName == "" {

So not only the variable name mismatches, but also the comment is wrong. The VolumeName seems to be a string, so is never nil, the else comment should specify that the VolumeName is non-empty.

The more verbose and detailled the comments are - the more work needs to be spent in ensuring that they are correct.
It will actually be tabs, which is standard for Go (as per gofmt), GitHub's default tab width is 8 spaces.
I know the paid search folk may claim otherwise, but as an organic search practitioner I agree that branded AdWords (bidding on your own brand name) is the biggest crock ever.

If you lump brand keyword and non-brand keyword bidding together, the ROAS/ROI (depending how you measure) looks good, but then when you break out just non-brand, you often see how terrible the return is. Not always, but often.
Doesn’t look that bad, frankly. Everyone looks healthy at least.
Thanks, fixed - I was trying to gloss over it for the sake of readers for whom X<Y> itself isn't familiar syntax but I think it makes more sense this way. (I'm also glossing over the fact that try! will convert error types, I think?)

Or pretend I meant io::Result :)
Funny, that's the second time within the space of an hour someone mentions Snarky Puppy. Very nice stuff.
This article is interesting... but confusing. It seems to be someone's organic journey to how we don't need to be on the gold standard anymore. Currency has always existed based on trust, at one point we thought that gold is really trustworthy (for some weird reason) then we thought that governments were really trustworthy (again, wat?) eventually we all settled on the idea that not all governments were trustworthy, but that the US government was _super_ trustworthy (REALLY WAT?).

Currency has value because we say it has value, and people will tend to default to the status quo. Your money is basically worth something because everyone is too lazy to actively consider it to be worthless.

If the society collapses, go and see if that farmer really wants to sell you a gallon of milk for a piece of paper - or even for an exquisitely printed bar of gold that you purchased because you were quite convinced the coming Armageddon would make all the silly paper money worthless.

(As an aside, I find one of the least believable parts of Fallout to be the fact that there is soda in the world and the bottle caps of that soda are a currency)
Retro computing operating systems.

There are a few of these. They're an "alternative to Windows" in the same sense that riding a penny farthing is an "alternative to travelling by bicycle" or sending a telegram is an "alternative to using the telephone". It's just nostalgia.

Whether these systems could attract the same development effort (and money, though what if anything Haiku Inc. does with the money is pretty unclear since they're lousy at basic organisational responsibilities of a charity) if they admitted they aren't a serious "alternative to Windows on the desktop" is an open question.
> It seems that all the beauty of those languages make people obsess over that beauty and purity while keeping them from being productive.

Much of theoretical physics is beautiful. Only when one takes it off the blackboard and into the real world does it turn ugly.
Can you end a holy war by mixing both sides together?
I think President Trump would consider himself part of an elite demographic of McDonald's connoisseurs here.
> Kind of the whole problem is when there are weird corner cases going on that straddle function boundaries.

If the problem has "hub and spokes" topology, i.e. it's relevant to multiple places in code that all reference a single location, put a comment describing the issue in that single location, and everywhere else put a comment with a reference. //Warning. See comment in [that location].

If there's no single best place for the detailed comment, put it in some design notes file, and put a comment with a reference to that file in all the affected places.

DRY can, and should be, applied to comments as well.
This reminds me of the countless malicious TeamSpeak servers who send out fake "TeamSpeak needs an update: [evil-url]" messages with the server message or poke feature. (The second one displays an arbitrary text in a simple message box, e.g. sent by a bot when joining the server).
I have avoided having people depend on me all my life, because I felt I wasn’t up to it. It turns out I’m not, due to my health. But it is a way that some people give meaning to their lives.

That’s the decision that’s leading to declining birthrate in western nations, isn’t it? Why give up your freedom and increase your stress by creating obligation by having children?
I think a better parallel would be "your bank's website has advertisements and one of them says 'click here to pay off your credit cards' but it's actually just a phishing attempt"

That said, I wouldn't call such a scenario a hack.
similarly, pydatalog https://sites.google.com/site/pydatalog/

found on this 5yo thread https://www.reddit.com/r/Python/comments/18y1mj/logpy_logic_...
> I'm not sure that reducing the comments-to-code ratio by increasing the complexity of the code really helps anything.

More lines doesn't mean more complex, it's the same logic just the logic is named now and more reusable. It's possibly not the best example, as the logic is minimal, but when the logic becomes more complex, wrapping it and naming it becomes very powerful. We're creatures of abstraction.

> You've made the code more generic for what you currently think future changes are going to look like, which may or may not be accurate.

I'd argue that I've reduced the number of reasons the code has to change, which should be a goal while programming. If we change how we calculate a leap day, we don't touch how we modify a leap day, which means we're less likely to cause adverse side effects.

> And in the process you've split dateIsOnLeapDay and convertLeapDayToPreviousDay into separate functions, so if someone is tracking down a bug in line 10, they need to jump to lines 20 and 21 to figure out that the associated code is in line 15

They should be separate functions, they are separate things.

> In a large program these would get even further separated over time

Is it really a problem if they are separated? What links them? There could be plenty of reasons for wanting to call one without the other.
I'm guessing investors are leery of funding expansion in an industry that is still illegal under federal law. The businesses themselves also have all sorts of trouble because banks don't want to deal with them.
GamesBeat managing editor Jason Wilson’s favorite games of 2018
Confederate money is now selling for above face value on eBay. When I was a kid in Virginia, we had Confederate money as play money.
Well that isn't going to happen, because most people don't feel that way.

I disagree that every single entity that has a product they want me to know about doesn't have my best interests at heart. At the very least, my interests are aligned with companies that produce things that bring me value. In what sense does a company that produces that the skateboard wheels that go on my daughter's skateboard and my skateboard not have my interests at heart? The existence of that product (and the other necessary parts) brings the two us immense joy, disproportionate with the $20 a set they cost.

I also don't really wish for the web sites that put ads on them to either go out of business or put up a paywall or something.

I do, however support the idea of there being an easy way for you to pay a fair and reasonable subscription fee to see sites ad free. It would be great if all the biggest advertising companies (Google, Amazon, etc) came up with a plan for that, and individual web sites didn't have to deal with it beyond what they already do to show the ads.
> I absolutely love this one particular brand (Linda McCartney) of mozzarella-riddled vegetarian burger they sell in the UK.

Yea, and on top of that Linda McCartney products are cheap, free from plastic packaging and pretty much available everywhere.

> Also, upvoted because a difference of opinion isn't what down voting is for, surely ?

I've also wondered about the semantics of the voting arrows (because I'm working on a HN-like[0]). In the guidelines[1] it says how voting/karma works, but not what a vote is supposed to mean. Within the (rarely used) polls[2] the meaning is a bit clearer. Lobsters[3] requires you to pick a reason for down-voting (and "I disagree" is not one of those), which makes its purpose a bit clearer.

[0]: https://gitlab.com/hjek/undebatable

[1]: https://news.ycombinator.com/newsguidelines.html

[2]: https://news.ycombinator.com/newpoll

[3]: https://lobste.rs
Get a proper router that allows VLANning, and put any IOT devices in their own VLAN. If your scary IOT device needs to see your NAS, then your NAS needs to go on its own LAN too with forwarding rules to allow the IOT device to use the specific ports that it needs to stream and nothing else.

Fiddle to set up, but worth it.
I think you can syntactically state that anything where the check is on the second return value (which is, by convention, the error return) is a "simple error check", and their rule for if statements is always for things that come from a first return value.

For instance, this would not be a simple error check:

server, err := find_current_server()
if server != nil {
...
}

because if find_current_server() believes that it's a non-exceptional case that there might be no server at all (i.e., it might return nil, nil instead of nil and an error), then you absolutely want to handle that case.
The primary reason for that is because that would imply endorsement.

Conversely, if Nike photographs the next celebrity walking into their store and posts it on their instagram, that celebrity's sponsor can't grab that picture and then make it a link to their store.
Obviously I'm not the intended audience, but I'm not sure it's wise to have CloudVolumeCreatedForClaimNamespaceTag, CloudVolumeCreatedForClaimNameTag, and CloudVolumeCreatedForVolumeNameTag in the same file.

This is almost the worst of both worlds: the trouble of wading through a pile of words, together with the lack of clarity.
funnier still, Fortnite initially was piggy-backing off DayZ the zombie survival formula ...
The example doesn't include money, by it reminds me of a different viewpoint that I have about politics.

My belief is that "corruption" is the normal state of traditional government. Previously I had considered this mainly to be about money, but the article makes me think that social factors may play a strong role as well.

Basically, my idea is that it is not realistic to expect people to disregard their social networks and potential profits in the service of the public. It is a nice idea in theory, but it seems that it has been proven that social dynamics and money are stronger motivators than the public good. And that in many circumstances, possible criminal or moral repercussions are not a sufficient deterrent to breaking the public trust.

In my opinion the situation can be improved by better integrating technology into the structure of government, money and society. I think we need more advanced and technical forms of government and money.
I remember reading that the average player spends $80 on DLC for Fortnite — so there are a lot of people out there spending well over that to bring up the average from all those $0 players.
Change is hard, and like you said it's easy to fall into the same old habits. Something that has worked for me is to change something small at first. Maybe redecorate your room a little bit, or always make your bed, or always keep your room clean. Then build off of that.

You're in your old city again, but you don't have to go to the places you used to, try a new lunch/dinner/beer spot. You spent 2 years abroad, you have the ability to adventure, and there's probably a ton of new people and experiences awaiting you if you get back off the beaten path in the very city you live.
It seems the second something on hacker News is related to a topic that can be interpreted as negative to the CCP, the downvoting begins.

None of this is criticizing China and Chinese culture, only the authoritarianism of the communist party.
I don't find relevant the inputs of organizations which exactly in the cases I'm familiar with get it completely wrong. And I invite others to familiarize them with the case and question these too.

How SPLC characterized Hirsi Ali is a good example of complete wrongness, enough to discredit their real understanding of the topic they purport to be able to judge.
> JWT is not just another bearer token scheme. It comes with its own additional obligations, restrictions, and extra steps, not to mention the purpose-defeating pitfalls.

Care to provide an example?
Even if you want to apply judicial ethical standards to city lawmakers, then a member of city council giving a token gift to another member of city council is most analogous to a judge on a panel giving a token gift to another judge on the same panel which... would probably be OK?

Legislators do not sit in personal, unilateral, legally binding judgement of each other, which is why their personal relationships are not analogous to that of a lawyer and a judge as the original article suggested.
Why is a damage checklist a Tesla specific problem? Bought plenty of cars(and trucks and tractors) where I went over them at delivery. Found more than a few things of which were sorted out by the dealer at the time.
I see several people complain about Linux limitations in this thread. What are the Linux limitations exactly? A) Unreal dev tools can't be used on Linux, B) Unreal dev tools can't be used to purchase marketplace assets on Linux, C) Unreal dev tools can't use marketplace assets on Linux even if you previously bought them on Windows, D) Unreal dev tools on Windows can't make a Linux build if it uses marketplace assets.
The situation for Fortnite as it was may have been dire, but as a company I imagine UE4 licensing would have kept them in business at the very least.
A more recent Indy record, by Young Knives, has Whittlesea Straw Bear on the cover, and there must be other folk custom references in rock genres, especially Green Man, I guess.

You don't need much rehearsal for a single script after a few years, except for the topical ad-libs, and you traditionally consult the correct words written on the props -- not to be taken too seriously!

Most English (and maybe other) folk customs had died out by the end of the 19th century. Then even the early revival groups were wiped out in the First World War, particularly as they tended to join up together. That's been poignant in recent centennials.
evil-mode already exists
At the very least you can add a participant to the holy war
It is forbidden to have one square inch of earth where there is no internet
If it is a general principle, then would one not expect it to apply in this case? More importantly, this is not a corner case; situations where there are specific conventions and protocols that have to be handled consistently in various cases are extremely common in software. It is also not uncommon to see optimized code that is much easier to understand when it is explained as a modification of a simpler implementation.

With regard to the sample, then if that is your experience, I cannot deny it, but, irritating as it may be, it seems fairly harmless. It appears to date from a time when it was thought that extremely prescriptive coding style standards was the way to fix programming - an even less realistic belief than the idea that code can be entirely self-documenting.
You might be surprised to learn that they don't know Star Wars either, or Dallas, or Moby Dick.

I met many visiting students, e.g. from India or Bangladesh, who do not know Star Wars, which was kind of a reality check for me, for how deep in a bubble we live.
Didn't stop Oregon. We've got 5x as many dispensaries as California and wayyyyyyyy less people. Oh and the prices are like 75% lower.
Just my 2 cents after no more than 10y of career.
The idea of letting other grow has nothing to do with resonating with them and form a bigger wave — you need to really want them to succeed and really fight for that to happen.

In my personal growth path I think I'm this close to reach that — but my ego is practically sabotaging it from the inside. I still can't let myself go in background-mode. And I'll pay for this sooner or later.

</personal-emotional-burst>
While I fully agree on hating the process, I've found the easiest working reply to these tactics by accident:

Simply visit the dealer, get through exactly the model you want, be reasonably interested (but not too much in love), ask for a quote, leave some contact details and leave.

Never answer and come back in about a month with a cheque when they've bidded themselves 20% down without you even saying a word.
He did not try to sell it, that's the whole point.

If they use it for commercial purposes, pay someone. He was fine until it was used to advertise outfits.
I would agree, but only with industries with a low barrier of entry of commodity businesses. There are also other moats that prevent trivial competition. Examples may be intellectual property, branding, switching costs etc.
>> Many basic questions about diet are unsolved, including the reason(s) that some people gain weight while others don't and the reasons that the vast majority of people can't lose weight. We just do not know to what extent do genetics, gut flora, lifestyle, and diet affect weight. We also don't know what makes for a "good" diet, or whether the same diet is good for everyone.
>
> Also flat out not true. You're creating some ridiculous standard for "knowledge" when in reality, you only have to have "good enough" knowledge in order to be healthy and not obese. Most people can easily adhere to, but for whatever reason, don't.

OK, this is a concrete claim that we can test: "most people can easily adhere to a 'good enough' diet/lifestyle to avoid being obese".

If this were true, then there would exist a protocol that "easily" results in lasting weight loss for most people, right?

Does such a protocol exist?