skysight-inc/HackerNews huggingface dataset:
All IMO:

> However, I've never seen a convincing and objective description of clear code.

I take "clever code" to mean "code that looks pretty on surface the but requires the reader to dig in in order to understand the intent".

The problem with clever code is that it is misleading. It lacks empathy. You assume the next programmer will understand it at first glance just because it looks cool or pretty, but they'll struggle to parse it.

---

> Sometimes people mean that clear code is verbose code.

I also consider some verbose code to be "clever code" too. Most of the time it is just people using hammers where screwdrivers would be more appropriate:

- Unnecessary structures - eg: classes that could be functions taking 2x or 3x more space

- Unnecessary usage of polymorphism - eg: inheritance chain that could be a simple if

- Excessive indirection - eg: layered code where most of the time the layers don't do anything

- Plain wrong abstractions - eg: using query builders to build queries that would be smaller and more readable in SQL

- Fear of making classes too big - eg: instead of adding a method to a class, making a second class that knows too much about the innards of the first one

- Procedural code disguised as OOP - eg: breaking up a method into multiple private ones, but ending up having a lot of instance variables that were local variables before. When everything could be a single function.

---

> The best we have is cyclomatic complexity, but there's some reason to believe that line count may be a better indicator (which can't be good). And cyclomatic complexity completely misses the effect of mutable or immutable state, the presence of bad APIs, poor variable naming, etc.

Great observations. I agree 100%.

Since you mentioned it, I find cyclomatic complexity a bit too easy to game. I always wanted to have a metric that prevented people doing that, and took multiple methods into account.

When you break a method in three or four without adding REAL abstractions (a.k.a. "things you don't have to follow with the debugger to understand"), you're not making it easier to read, in fact you're making it harder because the reader has to jump around your code.

Of course, it's harder for machines to know the difference between good and bad abstractions. But I think we should take that into account in code reviews and such.
In Smalltalk, we had return values from ifTrue:ifFalse: statements. This served the function of the ternary ( ? : ) while enabling if-then style brackets. Also, deeply nested logic and methods longer than 10 lines were regarded as "code smells" in the community, so a lot of that logic was implemented through polymorphism.

Anyone who has the experience of reading lots of highly trivial functions like those, and gotten the feeling "I've read a lot of code, and I understand what each little bit does, but what is the whole thing trying to do?" That's a symptom of excessive verbosity.

Smalltalkers sometimes solved this through executable comments. There would be some code, with a message to "debug this," and we could just highlight the code and quickly and easily walk through it in the debugger. This demonstrates one of the advantages and disadvantages of Smalltalk: Everything could be embodied in the interaction of relatively small objects, so everything tended to be modular, more easily. The disadvantage comes from the fact that the interaction has to be understood to understand the system as a whole.
Interesting the way it changes within a couple of generations, the "older generation" in my day, i.e. my dad - a linguist - would call out the then-modern interchangeable usage, by insisting "nouns have a gender, people have a sex!"
Any word on F#? Last I checked there wasn't any REPL still and type providers weren't working.
If every choice was obvious, there would be no need for a designer in the first place.
I'm curious and don't see anything. But what about things like IPC? Is WCF available yet? Is there an abstraction for namedpipes for all the platforms?
I use offline hard drives to store files that I don't think I'll be using in the future (but don't have the heart to destroy). I direct the find command to a file to make a searchable index of the drive in case I need to find a file but am too lazy to connect the drives and search them.
The rich/poor gap in the vaccine debate is pretty shocking. Not just these legal fines (cheap if you're rich), but the "alternative vaccine schedule" that some (very few) doctors recommend is also expensive and not covered by commoner insurance.
>Keeping in mind that keeping bee alive will also incur cost and sacrifice.

Do you live anywhere near an active volcano? I have been reading up on Maya culture and thanks to your comment I may have a plan to save the bees. It is unlikely to work I'd be the first to admit, however I think it could be worth a try.
Zsh has excellent tab completion and you don't have to write a whole novella for each command like Powershell mandates.
Mainly as a learning exercise, I wrote my blog from scratch. The back-end is written in Go, mainly communicates with S3 for storage of photo assets and blog posts and serves static pages using HTML templates. I have a front-end written in React for admin views, including blog post editing and photo uploading.
Cloudformation is a tragedy in itself.
It's all C++ code. We're using the relatively new XAML Islands framework to allow us to host UWP XAML content in a Win32 process. A lot of the core is C++/WinRT, which is magic that lets you call most WinRT (UWP) APIs from C++ without having to deal with CX.

I'd say the vast majority of the codebase is pure C++, without the C++/winrt magic.

The renderer we're using is DX-based, which provides a pretty substantial perf improvement over the old GDI-based one conhost uses.
100% agree.

If automation is needed, use scantron technology (where you fill in bubbles on actual paper), which can be manually audited if necessary.

No firewalls, phishing, spectres or meltdowns.
This issue of the AOA-disagree warning light keeps getting brought up again and again, which is unfortunate because the presence of such a light would not have saved those 346 lives. Imagine you are a pilot and your airplane's nose keeps getting pushed toward the ground no matter how much you pull back on the stick. You try everything. Now you notice a little warning light 'AOA disagree'. How does that help you, exactly? The lack of this warning light is completely irrelevant. The problem is that they allowed the readings from 1 single sensor to force the nose of the aircraft toward the ground.
From https://venturebeat.com/2019/05/06/microsoft-windows-termina... :

"WSL 2 will also support running Linux Docker containers natively, so that VMs are no longer required."

Great news!
Is it light in terms of dev time nowadays? 10+ years ago I had a self-managed Wordpress instance and it was just getting hacked left and right and I had to constantly be applying the latest updates/patches to be safe. 5+ years ago I was in a startup with a self-hosted company blog using Wordpress, this time I remember updates being easier to apply (1 click from the admin UI) but the cheap server we ran it on constantly ran into resource issues.

I agree the initial setup is usually easy and fast, but a lot of maintenance overhead to keep running. It's been a long time and maybe things are better since then?
when the price of something goes up, it means we're getting worse at producing it. It doesn't matter if you're using new technologies. what matters is results. If a gallon of milk goes from 2$ to 2.50$ inflation adjusted, then we've gotten worse at producing it (increase costs), etc. And, by gotten worse, I mean in aggregate: (this includes price of land, zoning laws, regulations, NIMBYs suing developers, insurance, frequency of huricanes, etc): all these things can make us get worse at developing shelter. What you'll notice about all these causes is they're directly or indirectly all Self inflicted.
One thing that I fail to wrap my mind around: aren’t all those corporations executives, politicians, and poachers living on the same planet Earth as all of us? Don’t they ever think that they’re actually destroying our planet and there’s no other place to live?
I can imagine that they don’t believe pro-climate change people, but they could simply hire an independent group of researchers, don’t they? And I mean actually independent researchers, not those who will produce any outcome you demand from them.
Cool. Makes me wish I had a feature in iOS, "Siri, play back every recording you ever made of me" ..
ACLU: Amazon Rekognition falsely matches Congress members against 25K mugshots
If it's an effective solution it will only seem weird until it's proven to be more useful than the status quo approach.

I read this post and thought 'async as a prefix is intuitive!', but that's only because I saw it first in C#.

Rust already has an immense learning curve despite its ergonomics, I say it should continue to experiment. Same way Haskell does.

I do wonder if `.await` could have a sigil equivalent the same way `try!` did with `?`. `…` could work if it's not already used as spread args.
They took years to rewrite C# compiler and delivery became _slower_?
Thank you (and your team) for making this! I'm looking forward to being able to use this.
Can we use this new gravitational wave information to work up the probability that such an event will occur nearby in the next N years?
Always involve junior developers in code review
I should try lineage OS... I'm on a OnePlus 3, and the battery is starting to go. I was thinking of trying the Librem 5 when it ships, but we'll see.
So what? They have become redundant so they are going extinct. Whats the problem with progress?
I absolutely love the way the docs page is setup: https://fullcalendar.io/docs

Nice design and useful section links.
Why didn't I get some prison time at least instead of just sending me to a place I know nothing about? I lived in the US For 20 years for Godsakes trump is Evil person.

Are there any journalists I can tell my story too I'm stranded in a country I don't know 1 thing about. I think the way I was deported was Illegal too I went to county jail for a few days for some misdemeanor crimes and got hurried up into a plane out of no where heading to Somalia and just dropped in the middle of no where.
Based on their privacy policy, it looks like they gather aggregate browsing data, which they may be monetizing. But they say that all data gathered is at the aggregate level.

https://addons.mozilla.org/en-US/firefox/addon/shoptimate/pr...
What hardware are you using for this?
Dang, I can relate to this 100%. I had to check the username to see if I actually wrote this myself :-p
the next step is ofcourse running an IDE remotely from a running program itself that can self modify. Like Nightlight for Clojure:https://github.com/oakes/Nightlight

my dream would be basically nightlight, but if the ide itself could self modify kinda like Emacs. Basically Emacs in Clojure that you could embed in applications or have applications run from it (the two would be equivalent)
I'd say if you're looking for linux commandline applications, I'd recommend the Windows Subsystem for Linux, which lets linux binaries run unmodified on Windows.

As far as package managers are concerned, I've had lots of success with Chocolatey. If developers are willing to port their commandline applications to Windows, then I'm sure they'd be welcome additions to Chocolatey
Serious suggestion, and I assume you have -- have you considered ".await?" as an alternative? It won't conflict with field names and cribs on the fact that "?" changes control flow.
This probably isn't what you're after but the idea is out there for this sort of thing:

https://www.fakespot.com/
Finally. Won't need to run a VM for Docker anymore
oh yes my bad, thanks. i was thinking extensions (maybe thanks to all the ff news!). wrt fingerpritning plugins, it seems to be the least of the issues and hopefully not an issue for long :)
I think you are confusing the .NET Standard (ie. the standard to base implementations of .NET on) with .NET Framework which is going away.
Enabling the ecosystem is a big focus for us moving forward, so I’d love to chat further about your scenario and requirements. Feel free to ping me at joncart@microsoft.com and we can setup a quick call.
No, I'm trying to state facts about history of philosophy and history of science.

First, you're obviously applying your current world view to 1640, which doesn't make any sense. OK, all people from the past were barbaric, racist, violent, misogynistic, credulous so whatever they did and say should be dismissed without any further reflection, is this your point?

Second, I don't even understand what you're trying to convey. Did Descartes advise to torture puppies for science?
>"If we may think that it's still modelling our world exactly enough [..]"

Some people think that it has been pretty accurate:

"[..] The dotted line shows the Limits to Growth “business-as-usual” scenario out to 2100. Up to 2010, the data is strikingly similar to the book’s forecasts."

From: https://www.theguardian.com/commentisfree/2014/sep/02/limits...
I'd say that rather depends on the design of the space habitat.

edit - also, while a space economy develops, the initially dangerous and messy environment is part of what will attract many of the first settlers. That and the money. Asteroid mining will be a goldrush.
It might have just been doing windows updates. I've never had problems with it but I've read online that it can spike disk/cpu usage on some hardware configurations. If you just bought it, it might have been doing a major version upgrade (1809->1903 for example)
Yes, but there should be an automated system that sends email, text, and calls to multiple family members simultaneously
Unless I'm missing something this is the same thing we have known for forever. Alexa saves recording WHEN YOU USE IT. It DOES NOT just record for the hell of it. It can pick up sensitive information by accident b/c it thinks it heard it's wake word but I'm not sure what people are expecting on this front.

All of these FUD articles are really starting to wear on me. We can discuss how Amazon could push an update to be always listening and recording but this article title and contents are just click-bait and do not deserve a platform on HN.

Wake me up when we have proof that Echo's are sending info WITHOUT hearing the wake work (or thinking they heard it, dear lord do these people expect it to be perfect??) until then we have known this all along.
I would only guess they haven't yet noticed that behaviour of yours, so your account hadn't yet been flagged to disable hassle-free returns?
From Gloom to Gratitude: 8 Skills to Cultivate Joy
It's a nice idea, but major sites still do user agent sniffing. Try setting your UA to one of those strings and visiting google.com -- the SERP looks like it came from 2009.

If Firefox tried that, it would instantly become that weird browser that makes Google look bad. The internet would be flooded with tips on how to set a custom UA that made it pretty again.
WSL fails in a lot of use cases due to the NT kernel's poor performance when creating processes, slowness in the translation layer when accessing files, and the like.

It's essentially the reverse case of telling Windows users to "just use Wine" - the emulation isn't perfect and some programs won't work well or at all. In a sense, WSL is worse than Wine in this regard since there's usually a Linux-native alternative if something doesn't work in Wine. If something doesn't work in WSL, you don't have a lot of options.
This is one of the best configuration scripts to make your Windows snappy, it's fully customizable and easy to use: https://github.com/Disassembler0/Win10-Initial-Setup-Script
Impossible research produces 400-year El Nino record revealing startling changes
All over my profiler. Go can deal with something embarrassingly parallel, same as any other language, but try getting it to scale up to high core counts with small RPCs is impossible, for the reasons the OP mentioned: you can't avoid its global allocator and you don't control the scheduler either. You will spend all of your CPU time in runtime.findrunnable and runtime.mallocgc.
I switched back to Linux for this very reason.

I have an Asus with Windows 10, and after a day of use, it becomes unbearably slow. It seems there is a lot of activity on the HD. I tried to diagnose this, but was never able to pinpoint a specific process that was slowing it down.

The only solution was to restart it. Web browsing always had a huge delay.

Linux on the other hand: startup is fast, use is fast, runs for months without any restart.
I think it actually is a popular opinion here, and in general, among people that write software and/or have a basic understanding of encryption.

Ever tried to get a non-technical person to use any kind of non-"automatic" encryption (eg, anything they have to directly interact with, as opposed to something like HTTPS)? Now imagine that but include people that can barely use their phone/computer.
Originally reported here(1) and poorly copy and pasted by that site. All of the important links are missing. Washington Post, so soft paywall.

1) https://www.washingtonpost.com/technology/2019/05/06/alexa-h...
The article mentions "extensions". Can you elaborate a bit on this? What is the vision here?
Care to explain why you think pen and paper is the best solution?
Very misleading clickbaity headline. Alexa does not record the whole time. Only when you say “Alexa”, or it thinks you do. There are bound to be false positives, but this is far from the “whole time”.

The Alexa app lets you hear, and delete, your recordings.
Interoperation with java, swift, and obj-c is interesting. I wonder if they have an actual jvm, or they're just implementing java-the-language?
I'd move it to

https://aws.amazon.com/blogs/aws/new-amazon-s3-storage-class...

Pricing is super cheap like $1/terabytes a month
Nope!

Lol I should have updated that issue - in the most recent Windows release, we added a feature to conhost to actually disable the overscroll (under Properties... Terminal... Disable Scroll-Forward). See [this blog post](https://devblogs.microsoft.com/commandline/new-experimental-...)
The article talks about "GPU-accelerated text rendering" - can you speak more about what this means in terms of visual performance? Also, are there plans to add subpixel antialiasing (maybe it's part of this)?
Caller ID is an untrusted advisory best effort service. It has absolutely no integrity of any kind today. There's an American law against spoofing it in theory, but it's not very enforcable at the moment. Understand it's literally a string that you can set to any value, including complete nonsense, and calls will often work.

Heck, we constantly receive calls with invalid phone numbers. And it's not always on purpose, sometimes it's just crummy or small-time carriers in rural areas (no disrespect intended, this is just an honest statement from experience). If we ingress filtered all invalid numbers, it would almost certainly be devistating to our customers.

This is like with email. First we need an integrity mechanism, then we can start doing reputation and identifying bad actors.
Well... except for the fact that I don't have a gut to make use of any of the biomass that grazing cattle can harvest from a field. And eaten or not, that biomass is part of active carbon cycle, and if left on the field, will decompose back into the atmosphere.
There was an absolutely phenomenal piece written recently: "How the news took over reality" [1] It goes into some degree of depth about why it is exactly that ever more people are increasingly feeling every pulse of every issue. And why it's not necessarily a great thing.

Consider something. Today, by most metrics, is by far the most stable and safe time that we've ever lived in during humanity's existence. This seems contradictory to how many feel. But consider that it wasn't that long ago that literal imminent nuclear annihilation was just a regular part of life. As a child we had fire drills. Go back just a couple of decades prior and school children were having nuclear explosion drills.

And there was absolutely no end in sight. The Cold War started around 1946 and ended around 1990. Imagine 44 years of fear of nuclear annihilation. You had a generation of people that grew up knowing nothing except this reality and for it to last long enough for them to reproduce and yet another generation to live through this, onto adulthood, as well. It's difficult to even imagine this.

And it's not like that was some extreme example. Right before the Cold War we had a couple of very not cold wars. In World War 2, some 3% of the entire world's population was directly killed in 6 years. It's impossible to understand that scale of loss directly. So let's measure it in terms of 9/11 attacks, where 2,966 were killed. Given today's population a 3% global loss would be the equivalent of 77,882 consecutive 9/11 attacks. That's 213 years of a 9/11 attack happening every single day. If you have a child at age 25 that means you're great great great great great great grand children would get to live their life with a 9/11 attack happening every single day. And now take all that misery and despair, and compress it into 6 years. And of course we weren't fighting over the petrodollar. We were facing an opponent who had every open intent of enslaving and/or engaging in genocide against the losers. And for some time it looked like he may very well win.

Now let's consider climate change. In the worst case scenario we're looking at extreme weather conditions and having to deal with coastal regions (where most people tend to live) becoming less habitable and uninhabitable in some instances. And this is assuming we completely fail at transitioning away from carbon producing systems and also completely fail to develop mitigating technological measures - many of which already exist (such as amine based scrubbing), but are too expensive to deploy. Climate change is of course very relevant, but when you frame it in comparison to issues people of previous generations have had to face... Suffice to say I'd happily take climate change over imminent nuclear annihilation and genocide. Not exactly a high bar I'm setting, but that low bar is exactly the sort of circumstance that defines what we've had to live through for centuries.

[1] - https://www.theguardian.com/news/2019/may/03/how-the-news-to...
Sounds like a great project for someone to work on.

You know, those Mastodon folks have built some interesting stuff on top of ActivityPub. Maybe we should build a text-based communication protocol on ActivityPub in addition to more social features. Then we could also give some file-sharing mechanism, wherein a user could send a message with a tightly linked file, like the message and file are attached to one another.

Then we could let users run a server to send these sorts of messages over a federated ActivityPub network.

Perhaps we could normalize this protocol so much that ISPs would include a basic option of an address and some storage. This would really help to separate us from these mega service companies like Google and Facebook.

/s
What's you differentiator from Craigslist or NextDoor?

Are you focusing on transactions (i.e. buy/sell/help needed), or are you focusing on social (donation requests/lost dog/transit discussion)?
My Acer aspire 7 is pretty useable... once you remember that Windows 10 is not truly done booting until it has checked for updates. (I also disabled everything I could too, including the bundled software)
Man, I miss Köln. It was a very interesting winter in 2002, where archaeologists were unearthing an entire underground city (you could see it through a pyramid-like window).

If you ever visit, down some of their Kölsch and get a Kölsch key (their beer-rival is the nearby region of Alt - at the company I was consulting for, many of the folks had replaced their Alt keys with Kölsch ones)
The Gardener’s Vision of Data