• 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: July 23rd, 2023

help-circle
  • I like to do two kinds of comments:

    • Summarize and explain larger parts of code at the top of classes and methods. What is their purpose, how do they tackle the problem, how should they be used, and so on.
    • Add labels/subtitles to smaller chunks of code (maybe 4-10 lines) so people can quickly navigate them without having to read line by line. Stuff like “Loading data from X”, “Converting from X to Y”, “Handling case X”. Occasionally I’ll slip in a “because …” to explain unusual or unexpected circumstances, e.g. an API doesn’t follow expected standards or its own documentation. Chunks requiring more explanation than that should probably be extracted into separate methods.

    There is no need to explain what every line of code is doing, coders can read the code itself for that. Instead focus on what part of the overall task a certain chunk of code is handling, and on things that might actually need explaining.


  • I self host it on my Synology NAS at home, using their MailPlus server and clients. It definitely took some time to get it up and running, but now it works without issue and very little maintenance required. My domain provider also acts as backup mx (for when the NAS is offline) and SMTP relay (for sending IP reputation), and the NAS does a daily encrypted cloud backup so nothing can be lost.

    The one pain point I have is spam blocking. It does a good job blocking most of the spam, but it’s not as good as something like Gmail unfortunately. I have to add custom keyword filters from time to time, and I still get 1-2 spam mails every day that make it past the spam filter. There are paid services to filter out spam, but I think it’s not really worth it in my case.

    Here is a breakdown of the costs I posted the other day. I’d pay for the NAS, domain and backup service anyway, so the email self hosting is basically free.