Please understand that something you think is helpful may not be. You should assume it isn't unless you have specific knowledge of the person involved.
In general, the bereaved don't need platitudes which cheapen their loss or try to fast-forward them through the grieving process. Don't presume to know what the deceased _or_ the bereaved feel or _should_ feel, and don't assume they share/d your beliefs.
Instead of 'comfort and a kind word', try 'comfort' until you are asked for more. Be present for those who are grieving. Offer to help in any way you can if you can, and help when called upon.
Just listening is profoundly useful. Often, they're not really listening to you anyway.
Half agree with your post, but I can see why you are downvoted.
To me, in grief, platitudes and comforting words seem like a useless distraction and annoyance, but I wouldn't then go on to suggest your way of being around the grieving is what everybody needs to be doing. He was being nice and wasn't hurting anybody doing it, and there isn't such a dearth of those posts that we need to attack them.
Disagree. While I was processing the pain of the sudden death of a family friend, someone who acted like a father to me my entire life someone else said something that she thought was being nice. In that moment it upset me so much I probably could have stabbed her. I still can't forgive her for it. She did hurt someone by doing it.
Keep it to yourself.
By the way, her words were something along to lines of "He's with God now, and that's the best thing in the world."
The types of your nodes probably don't have much to do with any algorithms you may be writing. Consider your algorithms as functions which act on an interface. Keep your graph data within a type which adheres to that interface. Then you only have to duplicate the type and not the algorithms, and you can easily create new types which the algorithms can use.
Even if you stuff the algorithms into the same type you have your data in (like most generic languages seem to encourage you to do), you still only have to type-cast/type-switch on getters and callbacks. And the only major missing requirement I can think of is that your nodes aren't guaranteed to be of homogeneous types (and you can hack that with a callback if you want).
> "The types of your nodes probably don't have much to do with any algorithms you may be writing."
Which is precisely why he wants generic types.
> "Consider your algorithms as functions which act on an interface."
How would he write a function that explicitly expects a graph whose nodes contain ints, and not, say, strings? What kind of interface would that function act upon?
> "you still only have to type-cast/type-switch on getters and callbacks."
Interesting TDD argument. I'll buy a book or something and try again when my present hobby project is done and I have time for experimenting.
(IDE refactoring needs a stricter language than I prefer. Also, without an IDE and using my old eyes I have 2 A4 of code + 1 A4 of bash on a 24" monitor...)
If you're looking for book suggestions, I'd recommend "Growing Object-Oriented Software, Guided By Tests" by Steve Freeman and Nat Pryce. It's pretty pragmatic, and the treatment of the subject is pretty thought-provoking (at least, I thought so when I read it).
In general, the bereaved don't need platitudes which cheapen their loss or try to fast-forward them through the grieving process. Don't presume to know what the deceased _or_ the bereaved feel or _should_ feel, and don't assume they share/d your beliefs.
Instead of 'comfort and a kind word', try 'comfort' until you are asked for more. Be present for those who are grieving. Offer to help in any way you can if you can, and help when called upon.
Just listening is profoundly useful. Often, they're not really listening to you anyway.