HNHacker News
TopNewBestAskShowJobs

spawarotti

330 karma · joined September 12, 2013

submissionscomments
spawarotti··on I resigned from Anthropic today
I think plenty of the most intelligent people eat meat, which means they are perfectly fine with harming less intelligent species just to enjoy a tastier meal. Also, I don't think many of the most intelligent people would be particularly concerned about disturbing a few ants if they were the only obstacle to economic activity. Intellect-wise, we will be less than ants to superhuman AI.
spawarotti··on The UK's war on anonymity has come to America
I am still curious: when is it acceptable to hope that something is actually going to work well enough when handed over to the government?
spawarotti··on The UK's war on anonymity has come to America
I am still curious: when is it acceptable to hope that something is actually going to work well enough when handed over to the government?
spawarotti··on The UK's war on anonymity has come to America
> is never followed up with a “yes, but …” (realistic evaluation of how politics actually works).

OK, but following this logic, shouldn't we disband the government altogether and have mafias rule us all?

When is it acceptable to hope that something is actually going to work well enough when handed over to the government?

spawarotti··on We should revisit literate programming in the agent era
There is at least one startup doing it already (I'm not affiliated with it in any way): https://promptless.ai/
spawarotti··on Why aren't smart people happier?
Smartness and happiness are like test coverage.

If you are not smart or have no tests, you will not be happy.

If you are smart or have high test coverage, you may or may not be happy.

spawarotti··on Fire destroys S. Korean government's cloud storage system, no backups available
There are two types of people: those who do backups, and those who will do backups.
spawarotti··on AGENTS.md – Open format for guiding coding agents
At this point AGENTS.md is a README.md with enough hype behind it to actually motivate people to populate it with contents. People were too lazy to write docs for other people, but funnily enough are ok with doing it for robots.

This situation reminds me a bit of ergonomic handles design. Designed for a few people, preferred by everyone.

spawarotti··on Historical Tech Tree
And a related page, in the other direction: https://www.futuretimeline.net/
spawarotti··on Debugging: Indispensable rules for finding even the most elusive problems (2004)
Very good online course on debugging: Software Debugging on Udacity by Andreas Zeller

https://www.udacity.com/course/debugging--cs259

spawarotti··on Database mocks are not worth it
Great advice. I follow it in my coding efforts and it has never failed me. Great book about this: Unit Testing Principles, Practices, and Patterns, Vladimir Khorikov, 2020

https://www.manning.com/books/unit-testing

spawarotti··on Serialization for C# Games
How do you deal with serializing properties "by reference"? E.g., if 3 objects reference object "Foo", then Foo is serialized once instead of being duplicated in the json 3 times?
spawarotti··on .NET Smart Components
I am especially excited for the Smart ComboBox:

https://devblogs.microsoft.com/dotnet/introducing-dotnet-sma...

In general, I see the idea of semantic matching instead of textual matching as one of the great, pragmatic applications of the current technology.

Somewhat related fun application of this concept is this: https://neal.fun/infinite-craft/ (the combination outputs are generated by LLMs)

spawarotti··on More than 50,000 Americans died by suicide in 2023–more than any year on record
Jake, I just read the blog post you shared. I loved it. The message and the writing style.
spawarotti··on The "End of Programming" will look a lot like programming (2023)
Currently some programmers, and with time more, have to write, integrate and debug LLMs, hence for the programming to end, other LLMs would have to be able to do so, too. LLMs successfully modifying other LLMs is, like, singularity. In other words, the moment programming ends is the same moment we all are going to die.
spawarotti··on TypeSpec: A new API definition language from Microsoft
From the page:

Describe your data up front and generate schemas, API specifications, client / server code, docs, and more.

With TypeSpec, remove the handwritten files that slow you down, and generate standards-compliant API schemas in seconds.

spawarotti··on The Configuration Complexity Clock (2012)
At a first glance this looks to me to be the same concept as "The Heptagon of Configuration":

https://matt-rickard.com/heptagon-of-configuration

spawarotti··on Everything that uses configuration files should report where they're located
Truer words have never been spoken.

Microsoft IntelliTest (formerly Pex) [1] is internally using Z3 constraint solver that traces program data and control flow graph well enough to be able to generate desired values to reach given statement of code. It can even run the program to figure out runtime values. Hence the technique is called Dynamic Symbolic Execution [3]. We have technology for this, just not yet applied correctly.

I would also like to be able to point at any function in my IDE and ask it:

- "Can you show me the usual runtime input/output pairs for this function?"

- "Can you show me the preconditions and postconditions this function obeys?"

There is plenty of research prototypes doing it (Whyline [4], Daikon [5], ...) but sadly, not a tool usable for the daily grind.

[1] https://learn.microsoft.com/en-us/visualstudio/test/intellit...

[2] https://link.springer.com/chapter/10.1007/978-3-642-38916-0_...

[3] https://queue.acm.org/detail.cfm?id=2094081

[4] https://www.cs.cmu.edu/~NatProg/whyline.html

[5] https://plse.cs.washington.edu/daikon/

spawarotti··on Incompetent but Nice
> but what these people often need is someone to sit with them for a significant amount of time and demonstrate how one breaks a problem down, builds small pieces that demonstrate functionality and then put those pieces together into a solution.

And what if this is done repeatedly for the junior engineer, and yet any initiative they show after that is still negligible?

spawarotti··on Your "simulation" might not need state
Thx, nice explanation. I think possibly Mercurial actually stores only the diffs, but I am not sure.
spawarotti··on Your "simulation" might not need state
One generalization of this concept I see is: Instead of having a sequence of successive states, you only need the initial state and a function telling you how to compute the next state from previous one.

You can also see a connection to a version control system like Git. Instead of keeping snapshots of all the contents of the repository after each commit, one can keep only the initial repository state and changes in each commit. Then to get to N-th state you say "Apply first N commits to the initial state".

In the bouncing DVD logo example the "function to compute next state" or "commit contents" is just easy and regular, to the point of being expressible via simple math functions.

This is also known as Event Sourcing.

spawarotti··on Papers and patents are becoming less disruptive over time
That's what I was thinking, too. Perhaps we already know majority of what there is to know, when it comes to fundamental concepts? Probably plenty of work left in improving our tools and engineering solutions, like machine learning-based software, as well as in understanding the intricates of biology. Maybe mathematics, too. Maybe improvements in these will cause another golden age of discovery. Like, understanding biology enough to gain significantly extended lifespan, which means much more expertise can be built by one individual.
spawarotti··on ChatBCG: Generative AI For Slides
According to [0] the toll of civilian deaths is 9% not ~90%:

> The 542 drone strikes that Obama authorized killed an estimated 3,797 people, including 324 civilians.

spawarotti··on Peter Norvig critically reviews AlphaCode’s code quality
> I define a few test cases and the AI writes code for a generalized solution

How about the AI never writing any code, just training "mini AI" / network that implements the test cases, of course in a generalized way, the way our current AI systems work. We could continue adding test cases for corner cases until the "mini AI" is so good that we no longer can come up with a test case that trips it over.

In such future, the skill of being comprehensive tester would be everything, and the only code written by humans would be the test cases.

spawarotti··on Show HN: Whole Git repo was made with ChatGPT
This situation reminds me of low-background steel:

Low-background steel, also known as pre-war steel, is any steel produced prior to the detonation of the first nuclear bombs in the 1940s and 1950s. Typically sourced from shipwrecks and other steel artifacts of this era, it is often used for modern particle detectors because more modern steel is contaminated with traces of nuclear fallout.

https://en.m.wikipedia.org/wiki/Low-background_steel

spawarotti··on Good conversations have lots of doorknobs
This article reminds me of "The Church of Interruption", the best short article I ever read about communication styles: https://sambleckley.com/writing/church-of-interruption.html
spawarotti··on Notre Dame rises again
https://archive.ph/V9ALy
spawarotti··on More invested in nuclear fusion in last 12 months than past decade
How long will the fuel last? Sabine Hossenfelder references studies in which we have enough Uranium for 50 years max.

6:08 here: https://youtu.be/0kahih8RT1k

spawarotti··on The Dhall Configuration Language
Why not instead use one of the popular programming languages (C#, Java, ...), possibly with some dedicated library built on top of it? Also, reminds me of the Heptagon of Configuration [1].

[1] https://matt-rickard.com/heptagon-of-configuration

spawarotti··on Don’t mock what you don’t own
> how are you suppose to "unit test" that you properly increment a varibale before inserting into the DB without mocking the DB?

You put the logic that increments that variable into a pure function and unit test the input/output pair. Because it is now decoupled from the database, you don't have to deal with it.

> mocks allow you to isolate the unit to be tested.

You achieve isolation instead by refactoring to a "pure functional core and mutable outer-shell" architecture. Above I gave one example of refactoring to functional core. In the cases where you still need to deal with external dependencies in unit tests, you use in-memory implementations (aka simulators) instead of mocks.

Basically there are two subtypes of unit tests - small focused unit tests, testing input/output pairs of purely functional code, and "bigger" unit tests, that check how bigger units of internal business logic collaborate together. They use the in-memory simulators to ensure the tests maintain all the properties of a good unit test: runs fast, doesn't interfere with other tests, requires zero setup, is not flaky and makes zero assumptions about the environment.

So, overall - no mocks for unit testing.

> mocks are for unit tests only.

I do think the opposite is true, with very few exceptions. Mocking in unit testing is an anti-pattern leading to brittle tests with negative value - the cost of maintaining them is way higher than any benefit they provide. Too many false positives, too little true positives, too much rework needed when code changed but no bug was introduced, too unreadable code.

> integration tests is when you start integrating dependencies together. so maybe you have a dummy database like an in-memory db, but you're certainly not mocking it.

This is the only case mocking makes sense. In integration testing you want to test integration with one external endpoint. Hence you mock or simulate all the others. In unit testing there is no need for mocking as explained above. In system (end-to-end) testing there is no need for mocking because we test how everything integrates together.

Naturally, there is way more nuance to the simplified statements I made above. The book elaborates on that. There is also an article by the same author about it: https://enterprisecraftsmanship.com/posts/when-to-mock/

Page 1 of 3Next →