Naming Things in Code

  Рет қаралды 3,402

Bran van der Meer

Bran van der Meer

Күн бұрын

Пікірлер: 16
@ShadeSlayer1467
@ShadeSlayer1467 Ай бұрын
Naming Things -Objects are Nouns -Functions are Verbs -Less is More -Description is more
@ShadeSlayer1467
@ShadeSlayer1467 Ай бұрын
I have recently gotten into the habit of being more verbose in my C# projects and I find that when designing I write my high level code in almost plain English including variable/function/class names. And Then I go back up to the top and hit Alt+Enter then Enter on each line to "generate whatever code" and the implement that code. It forces you to write the whole project before testing, but it only codes what you need, rather than designing each part one at a time and doing full unit tests all the way up. (This is just the first pass, i usually go back and refactor a ton)
@ferroalloys594
@ferroalloys594 Ай бұрын
The very use of the term "code" as a synonym for the more accurate term "source description" sadly suggests a fundamental limitation in what follows.... There is no intentional or unintentional attempt to ENCRYPT or even subsequently decrypt anything whatsoever in any correct conventional sense of the term code!!!
@homomorphic
@homomorphic 2 ай бұрын
What you're neglecting is that a reader is almost certainly reading for the purpose of being able to write. That means that convenience of the writer is of nearly equal priority. Not disputing any of the recommendations just that the motivation is definitely for support of writer as well as reader.
@Nosceres
@Nosceres 9 ай бұрын
OK. This is criminal: why doesn't this video have more views? It's well made, clear, and well presented. C'mon people! These are rookie numbers for profession work. Let's get those numbers up, people! Up, up, up!
@sonluuh
@sonluuh Жыл бұрын
straight forwad. A reflection from me, I often use the alphabet order to naming files, modules. For example, I would like to put the name like `date_start.py` & `date_end.py` instead of `start_date.py` & `end_date.py` to quickly lookup them at the same time in the folder tree.
@FLUTTER_HUB
@FLUTTER_HUB 9 ай бұрын
awesome
@akuoko_konadu
@akuoko_konadu Жыл бұрын
Wow, i learnt a lot, especially combining two nouns to name a data
@tmbarral664
@tmbarral664 Жыл бұрын
9:24 - you may name the parameter n "times" ;)
@branvandermeer
@branvandermeer Жыл бұрын
Fair enough!
@matthimuller
@matthimuller Жыл бұрын
Nice content, thank you!
@tehyonglip9203
@tehyonglip9203 10 ай бұрын
for those who think your code is only gonna be written once, a good naming is still very beneficial, it forces the user to know exactly what data is he storing, thus, it makes error less likely and easier to debug if there's an error.
@onhazrat
@onhazrat Жыл бұрын
🎯 Key Takeaways for quick navigation: 00:00 🧐 Naming in code is crucial because the reader often has less context than the writer, making code readability a priority. 02:07 📚 Good naming speeds up code comprehension and reduces the chance of misunderstandings. 03:02 📝 Best practices for naming include using descriptive nouns for data and verbs for functionality. 05:07 ✅ Longer, descriptive names are often better for clarity and understanding. 07:11 📜 Stick to naming conventions in your programming language or style guide. 08:08 🚫 Avoid using very short or one-character names and including types in variable names. 09:46 🚫 Avoid vague words like "util," "lib," "service," or "data" in names. 11:55 🎩 Don't use "magic numbers"; give them meaningful names for clarity. Made with HARPA AI
@baxsm
@baxsm Жыл бұрын
good video, solid examples!
@blankemail2748
@blankemail2748 Жыл бұрын
I love your content, ive watch almost every video and realize i haven't subscribe. Just did. By the way this help me so much because i work remote and have no exposure to productive etiquette
@branvandermeer
@branvandermeer Жыл бұрын
Your comment is heart warming, thanks! If I may ask: what's the biggest challenge working remotely for you?
Loose & Tight Coupling: Why Code is Hard to Change
17:40
Bran van der Meer
Рет қаралды 6 М.
Dependency Injection, simplified
9:55
Bran van der Meer
Рет қаралды 4,1 М.
Man Mocks Wife's Exercise Routine, Faces Embarrassment at Work #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 6 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 24 МЛН
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 93 МЛН
How to name things in programming?
18:20
Smok Code
Рет қаралды 7 М.
Infer is easier than you think
13:38
Matt Pocock
Рет қаралды 90 М.
7 Functional Programming Techniques EVERY Developer Should Know
21:35
My Favorite Code "Anti-Patterns" (Break These)
16:52
Conner Ardman
Рет қаралды 55 М.
Ubiquitous Language, simplified
9:25
Bran van der Meer
Рет қаралды 1,1 М.
5 C# Naming Conventions I Wish Everyone Followed
12:46
Amichai Mantinband
Рет қаралды 17 М.
Naming Things in Code
7:25
CodeAesthetic
Рет қаралды 2,1 МЛН
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,5 МЛН
Driver/Navigator style of Pair Programming
15:17
Bran van der Meer
Рет қаралды 3,3 М.
The Absolute Best Intro to Monads For Software Engineers
15:12
Studying With Alex
Рет қаралды 636 М.