skysight-inc/HackerNews huggingface dataset:
Whenever Bernie Sanders or some other highly polarizing politician makes some sweeping claim, I have found that comments can be effective,such as on Reddit, for at least setting the record strait or putting it in the correct context or showing counterexamples.
Bugs favorite place to hide is in interfaces.
The type of software John writes is different (much more conceptually challenging), and I don't recall him being as big of a proponent of TDD (which is the biggest benefit to small functions).

I think the right answer depends on a number of other factors.
We ask people to sign in with their work email, so you can share private completions for scripts and internal CLI tools with teammates.

(You can use your personal email, if you prefer!)
It might make sense to divide your function with boolean flag into two functions and extract common code into third private function. Or may be it'll make things ugly.

I treat those books as something to show me how other people do things. I learn from it and I add it to my skill book. Then I'll apply it and see if I like it. If I don't like it in this particular case, I'll not apply it. IMO it's all about having insight into every possible solution. If you can implement something 10 different ways, you can choose the best one among them, but you have to learn those 10 different ways first.
I was really struck by Paul Graham's defense of him, which included an apologia that he sometimes spoke outrageously "for effect".

There was an effect. That seems to have come as a surprise.

I think he'd gotten used to the notion of internet trolling as being free of consequences. You get the power to touch others but without them being able to touch you. But a book puts your identity out there, and now they can do something about it.
Ask HN: How to make computer elderly proof
Hi HN

I have a grandma that uses her computer for two things: Skype and checking emails.

As her age progresses her ability to use the PC degrades, she forgets how to do things etc. I have a remote desktop so I can help if I can connect. Which is the biggest hurdle as she somehow often turns the laptop's airplane mode.

She's on Windows now as that's the OS she's most familiar with (I forced the Win10 to somehow look like WinXP). I am fine with switching to Linux if there is some distro that will allow me to do what I want.

So what I am interested in:

- preventing her to turn on airplane mode

- preventing her to launch anything apart from Skype and Firefox

- block any updates which confuse her greatly

- keeping the remote desktop running

I expect a recommendation to buy her tablet but she will freak out "learning" something new. Kiosk mode sounds interesting but it usually locks down to single app and I need her to switch between two.

I will be grateful for any tips
> Race is absolutely a state of mind, more so than gender.

Yes ...

> All else being equal, a person who would identify as "POC" in the USA would simply be seen as "white" in many other Western countries.

I'm struggling to think of what you mean here? The 20th century saw the transition of various southern european ethnicities into being "white" where they might previously not have been. And also a brutal war in the ruins of Yugoslavia among ethnicities that outsiders would find hard to distinguish and label together as "white".

Race is a state of mind - both in oneself and in the eyes of other people.
That's really cool, but we're not talking what the law is, but what it should be.
I lived in Orlando for 14 years, well within Disney's time-sphere of influence.

While I lived there, it had strip clubs. A fair number of them. One of the reasons they shut down was a massive roadwork project on South Orange Blossom Trail where a lot of them were. Many, many businesses shuttered due to the road work median limiting left turns, and the widening reducing available parking to next to nothing.
Its just a attack on linux. Just like what they did to firefox. Made a superior browser and make it opensource and gain monopoly.

Now they have control over os. They can do anything.
Exactly. From politicians down to the lowest bureaucrats few in government are so stupid as to need to be told who wants what. And those that are don't tend to last long.
Pardon me for stating this but pundits of the Clean Code mantra I've worked with tend to be those consultants who bill enormous amount of money to ensure that they have lengthy contracts which is justified by wrapping codes in so much classes to abstract it and considered *CLEAN* and *TESTABLE*.

They will preach the awesomeness of clean code in terms of maintainability, scalability and all those fancy enter-pricey terms that at the end of the day, brought not enough value to justify their cost.
I do not believe this true. War over the past 20 years has been overwhelmingly unpopular. Have we in the US been able to stop that?

What then also of the minority that lives under these laws? I never once consented to them, and yet must submit to the majority.
To be fair, more people die from inserting things into their anus than die from AR15s.
In the US there is precedent (existing court rulings) against IP address being PII. Obviously, IP address is not very good PII, and never guaranteed to be able to identify someone.

Whether HN has a log of it is an assumption I don’t have a way to verify. Lots of privacy-conscious sites purge connection logs often and/or refuse to keep them for this very reason.
It's less comprehensive but depending on your definition devices like Amazons Echo or Googles Home devices could count as audio only OSes
How to have fun and create “podsafe” podcast production themes and content
RAF is still imprecise for audio use. For audio in the browser, you usually want to defer all timing events that must be precise to a scheduler that uses either the webAudio context time or even more ideally, use a lookahead scheduler to schedule events by audio frame using an internal counter and the sample rate.

A great programming exercise that forces you to wrap your head around JavaScript timing events is writing a small step sequencer that can be used while it is running with minimal latency.
> in any mass migration, those who migrate (vs stay where they are) tend to be the fitter, smarter, richer people.

Completely not true. Look at the migrations to the EU, as well as to the US. The “smarter, fitter, richer” people aren’t mass migrating from Latin America. Not at any significant percentage at least.
A 1000 times this. We never use git blame - who cares? The code should be self-explanatory, and if it's not, the author doesn't remember why they did it 5 years down the line either.
I think a much stronger solution would be to require all browsers to disable cookies by default, and let the user opt into websites that you need to sign into.

In its current state GDPR has effectively just littered the website with popups that don't let you disable "functional" cookies in the popup. Functional my ass. The pages work fine without them. I disable all cookies except on a short list of sites I need to log in. Unfortunate side effect is the goddamn GDPR popups keep popping up on all those news sites.
So many coding recommendations trip up when they fail to take into account Ron's First Law: all extreme positions are wrong. Functions that are too long are bad, but functions that are too short are equally bad. 2-4 lines? Good grief! That's not even enough for a single properly formatted if-then-else!

IMHO it's only when you can't see the top and bottom of a function on the screen at the same time that you should start to worry.
I disagree. A lot of the US dollars that are held outside the US seem to be held not with an intention of spending them in the US, but out of trust that everyone will always agree they're valuable.
We are planning on going cross platform! What distro / terminal emulator do you use?
> The sanest, of course, is to not update your dependencies unless really necessary, to avoid introducing new bugs.

So instead you live with all the existing (and unknown) bugs and security issues?

And when you finally do update those frozen dependencies it becomes a nightmare because of all the drift, not just in that package but also its dependencies.

You should be updating regularly; if you're concerned about stability then stay a release or two behind latest but that's not guaranteed to more stable than latest.

Too often I see people take the approach you're espousing to only suffer more later when they are forced to take an update, and then they become so scared of future updates that they never update again, manually backporting patches, and creating a nightmare legacy application.
Except for Portland, Beaverton, Eugene, etc.

And state law is about that change to allow the locality to make it easier to toss you in jail.
AWS Condition Context Keys for Reducing Risk
My biggest gripe: Functions shouldn't be short, they should be of appropriate size. They should contain all the logic that isn't supposed to be exposed to the outside for someone else to call. If that means your function is 3000 lines long, so be it.

Realize that your whole program is effectively one big function and you achieve nothing by scattering its guts out into individual sub-functions just to make the pieces smaller.

If something is too convoluted and does too much, or has too much redundancy, you'll know, because it'll cause problems. It'll bother you. You shouldn't pre-empt this case by just writing small functions by default. That'll just cause its own problems.
Hard to see what you can actually put in the dashboards from the website. Would be great if more specific features were shown.
Number of bugs per line also goes way up when the average length of functions goes below 5, and the effect in most studies is larger than the effect of too large functions.
AFAIK none of the (current) apple produced processors do 32 bit, even the apple watch. Which is interesting, as it is very memory constrained, the usual reason for using 32 bit code.

Judging by some LLVM patches by an apple engineer, they solved this by creating an ILP32 mode for Aarch64 where they use the full 64 bit mode but with 32 bit pointers.
Cuz you’re a bunch of pansies
That's excessively specific. Most people, no further qualifiers, have zero interest in whether what they are posting is actually true. Most people are just socially signalling their preferred in group by what news they propagate. Labeling things "misinformation" is just another dodge for having to engage with whether or not something is true, or has a grain of truth in it that you might not like.
OP here. Hey, if you have a source on your statement I'm happy to change the blog post towards what is correct.

It may be that I assumed emscripten to use gcc but since its been over a year I wrote about it, I'm not sure anymore and so I default to trusting what I wrote. Happy to change with a source.
If this stuff interests you have a look at Pianoteq. They take this to a whole new level, through physical modelling they get extremely close to being able to generate realistically sounding pianos.
why? Just go to the commit hash in the blame and run blame again.

All in all it has a negligible impact on the readability of the code. It's mostly aesthetic for me. It's ugly and only solves far fetched problems.

Do you scratch your name and SSN into the side of your car? What if your title blows away in the wind on the same day that city hall burns down destroying all ownership records?
I believe that's pretty much the essence of DeSantis' approach.

It would be nice to see rational equitable solutions as to who can speak and where though. It wouldn't be such a big deal if were back in the age of 100,000 tiny blogs.

But in this age of a handful of big platforms determining which content and viewpoints are acceptable, there might be some moral hazard and negative potential for society. This is true no matter what your particular politics or religion might be and even if they are "on your side" today.
14$/month - Build one dashboard .

This seems too much money to build one dashboard.
Moreover, they can arbitrarily ban you from their walled gardens and you're more or less screwed.

When their control your email (GMail), business infrastructure (Google Business Apps / Servers etc.), Google Play (matters if you're a developer)... basically your entire digital existence.

I really hope we add more regulations to protect people online. While it's not clear for everyone, your digital existence is an essential part of being part of the society.
I think your comment is controversial, for a number of reasons. One, I think nobody should own code. Code should be obvious, tested, documented and reviewed (bringing the number of people involved to at least two), the story behind it should be either in the git comments or referenced to e.g. a task management system. Code ownership just creates islands.

I mean by all means assign a "domain expert" to a PART of your code, but no individual segment of code should belong to anyone.

Second: There's something to be said about avoiding churn. Everybody loves refactoring and rewriting code, present company included, but it muddles the version control waters. I've seen a few github projects where the guidelines stated not to create PRs for minor refactorings, because they create churn and version control noise.

Anyway, that's all "ideal world" thinking, I know in practice it doesn't work like that.
Digital pimpin' ain't easy.
> This is done as part of an overall lesson in the virtue of inventing a new domain-specific testing language for your tests. I was left so confused by this suggestion. I would use exactly the same code to demonstrate exactly the opposite lesson. Don't do this!

This example (code is in the article) was very telling of the book author's core philosophy.

Best I can tell, the OOP movement of the 2000s (I wasn't a professional in 2008, though I was learning Java at the time) was at its heart rooted in the idea that abstractions are nearly always a win; the very idealistic perspective that anything you can possibly give a name to, should be given a name. That programmers down the line will thank you for handing them a named entity instead of perhaps even a single line of underlying code.

This philosophy greatly over-estimates the value, and greatly under-estimates the cost, of idea-creation. I don't just write some code, I create an idea, and then I write a bit of code as implementation details for it. This is a very tantalizing vision of development: all messy details are hidden away, what we're left with is a beautiful constellation of ideas in their purest form.

The problem is that when someone else has to try and make sense of your code, they first have to internalize all of your ideas, instead of just reading the code itself which may be calling out to something they already understand. It is the opposite of self-documenting code: it's code that requires its own glossary in addition to the usual documentation. "wayTooCold()" may read more naturally to the person who wrote it, but there's a fallacy where they assume that that also applies to other minds that come along and read it later.

Establishing a whole new concept with its own terminology in your code is costly. It has to be done with great care and only when absolutely necessary, and then documented thoroughly. I think as an industry we have more awareness of this nowadays. We don't just make UML diagrams and kick them across the fence for all those mundane "implementation details" to be written.
In my experience it brings minor conveniences: yelling at Google or Alexa to turn on the kitchen lights when your hands are greasy, or dimming the lights with your phone when you're sitting on the couch with a cat on your lap. None of these are huge selling points, but once in place they're nice.

If done right, though, the system just degrades gracefully to a normal set of switches.
So then you checkout at the refactor commit and look through the blame to continue searching. If you have to repeat this more than a few times then the person has probably left the company or hasn't touched the code in years so its better to understand it yourself before modifying.
> You will win more friends with a "never correct others" policy. However, what if belief in the misinformation has deadly consequences?

where do you think the line should be drawn? dying is pretty clearly terrible.

what if someone is going to invest all of their money in a ponzi scheme? or put 50% of their savings into GME? or invest in a high expense ratio index fund?

we've got to ignore some mistakes and errors on the part of others.
I think a pc is not suited for this. I would try to see if an ipad is of any interest to them.
So does deplatforming work or is it just a myth, like some people say?
> Or trying to argue with someone who believes in "systemic white supremacy" by pointing out that Asian-Americans earn more money than white Americans.

White Supremacy is the belief that white people are inherently superior to everyone else and should dominate, regardless of how much money anyone makes. There are plenty of poor white supremacists.

Did you mean systemic social privilege? https://en.wikipedia.org/wiki/Social_privilege

>I don't know what to do in these situations.

Empathy and understanding.
I never read Clean Code and know nothing about its author so I'm willing to trust you on the first part, but the second paragraph is really uncalled for IMO. The article is long and gives precise examples of its issues with the book. Assuming an ulterior motive is unwarranted.
UN, WHO, WEF, WTO, and more... Where will you shop to as these unelected organizations gradually ascend?
Here is a pretty good example https://youtu.be/pXvIzWhEWvA?t=332
Absolutely this. Code should tell a story, the functions and objects you use are defined by the context of the story at that level of description. If you have to translate between low-level operations to reconstruct the high level behavior of some unit of work, you are missing some opportunities for useful abstractions.

Coding at scale is about managing complexity. The best code is code you don't have to read because of well named functional boundaries. Natural language is our facility for managing complexity generally. It shouldn't be surprising that the two are mutually beneficial.
Human Readable Legal Page
Texan here. I hope it convinces some bad apple transplants to leave. There is one person here who said they moved from the Bay area to Texas, but that person is condescending, demeaning, and racist, while claiming to speak as a Texan in their comments in this thread.

I hope those people don't turn Texas into the state that they left, which they left for a reason.
It's been a while since I've read it, but I think to handle boolean flag type logic well he suggests to rely on object subclassing instead. So, for an example that uses a dry run flag for scary operations, you can have your normal object (a) and all of its methods that actually perform those scary operations. Then you can subclass that object (a) to create a dry run subclass (b). That object b, can override only the methods that perform the scary operations that you want to dry run while at the same time using all of its non scary methods. That would let you avoid having if dry_run == true; then dry_run_method() else scary_method() scattered in lots of different methods.
Those are your beliefs/values. I mostly share them. But is it right to impose them legislatively on everyone?
>it is _much_ easier to refactor copy pasta code

I totally agree assuming that there will be time to get to the second pass of the "write everything twice" approach...some of my least favorite refactoring work has been on older code that was liberally copy-pasted by well-intentioned developers expecting a chance to come back through later but who never get the chance. All too often the winds of corporate decision making will change and send attention elsewhere at the wrong moment, and all those copy pasted bits will slowly but surely drift apart as unfamiliar new developers come through making small tweaks.
Yes, to be honest we are mainly targeting agencies and bigger companies with the Agency plan (All unlimited) which currently is at 29. The 14$ is more for personal users and it might be indeed a bit too high. Perhaps we should drop it at 6/7$
thats too enterprisey, at a startup you would write it like this:

const charA = (false+"")[1];
USD has inherent value* because it can be exchanged for goods, property, and services in the US. Or to pay US taxes. The US has a lot of goods, property, and services that people want. US taxes are not a consideration for most people outside the US.

*Since most global trade is denominated in USD, and many countries use USD as their official currency, it can also be used to pay for goods, property, and services outside the US. But arguably it wouldn't have this global status if the US itself didn't have valuable goods, property, and services.
I have the same complaint with Code Complete. I read bits in college and I'm not sure I follow most of its advice today (i.e. putting constants on the left side of a comparison).

However, the book also presents the psych study about people not remembering more than 7 (+/- 2) things at a time (therefore you should simplify your code so readers don't have to keep track of too much stuff) and it stuck with me. I must be one of the people with only 5 available slots in their brain...

(edited for clarity)
> Of course, there are plenty of scammers happy to charge you £50 for insurance against an impossibility...

Charging money for insurance against an event that is impossible is, i believe, a criminal offence in the UK.