Hacker Newsnew | past | comments | ask | show | jobs | submit | AugustoCAS's commentslogin

A chunk of the internet is down for me. So far Perplexity, AWS (VPN) and vercel.

Seems AWS is limping: https://news.ycombinator.com/item?id=45640772


Something that I find amusing in the Java community is that a good number of senior developers, with anything from 5-20 years of experience, who do 'tdd' have never heard of the concept of test doubles and religiously think that a class must be tested in complete isolation mocking everything else.

The saddest one I saw was a team trying to do functional programming (with Spring). The tech lead was a bit flummoxed when I asked why mocks are not used in functional languages and continued to think that 'mocking functions' is the correct way to do TDD.


Tests knowing about implementation details and testing the implementation details (which is the case 99.999% of the time if you use mocks) is more common than not. Even when the main value of automated testing is being able to change those very implementation details, that you now cannot do.

A whole bunch of work spent for no benefit or negative benefit is pretty common.


I use Java and Spring extensively. If I am in a lead role and have say over the code base I won't allow mocking frameworks to be used in tests. If you want a good way to shine a light on poorly structured code, disallow mocking frameworks.

Java added the Funcional interface in v8 making it quite easy to code to an interface and yet in Spring everyone's go to is just to slap a @Component on a concrete class.


A quick google shows this for FF (taken from a thread in StackOverflow):

> In Firefox you can completely disable beforeunload events by setting dom.disable_beforeunload to true in about:config. Extensions may be needed for other browsers.

A word of caution: I'm not 100% sure, but I wonder if some web collaboration tools might use this to ensure data has been synced with a server.


It surely has a lot of legitimate uses, even if it is primarily abused. I’ve used it before to do various cleanup tasks, to have a more timely “user disconnected” event, rather than waiting on some timeout to occur server side.

Having said that, it should never be the end of the world to disable, sites should never have data loss due to this event missing, because if so, they already have a data loss problem when for instance the power goes out.


I am not sure if this is implemented using this functionality but when I am on a console session on proxmox and hit ctrl+w due to muscle memory, it's nice to have a warning telling me the tab will be closed. Same with all kinds of remote access tools. One legit use case I can think of.


[posted this in another thread, but maybe the author can clarify this]

I wonder how this works when one runs test in parallel (something I always enable in any project). By this I mean configuring JUnit to run as many tests as cores are available to speed up the run of the whole test suite.

I took a peek at the code and I have the impression it doesn't work that well as it hooks into when a thread is started. Also, I'm not sure if this works with fibers.


Yes, Fray controls all application threads so it runs one test per JVM. But you can always use multiple JVMs run multiple tests[1].

Fray currently does not support virtual threads. We do have an open issue tracking it, but it is low priority.

[1]: https://docs.gradle.org/current/userguide/java_testing.html#...


I wonder how this works when one runs test in parallel (something I always enable in any project). By this I mean configuring JUnit to run as many tests as cores are available to speed up the run of the whole test suite.

I took a peek at the code and I have the impression it doesn't work that well as it hooks into when a thread is started. Also, I'm not sure if this works with fibers.


A side comment, I have found that configuring a few live templates in IntelliJ helps me to write a lot of the repetitive code just a handful of keystrokes regardless of the language.

Structural refactoring is another amazing feature that is worth knowing.


I've also got some mileage from live templates for repetitive code. However, at some point I built[0] an IntelliJ IDEA plugin to help me generate setters and field assignments that I felt live templates weren't a good solution for (for my case). I don't know if JavaFactory solves this kind of problem, keen to try it out.

[0]: https://github.com/nndi-oss/intellij-gensett


I think IntelliJ is a great tool on its own. Recently, they even added a feature that auto-injects dependencies when you declare them as private final — super convenient.

I can’t help but wonder if the folks at JetBrains are starting to feel a bit of pressure from tools like Cursor or Windsurf


Would love to know if you found it's a real key or a fake one.


I find a bit odd that MS didn't have a couple of people in the board of directors, who I assume accepted Sam Altman resignation (and signed the severance package).

Edit: I just read he was fired, but the point remains.


Per my understanding, the board oversees the non-profit which owns the for-profit entity which Microsoft invested in. It's not clear to me how the non-profit board was picked but equity holders in the for-profit don't have a say on the matter.


I had the same problem (there's a github issue about this: https://github.com/canonical/microk8s/issues/2186).

I swapped to k3s and the usage was half of what microk8s used.


I have the strong impression that most people confound cloud to be public only. Private clouds are fine and deliver a lot of the flexibility at a big % discount of a public cloud.

The big gain from clouds is the flexible infrastructure, especially in the microservices world we are now. In the past, one needed to procure, provision, etc a new server to run a service (times X per environment). With a cloud, regardless if it's public or private, provisioning a VM (or container) to run a new service is a few clicks away.


Currently watching a large enterprise migrate to cloud and hosted private cloud(I know) but all most teams are doing is a 1:1 mapping of VMs. I can see the cost going through the roof vs on prem. Give it another three years and and we'll be rolling back a significant % to on prem.


I'm currently working on planning for a large enterprise migration. We're definitely not doing a 1:1 mapping of VMs, but costs are still going to go through the roof.

There might be a quiet betting pool on just how much more.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: