• 21 Posts
  • 23 Comments
Joined 2 years ago
cake
Cake day: September 9th, 2023

help-circle
  • All this time I was wondering what black sorcery DST was performing to magically “add more sunlight” when it was simply the matter of setting the clock 1hr early.

    I would rather go with having separate schedules for winter and summer for everything; even thinking about adopting DST is nauseating for me. I enjoy having a uniform time scale independent from external environmental factors.

    Thank you very much for sharing this link.



  • This isn’t related to the context of the post, but I recall giving a review in an earlier post regarding the blog site. Assuming you (positive-intentions) are the same person as the author of the previous post (xoron), It’s impressive how you came this far with your blog and apps since then.

    Your blog post about bottom-up browser state management was particularly interesting because I was dealing with indexedDB before and ended up going with a wrapper while I personally wanted to work with a custom solution. The explanations for the code snippets are to-the-point, easy to follow and overall well written which I really appreciate as a person not experienced in reading blogs.

    Also I enjoyed your in-house illustrations. Keep up the great work!












  • Interesting to see your opinion on how commenting shouldn’t be mandatory. I specifically go the extra mile to ensure my code is readable for everyone, by naming my variables and functions to be as self-explanatory as possible and breaking down long expressions to store chunks in variables. This is why I was feeling confused as to what more I could add to explain my code better, though I must admit there are still considerable complex portions in some of my projects that would appreciate similar simplification.


  • I believe you confused the ‘how’ of commenting the ‘why’ with ‘why’ of commenting the ‘why’, if that makes sense.

    I am already aware of and totally agree with the need to document your code in this fashion for the convenience of others and self. What I am troubled about is its implementation in real life. How does one write comment that explains the ‘why’ of the code? How would I know if I haven’t accidentally written something that explains the ‘what’ instead or anything that is simply redundant? It seems like this portion is left out ‘as an exercise for the reader’.


  • Asking as a newbie programmer: how do you suggest we write comments that explain the ‘why’ part of the code? I understand writing comments explaining the ‘what’ part makes them redundant, but I feel like writing it the former way isn’t adding much help either. I mean, if I created code for a clock, is writing “It helps tell what time it is” better than writing “It is a clock” ?

    It would really help if someone could give a code snippet that clearly demonstrates how commenting the ‘correct’ way is clearly better than the way we are used to.