HNHacker News
TopNewBestAskShowJobs

pistoleer

175 karma · joined August 6, 2024

submissionscomments
pistoleer··on Don't let dicts spoil your code
You would still have to update everything if you rename a field in a struct, what do you mean you never have to worry?
pistoleer··on A popular but wrong way to convert a string to uppercase or lowercase
I agree, but the logging formatters don't really do much beyond trivially pasting in placeholders.

And as for data entry... Maybe in an ideal world. In the current world, marred by importing previously mangled datasets, a common solution in the few companies I've worked at is to just not do anything, which leaves ugly edges, yet is "good enough".

pistoleer··on A popular but wrong way to convert a string to uppercase or lowercase
> I would argue that for most programs when you're doing string manipulation you're doing it for internal programming reasons - logs, error messages, etc. In that case you are in nearly full control of the strings and therefore can declare that you're only working with ASCII.

Why would you argue that? In my experience it's about formatting things that are addressed to the user, where the hardest and most annoying localization problems matter a lot. That includes sorting the last name "van den Berg" just after "Bakker", stylizing it as "Berg, van den", and making sure this capitalization is correct and not "Van Den Berg". There is no built in standard library function in any language that does any of that. It's so much larger than ascii and even larger than unicode.

Another user said that the main takeaway is that you can't process strings until you know their language (locale), and that is exactly correct.

pistoleer··on A popular but wrong way to convert a string to uppercase or lowercase
> There are so many ways to do something and every way is freaking wrong!

That's life! The perfect way does not exist. The best you can do is be aware of the tradeoffs, and languages like C++ absolutely throw them in your face at every single opportunity. It's fatiguing, and writing in javascript or python allows us to uphold the facade that everything is okay and that we don't have to worry about a thing.

pistoleer··on All Work and No Play (2021)
You specifically mention this as an ailment of western culture, how are other cultures, what are they most hooked on?
pistoleer··on American WWII bomb explodes at Japanese airport, causing large crater in taxiway
This was faster
pistoleer··on The lost language extensions of MetaWare's High C compiler (2023)
You can still do

    *(foo ? &zork : &bork) = 123;
pistoleer··on Death of the Department Store
Everything in every society is just "made up".
pistoleer··on Hacker plants false memories in ChatGPT to steal user data in perpetuity
I share your experienced frustration dealing with these morons. It's an advanced evolution of the redditoresque personality that feels the need to have a say on every subject. ChatGPT is an idiot amplifier. Sure, it's nice for small pieces of sample code (if it doesn't make up nonexistent library functions).
pistoleer··on GUI Examples – Rye Language
I really enjoyed the undertone of dry, absurdist humor in these examples. The components are nicely showcased but in an unexpected context.
pistoleer··on Is this the civilization we want? (2017)
Oh I see, it's 2 dudes having a debate about "intelligence". I think they both kinda missed the forest for the trees, because no one has a good definition of intelligence and it doesn't matter that much anyway. What matters much more is how you can apply and use AI, and how it has changed the world and will continue to change it.
pistoleer··on Is this the civilization we want? (2017)
what the hell is the context for this
pistoleer··on Master Hexagonal Architecture in Rust
You can't just extend a house willy nilly. You have to set up scaffolding, destroy some walls, have temporary rigs to keep the ceilings from collapsing, etc. Unless you want to live in a "shipping container" building, but even then there's a non 0 effort, and the shipping container constraint comes with its own set of issues.

In real life, you just can't have it both ways. There's always a trade off. If the trade makes sense go for it I say, but I think people aren't always honest (to me or themselves) about the exact trade they are making.

pistoleer··on Master Hexagonal Architecture in Rust
If only we could all finally agree on the definition of "proper design"!
pistoleer··on Master Hexagonal Architecture in Rust
> If you ever change your HTTP server

Never needed to. Premature optimization.

> We have the same issue with the database

What issue?? Cross that bridge when you get to it...

> To change your database client – not even to change the kind of database, just the code that calls it – you'd have to rip out this hard dependency from every corner of your application.

I really doubt this is such a big deal... Bit of ctrl+f for that module and paste the new one. All database libraries have a "connect()" and a "query()".

I'm so far convinced that this article is written for people who have too much time to waste on things that will probably never happen just so they get to feel smart and good about something that's not even visible.

Imagine if we built bridges this way: yes, right now we have settled on a stone masonry design, but what if we want to move to steel trusses in the future???

Why can software engineers not accept that it is unreasonable to expect one single human creation to last forever and be amendable to all of our future needs? Cross the bridge when you get to it. Don't try to solve future problems if you're not 100% certain you're going to have them. And if you _are_ certain, just do it right the first time, rather than leaving an opening for a future person to "easily" fix it up. And sometimes? A new bridge has to be built and the old one torn down.

pistoleer··on Does your startup need complex cloud infrastructure?
That makes sense, cloud infra does reduce risk in that sense. I assume you're allowed to say "we need to be compliant with X, and our cloud provider is compliant with X, therefore we are compliant with X".

When something bad does happen, is the cloud company liable?

pistoleer··on Does your startup need complex cloud infrastructure?
> How do you handle something like HIPPA compliance when you're in this situation?

I'm a dev who hasn't seen anything related to that. Since you bring it up, can you give some pointers on why something like a MySQL db coupled to a monolithic backend isn't good enough? What shortcomings did you experience?

All of the things raised in the article seem possible to solve without the need for microservices.

pistoleer··on Vulnerabilities in the Feeld dating app
I thought you were making the comparison that a pentester is like a missile shot at a bridge whereas the internet is the army walking over the bridge.
pistoleer··on Vulnerabilities in the Feeld dating app
How do you guys bridge the abstraction gap/wall between resolvers to prevent N+1 queries? I have the suspicion that GraphQL is great for exposing a really generic API, useful when you have no idea what shape the front end will take (how often is that?). But it comes at a heavy price; genericity is always the opposite of specialization. And optimization can only occur during specialization.

Having worked with it for a bit over a year now, it really feels like GraphQL is just a different protocol for writing the same old REST CRUD, while introducing a huge framework with lots of annoying magic and language level reflection that isn't amendable to extension or modification according to the needs of the developers.

Is that all worth it, just to reduce the amount of HTTP requests? Is it that much of a sacrilege to add specialized REST HTTP endpoints to remedy that otherwise?

pistoleer··on Vulnerabilities in the Feeld dating app
A software penetration tester has the same techniques and suite of tools for pwning as "the internet".
pistoleer··on Be a thermostat, not a thermometer (2023)
It is both inspiring and depressing that intelligence is not a prerequisite for high up roles.
pistoleer··on Vulnerabilities in the Feeld dating app
That's hiring a pen tester, and there is a market for it, but companies don't do it as much as they should because it costs money while the app already "works" and brings in revenue. Of the 3 I've worked at, only one had yearly pen tests done.
pistoleer··on Greppability is an underrated code metric
Would be great if the wider industry shared that view
pistoleer··on Clay (short for C Layout) is a high performance 2D UI layout library
Stimulate, indeed. How do we convince others to keep prototyping languages/technologies for prototypes? And to move from prototypes to actual products using languages that focus more on correctness and static guarantees, rather than endless runtime flexibility and dynamism?
pistoleer··on The Future of TLA+ [pdf]
If a projects desires a future, it requires adoption. For that, it must be approachable. When the syntax throws unicode math symbols at the user, and requires the user to first define the universe before even thinking about "this function negates the input", and in general throws years of programming language syntax conventions away, it's just not approachable.

I understand and empathize with the ideal that everyone should just know college level math. It may even be fun to engage in putting down those who don't. Oh, how they just ignored their classes! Stupid fools!

However, it's not a realistic expectation, even in the field of programming, where a large majority have not been accredited with a math bachelors degree. A LOT of programmers didn't even have computer science formal education.

Meet people where they are and all that. Taking position in an ivory tower allows you to feel intellectually superior, but practically speaking it doesn't actually get you anywhere.

The TLA+ community can not have it both ways, either stop bemoaning the lack of adoption of formal verification, or adapt to meet people where they are at. And certainly don't make redditor-esque proclamations about "just" "simply". Take a step back and think about your goals when you write in such a tone. Are you trying to build something and invite others? Or are you trying to prove your own intellect? To whom and what for?

pistoleer··on The Future of TLA+ [pdf]
Ah yes "f triangle equals CHOOSE f member of array of int to int, namely, upside down A x member of int, namely, x'th element of f equals the negative of x'th element of f." Easier than python indeed, where this simple and elegant expression is turned into the much more complicated and ugly form of

    def f(x):
        return -x
pistoleer··on The Future of TLA+ [pdf]
What's the joke?
pistoleer··on How to verify boot firmware integrity if you prioritize neutralizing Intel ME?
What do you do if the beans are disturbed? Throw the laptop out presumably? Would it not be easier to not ship the laptop, instead buying a thin client locally?
pistoleer··on Microsoft donates the Mono Project to the Wine team
These days "pipeline oriented programming" (which is what LINQ is) is seeping into many modern programming languages like Rust, although array programming languages are still (unreadable) kings at it.
pistoleer··on The Monospace Web
I think any heavily stylized text (that includes terminalesque sites) takes extra cognitive effort to read. Sometimes it's best to just leave it plain, and have it be elegant through being easy to read.
← PreviousPage 2 of 3Next →