nyjan

joined 1 year ago
[–] nyjan@feddit.de 1 points 3 months ago

Aus dem Sonnensystem raus wäre energetisch aber effizienter und sie wären dann auch weiter weg

[–] nyjan@feddit.de 2 points 6 months ago (1 children)

My personal take on this, at least when dealing with more complex or production code:

Performance is not an issue with exceptions if you don't use them for control flow, they should be an unusual occurrence wherever possible.

If you expect to throw and later handle an exception regularly, I'd try to include relevant info about the failure in the returned value, or even better in the returned type, and skip throwing the exception altogether.

Returning a type that contains both error info and the actual result (if there is one) and forces the caller of your function to handle any contained error info before being able to access the actual result has the same effect as a try/catch block without the major performance implications.

This is basically what rust does everywhere in order to completely remove the concept of exceptions, but it's a nice performance optimization for langues with exceptions as well.

Exceptions should interrupt your programs flow, not control it, at least in all hot execution paths. Thanks for coming to my ted talk

[–] nyjan@feddit.de 17 points 9 months ago

Naja das kommt, mutmaße ich, mitunter auf die Strecken an die du gefahren bist. Ich fahre mehrmals in der Woche Fernverkehr und bin trotz der aktuell katastrophalen deutschlandweiten Pünktlichkeit der Bahn bei Fahrten durch Ostdeutschland quasi nie verspätet angekommen, bei Strecken über z.B. Frankfurt und/oder Mannheim könnte ich mich hingegen nicht an eine einzige Fahrt ohne Verspätung und Zwischenfälle erinnern.

 
[–] nyjan@feddit.de 53 points 10 months ago

I'm mostly checking if my standards have lowered since the last time I looked into the fridge

 
[–] nyjan@feddit.de 7 points 1 year ago* (last edited 1 year ago)
[–] nyjan@feddit.de 0 points 1 year ago* (last edited 1 year ago) (1 children)
[–] nyjan@feddit.de 0 points 1 year ago (3 children)

Lustig, wo doch die offizielle Reddit-App auch ehemalig eine Drittanbieter-App war (Alien Blue), bis reddit sie gekauft hat weil deren eigene App so scheiße war.

Sich jetzt hinzustellen und zu sagen dass APIs gar nicht dafür da sind von einem client genutzt zu werden ist auch ein bisschen frech. Was, außer scraping, soll man denn damit sonst machen? lol