• 1 Post
  • 58 Comments
Joined 10 months ago
cake
Cake day: September 7th, 2024

help-circle


  • Sure, in many cases the dev’s computer is powerful enough to handle that.

    However:

    • The more the dependencies, the more likely it is to pull-off a supply chain attack. Any of those thousands modules can be compromised and infect either the user or the developer.
    • Not all computers are optimized for working with so many tiny files. Have you ever worked in a company that uses McAfee Antivirus? Even Defender can be a massive performance hit in some cases.

  • I feel the importance of user privileges distinction, as I see it from a server perspective and organization managed devices. Some would argue the insignificance of this in the personal desktops.

    However, I believe that the community structure of Linux is benefiting everyone. It is a general purpose kernel, that gets improvements from various different sectors. In the current space, where most servers run Linux and most desktops run Windows, desktops are not benefiting from filesystem or scheduling optimizations implemented for servers.







  • In bash, when you redirect the output of a command to /dev/null, like cat /etc/passwd >/dev/null, you are silencing the output.

    There are cases that this is useful, for example when checking if an application is installed:

    node -v >/dev/null && echo "Node.js is installed"

    This line tries to get the version of Node.js, but it silences the output. That’s because we don’t care about the version. We only care about whether the execution was successful, which implies the existence of Node.js in the system.



  • Take this shape as an example. The “square” in question consists of AC, BD, the outer AB, and the inner CD.

    Point (5) means that, since the lines AC and BD are radii of the concentric circles, the arcs AB and CD should have the same inner angle. That’s because the angle COD is equal to AOB.

    Since, the inner angle is the same, then the outer AOB should, by definition, be 2π - (the inner AOB), because that’s how radiants work; a circle is 2π rads.



  • Solution:

    Explanation:

    1. in order for the straight lines to be 90 deg with the circles, they must be radii of circles with same central point

    2. the length of an arc is defined as c = r * θ (where r is the radius, and θ is the angle)

    3. we define the inner circle with radius r₁ and its arc L₁ = r₁ * θ₁

    4. we define the outer circle with radius r₂ and its arc L₂ = r₂ * θ₂

    5. Because of (1), θ₁ + θ₂ = 2π

    6. To create the shape, L₁ = L₂ = r₂ - r₁

    If you start replacing and solving, you will get a 2nd grade quadratic, which has a positive and a negative solution. The positive solution is that magic number.