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

> "I like your design thinking, I do not like your design thinking people. Your design thinking people are so unlike your design thinking."

- Gandhi


To me, this sounds like:

If AI was good at a certain task then it was a bad task in the first place.

Which is just run of the mill dogmatic thinking.


The incentives for such a swapping system are completely busted.

Think of existing swap infrastructure out there, like propane tank swaps. People already use these systems to rinse defective or expired tanks all the time, and that overhead simply gets built into the price.

Now imagine if you could refill a propane tank at home by just plugging it in to your wall. The only reasons to use such a service are now exceptional cases like travel, or to move defective items.

For every new tank introduced to the supply, on average, how many good-for-good swaps will occur before the supplier gets a defective one? Take the cost of a new one and divide it by that average and that is the minimum overhead for a swap.

For batteries, that number is likely in the hundreds of dollars.


> No one seems sufficiently outraged

Harvesting outrage is about the only reliable function the internet seems to have at this point. You're not seeing enough of it?


I've seen plenty but about the wrong things.


Outside of Apple laptops (and arguably the Ryzen AI MAX 390), an "AI ready" laptop is simply marketing speak for "is capable of making HTTP requests."


Libraries shouldn't log. Just have your top-level abstractions extend an EventEmitter base, emit appropriate events, and let the user do the rest.


This is so simple and makes so much sense. I’ve seen a couple libraries that do something similar, but I feel like this is obvious and useful enough that it should just be a stock pattern, and it clearly isn’t.


Why shouldn’t libraries log?


Aside from what some other users have said, logging is fundamentally an observable side-effect of your library. It’s now a behavior that can become load-bearing — and putting it in library code forces this exposed behavior on the consumer.

As a developer, this gets frustrating. I want to present a clean and coherent output to my callers, and poorly-authored libraries ruin that — especially if they offer no mechanism to disable it.

It’s also just _sloppy_ in many cases. Well-designed library code often shouldn’t even need to log in the first place because it should clearly articulate each units side-effects; the composition of which should become clear to understand. Sadly, “design” has become a lost art in modern software development.


In Java world logging in libraries is effectively a no-op unless explicitly enabled by user, so side effects are negligible. And it actually does make sense, e.g. when a library is offering a convenient abstraction level over i/o, parsing or other stuff with initially unknown failure modes, where some logs may help clarifying the picture beyond handling an exception or error code. The way logging is done there is the art of good software design, which has never been lost (it may have not reached other platforms though). So I disagree with you and some other commenters: strict Verbot is dogmatic, and good design is never dogmatic.


It depends a lot on the language, but in my field libraries that have their own logging implementation and that don't provide hooks to override it cause big problems for me because I send all the logs to the same central logging client that forwards it to the same central logging server for aggregation. Your logging probably dumps it to a file, or it writes it to STDOUT, or something similar, in which case now I have to pipe all of that data in two places by doing something hacky.

There are some language ecosystems that have good logging systems like Java which I would be totally fine with. But systems languages like C/C++ that don't have a core concept of a "log message" are a pain to deal with when the library author decides to stream some text message somewhere. Which is probably a good argument for not using those languages in some circles, but sometimes you have to use what you have.

So it's not really a blanket "don't do it" but you should carefully consider whether there's some well-known mechanism for application authors to intake and manage your logging output, and if that doesn't exist you should provide some hooks or consider not logging at all except with some control.


It tends to break composability.

The behavior of the library logging can be incompatible with the architectural requirements of the application in dimensions that are independent of the library functionality. It requires the user to understand the details of the library's logging implementation. Even if documented, design choices for the logging will automatically disqualify the library for some applications and use cases.

Is writing the log a blocking call? Does it allocate? Synchronous or async? What is the impact on tail latencies? How does it interact with concurrency? Etc.


Because they have to be compatible with your logging implementation, and they were written first.


Any log produced directly by a library will just be a "what" detached from any semblance of a "why".


Because libraries don't know where or even how the user wants it to log.


That's why a library (if it absolutely must do logging) should always allow the user to optionally inject their own logger implementation.


Isn't that basically what the average logging framework is?


For many people, the thing being substituted for an alternative is not "transportation into Manhattan", but more broadly "engaging in commerce in Manhattan"


What business or shopping trip into Manhattan is small enough that 9 dollars is a significant hurdle or increase in cost? It's there to disincentivize taking a car for no reason when you can use transit while being small enough to absorb if you have a reason to actually use a car.


If you're engaging in commerce, those few bucks are negligible..


> You don’t start a wood bank in a country with functioning institutions.

A wood bank is a functioning institution, you clown.


I can think of someone who might be at fault.


Then why don't you tell the room who it is?


Enough.


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

Search: