I have worked on larger older projects. The more comments you have, the larger the chance that code and comment diverge. Often, code is being changed/adapted/fixed, but the comments are not. If you read the comments then, your understanding of what the code does or should do gets wrong, leading you on a wrong path. This is why I prefer to have rather less comments. Most of the code is self a explanatory, if you properly name your variables, functions and whatever else you are working with.
- 0 posts
- 7 comments
- 2 years
- englislanguage@lemmy.sdf.orgto
Selfhosted@lemmy.world•Help figuring what the two non SAS ports areEnglish
2 yearsSame question on reddit a while ago
As suggested there, I recommend to use a multimeter to identify the power socket pins. Roughly half of them should be ground. Most or all of them should correspond and be connected to the SATA power connector pins on the other side.
- englislanguage@lemmy.sdf.orgto
Selfhosted@lemmy.world•Help figuring what the two non SAS ports areEnglish
2 years+1 on that. The User’s guide of a similar device (source) mentions a 10-pin CPLD connector Reserved for IBM use
- englislanguage@lemmy.sdf.orgto
Linux@programming.dev•Lindroid is an Android app that lets you run Linux in a container, with support for hardware-acceleration - Liliputing
2 yearsYou need a phone, tablet, or other device that’s been rooted.
😦
- englislanguage@lemmy.sdf.orgto
Selfhosted@lemmy.world•Nextcloud or Syncthing - which one do you suggest?English
2 yearsSyncthing on Android has an option to only sync when on AC battery. The PC client might have a similar option. If not, you could probably configure something similar via systemd or udev under Linux.
I don’t think syncthing has proper means to synchronize contacts or anything else that’s not file-based though.
I use syncthing and prefer it for synchronizing files between my devices.
I’m avoiding the major search engines. If I really need a search engine, I use DuckDuckGo. Most of the time, search forms of a few websites provide better results. I’ve bookmarked search forms of e.g. wikipedia, Wiktionary, the python docs, Arch Linux wiki, github, dict.leo.org, bug trackers of software I commonly use (such as Mozilla’s bug tracker) and so on. I’m basically using Firefox’s “keyword” search feature in the way DuckDuckGo’s !bang syntax works.



One example for self documenting code is typing. If you use a language which enforces (or at least allows, as in Python 3.8+) strong typing and you use types pro actively, this is better than documentation, because it can be read and worked with by the compiler or interpreter. In contrast to documenting types, the compiler (or interpreter) will enforce that code meaning and type specification will not diverge. This includes explicitly marking parameters/arguments and return types as optional if they are.
I think no reasonable software developer should work without enforced type safety unless working with pure assembler languages. Any (higher) language which does not allow enforcing strong typing is terrible.