skysight-inc/HackerNews huggingface dataset:
Sorry, this sounds a lot like motivational "feel good" advice that's in essence empty and confuses more than helps.

"write small functions" sure, how does it help managing complexity? Now you have several tiny functions and need to jump across files and functions to understand how everything works (+ the overhead each function adds - parameters, return values, etc)

Sure, small functions have their place, but sometimes it is easier to have a big block of code that does what you need. Or as another comment said, write small functions but big procedures.

Now for my favourite pet peeve: that 80 columns is some kind of "best practice". In reality it has been cargo culted since the days of the initial IBM PC and there is no reason for such an arbitrary number to exist. But the church of 80 columns keep repeating their mantra mindlessly, mindlessly uglyfying lines of code which go over only a couple of characters beyond 80 columns and wasting coder time with this instead of actually asking the question: is the code actually easier to read now or not?

Because to me, calling a function with one parameter in each line is extremely ugly (especially under-indented as the examples presented in the article)

Is a line that's 85 characters essentially harder to read (especially now with multiple screen sizes and widths) than an 80 char one? No.

I'm not advocating for writing 200 character lines of code, but to not be absolute about it.
When a news paper headline asks a question that seemingly can be answered with a yes or no, the answer is always “no”.

When a programming blog has a headline which teases knowledge of the perfect technology, the answer is always “I don’t know”.

Both baits work on me, apparently, but I sure wish they didn’t.
There's a lot that gets in the way of reading most Bibles. This old Kickstarter laid out the problems nicely (not an endorsement, I don't own this version).
https://www.kickstarter.com/projects/adamlewisgreene/bibliot...
I here's hate when this happens and I can't imagine how you feel.

You have very strong opinions, from the results and status of this thread I think this response is coming from how strongly others are put off by your aggressive defenses and how you're voicing your disagreement with an article or response. (I want aware of Dang before your posts)

The substances on your posts seen very on point, however the tone makes your responses feel personal. I don't like hearing that I'm wrong, combined with a tone where I feel I'm a lesser, stupid, idiot, for having a mistaken brief immediately pushes me defensive. It doesn't matter if I agreed with you initially, if this tone is felt ok the first sentence: I'll never reach your substanive argument for your point to be made.
Your responses feel like an attack on Dang not a criticism of HN, this is encouraging others to defend him, and the site, because the principle feeling is a personal attack.

I'm worried that by posting I'll get that same for of response from you.
> One of the 25% is a wrong answer despite being indistinguishable. Such a thing can happen because of a typo or in any myriad of ways. It's not a paradox.

Sorry but that seems disingenuous... You are ready to accept that there's a mistake in one of the answers but not that none of the answers are correct?
Downturn in low-quality lithium price. We don't know what the real price of high quality battery quality lithium is, as all battery quality supply is locked in long term confidential offtake agreements.

What we know, is lithium companies latest round of results was not great. Stock prices are spiralling. EV makers will find out without paying more to lithium suppliers, they won't get as much batteries as they wish.
https://www.amazon.co.uk/dp/B081GV8Y7V/
Oh I see what you mean. So ya its not transactional across systems. Ya good point. I usually manage that by just updating the primary data store in the job, but I can see what you mean, and how that might not always be an option.
Seeing as how its aimed squarely at developers, this seem at least as correct (and maybe more-so) than the way a native speaker might expect this idiom to read.

I'm already thinking of all of the things I can adapt this platform to do for me.
I think we apply radically different cognitive machinery to physical skills like riding a bicycle, compared to playing a card game where the rules are on the cards, and you have no idea what rule will be on the next card or even what rules are possible. We can train Chimps to ride bicycles, so they have the cognitive machinery for that, but we can't teach them to play these kinds of card games.
Yeah... I have read that and told that to others many times. But the thing is some of my best work (rare, though) has not been to spec. To any spec. More like, when you are doodling on a paper. "This might be a lake with a duck. Nope scratch that, it's actually a dragon and those are its scales. Yep."
At the risk of being serious for a moment, saying "please" and "thank you" are two of the lowest effort, highest reward, and plainly decent things you can do as a human.
The effect is extremely similar though, don't you think? If not worse, for e.g. shadow banning.
The flippant-yet-accurate description I've heard of this is "socialized losses, privatized profits".
Do you also complain about error messages from your compiler after a syntax error? A dictionary / thesaurus is only a mouse click away. There are even rumors about editors with built-in spellcheckers. Is an effort to get the language right in a marketing document too much to ask?
it only misses hangouts messaging, if it had that it would be perfect.

Still - the latest update to gmail was basically a downgrade from user perspective. It is slower, and looks the same and offers no new functionality.
plaintext passwords in 2019 .. it hurts to read articles like these.
In general I write unit tests as I implement. I would not write them unless I was convinced they were immediately beneficial to my productivity. Some parts of my code is not covered. In the beginning the test cases just outputs the result to standard out, in the end I would use assertions or disable them if they were dependent on external systems.
And I feel glad I still have my mom and am calling her regularly.

Call your moms!
Me and monotropism: a unified theory of autism
Be warned that my patent for dried coffee licking powder is now in the works! Prior art be damned.

;-)
Here is the actual relevant text from the law[0].

Assignment grades and scores shall be calculated
using ordinary academic standards of substance and relevance,
including any legitimate pedagogical concerns, and shall not
penalize or reward a student based on the religious content of a
student's work.

I'm not certain whether this means students must not be penalized for factual errors if those errors are based on religious beliefs (eg claiming God created the world in seven days and declaring evolution to be a heresy), or whether they simply cannot be penalized for religious content given otherwise factually correct answers, which would seem to be blatant religious discrimination.

It does seem like a really weird, suspiciously contextually specific thing to want a law for, since religious discrimination is already illegal and something people can sue over.

[0]https://www.legislature.ohio.gov/legislation/legislation-doc...
I can't even code like that except maybe for simple tasks in a mature project.

I'm more a "Make It Work, Make It Beautiful, Make It Fast" person and don't see it working by writing unit test first.
Hyatt should just call itself a tech company and increase its valuation 10x
Infinite Monkey Theorem and the Borel-Cantelli Lemmas
> Young man, in mathematics you don't understand things. You just get used to them.
Yes.

Every object in Java has something like three words of overhead; also since it doesn't have value semantics (yet) objects are typically allocated out-of-line, so an ArrayList makes a linear number of allocations, whereas a Go slice makes a constant number.
Plus the binary sizes are typically much smaller; not really an expert but our observataion at work is non-trivial Java services allocate a lot of memory through classloading / JITing whereas a Go binary will typically be very small.

Basically, agreed on the GC tradeoff, but the higher memory footprint of Java mostly comes from other areas.

> Better memory usage always implies worse performance

That isn't really true. Better memory usage implies better cache-friendliness (and possibly better locality too).
I believed it until your password remark. That's a bad, bad practice.
Can this be solved by fixing the UI somehow? Half the time I don't remember the guidelines and just go into ranting. The article was definitely eye-opening, I definitely go for negative attention sometimes, sometimes unwittingly and sometimes out of spite for the trends I see. I can certainly see why dang had to remind me a few times about the guidelines. I hate Java and I can be quite trollish about my hate. Oh well, I guess I should just concentrate on what I love.

That said I do have a problem with silencing. This problem was solved in USENET with kill-lists, lists where each user can choose to ignore another list of users maintained democratically without resorting to a few mods, who can be benevolent or not. This is how we block spammy ip addresses using the hosts file! This is a solved problem with a simple solution, heck it can even be applied to every major social networking site out there.

On a side note, why can't HN code be made available on GitHub? It could be one of the biggest lisp projects overnight.
> No one here wants to live in that kind of world.

A little melodramatic don't you think? Aren't there much bigger fish to fry than a modest jab at the authors misuse of the word?
A cryptocurrency address name service
I write the impl, then tests and then refactor based on the tests. Tests are an excellent data point on impl ease of use.
Giving a fake username and password results in

> Expected Array for #[]?(index : Int), not Int64

> Traceback:

> Getting lookup...done, returned 200.

> Getting challenge...done, returned 400.

So, yeah, nope. Why not use Google's SSO to connect accounts?
I've ordered a Rock64 board from them before, and it has been fantastic. I justed ordered the pinephone, and I'm excited to get it. :)
What’s the matter with Ohio?
Care to enumerate some of these strings? Or perhaps some of these things you wouldn't be allowed to say?

Quite the contrary on the second point, with regard to a Government-run website, you'd have a far stronger claim to the rights of free expression people regularly (erroneously) attempt to claim on privately owned social networks.

Or does your entire point begin and end with "government bad?"
I just write tests for the bits that I know I'm going to have lots of trouble with. You can tell, after a while
> Dropbox... is friction

Yes, completely agree. Dropbox sync has lots of gotchas and edge cases, and was particularly bad if you edited files on multiple systems (my workstation and laptop, for instance -- I use both interchangeably depending on what I'm doing).

I can understand why 1Password built their own sync service instead of playing whack-a-mole with different cloud storage providers' quirks.
> basic language mistakes like this damage professionalism

Thats just like your opinion or whatever. I care about professional results I'll meet people half way with their communication.
Thank you. I'll keep that one. Still looking for something better ;)
I think there's this myth that TDD is one of the best ways to write software and if you admit you don't do it, you'll be seen as a cowboy and will look stupid. I think the truth is TDD has its pros and cons, and the weight of each pro and con is highly dependent on the project you're doing.

- The uncomfortable truth for some is that not doing any testing at all can be a perfectly fine trade off and there's plenty of successful projects that do this.

- Sometimes the statically checked assertions from a strongly typed language are enough.

- Sometimes just integration tests are enough and unit tests aren't likely to catch many bugs.

- For others, going all the way to formal verification makes sense. This has several orders of magnitude higher correctness guarantees along with enormous time costs compared to TDD.

For example, the Linux kernel doesn't use exhaustive unit tests (as far as I know) let alone TDD, and the seL4 kernel has been formally verified, both having been successful in doing what they set out to do.

I notice nobody ever gets looked down on for not going the formal verification route - people need to acknowledge that automated testing takes time and that time could be spent on something else, so you have to weigh up the benefits. Exhaustive tests aren't free especially when you know for your specific project you're unlikely to reap much in the way of benefits long term and you have limited resources.

For example, you're probably (depending on the project) not going to benefit from exhaustive tests for an MVP when you're a solo developer, can keep most of the codebase in your head, the impact of live bugs isn't high, the chance of you building on the code later isn't high and you're likely to drastically change the architecture later.

Are there any statistics on how many developers use TDD? There's a lot of "no" answers in this thread but obviously that's anecdotal.
All the work went away.
On Hiring Developers and the Technical Interview Process
"There is no purpose of having a so complicated language - like c++ or java"

I would not call Java complicated at all. The way they wrote some over-engineered libs for it however is a different story. FactoryFactoryFactory my a$$. I personally do not like Java for performance related reasons and inability to do some lower level tasks but for generic enterprise development those features are not really needed.

As for C++ - yes it IS SUPER COMPLICATED . I do not know all of it and do not give a flying hoot about this fact. What good about C++ for me personally is that basic stuff is easy enough to comprehend and I have no problem mostly sticking to C with classes approach. However whenever I feel that I need some exotic "feature" usually I can do a bit of reading and find it.

Build time is not great but at least in my cases incremental compile time is fine.

My only real problem with C++ is when I need to use some third party piece of code and it is written by some cool person who has decided to write it using every feature of language available and suddenly I can not comprehend what does every second f..ng line mean.
Open Connect
True for personal communications. Not true for a product launch. Proofreading is as important as code testing.
Fracking may indeed be causing earthquakes in Texas, according to UT study
The scene i think is the most wasted was the death of Snoke.

There are myriad ways to go forward in interesting directions(Kylo and Rey could go both dark jedi, gray jedi, swap sides(i think that it will come to that) or even go for a 3rd way, or even destroy the concept of jedi itself) yet they basically returned to status quo.

It also felt like it was heavily edited - like there were two drafts, and someone mashed them together.
How about we disallow political discrimination as well. The left is so against discrimination when it comes to crime, yet will find every reason to not support or hire people that are against their political beliefs.

Conservatives/republicans/trump supporters face overwhelming discrimination in silicon valley.

It's why I know all of these movements are complete bullshit and just a way to get voting power and push out anyone you dislike.
Manipulating Text with Grep
The Disappearance of John M. Ford
The problem I see here is that companies are not moving to Firefox en masse.
You can run them on an old computer. Used mini-towers and desktop form factor can be had for close to free.

The next major release of pfSense will require hardware encryption support (e.g., AES-NI).

OPNSense is very reliable, but has fewer features though is in active development. Haven't used it in around 18 months or so.

I picked up an HP 4-port 1gbps PCIe card for $40.
Does this bill protect against cases such as "my religious belief is that I am always correct on exams" that would otherwise award a steady stream of A+s?
Here is a single python statement that solves the problem:

print([
q for q in itertools.product((True, False), repeat=6)
if q == (
all(q[1:]), # 1. All of the below.
not any(q[2:]), # 2. None of the below.
all(q[:2]), # 3. All of the above.
any(q[:3]), # 4. One of the above.
not any(q[:4]), # 5. None of the above.
not any(q[:5]), # 6. None of the above.
)
])

https://gist.github.com/lovasoa/f2b4ed93e755bf4172583d28f206...
How to Sell Drugs and Influence Everyone on Instagram
I don't regret it. It's very entertaining
If people thought about it that rationally, they wouldn't have gotten involved with MLM schemes in the first place.
I don't even think people are differentiating that much about deplatforming. I am fine if the sentiment growth that thinks'those bad corporation have too much power and can't just start banning users without a clear cause'. The free speech issue is to narrow.
We overestimate how well other people can read our thoughts and emotions
That's the kind of thinking that leads to situations like this:

https://www.digitaltrends.com/mobile/samsung-galaxy-s10-ultr...

A lot of the time it's just as important to make sure certain things can't work as making sure that certain other things will.
No. Tests are like any other code. They incur technical debt and bugs at the same rate as other code. They also introduce friction to the development process. As your test suite grows, your dev process often begins to slow down unless you apply additional work to grease the wheels, which is yet another often unmeasured cost of testing in this fashion.

So, in short, I view tests as a super useful, but over-applied tool. I want my tests to deliver high enough value to warrant their ongoing maintenance and costs. That means I don't write nearly as many tests as I used to (in my own projects), and far fewer than my peers.

Where I work, tests are practically mandated for everything, and a full CI run takes hours, even when distributed across 20 machines. Anecdotally, I've worked for companies that test super heavily, and I've worked for companies that had no automated tests at all. (They tested manually before releases.) The ratio of production issues across all of my jobs is roughly flat.

This issue tends to trigger people. It's like religion or global warming or any other hot-button issue. It would be interesting to try to come up with some statistical analysis of the costs / benefit of automated tests.
The reality is every time someone gets a new laptop they get a new docking station. Docking stations seem to last about 3 years. It is very nice when traveling to get to a remote office and hear "Joe is out this week, you can use his office - he even has a docking station that will fit your laptop". However it is questionable if his docking station will fit your laptop.

If connector N (usb-c or whatever) has enough bandwidth and a standard connector it would be really nice if we could give everybody that docking station. Even if we have to upgrade docking stations every few years, so long as I can mix and match I'd be happy.
I don't do TDD on the first version. For me, the first version is a throwaway version. If it turns out to be commercially viable, that's when I start with a brand new codebase incorporating all the lessons from the first version, but this time using TDD. TDD has it's place. I just don't think it's cost effective on the first version.
Thanks for the recommendation. After spending some minutes browsing the content, I was delighted.
what is the purpose of sharing articles that are behind a paywall?
I'm putting off buying a new phone in general until we get a decent Linux variant.
Currently rocking a Samsung S4 running LineageOS.
He was denied buying an external screen to be more
efficient since he then could have more information on the
screen (eg an application next to a browser), "because
then everybody wants one", even buying it himself.

My wife was denied permission to bring her own secondary monitor from home for that reason. Unreal.

I also faced pushback at one job for bringing my own monitor from home. Same reason given. I'm an entitled software developer though, so I basically disregarded my manager on that one and he let it go.
normally we call this “society”.
> Anyone have any reasonable indications about customs etc?

Depends on the country, in the uk you get the package, then if you are unlucky a few months later customs will send you a bill. 90% chance they wont send anything and you won't have to pay customs.
I suspect incorrect answers based on non-Christian religions will not get the same treatment as incorrect answers based on a Christian religion.
Is getting docked points for bringing religion into an answer on physics, or biology, or chemistry religious discrimination or is it requiring an answer to be germane to the question?

If I'm asked a question in a biology exam and I start talking about computer science, losing part of the score doesn't seem completely egregious.
> Also the EU makes money from the auto companies in their jurisdiction and they don’t want a U.S auto company competing with them.

I believe that Ford might have something to say about that. They've been in Europe since... 1967.

Or GM since 1986 (now Opel and Vauxhall).

Or the existing Fiat-Chrysler.
Every greenback may be registered. But physical currency is only a small amount of the actual circulating money supply.

Due to fractional reserve banking, banks lend money they don't have. Banks are only required to have 10% of the money they loan on reserve.
Globalization.

Industry went to China and Mexico. Agriculture is a dumpster fire.

The people who supported these industries moved on to other places. The people who are left are idle and are occupied by crazy religious people and being bitter.
What "other kinds of testing" do you do instead then? How do you make sure the code is testable by those other tests?

Often people fall back on manual testing, which is often slow, unreliable and incomplete. And certain things might not even be testable if the system hasn't been designed to allow it.
Wow, that looks incredible. I don't know why, but I've never really thought to look for admin site solutions out there, instead opting for janky in-house built ones. I'll definitely be playing around with this.
Skimming the WDL “Quick Start Guide” (https://software.broadinstitute.org/wdl/documentation/quicks...) to get an overview, it’s like watching a snake eat its tail. You’d think a narrative in this problem space would at least have a clear beginning, middle, and end.

At least the Nextwave homepage (https://www.nextflow.io/) starts with a clean concrete written example, even if it does leave you to deduce its actual meaning for yourself.
That tells me that DoAllContext should be a class itself that doA belongs to, or that DoAllContext should be on the class itself, and the method itself should be the class.

This is, of course, when we're talking about programming in Objects.
I’ve absolutely seen that too. Just last week a classmate mentioned that she was going to the Bahamas for the weekend. I asked why and lo-and-behold it’s for a training for her “work.” Undoubtedly this was a huge money maker for someone. I understand the appeal, of course - who doesn’t want to be tricked into believing that taking a weekend in the Caribbean is a good idea financially
> Well, what's the culprit? A? B? C? D? E? F?

I honestly don't care. I know this merge is not touching production. I could have all of A, B, C, D, E and F test suites working individually if they break when put together they are all bad.

The developer have tests so they know exactly how to reproduce the bug. Time for them to earn their salary.
https://outline.com/6pmB5s