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

  • 13 Posts
  • 48 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.






  • 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.












  • Kum & Go isn’t a charity, yet they found a way to go from zero charitable activity to nonzero. That’s a plus.

    So you’re saying the ends are what is important, not the reason the action was taken?

    To me, there’s an important philosophical question here – if the right action (or a demonstrably good action) is taken, does it matter why? I think it does.

    Let’s say my neighbor doesn’t maintain their property – they don’t mow or clean the landscaping. I decide to do this for them on my own, with their permission of course. There is a difference if I’m doing this to be a good neighbor, as opposed to making sure the neighborhood looks good because I’m selling my house. My actions are the same in both cases, as are the effects and side effects – only the motivation differs. Therefore that motivation deserves to be interrogated and explored.

    If you honestly see that as a negative, you should take it as a wake-up call that you’re using an irrationally pessimistic lens to view the world.

    I don’t see myself as a pessimist, but I’ll admit this observation is probably correct.