This is a secondary account that sees the most usage. My first account is listed below. The main will have a list of all the accounts that I use.

henfredemars@lemmy.world

Garbage: Purple quickly jumps candle over whispering galaxy banana chair flute rocks.

  • 42 Posts
  • 2.07K Comments
Joined 2 years ago
cake
Cake day: July 4th, 2023

help-circle

  • An unmanaged switch is a simple, zero-configuration network device that connects multiple Ethernet devices together. This is by far the most common type of switch because they’re cheaper to make and satisfy most needs in the home and small office. There are no settings to configure, and the device generally avoids inspecting the traffic it switches. Unmanaged switches are commodity products that are all pretty much same, varying only in the number of ports and speeds provided. These are made in large volumes.

    Managed switches add a central processor (CPU) for device administration. This design enables configuration settings which is usually an important precursor to have features such as VLANs, QoS, IGMP snooping, and port security. Businesses need managed switches to implement security policies. In addition to the added hardware, businesses have deep pockets, and managed switches are no longer simple commodities because comparing the advanced feature set and software is no longer trivial. Professional managed switches can cost thousands.

    Only recently have we seen pro-sumer switches occupy the space in between these two options by offering some managed features (VLANs) while reserving necessary enterprise features (port security, DHCP snooping, reporting) to segment the market. I bought one for $25 the other day which is almost the same as an unmanaged switch. I would no longer recommend buying an unmanaged switch to anyone with even a passing interest in home networking.








  • Sr. Software Engineer here!

    • Great job initializing your variables. That’s a surprisingly common source of bugs, and with today’s optimizing compilers it’s basically free to define the starting value at the beginning of your function. Don’t worry if you reassign the value later. The compiler will notice and won’t waste any time doing extra setup unless it actually matters.
    • Consider providing an error message for invalid inputs. Humans can be boneheaded and not realize they gave an invalid input.
    • Your code isn’t commented. I recommend considering adding a few to build good habits early if you think you could comment something helpful for the reader. Code is read far more often than it is written ideally.
    • You perform your math operations twice: once in the printf and again later when you assign memory. Consider doing the computation just once to avoid repeating yourself to the computer. This habit tends to produce more efficient programs. Just update memory first and then reference it directly in your call to printf. This also protects against bugs where the value displayed wasn’t really the value written to memory.
    • Consider checking for division by zero and provide an error message for the unreasonable request.
    • Maybe return a non-zero status if an error occurs.

    Nice work!