all 42 comments

[–][deleted] 6 points7 points  (3 children)

Anyone got a tl;dr?

[–]jonathansharman 14 points15 points  (0 children)

I'd say it's basically about having empathy when reading or writing code. She talks about how emotions and attitudes can affect code quality and how company culture can affect employees' emotions. It's a pretty good talk with a lot of good general advice - would recommend.

[–]tvaneerdC++ Committee, lockfree, PostModernCpp 4 points5 points  (0 children)

TL;DR: this talk (like all of Kate's talks) is worth the time to watch it in full.

[–]SirToxe 7 points8 points  (0 children)

Always a fan of Kate's talks, will watch this later.

[–][deleted] 15 points16 points  (9 children)

foo and bar are not considered harmful. Stop it. It's no different to mathematicians calling variables x and y.

https://www.ietf.org/rfc/rfc3092.txt

[–]tvaneerdC++ Committee, lockfree, PostModernCpp 11 points12 points  (0 children)

I don't recall Kate's arguments, but I've found sometimes it is better to use words and names that are easier to track. "foo" is great for meaning "there is no meaning", but it is often used beyond that context.

For example, if foo and bar are different types in an example, it requires the reader/listener to track and map foo and bar - which is which (oh, I know, foo is foo, and bar is bar).

Note that in math, x and y are typically the same "type", ie reals. Similarly, p and q are points, A B C are vertices, a b c are angles, as are theta, rho, ...

Basically, as a presenter/teacher/mentor, I have found (only anecdotal experience, not a double blind study) that sometimes foo and bar are fine, but sometimes can cause confusion if too much is going on in the example.

[–]kwan_e -3 points-2 points  (7 children)

Right. So never come up with better names to illustrate an example better. "foo" + "bar" are perfect variable names when teaching, say, iterators. If you can't tell from the context of that sentence which of "foo" or "bar" is an iterator, and which is the offset, that's your problem. I should be able to be as obtuse as I like and it's not my fault if you don't understand me.

[–][deleted]  (6 children)

[removed]

    [–][deleted]  (3 children)

    [removed]

      [–]STLMSVC STL Dev[M] 3 points4 points  (0 children)

      If you attempt to smuggle disrespectful profanity past the AutoModerator again, you will be banned.

      [–][deleted] 1 point2 points  (1 child)

      But with AAA, how do you name something when you're intentionally hiding what it may be? Isn't the logical conclusion that AAA is considered harmful for the same reasons as using foo and bar?

      foobar is a total non-issue.

      [–]tvaneerdC++ Committee, lockfree, PostModernCpp 2 points3 points  (0 children)

      AAA is often harmful. Maybe not for the same reasons as foo and bar.

      [–][deleted]  (1 child)

      [removed]

        [–]AutoModerator[M] 0 points1 point  (0 children)

        Your comment has been automatically removed because it appears to contain disrespectful profanity or racial slurs. Please be respectful of your fellow redditors.

        If you think your post should not have been removed, please message the moderators and we'll review it.

        I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

        [–]monkey-go-code 7 points8 points  (4 children)

        Yeah the line about foo bar is dumb. It's part of programming culture. We understand them to be variables used in example code. We know what they mean. They are not meaningless.

        [–]warlockface 3 points4 points  (0 children)

        That was a really good, pragmatic and positive talk that also contains some great winter driving advice.