News for hackers. Stuff that matters.

prosqlinjector

Re:Ask HN: Any felons successfully found IT work post-release? on Wednesday January 03, 2024 @07:24PM (#38861612)
The elephant in the room is legal liability. If something happens with a criminal employee then the question is raised "what precautions did you take from letting this dangerous person into your workplace".
Re:Writing Books Remains a Tough Way to Make a Living (2022) on Wednesday January 03, 2024 @12:26PM (#38856765)
> This is where institutions like universities, governments, etc. come in.

Science was doing pretty well before it became institutionalized in the early 20th century. It's not without tradeoffs, but these aren't essential components.

Re:Writing Books Remains a Tough Way to Make a Living (2022) on Wednesday January 03, 2024 @12:24PM (#38856740)
Of course rare books are valuable. The point is that if you want to buy a physical book you probably will pay $10-15 more for the nice version. The market for the cheap entry is smaller.
Re:Writing Books Remains a Tough Way to Make a Living (2022) on Wednesday January 03, 2024 @12:15PM (#38856620)
Your value to your company is also not a linear function of your time there. There are high fixed costs to training, liability, insurance, etc. They are paying you to always be available, etc.

With that said, I think it's very possible to find a much more easier development job with a lower salary. You should be able to meet performance expectations in very little time.

Re:50 Algorithms Every Programmer Should Know (Second Edition) on Wednesday January 03, 2024 @12:00PM (#38856423)
You actually don't need any of that stuff, you can just write .js files and run them in node. The node.js standard library is quite extensive.
Would you be persuaded by more examples of headlines using this technique?
The individual is using the same reasoning as the headline. They weren't getting the fund they wanted and noticed there was a donation recently. They are speculating that that's the cause of their lack of organization support.

"whistleblower" is a journalism word meant to imply who the good guy is and endow them with credibility. Rewriting the story with "employee files complaint" doesn't hit the same.

Either make it clear you are speculating about two events being connected, or get evidence that links them.
We can do polynomial regression of data sets that looks equally plausible, but it's not real data.
Curating and presenting facts is a form of narrative and is not at all objective.
The sky is not one color and changes color depending on weather, sun, and global location.
> but if you watch how they act, how they vote, and how they discriminate it could not be farther from the truth.

This is a low quality and bigoted comment.

"wow our software is so powerful, it's going to take over the world!"
It was your idea. He suggested it was a universal temptation, you suggested it was a personal problem. If it's personal, there is a community of people with that same problem.
> because you personally couldn't handle a tiny bit of welfare.

If there was a segment of the population who "couldn't handle" welfare, where do you think we would find them?

Re:The real engine behind "AI" is the bad tech economy on Monday October 16, 2023 @01:33PM (#37903306)
> What would a "good" tech economy look like?

Producing goods and services that real people buy and benefit from.

Re:The real engine behind "AI" is the bad tech economy on Monday October 16, 2023 @01:32PM (#37903281)
> women are less likely to die in childbirth

This one has been debunked many times. US healthcare attempts riskier births that would otherwise be aborted.

Re:Advice for Prospective PhD Students on Monday October 09, 2023 @12:19PM (#37821970)
I chose mine because he was a reasonably guy to work with and talk to. What I did not know at the time was that he was very junior in the department and needed to please other professors. So even though I liked working with him, I was quite helpless at certain difficult parts of the process.
Yep, so now your sort function isn't just a sort. It's a sort with a unit test at the beginning. This burden is placed on EVERY use.
Why would a comparison function throw an exception?
> to not work properly with the comparer, even if the criterion is correct.

Then the algorithm is incorrect or its specification for the compare function.

> The example the article gives is a comparer that increments a variable each time it's called, to count the number of comparisons. Depending on how this is done and how the sorter is implemented, copying the comparer may break this behavior.

Yep, then that means the comparer is not valid and does not satisfy the necessary requirements.

> If I'm reading the article correctly, the user can be informed at runtime with little to no performance impact.

It's not possible to verify a function is a strict weak ordering without enumerating the entire domain.

Agreed. And I think that's a good idea to do. It's still possible to do wrong.
> that argues it's the users responsibility to be careful,

If you try to sort with a function that's not a valid comparison operator, I don't know what to tell you. What should it do?

Semantics cannot be validated at compile time. The best that can be done is to annotate the function as "yes this should have the right semantics" as is done in Rust and C++ concepts, but that's still not a guarantee.

Currently employed writing new C++ btw.
Re:Return to Office Is Bullshit and Everyone Knows It on Monday October 02, 2023 @09:03PM (#37746626)
Nope, I'm saying that people advertised that the lockdown allowed them to work less.
Re:Return to Office Is Bullshit and Everyone Knows It on Monday October 02, 2023 @12:08PM (#37740040)
Everyone was posting on twitter about all the "projects" and video games they were working on during the lock down, despite supposedly still having full-time remote jobs.

They also had time to move all across the country.

Re:The most copied StackOverflow snippet of all time is flawed on Wednesday September 27, 2023 @04:21PM (#37680716)
This is nonsensical. When you use a function, how do you know what it will do? You guess from its name?

> auditing it is awful.

If a function specifies a requirement, you look at the callers and see if that requirement is met. If it's easy to verify in code, you can assert. Is there an easier way to audit correctness?

Re:The most copied StackOverflow snippet of all time is flawed on Wednesday September 27, 2023 @04:17PM (#37680665)
> That kind of reasoning only works if the language or ecosystem has some kind of compile time error or linter or comprehensive testing that will catch the error if the preconditions ever change.

Most requirements can't be verified at compile time, or even at runtime in a feasible amount of time.

If you expect functions to do things that they don't say they do, I don't know what to tell you. Conventions and specs are the best we have.

Re:The most copied StackOverflow snippet of all time is flawed on Wednesday September 27, 2023 @12:53PM (#37677522)
The only principle I want to defend is that a function is correct relative to its preconditions. If the caller doesn't meet them, that's on them.

Older »