Felienne Hermans: How patterns in variable names can make code easier to read

preview_player
Показать описание
Felienne Hermans is an Associate Professor at Leiden University in the Netherlands. In this presentation she look at how thinking about the content and shape of names can make programmers more producive.

---

On April 27, 2022, It Will Never Work in Theory ran its first live event: lightning talks from leading software engineering researchers presenting immediate, actionable results from their work. Our audience learned:
- powerful new ways to test modern software
- how to do better, smarter code reviews,
- what effective remote onboarding means during the pandemic,
- whether test-driven development actually makes you more productive,
- and what "productive" really means for programmers.

We are grateful to Strange Loop, Mozilla, and Taylor & Francis for their support, and we hope you'll join us at Strange Loop 2022 in September for more insights.
Рекомендации по теме
Комментарии
Автор

Very nice.. thank you. We developed a business programming language and at the suggestion of the team we added support for variable names ended in a "?" to signify a boolean. It has been amazing how helpful that has proved to be over the years. If good_client? then ...

MisterDan
Автор

It would have been good to see some examples of name molds.

fburton
Автор

@5:53, I would have gone with `const maxOrdersPerMonth: number = ...;`

spartanatreyu
Автор

There already is a longstanding best practice regarding naming in software development, which is using naming conventions to name not just your variables, but pages, methods, objects, etc. What, if any, is the difference between these 'name molds' and the best practice of naming conventions?

whatmorpheus
Автор

I believe most of the developers often struggle with naming also due to a lack of grip on English too. Eg isValid seems a nice name for a variable or function which holds or returns a boolean value, however it doesn't talk about the context it has been used. E.g if you wanted to check if a user allowed for an action or not, instead of going with isAllowed, a better name would hasPermission. However, your point of agreement on mold is really an awesome technique to keep things in line within the teams.

devrkd
Автор

A good Windows example of a method that do the reverse of what it says, is you must call ShowWindow in order to hide a window.

Spiderboydk
Автор

Great advice - consistency is key whatever template you use. Where can I find the papers you referenced?

PeterPrevos
Автор

I'm struggling to see how to create a set of name mold rules that aren't overfitted around the test cases. Hopefully, the book has some suggestions.

DrewIsFail
Автор

Would you be so kind to share names (and links?) to the papers mentioned?

andresgz
Автор

The programming language I mainly use (for work) ignores white space and capitalization, so the variable "is valid" is equivalent to "IsValid". Honestly it is so nice to be able to read variable names without snake case or camel case that going back to normal languages is a pain!

Efecretion
Автор

I somehow expected to see a cat somewhere in this video.

PuerinTheHunter
Автор

The participation panda is so funny! :-)

kimhomann
welcome to shbcf.ru