skysight-inc/HackerNews huggingface dataset:
Sorry, corrected an error.

It's 2275X

That's the compression ratio for complete cross correlation.
It's (10 bits uncompressed / 4.5 bits compressed on 1 channel) * 1024 channels
Almost all programming tutorials and even books to a certain extent suffer with the problem of terrible examples. Properly motivating most design patterns requires context of a sufficiently complex codebase that tutorials and books simply do not have the space of getting into. This particular case is especially bad, probably because they had the goal of having the whole article fit in one page. ("You can download a printer-friendly version to display in your office.")

> There is no guidance whatsoever (ie: Martin Fowler's Rule of Three).

That is completely unfair imo. Although not properly motivated, the advice is all there. "When designing abstractions, do not prematurely couple behaviors that may evolve separately in the longer term." "When in doubt, keep behaviors separate until enough common patterns emerge over time that justify the coupling."

Simplified maxims like "Rule of Three" do more harm than good. Don't couple unrelated concerns is a much higher programming virtue than DRY.
> such as the practice of decomposing every non-trivial function into a bunch of micro-functions that call each other,

That has approximately nothing to do with DRY. At best it might technically be a violation of DRY if (and only if) some of those micro-functions are identical, but the correct way to fix that is to recompose them into the non-trivial (and non-repeated) functions they're more usefully expressed as. And more often it's just a totally independent refucktoring that makes the codbase worse entirely orthogonally to 'DRY-ness'.
> Any more levels and you have now reinvented GraphQL

Sure, but reinventing the wheel can be good, particularly when the existing wheel technology is oblong, lumpy and constructed of stone and cheese.

I’m just bitter than GraphQL endpoints return 200 on errors. If you’re returning 200 on errors, then you’re not really doing HTTP; you’re just using HTTP as a substrate for some other protocol, in which case you might as well just open a port and serve that protocol directly and not pretend to be HTTP.
>I advise staying in your lane.

Easy there tough guy. I wouldn't want to anger such a well spoken sophisticated and modest economics genius, pasting stuff off ChatGPT.
Arxiv now supports HTML natively. Not sure if the quality is different or it is now supported for all old articles.

https://blog.arxiv.org/2023/12/21/accessibility-update-arxiv...
+1 on this... keep it as simple as possible for as long as possible. A lot of the "clean code" patterns that some always push for aren't always needed, especially with smaller or independent projects.
I'm not sure how you expect an answer when you don't define what things like "high performance" or "pretty slow and resource inefficient" even mean in your context.
Some might say polluting the planet with microplastics before we fully understood their effects was jumping the gun. Now, once they are everywhere, it seems a bit late to suggest “caution”.
Let me put it a different way.

You have already been paid everything you will ever get paid for work you did in 2021. Next year, I want you to do an unpredictable amount of work to support the 2025 iOS. How much will you charge me? Where will I get the money to pay you? Why would I spend it on this instead of something else where I might see a return?
I like it a lot. Feels like idle Wikipedia link surfing but with the key difference that each new step keeps track of the previous context. To me it is both novel and useful.
Suppose the protocol exists. It's not "gambling cheating" at all, it's not even "gambling", rather following some general methodological guidelines from quantum mechanics (least but not last). The question is to get enough subjects willing to replicate it.
How is applying DRY entering premature optimization territory (maybe relative to LOC?)? I argue it is instead: premature abstraction.

Optimization is specialization (which is the opposite of DRY): to enable DRY you likely need to generalize the problem (i.e. abstract) such that you remove duplication.
That makes literally no sense. VW never cheated on Petrol cars.
Plug: I’ve been building Packj [1] to detect malicious PyPI/NPM/Ruby/PHP/etc. dependencies using behavioral analysis. It uses static+dynamic code analysis to scan for indicators of compromise (e.g., spawning of shell, use of SSH keys, network communication, use of decode+eval, etc). It also checks for several metadata attributes to detect bad actors (e.g., typo squatting).

1. https://github.com/ossillate-inc/packj
Varies from state to state since traffic laws are per-state in the US, but in most states the traffic merging is supposed to yield to the traffic staying in their lane.

You also are supposed to maintain a "safe distance" (where the law might be literally "safe distance" or might give a specific units) which at freeway speeds would mean leaving enough room for zippers but I don't know anyone who has ever been cited for following too closely, except after an accident caused by following too closely.
You can do that and people already do. The most microkernelly consumer OS is macOS/iOS and there you see a lot of code has been moved out of the kernel with time. Example: whilst APFS is in-kernel by default that isn't much security risk. More vulnerable components like FAT drivers have moved into user space. On iOS the networking stack also runs in user space for apps that use Apple's APIs!

https://devstreaming-cdn.apple.com/videos/wwdc/2017/707h2gkb...

So the whole TCP/IP stack is just a regular userspace library on that platform. Only the wifi driver runs in-kernel.

These platforms are made up of literally hundreds of Mach servers. Relatively little code runs in the kernel when you examine the structure of the whole OS. The kernel is really only running some hardware drivers where moving them to userspace is hard, and some basics like memory management, process scheduling, IPC and code signature verification. The kernel just isn't that big.

It's important to realize though that moving even more stuff to processes does not automatically improve security or availability. Imagine there's an RCE vuln in your root filesystem code. Being in a userspace server doesn't help you:

1. If you can control the FS you can make a root owned file appear anywhere and then just run it, or alter system configuration in any other way.

2. If you can crash the FS the core kernel can't easily recover without special cases because where would it restart the FS process from? If you say "initramfs" then you're back to having an FS in the kernel.

In practice there are lots of cases like that. Sometimes it's worth it - modern OS' can generally recover from a display server crash and run graphics mostly in user space. Sometimes it's not.

Finally, bear in mind that Linux is very insecure due to its huge feature set and reliance on C, but kernel exploits are often not the biggest security problem on other platforms. The most serious bugs are all in userspace already on most platforms.
I use a google form for my app.

Downside is that I'm not able to gather statistics or additional info from form (such as os version, phone model, etc).
Can someone also write an article on how not to write code like is in this article?

`DeadlineSetter` should not be a class, and besides that the implementation makes zero sense. The whole thing should probably just be a single if statement.
A bird and a submarine both apply the same underlying laws of physics.

Just because LLMs seems to reason does not necessarily imply that it is able to actually reason. An airplane can't fake flying, it either flys or it doesn't. With text, reasoning can be faked.

Does that clarify?
I think everyone is prone to it. Personally, i've been trying to be more selective about what I form opinions and stake claims about.
ok, won't read neither write it then.
Ask HN: With the rise of AI, how to approach my new career in software dev?
Hello, HN:

I recently graduated from a two-year diploma program in software development, and I’d love some advice for getting started in the industry (and, perhaps, for landing my first job). Apologies if this post is long-winded.

Some background: I’m graduating from this program in my mid-thirties. I previously graduated with a Master’s in English, and I believe that previous experience has helped me develop strong soft skills that will be beneficial regardless of job or industry.

During my software development education, AI exploded and seems to have changed everything, most immediately and obviously in the tech sector. No one seems to know what the ultimate impact of this technology will be, and it has, understandably, caused some anxiety and confusion. This is certainly the case for me and my peers.

Today, I read a Medium article by Matt Welsh[1], a well-known computer scientist and AI startup founder. He argues that “classical” computer science -- focused on programming, algorithms, data structures, and so on -- is in for a “major upheaval”:

“[T]he field will look less like an engineering endeavor and more like an educational one; that is, how to best educate the machine, not unlike the science of how to best educate children in school.”

In other words, engineers will be relegated to the role of supervisors, overseeing AI models that write programs.

(I appreciate he may be biased as an AI startup founder, but he has lots of education and experience in the field, and I don’t know enough to argue otherwise.)

In a way, this makes me sad. I got into this program because I was really interested in the act of coding itself, using it as a medium to solve problems. It’s gratifying to learn a language, get better at it, and write a working program.

I suppose this is a long-winded way of asking the following: does it make sense for me to focus on learning specific languages? I recently bought a book on Go because I’m interested in the language and want to build something with it. Is this worth my time? Should I instead focus on learning and leveraging LLMs? Do I balance the two? What’s a reasonable way to approach this?

More broadly speaking, what might you recommend I learn or focus on? What other advice do you have for approaching this rapidly changing tech landscape?

I certainly appreciate that this is a big question, but as someone new to the industry, I’d be deeply grateful for _any_ input from those more experienced and knowledgeable.

[1] https://levelup.gitconnected.com/the-end-of-programming-6e3f7ff0d8b4
This comes after they announced negotiations with Renault fell through. Both company were in talks about a joint product, but couldn't agree. The announcement here isn't that VW is building a new car, it is that they will build a new car alone.
That was likely the point that whoever did it was trying to make, that they were an extremely bad device.

1) The ISP exposed some form of external management they used to access them they shoudldn't have
2) The attacker overcame whatever security used on said management interface
3) Once in, the attacker could simply overwrite the first few sectors of the nand to make them unbootable without local hardware serial console.
4) There was no failsafe recovery mechanism it would seem

An actual "modem" would mostly likely prove volatile/immutable by nature, but anything with a "router" built into it is far more vulnerable that typically run for poorly secured tiny linux systems, and subject to Chinese enshittification.
Right, but this definitely reinforces the idea in my head that school isn’t about learning, it’s about making people who are compliant little worker bees who never stop working.

The very idea of “homework” should be an affront to anybody’s pro-labor sympathies.
While a lot of the items they bring up are legitimate issues, almost all of them are issues universal to any messenger application. They don't offer any real solutions to these issues, so I wasn't sure what they purpose of this article was then, until I got to the bottom and sure enough they have their own alternative they're wanting to pitch to you.
> What is so abnormal about this stack versus every other large-scale system on the planet, buddy? C’mon!

The "...buddy? C'mon!" framing is simply obnoxious. Who would engage with such a person in the first place?
Well, Groq memory-per-rack looks very low. That is to say, the whole world now understands how exciting very high inference throughput is in a way that almost nobody did when Groq started, (I think I saw an early pitch deck, and don't recall fast inference as even a differentiator in that deck, although I could be wrong). However, the number of Groq chips/servers/whatever you call them that are needed to get up to running Llama 400B looks like a lot. Like many, many racks worth.

Plus, Groq claims to have converted over to only being a cloud provider now, and will keep their hardware to themself. Given that I can't even sign up for a pay-as-you-go API key with Groq right now, I think there's a lot of room for competitors.
A talk with YC head like Paul or other, a "read the room" situation, the writing is on the wall, etc.
This bit was more what I focused on:

> Illegal fishing is also harming local fishermen. Chinese vessels routinely fish in waters close to the shoreline reserved by law for small-scale local fishers. According to the EJF, Chinese trawlers in Mozambique often line their nets with a fine mesh, allowing them to catch smaller fish usually targeted only by locals. They have also been known to intimidate the local fishermen, ripping their nets and hounding them out of their usual fishing grounds. The volume of fish caught by small-scale fishers in Mozambique has slumped by 30% over the past 25 years.
There aren't that many. NYC housing data is sliced, diced, and studied by so many agencies, non-profits, think tanks, and so on that someone would notice. There's a marginal number of units that appear to largely unoccupied. Corporate and LLC ownership shows up in tax data and the totals are a drop in the bucket of the nearly 4 million units.
they have me as breaking their academic dishonesty and facilitating academic dishonesty policies. My website is nothing more than a reading assistant. It can't be used to help students cheat, which is why it shouldn't breach these rules
For some reason I feel like the Wikipedia should use this (or something like this) as a backend to serve a more "dialogish" UI (without replacing the current static UI). The name "delve" is spot-on, but it lacks Wikipedia's intelligence and interconnectedness.

And maybe add some locally stored "Microsoft Recall"-like feature to revisit paths you've made. It would be text-only, so use up almost no space, and be quickly searchable.

Well done it could even work in a terminal.
I "love" the government? That's news to me. I am not sure where you got that information.

I don't really know how the government "caused" COVID, unless you're claiming that the Trump administration's handling of it was completely incompetent which led to a lot of unnecessary spreading, which I would agree with. I'll concede that the Reagan administration's handling of the AIDS epidemic was pretty evil.

I'm not terribly worried about pasteurized milk, I just said that if something causes TB, and TB can be spread person to person, that's something to consider, and it's not as simple as "if you don't like the risk then don't drink it".
Is groq related to Twitter's grok or is that just a very unfortunate naming coincidence?
In my experience DRY and many (any?) other coding principles are only problematic when misused. They're typically misused because the user doesn't understand the motivation or underlying value of the principle in the first place.

I think the example in the article does a bit of that as well. The example sets a deadline on a thing (a task or payment) by validating the deadline against the current time, and then presumably doing something else that isn't shown. The article argues that in the future a task might have different validation requirements than a payment, and they're only coincidentally the same today; so it would be foolish to abstract the deadline setting logic today.
BUT, the reality is that the real coincidence is that payments and tasks have the same set of validations, not that the logic to validate a deadline is coincidentally the same. In my opinion "good" code would be fine to have separate set_task_deadline and set_payment_deadline methods, but only one validate_deadline_is_in_future (or whatever) method, alongside other validation methods which can be called as appropriate by each set_x_deadline implementation.

Disclaimer: the code is so short and trivial that it doesn't matter, I think we can all assume that this concept is extrapolated onto a bigger problem.
FTA: Even if they did sell the ship, it often won't make the workers whole

> Abandoned ships are sometimes so old and worn that “even the scrap guys lose money stripping it of anything of value,” said Eric White, a ship inspector for the International Transport Workers’ Federation, or ITF, a seafarers’ union.

> Left hanging by Teeters were the ships’ crews of mostly Ukrainian seafarers, who suddenly had no way of sending money to families back home in what was now a war zone after Russia’s invasion. In total, the 22 men were owed $130,000 covering more than three months, White said. If not for $22,000 in donations from local seafarers’ charities, none of them would have made it off the ship and back home, according to White.
Safari with built-in ad blocking. What do we know about it
Your example is nonsensical. There are minimum wage laws. And if somebody is not getting paid at all, then of course they are fired. You've completely changed the example to where they clearly are fired, so I don't know what you're trying to argue.

> This is also not in any contract that I've ever signed

Are you sure you've looked? It can also be implicit in standard clauses such as the company owns all rights to all of your work. In which case starting a second job would be fraudulent.

But of course it's also one of those things that's so common sense it doesn't need to be written into a contract in at-will employment countries (although it often is). There's the expectation in a full-time salaried professional job that the employer is getting all your productive professional work. It's mentally impossible to give 100% to two full-time jobs simultaneously. There's no reasonable expectation that anyone should be able to hold a second full-time CEO job. Nobody is "changing the terms" when the terms are commonly understood. If you start showing up to work shirtless and it wasn't in your employment contract that you're required to wear a top, complaining that they're "changing the terms" is missing the point entirely.
The article is discussing acting in the context of the dramatic arts, and in particular, the difficulty of remembering lines.

Feigned emotions do not work on stage or on screen. You can't fake being emotionally honest while performing. This requires rigorous training to get right.

If you try to manufacture emotion, you'll spend part of your thought process moderating your performance. Trying to sound "right", trying to hit some emotional target, focusing on your delivery, focusing on your marks and your lines. You're in your head too much and you come across as a caricature. I guarantee you have seen this before, and it's really bad.

Acting isn't performing. Acting is being yourself and being in tune with everything around you. When you're finally liberated from playing some role, the magic happens naturally.
Honestly, it’s gotta work across all my devices pretty well. Signal doesn’t really let you move from device to device easily. I like privacy, but I don’t need it that badly. If it had a chat history, I would pay for it to be honest.

The problem with Signal and Proton is they sacrifice usability for over the top security. I don’t want to use Google or Zuckerberg products that are using you to sell ads, but I don’t want terrible usability either.
Oxygen-Free Process Paves the Way for High-Quality Graphene Production
So the way I understand it you would use a fsspec.filesystem and specify a filecache (https://filesystem-spec.readthedocs.io/en/latest/features.ht...) and pass that to duckdb to use (https://duckdb.org/docs/guides/python/filesystems.html). Like I said I haven't tried this yet but it seems straightforward. They are also pretty responsive on Discord if you face any issues you can also try asking there (https://discord.com/invite/tcvwpjfnZx)
Nonsense. The same set of people working on a monolithic kernel could work on a microkernel instead. It’s a purely technical decision.

What you say is akin to saying that you don’t want to divide the storage in your basement into multiple crates instead of one large one, because you somehow would need multiple people to manage and access each individual crate?

My hunch is that you’re somehow applying micro services in web development, and their motivation for existing, to OS design.

This used to be a site for great technical discussion.
I don't speak music (like, at all), but I've hung out with a lot of musicians at various points in my life, and it's so cool how we're able to relate to performance in the same way. I had a legit emotional reaction to what you said, so thanks for writing it.

Like I say, I'm a numbskull when it comes to music, but I love live shows. I'm able to pick up those performance moments - the nuanced attention; the communication within the ensemble, and with the crowd - and just let the sound wash over me. I've had incredible experiences attending concerts by bands whose music I hate on recordings. The Dandy Warhols come to mind: I literally can't stand the one or two tracks I've heard by them (godawful noise), and I've no idea what "music people" think of them, but they were so in sync that seeing them live was transcendant.
I wonder why nobody mentioned it - there is one more advanced principle AHA: (Avoid Hasty Abstractions) https://kentcdodds.com/blog/aha-programming#aha- Overusing the DRY principle can make software almost unsupportable.
Buy a house. Invest the rest.
Because groceries, gas, rent, insurance are way up in terms of costs. Even with some seeing higher pay, the increased prices more than offset that so people feel worse. For 8-10% of the population may be doing the same or better, the rest are worse. That doesn't count for nearly 20% of adults being maxed out on credit.

Most of these changes are in the past 4-5 years or so.
"They can man-in-the-middle the traffic" could be interpreted as them having to actively do something to become the man in the middle, when they already are.

It's likely they just do sampling (think netflow) to get some statistics over the data that's already transiting their network.
There is an absolutely heartbreaking(to me at least) moment in the classics in "Sayings of the Spartan Women" when Leonidas is leading his men to Thermophylae to almost certain death at the hands of the Persians his wife asks him what she should do if he dies and he says "Marry a good man, and bear good children."

I think this is amazing. He wants her to lead a happy and full life. I for sure would want that for my wife if I was to die first. I love her to bits and would want her to be happy.