Writer, teacher, data driven humanist. Tech geek, model builder, mini-painter, reader. He/Him.

  • 12 Posts
  • 71 Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle







  • Meh.

    I’ll agree, docstrings are better for documenting a function than just a comment.

    However, the author seems to jump through hoops in the next example to break one function into four, just to avoid some single line comments. Unless those code blocks make sense as functions (they’re used/duplicated elsewhere), you’re just making work for yourself. Why not turn it into 12 functions? One for each line of code?

    I’m reminded of the admonition that there are only two hard problems* in computer science – cache invalidation, and naming things. The more functions you have, the more things you have to name.

    The rest of it – name your magic numbers, use tuple unpacking, comment “why” instead of “what” – is good practice. I’m just not a fan of making functions just to avoid writing a comment.

    * And off by one errors.






  • displaced_city_mousetoLinux@lemmy.mlBest Email Client
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 months ago

    I tried KMail and Organizer for a few weeks, but they kept losing connection with Gmail. My calendar would get out of sync, and they only way to fix it was to reset the connection and redo all the appointments.

    I’m sure it was user error, since I couldn’t figure it out after spending a couple hours on it, so I just dropped back to webmail and not leaving the mail tab open all day.











  • I’ve a single vault with everything in it - personal journal, research projects, writing projects, random notes, all of it. I separate it all in a folder structure when I can, and use tags for finding the random notes and files otherwise. I’ve got notes from Kindle and Zotero books that get pulled in when necessary, as well as Fleeting Notes. I keep my vault synced on my desktop, laptop, and Android phone via a home-grown GitHub sync script.

    I have a large collection of stuff in a OneNote notebook, which stays there until I need it. No sense taking the time to move over stuff I may not need right now.

    I do a lot of my writing in it using Longform, as well as just in a note for shorter pieces. Those include some crappy creative writing and slightly less crappy technical articles.