[–] 20 points 7 months ago* (last edited 7 months ago) (1 child)

cat file.txt | grep foo is unnecessary and a bit less efficient, because you can do grep foo file.txt instead. More generally, using cat into a pipe is less efficient than redirecting the file into stdin with <, like grep foo < file.txt.

  • source
  • parent
  • context
  • [–] 22 points 7 months ago

    Yup. It's insanity that this is not immediately obvious to every software engineer. I think we have some implicit tendency to assume we can make any tool work for us, no matter how bad.

    Sometimes, the tool is simply bad and not worth using.

  • source
  • parent
  • context
  • [–] 4 points 7 months ago (2 children)

    Admittedly I'm not sure if it works for Japanese, but English has online tools you can use to print out a sheet to write out every character and scan to turn into a font file. Would be surprising if it didn't exist for Japanese.

    So ultimately you probably just need someone with neat handwriting.

  • source
  • parent
  • context
  • [–] 3 points 8 months ago

    Except it's not seamless, and never has been. ORMs of all kinds routinely end up with N+1 queries littered all over the place, and developers using ORMs do not understand the queries being performed nor what the optimal indexing strategy is. And even if they did know what the performance issue is, they can't even fix it!

    Beyond that, because of the fundamental mismatch between the relational model and the data model of application programming languages, you necessarily induce a lot of unneeded complexity with the ORM trying to overcome this impedance mismatch.

    A much better way is to simply write SQL queries (sanitizing inputs, ofc), and for each query you write, deserialize the result into whatever data type you want to use in the programming language. It is not difficult, and greatly reduces complexity by allowing you to write queries suited to the task at hand. But developers seemingly want to do everything in their power to avoid properly learning SQL, resulting in a huge mess as the abstractions of the ORM inevitably fall apart.

  • source
  • parent
  • context
  • view more: ‹ prev next ›