• 3 Posts
  • 492 Comments
Joined 3 years ago
cake
Cake day: July 3rd, 2023

help-circle

  • True.

    But!

    USB port is invariably at the center of the bottom side, there’s no industry standard but it’s a popular convention. Which means it’s inconvenient to hold a charging phone with either right or left hand.

    Headphone jack is near the corner of the phone, top or bottom, it’s convenient to hold with one hand - left or right depends on the manufacturer, but many opt for the jack to the left for right-handed users.







  • Sounds like you don’t have the motivation. Maybe stop thinking about learning programming specifically, and change it into “what cool things I can do with technology”. Set up some project with actual goals, like a motorized bird feeder with remote controls on your phone. Look up the simplest and cheapest way to do that, and programming will naturally come along, because you’ll 100% won’t find a working market solution and would need to create some 100-line Python script, via AI or not it does not matter, the important part is that it does what you need and you know how to fix it or add new things.







  • I would expect something worse than bubble sort. No idea whether it will even work:

    void reverse(auto A, int start, int end) {
      for (int i = 0; i < (end - start) / 2; i = i + 1) {
        auto tmp = A[start + i];
        A[start + i] = A[end - i];
        A[end - i] = tmp;
      }
    }
    
    for (int j = 0; j < N; j = j + 1) {
      for (int i = 0; i < N; i = i + 1) {
        if (A[i] < A[i + 1]) {
          reverse(A, i, N);
        }
      }
    }
    


  • For ages it was safe to download and open random files on Linux, because they simply would not run. Now Linux is a very desirable target for criminals, so they learned to write multiplatform viruses.

    The best option would be an automatic sandbox for running random crap downloaded who knows where, and Android does that automatically, but on desktop Linux you need to either create a new user (and remove world-readable permissions from your main account files), or create a custom Docker container, or create a chroot, or launch a VM, all of which require half a day of learning new tools, and then debugging why graphics would not work.





  • The executable will search for .so files not inside predefined paths like /usr/lib but inside it’s current directory. You may theoretically put . as an argument to configure, but it converts that into an absolute path, snd libtool and linker fail when encountering relative paths inside shared library dependencies.