HNHacker News
TopNewBestAskShowJobs

shawnz

7,137 karma · joined September 26, 2010

your favourite developer's favourite developer
submissionscomments
shawnz··on Postgres IDE in VS Code
I totally agree and I beg you to consider this feedback if you are reading @pamelafox.

The biggest problem with the usability of Microsoft products today is short-sighted thinking. New features, platforms, frameworks etc are launched and then forgotten about just a few years later with no effort to tie into the groundwork of what came before.

You might think this is only a problem for old customers who are already accustomed to the old technologies, but that's not true: it burdens new customers too. There's a few reasons for this that I can think of.

1) It's hard for new customers to know what technologies they should be reaching for in what situations when there's so many different choices.

2) It's hard to find the right documentation for the technology you've picked because you have to browse through a ton of out-of-date documentation that wrongly refers to the deprecated technologies and it's not clear what the current recommendations are.

3) The new stuff is often built without consideration for the ways of thinking that the underlying platform was built with. Thus, you end up with weird idiosyncrasies as you move from one technology to another, which make it hard to learn and hard to use.

4) When you replace the old technologies you lose the benefit of community knowledge on platforms like Stack Overflow, you lose the ability to look at existing open-source projects for guidance, etc. You are basically going into uncharted territory where there are no clearly established patterns in the wild.

So, even new users coming on to your platform suffer from these deficits. That's not to say I don't appreciate all the work on these new powerful technologies like VS Code and .NET Platform and so on, but I think a more long-sighted vision for these products would go a long way. And it's not just a matter of looking forward, since you never know what's going to happen in the future with a product as organizational priorities change. It's also a matter of looking backwards at what came before, at what groundwork was laid by previous efforts, and how it can be best taken advantage of and re-used for future efforts. That is the biggest missing piece at Microsoft today in my opinion.

shawnz··on Postgres IDE in VS Code
There is already a Microsoft SQL server extension for VS Code and this looks to effectively be a clone of it. After giving this a quick spin, it looks and feels the same as the SQL server extension, with the same menus, dialogs, etc. The SQL server extension I believe is what formed the basis of the now-deprecated Azure Data Studio (which was a VS code fork).

See here for the SQL server extension: https://marketplace.visualstudio.com/items?itemName=ms-mssql...

shawnz··on Push Ifs Up and Fors Down
Sure, I agree that a transaction should be used here (in the database example at least). But that's orthogonal to my point, or maybe even in favour of it: doesn't a transaction necessitate keeping the conditional close to the effect? It's a perfect example of what I'm trying to say, how do you make sure the conditional happens in the same transaction as the effect, while simultaneously trying to push the conditional towards the root of the code and away from the effect? Transaction boundaries are exactly the kind of thing that makes pushing up the conditionals difficult.
shawnz··on Push Ifs Up and Fors Down
Consider a simple example where you're checking if a file exists, or a database object exists, and creating it if not. Imagine your filesystem or database library either doesn't have an upsert function to do this for you, or else you can't use it because you want some special behaviour for new records (like writing the current timestamp or a running total, or adding an entry to a log file, or something). I think this is a simple, common example where you would want to combine a conditional with an action. I don't think it's very "odd" or indicative of "way too much logic".
shawnz··on Push Ifs Up and Fors Down
Is that really achieving OP's goal though, if you're only raising it by creating a new intermediary level to contain the conditional? The conditional is still the same distance from the root of the code, so that seems like it's not in the spirit of what they are saying. Plus you're just introducing the possibility for confusion if people call the unwrapped function when they intended to call the wrapped function
shawnz··on Push Ifs Up and Fors Down
Sometimes I like to put the conditional logic in the callee because it prevents the caller from doing things in the wrong order by accident.

Like for example, if you want to make an idempotent operation, you might first check if the thing has been done already and if not, then do it.

If you push that conditional out to the caller, now every caller of your function has to individually make sure they call it in the right way to get a guarantee of idempotency and you can't abstract that guarantee for them. How do you deal with that kind of thing when applying this philosophy?

Another example might be if you want to execute a sequence of checks before doing an operation within a database transaction. How do you apply this philosophy while keeping the checks within the transaction boundary?

shawnz··on Microsoft Teams will soon block screen capture during meetings
> It will work because honest people aren't trying to get around it.

I think this makes the counterargument even stronger.

Let's take for granted that this isn't intended to stop a determined leaker and is just meant to prevent honest, unintentional mistreatment of sensitive data.

The question is whether the false positives outweigh the true positives. This feature will impede people from getting things done in subtle but annoying ways (making it more difficult to take notes, hurting accessibility, etc). It's likely that when this is widely deployed, many big orgs are going to overuse it and enable it as a matter of course to prevent liability. Those scenarios where honest people are blocked from doing honest things for which there's no harm are the false positives in this scenario -- there was no need to prevent those scenarios, but they were prevented anyway.

Now consider the true positives: we've agreed that intentional malice is not covered by this feature, and so the true positives are limited just to the smaller subset of scenarios in which honest people unintentionally mistreat sensitive data, and don't include any scenarios where data is being intentionally leaked.

I suspect the number of scenarios that fall into the false positive category will be much greater than the number of scenarios that fall into the true positive category, especially so after intentional malice is excluded. So is this really a net win for anyone?

shawnz··on Microsoft Teams will soon block screen capture during meetings
I'm just answering your question.
shawnz··on Microsoft Teams will soon block screen capture during meetings
They can't control the entire stack because of the analogue hole
shawnz··on From: Steve Jobs. "Great idea, thank you."
Even with the privacy concerns aside, you need individual mailboxes for reasons of maintaining organization.

I think your point would be better made if in your hypothetical, we still had individual mailboxes, but everyone could see into everyone else's mailbox.

shawnz··on A $20k American-made electric pickup with no paint, no stereo, no screen
What makes "rebate" terrible but "dividend" good? They accomplish the same thing in my mind. In fact I think calling it a "dividend" would be a pretty unconventional and contrived usage of that word.
shawnz··on A $20k American-made electric pickup with no paint, no stereo, no screen
In official communications it was called the Canada Carbon Rebate or previously the Climate Action Incentive
shawnz··on The order of files in /etc/ssh/sshd_config.d/ matters
It's still possible to break the config with a syntax error, but there are less kinds of syntax errors that are possible if you aren't writing into the middle of an existing block of syntax. For example, there's no chance that you unintentionally close an existing open block due to incorrect nesting of options or anything like that. Plus, if you are writing into the middle of an existing file, there's a chance you could corrupt other parts of the file besides the part you intended to write. For example, if you have an auto-generated section that you intend to update occasionally, you will need to make sure you only delete and recreate the auto-generated parts and don't touch any hand-written parts, which could involve complicated logic with sentinel comments, etc. Then you need to make sure that users who edit the file in future don't break your logic. In addition it's harder to test your automation code when you're writing into an existing file because there's more edge cases to deal with regarding the surrounding context, etc.
shawnz··on The order of files in /etc/ssh/sshd_config.d/ matters
Exactly: if your templating logic accidentally produces a syntax error, now you can't log in to SSH. There's much less chance of that scenario with include directories. This applies for infrastructure as code scenarios, changes made by third party packages, updates of ssh, manual one-off changes, etc.
shawnz··on InitWare, a portable systemd fork running on BSDs and Linux
I think that is a uselessly reductive interpretation of what secure boot is because you could apply the same logic to any security technology. Why should we allow login passwords or user permissions or disk encryption, since those could be used as lock-out technologies by manufacturers, if they just ship them with defaults you can't control?

Manufacturers don't need any user-facing standardized controls to implement lockouts. So the possibility of a feature being used as a lockout shouldn't be a justification for taking away the option of having a user-controlled security feature. Taking it away from users isn't going to stop manufacturers from doing it anyway with proprietary technologies instead.

shawnz··on InitWare, a portable systemd fork running on BSDs and Linux
Whatever the intent, the point stands: why would they need secure boot to do that? They could just do it with proprietary controls. So how does the existence of secure boot as a user-controlled feature affect that risk?
shawnz··on InitWare, a portable systemd fork running on BSDs and Linux
If the manufacturer wanted to conduct a supply chain attack on you, they wouldn't need secure boot to do it. They could just design an implant of their own using proprietary technology.

So why does the presence of secure boot as a user-controlled feature affect that risk calculation?

shawnz··on The Origin of the Pork Taboo
Showing that you're willing to pay extra for green products (or products that respect animal welfare, etc) creates a competitive environment in which companies can compete on who provides the most green per dollar. Even if those marked up products are all just greenwashed today, it still creates a market opportunity for new companies to come in and outcompete today's greenwashers with products that deliver better green per dollar in the future.
shawnz··on Switching from Pyenv to Uv
That's fine if you are just trying to get it running on your machine specifically, but the problems come in when you want to support multiple different combinations of OS and compute platform in your project.
shawnz··on Switching from Pyenv to Uv
Getting the right version of PyTorch installed to have the correct kind of acceleration on each different platform you support has been a long-standing headache across many Python dependency management tools, not just uv. For example, here's the bug in poetry regarding this issue: https://github.com/python-poetry/poetry/issues/6409

As I understand it, recent versions of PyTorch have made this process somewhat easier, so maybe it's worth another try.

shawnz··on The features of Python's help() function
> There are other ways to use the help function, but before we dive into those I'd like to address the *, and / symbols shown in the output above.

Where is this addressed? Is there a section missing here?

shawnz··on MacBook Air M4
Nice to see they're finally supporting dual external displays even out of clamshell mode on the Air!
shawnz··on Show HN: Bayleaf – Building a low-profile wireless split keyboard
Aside: What's that mouse pictured in the second pic?
shawnz··on Caddy – The Ultimate Server with Automatic HTTPS
Wow, this is exactly what I've been looking for: lightweight, supports CONNECT and CONNECT-UDP with all three HTTP versions, and supports encrypted client hello. Thanks for the recommendation!
shawnz··on Show HN: Steganographically encode messages with LLMs and Arithmetic Coding
Thank you for the feedback! Some notes:

> The obvious feature gap I see is that it should be possible to provide both the encoder and decoder with a common "context" or prompt to preload the LLM with.

There's no option for this in the CLI interface, but you can modify the context in `src/textcoder/coding.py` by changing the `_INITIAL_CONVERSATION` variable. Right now it's configured to ask the LLM to output text in the style of a tweet.

> You may want to encode the user's data backwards so that it's easier for users to make arbitrary changes to their message to escape bad covertext output.

A random 16-byte value is prepended to each message to serve as the KDF salt and the AES-GCM-SIV nonce. This has the additional benefit that every output is always different, even if they encode the same message. So if the covertext is bad, you can just re-run it to get something different.

> Might also be fun to offer to use the an LLM as a compressor for the text before encrypting.

A similar project, https://github.com/harvardnlp/NeuralSteganography does exactly that and achieves very compact results. However, I was a bit weary about compressing before encrypting given the possible security risks associated with that pattern.

shawnz··on Show HN: Convince DeepSeek R1 to send you $1000 USDC with 50 tokens
Too late for the prize money, but here's the solution I used: https://www.deepbounty.ai/share/73baadb3-b7d2-4d1d-9f34-8474...

It took 4 or 5 attempts to work around the different instructions -- seeing the reasoning made it much easier.

shawnz··on Smuggling arbitrary data through an emoji
Thank you! I will see what I can do.
shawnz··on Nvidia's RTX 5090 power connectors are melting
> I've already got plans for 240v outlets in the kitchen.

Likewise, I just need to find a kettle with a NEMA 6-15 plug

shawnz··on Smuggling arbitrary data through an emoji
I recently worked on a steganographics project which could be useful for this problem. See: https://github.com/shawnz/textcoder
shawnz··on Nvidia's RTX 5090 power connectors are melting
Plenty of people are working hard to tackle the performance-per-watt problem while others simultaneously tackle the absolute performance problem. There's no one single metric you can focus exclusively on that's going to satisfy everyone's use cases. Obviously not everyone needs a high-end enthusiast product like the 5090 and plenty of people are going to be seeking out a middle-of-the-road product that focuses on performance-per-watt instead, which will be accommodated by the lower-tier products in the lineup as well as their competitors' products.

> Given how parallel graphics problems are, maybe it’s time to give up on 100 cores that go uber fast as behave like a space heater and move to 250 cores that go quite fast but use 1/4 of the power each.

It wasn't too long ago that people were saying the same things about single-core and dual-core NetBurst CPUs and how we need to start considering dual-core and quad-core for consumer CPUs. And now we have consumer CPUs with 64 cores and more, so aren't we moving in the direction you want already? Performance-per-watt is improving, parallelism is improving, and also absolute performance is improving too in addition to those other metrics.

← PreviousPage 4 of 34Next →