Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)LY
Lysergid @lemmy.ml
Posts 1
Comments 69
Languages
  • Library built this way because it supposed to be flexible and provide ground for complex usecases. It can only be flexible if your API works with simple abstractions which you can then compose. It’s not driven by “I need this specific utility for this specific scenario”. That would be zoo you have in JS where you have 10 ways to iterate over array and 9 of them wrong for your scenario.

    Java’s OO is great because they design library with SRP in mind making sure there is few but good ways to do things.

    BufferedReader cannot accept file name because it makes arbitrary reader… well buffered. It’s not BufferedFileReader, even that would accept something like Path or File, not string, because File can be remote file, should Reader now know all possible local and remote protocols and path formats? What else it must do?

    Having it designed the way it is, allows Java to have utilities for various scenarios. Your scenario covered by standard lib too. See Files.readAllLines which, surprise-surprise, built on top of BufferedReader.

  • Languages
  • I don’t know german but it seems to be more logical to have one word for “health insurance card” since it describes one class of objects. Better than spelling 3 nouns where one partially describes what object is and other nouns act like clarification

  • Ford Chairman & CEO Jim Farley Wakes After Decade-long Nap, Shocked By China's EVs - CleanTechnica
  • That was my first thought, but is that much different for say Tesla. They get tax breaks and pay as low as they can. Don’t get me wrong I not protecting China’s way, I’m rather against both. But it would be interesting to see numbers from both sides

  • Ford Chairman & CEO Jim Farley Wakes After Decade-long Nap, Shocked By China's EVs - CleanTechnica
  • AFAIK major contributor into low Chinese EV prices are subsidies and tax breaks for manufacturers. I know they have significant tax breaks in US. It would be interesting to see how they compare. Because if they are mostly on par this is pure corporate greed stopping them. Especially in case of Tesla. They are not overpaying workers and don’t use luxury materials

  • CORS is Stupid - Kevin Cox
  • ‘’’ Note: When I say “top-level” I am talking about the URL that you see in the address bar. So if you load fun-games.example in your URL bar and it makes a request to your-bank.example then fun-games.example is the top-level site. ‘’’ Meaning explicit creds won’t be sent. Even if fun-games knows how to send explicit creds, it can’t because fun-games does not have access to creds which stored for your-bank. Say suppose your-bank creds stored in local store. Since current URL is fun-games it can only access local storage of fun-games, not your-bank.

  • CORS is Stupid - Kevin Cox
  • Thank you! I was always wondering why the heck this (mostly) useless and broken mechanism exists. I had hesitations about disabling it but had doubts about my understanding. Now I know I’m right

  • What is your preferred API error response and why?
  • “Stateless” is not what “I” want, it is part of definition of REST.

    Can do != what spec says you should do. You can also send clown version from the post but don’t be surprised people will find it… funny

    Again, I’m not telling you are doing wrong. I’m telling you are mixing REST and RESTful web services

  • What is your preferred API error response and why?
  • REST calls are same as in 2001. There is no REST 2.0 or REST 2024. Because REST is architecture guideline. It’s just more data sent over it today. HTTP code IS code. Why your system issued it is implementation detail and have nothing to do with resource representation. Examples you provided are not 403. “Too many users active” does not exist in REST because REST is stateless, closest you can get is “too many requests” - 429. Insufficient permissions is 401. I don’t even know what is “blocked by security” but sounds like 401 too. Regardless, you should not provide any details on 401 or 403 to client as it is security concern. No serious app will tell you “password is wrong” or “user does not exist”. Maximum what client should hope for is input validation errors in 400.

    For those with “internal tool, I don’t care” argument - you either do not know what security in depth is or you don’t have 403 or 401 scenario in the system in the first place.

    Now hear me out, you all can do whatever you want or need with your API. Have state, respond with images instead of error codes, whatever, but calling it REST is wrong by definition

  • This might be the worst bus stop I've encountered
  • Why sit there 5 mins? This looks like normal city bus stop. Bus arrives at scheduled time, picks up passengers and takes off. I believe great ‘merica supper power nation can manage what Eastern Europe nations made happen years ago. Yes you may have few mins delays but it’s not a disaster.

    If for whatever reason it must sit there for long time bust stop should be in a bay

  • This might be the worst bus stop I've encountered
  • I believe car drivers are capable of waiting 15 seconds while vehicle which most likely transports multiple times more passengers dropping/picking those passengers. Car drivers wait hours in traffic jams for themselves, can wait a bit for bunch of people in a bus

  • Okay, which one of you Java devs did this

    33