skysight-inc/HackerNews huggingface dataset:
> Proponents of small functions argue that you don't have to read more than the signature and name of a function to understand what it does; it's obvious what a function called last that takes a list and returns an optional value does.

It's also interesting that in comment to the same article many people argue against PR process. I hardly see how else that level of discipline required not to undermine trust in names of small methods can be maintained for any team with more than 3 developers.
I do my absolute best to write code that does not require many or an comments or annotations because of the pain points described. I assume you're not referring to things like documenting "infrastructure" or "overall design" or "how to get started" as they don't change much and I just put those in a readme in the repo. For the nuts and bolts itself, this involves

Carefully naming variables and classes in obvious and consistent ways. I will spend time refactoring code so that it is named consistently and behaves as named.

Very small functions and classes (but not smaller than they need to be). This lets me use more named functions which gives me more description. It also typically gives me a nice hierarchy of how things occur, so whatever main "driver" function I have is pretty declarative and light on logic. It avoids big "god" functions or classes which tend to get cluttered and are often the hardest to break down or read.

Enforce obvious and established patterns. These again go in names, but if I'm using CQRS, then I'll have lots of CQRS, handler, registrar, etc in the names. If I have a factory it has Factory in the name. When you see these you know what and how things are organized.

Related to the above, no "clever" code and no inconsistent code. I'll write more "inefficient" code if it's not a bottleneck rather than something tight which was a premature optimization. If it's not normal for the established patterns, but could be forged into something consistent, I do the latter.

Lots and lots of tests. Tests describe behavior which tends to be pretty immutable OR if I have a requirement on behavior change, the test will fail at some point and needs to be reconsidered so gets my renaming attention. That last part is very important. Most testing frameworks let add plain language names/failure conditions, so if the behavior has changed the test starts going red and it doesn't let you forget about it. Those often become my documentation/annotations.

I will use comments when I've written something that needs to be structured outside of the above. These tend to be rare and typically pretty dense "black box" places, like when I've implemented a numerical or other very specific algorithm. As such they don't tend to get touched very often and I will write unit tests to make sure behavior is enforced.
FreeBSD 14 on a mini-ITX supermicro mainboard and 5 drives in a Jonsbo NAS case.
Because a person might be willing:

-to directly support artists with buying the albums or songs at full price, rather than letting Spotify barely pay artists anything for their music (especially independent ones without industry connections)

-knowing you own your library and that once you’ve purchased media, there is nothing to take it away other than the sands of time taking back its silicate

-one does not need unlimited access to songs they will never hear, especially when natural discoverability on Spotify is so so versus trawling through sites like Bandcamp, Earmilk, RCRDLBL (I know it doesn’t exist anymore), or other places where new artists show their work in a way that Spotify doesn’t provide
A weak function is also a function. Also if your income is higher you probably buy stuff that is more expensive.
Maybe a combination of private fork with comments and separate markdown files with notes (maybe in the same private fork)

Consider using special "symbols" in comments like "MYDOCS_XXX" that you search for in your modified version of the code base, and refer to in other places. These will survive renames of function names etc by the upstream authors.
Instead of using binarized hamming, why not just use a shorter embedding that you can properly tackle? What good is Milvus if it's not giving you matches using something more proper?

Also, this site is not Reddit. You don't have to reply to every comment.
You shouldn't have been downvoted for this!

http://hardboiledpoker.blogspot.com/2015/02/when-they-introd...

Also I feel like we're aging out of the tech scene. Or maybe that the seemingly antiquated life lessons we've learned might be needed now more than ever.
>It's quite easy to imagine a well factored codebase where all things are neatly separated.

If one is always implementing new code bases that they keep well factored, they should count their blessings. I think being informed about cognitive load in code bases is still very important for all the times we aren't so blessed. I've inherited applications that use global scope and it is a nightmare to reason though. Where possible I improve it and reduce global scope, but that is not always an option and is only possible after I have reasoned enough about the global scope to feel I can isolate it. As such, letting others know of the costs is helpful to both reduce it from happening and to convince stakeholders of the importance of fixing it after it has happened and accounting for the extra costs it causes until it is fixed.

>The messy stuff is where the real world concepts need to be transformed into code.

I also agree this can be a messy place, and on a new project, it is messy even when the code is clean because there is effectively a business logic/process code base you are inheriting and turning into an application. I think many of the lessons carry over well as I have seen an issue with global scope in business processes that cause many of the same issues as in code bases. When very different business processes end up converging into one before splitting again, there is often extra cognitive load created in trying to combine them. A single instance really isn't bad, much like how a single global variable isn't bad, but this is an anti-pattern that is used over and over again.

One helpful tool is working ones way up to the point of having enough political power and earned enough respect for their designs to have suggestions of refactoring business processes be taken into serious consideration (one also has to have enough business acumen to know when such a suggestion is reasonable).

>the original author doesn't work here anymore so no one's here to explain the original code's intent.

I fight for comments that tell me why a certain decision is made in the code. The code tells me what it is doing, and domain knowledge will tell most of why it is doing the things expected, but anytime the code deviates from doing what one would normally expect to be done in the domain, telling me why it deviated from expected behavior is very important for when someone is back here reading it 5+ years later when no one is left from the original project. Some will suggest putting it in documentation, but I find that the only documentation with any chance of being maintained or even kept is the documentation built into the code.
I used to add stuff to MB but it's a bit involved as a process and honestly I'm too lazy a lot of the time. Picard is fine as a GUI tagger but I like foo.

If I can't pick what to listen to I quite like radiooooo, Radio Paradise, Radio Meuh, etc.
Just curious, I has noticed that it is only possible to host it on their cloud, and doesn't have any autonomy to host the forum myself?
Thanks for clarifying, that would've sent me on a long wild
goose chase. Most libraries only provide some sort of channel to send messages to. They generally do not indicate any FIN or ACK received at the TCP level.

If anyone knows any library or framework in any language that solves this problem, I'd love
to hear about it.
Tech Makes an Economic Case for Skilled Immigrants. Will Trump Bite?
Is there an Apple Watch app for this tech stack? That’s what my current (totally different) solution is missing.
Me too on Rust, self-hosting, and devops stuff! Good luck.
You Need to Create a Secret Password with Your Family
Why human civilization may be on the brink of a 'planetary phase shift'
Google "adhd hobby jumping". Too much to explain here. The main thing to keep in mind with ADHD is that when a normal person simply thinks about doing a task, they get a hit of dopamine that gives them the motivation to do the task. An ADHD person doesn't get that until after the task is done, which leads to them never starting. The exception is with things that are an instant dopamine hit. The new shiny. Lather, Rinse, Repeat.
Ancient genomes provide final word in Indo-European linguistic origins
GPS depends on widely separated (several times the diameter of Earth) clocks agreeing with each other down to the nanosecond.
Show HN: VeganHub – The Largest Online Collection of Vegan Resources
I just launched VeganHub, a platform that gathers the best vegan resources all in one place. Whether you're vegan, vegan-curious, or simply exploring a sustainable lifestyle, you'll find curated articles, books, documentaries, podcasts, and videos to inspire and educate.

I am on a mission to make veganism more accessible and empowering by providing a central hub for information and community.

Would love your thoughts and feedback!
Bypassing the monthly usage limit for 1-800-ChatGPT – A PoC
There's a UI design element here which I don't like.

The UI presents a text field which is for entering search terms.

You click it and expect to type - but NO! - SURPRISE!!! it's actually a button!!

And now the page changes, pops up an actual text field, somewhere else and new, and you abruptly are forced to set aside your thoughts about search to process the page layout a second time and go and click again to type in a term.

Why on God's clean Earth would anyone ever do this?
> has a sensible reason for being

Maybe, but sometimes it is just that they "had" a reason which is no longer relevant.

Other times, the reason is protecting high paying union jobs. (e.g. requirements for copper plumbing and electrical conduit)
Obsidian lets you live on top of the filesystem structure using markdown files, and it gives you links, tags, topic clouds, and more.

If you use it with reasonable conventions, you can compile and deploy a web version with ghost or zola or something automatically run in CI.

It's backed up, synced, and comes with desktop and mobile apps. It has vim key bindings and git plugins.

It's a pretty sweet system that works nicely with Unix, and it adapts to multiple navigational and organizational paradigms.

I've tried a lot of things, and nothing has ever come close to Obsidian.
Hi guys. I just noticed that this post has a Reddit post on the front text. I originally made this post for Reddit actually, but I taught of hearing feedback here too, so I cross-posted it here. I forgot that the title of the text which is 'Reddit post' is also copied. If you guys have any recommendations or feedback for me, I would love to hear it. I sincerely apologise.
I've been experimenting with Flatnotes (https://github.com/Dullage/flatnotes) for a while and really like the design. No notebooks or even folders, just a single directory with markdown files and decent search & tagging. It feels a lot like what happened to email when we gave up all the up-front structuring with deep hierarchies and just said index it and we'll find it when we need to.

The project is just "good enough" for what I need, and aside from tiny bugs whenever I find a gap I can either work around it or live without. Constraints are a powerful motivator for both creativity and getting stuff done.
I agreed. But I plan to run this forum on a shared hosting through, and I don't think it is possible.
2024 in review: Submarine cables become battleground
> Proponents of small functions argue that you don't have to read more than the signature and name of a function to understand what it does;

Although this is often the case, the style of the program can change things significantly. Here are a few, not so uncommon, examples where it starts to break down:

1. When you’re crafting algorithms, you might try to keep code blocks brief, but coming up with precise, descriptive names for each 50-line snippet can be hard. Especially if the average developer might not even fully understand the textbook chapter behind it.

2. At some point you have to build higher than "removeLastElementFromArray"-type of functions. You are not going to get very far skimming domain-specific function names if don’t have any background in that area.

More examples exist, but these two illustrate the point.
It's good to see you operating again, doctor.
Emulating 1980s Computer Graphics
Places where many people already live will always be the most attractive. You are not going to solve this by trying to even out population density. Trying to manipulate demand with anything is almost always a losing approach.

You don't have to overcomplicate things. Supply less than demand > price goes up. Increase supply > price goes down. The data shows the same pattern over and over again[1]. See Japan as an international example or Minneapolis[2] and Austin[3] as US examples.

[1] https://deny.substack.com/p/tracking-the-anglo-worlds-housin...

[2] https://www.ft.com/content/86836af4-6b52-49e8-a8f0-8aec6181d...

[3] https://archive.ph/X3zAx
I‘m getting a redirect to some „Help Center“
I recommend FreeBSD-based OPNSense to anyone wanting a capable router for a small to medium size wired network.

Also, I feel like FreeBSD will eventually enter the "immutable server distro" space. ZFS boot environments have had 1st class support for over a decade already. New container advancements are being made on FreeBSD every year. I really believe it could compete hard with Fedora Atomic and OpenSuse MicroOS.
Smartphone design plateaued in 2018. Since then, we've seen widespread removal of the headphone jack, hole punches or notches in the status bar, larger camera bumps that result in the phone not even sitting flat on a table.

I would honestly prefer no selfie camera to a display cutout.
Roast me but the code is very readable. Compare with some modern languages where you have to stare at it for minutes to understand what's going on.
You really probably want to read up on what Chamberlain was actually doing before the war.
I think you'd have to translate the statement into the appropriate space. Here, the unconventional moves would refer to pro-level trick play. These doubtlessly exist, and have for a long time (e.g. secret house moves in joseki 100 years ago). Once made public, they either lose their surprise advantage and become poor moves, or become standard moves themselves.

So I'd say it is correct that there is a benefit to unconventional moves where punishing them requires understanding of unusual patterns.

On the same note, it is certainly true that playing unconventional moves against an opponent who does now how to punish them would only bring defeat quicker :)
My understanding is the hard part about scaling WebSockets is that they are stateful and long lived connections. That is also true of SSE. Is there some other aspect of WebSockets that make them harder to scale than WebSockets?

I guess with WebSockets, if you choose to send messages from the client to the server, then you have some additional work that you wouldn't have with SSE.
Is There Any Escape from the Spotify Syndrome?
I agreed (but I posted here to get some feedback). But I don't think it is continuously updated, as I noticed their update progress is quite slow through.
Ask HN: What tool for live, collaborative, symbolic math?
I've been doing Zoom meetings where we use live Overleaf to talk through math equations. This is cumbersome at best. I need a tool that I can use to talk with one or two remote mathematicians while we're visualizing and editing equations live.

Hand-drawing the equations, like you would do on Zoom's whiteboard, is not great. We all have mouse & keyboard interfaces, and mouse-drawn square-root symbols and subscripts leave a lot to be desired. Also, we copy and paste equations and modify them. The whiteboard interface has a struggle with this as well. The mouse-drawn stuff tends to be too large; we can't fit enough on screen.

What tool would you recommend for this scenario? A bonus would be to have something like a mini Desmos calculator on the side, where I can drop (in)equations and get them rendered.
> it's not they were lazy but they had intent to distill wisdom to save time.

Yes – I was referring to lazy in the sense of the apocryphal quote from Bill Gates:

“I choose a lazy person to do a hard job, because a lazy person will find an easy way to do it.”

> Only after going through a fundamentals-first approach do you not end up with one kind of spaghetti, but you end up with another kind because it's fundamentally engineered towards producing spaghetti code unless you constantly fight the inertia of spaghettification.

I’ve been guilty of this. Thinking that a given abstraction is unnecessary and overly-complicated, building my own minimal abstraction for my use case, and then slowly creating spaghetti as I account for more and more edge cases.
Basic hardware gets you a precise GNSS time once per second. Your local clock won’t drift that much in that time, and you can track and compensate for the drift. If you’re in a position to get the signal and have the hardware, then you can have very accurate clocks in your system.
OpenAI's own documentation makes note of how difficult it is to work with SSE and to just use their library instead. My team wrote our own parser for these streaming events from an OpenAI compatible LLM server. The streaming format is awful. The double newline block separator also shows up in a bunch of our text, making parsing a nightmare. The "data:" signifier is slightly better, but when working with scientific software, it still occurs too often. Instead we've had to rely on the totally-not-reliable fact that the server returns each as a separate packet and the receiving end can be set up to return each packet in the stream.

The suggestions I've found online for how to deal with the newline issue are to fold together consecutive newlines, but this loses formatting of some documents and otherwise means there is no way to transmit data verbatim. That might be fine for HTML or other text formats where newlines are pretty much optional, but it sucks for other data types.

I'm happy to have something like SSE but the protocol needs more time to cook.
in the US or parts of Europe you could wait there for 10m past the scheduled time and barely notice. In Japan if the train clock disagreed with the station clock by 30s, causing the train to arrive 30s late, they'd have to write all of the passengers excuse notes for why they were late to work.
I agreed. Thanks for your feedback.
Bit processing is always SIMD.

A 64-bit register being processed 64-bits at a time is, from a mental and programmers perspective, a 64-wide SIMD computer over 1-bit AND, OR, and NOT instructions.

If you aren't using SIMD / parallel programming concepts while thinking about 64-parallel bits (or even in this case, parallel processing of 8-bit bytes or 7-bits of ASCII), then you are making life much harder for yourself.

-------

I believe in the 90s, some people called 32-bit parallelism as SIMD Within A Register (SWAR). Some guy wrote 3DES encryption with 64-bit AND/OR/NOTs and progressed bit-by-bit (but in parallel), achieving absurdly efficient encryption back in the day.

And of course, Chess Programmers with all their 64-bit boards for their 8x8 game constantly think in terms of SIMD inside of 64-bits.

-------

Once you learn to think in SIMD, you can extend these concepts out to 128-bits (SSE), 256-bits (AVX) or 512-bit (AVX512) or beyond (GPU 1024-bits and greater).
the data shows over and over again that the issue is lack of supply. Zoning is the main roadblock to changing that. I don't know why you would assume people are not thinking critically about this.
> Separate markdown files (hard to maintain precise code references)

That shouldn’t be difficult. Most code repository systems support links to exact line numbers in specific commits, for example like [0]. Even in the event that the links stop working, you can still identify the commit hash, file name and line number from the URL.

[0] https://github.com/curl/curl/blob/3b057d4b7a7e6b811245fd0312...
China Stuns with Heavy Stealth Tactical Jet's Sudden Appearance
I love that there are unit tests.
Ukraine Bets a Free Market for Weapons Production Can Out-Innovate Russia
https://archive.ph/7a7Ir
The book looks pretty interesting and not what i thought it was based on its title; need to check it out.

In case you didn't know of it; you might also like Sophie's World by Jostein Gaarder - https://en.wikipedia.org/wiki/Sophie%27s_World
The difference between inheritance and composition as tools for code reuse is that, in composition, the interface across which the reused code is accessed is strictly defined and explicit. In inheritance it is weakly defined and implicit; subclasses are tightly coupled to their parents, and the resulting code is not modular.
COBOL was designed to be written and read by non-programmers. That was the theory, at least.
A sneak peek at Notre-Dame's new stained glass designs
A Woman with a Rare Gene Mutation Fights to Avoid Her Mother's Fate
Hi! Thanks for your comment. I strongly appreciate this, and would take into consideration.
and where is your evidence for this conspiracy theory? I have an unending amount of data that shows it's a supply issue.
Surely this is use case dependent? I’ve worked on projects where modular programming works well and others where not so much.
I have a lot of respect for OS/2 and this wonderful article just confirms it --- the architecture and UI was so consistent that I was able to talk a customer through installing a printer over the phone, w/o access to a machine running it, even though my only experience with it was installing it as a custom configuration on their machine the day before.

Kind of wish it was possible to run it on modern hardware... well, the OS/2 for Pens version anyway.
>The mistakes we committed, were because we trusted that those functions did what they said they did correctly. After all, they've also been unit tested, and there's also integration tests.

As it is stated, I don't see where it is your mistake. You should be able to trust things do what they say, and there should be integration testing that happens which adds the appropriate amount of distrust and verification. Even with adequate unit testing, you normally inject the dependencies so it wouldn't be caught.

This seems an issue caused by two problems, inadequate integration testing and bugs in the original function, neither of which are your fault.

Building a sixth sense of when to distrust certain code is something you see from more experienced developers at a company, but you were new so there is no reason to expect you to have it (and the system for making code changes shouldn't depend upon such intuition anyways).
Without the zoning restrictions monetary policy would have a negligible effect. In the 80s interest rates were 15%+ but there was far less restrictive zoning and housing was incredibly cheap. Unrestricted was the default and zoning was loosely defined where it existed at all. The permitting and inspection process was minimal or even non-existent. The 90s were the decade of extreme NIMBYISM, zoning everywhere and arduous inspection processes.
Why not just use firefox and ublock origin while it works instead of a sub par experience just because you decided to impose it on yourself?
Such is the fate of anything large, heavy and fragile, no matter how beautiful. See also: CRT televisions.
They're just Germanic names
For those who like me had no ideas what UNORM/SNORM are, it's a base-2 fixed-point representation apparently common in the latest GPU APIs (DirectX 10/11, Vulkan).