Buzz Chronicles
Follow
  • Home
  • Threads
    • Daily Charts
    • Most Popular
    • Most Recent
  • Authors
  • Categories
    • Life
    • Tech
    • Culture
    • Politics
    • Society
    • Fun
    • See All Categories
  • About

Jacobtldr Authors Bryan Goss

7 days 30 days All time Recent Popular
Bryan Goss
Bryan Goss
@gossbc
Coders, write short methods! It helps with
* readability
* reusability
* and getting work done.

Readability

When you have many small methods and you name them well, your code reads like a paragraph. A well named method describes what the method will do. It's easier to read a series of phrases written in your own language than a series of math equations.

Reusability

A small method only does one thing. If a method does two things, you can only use it when both things should happen. If on only want one of the two things, you can't use that method. Methods should be Lego bricks not completed models.

Doing Work

Imagine you need to fix something in a long method. You need to understand the whole method before you change it. If you method is composed of many smaller methods, you can quickly read their names, then go to the relevant method and quickly understand it.

The computer does not care how long or short your methods are. Humans reading your code will thank you for using short methods with expressive names.
ALL
  • Page 1 of 1
How does it work?
  • 💬 Reply to a thread with "@buzz_chronicles save" or "@buzz_chronicles save as category"
    🤖 Our bot will send you a link to your own folder on Buzz Chronicles. The thread will be saved in a form of an easy-to-read article
    📁 All your saved threads will be available at buzzchronicles.com/your_twitter_handle
Buzz Chronicles
  • Explore
  • Threads
  • Daily Charts
  • Authors
  • Categories
  • About
  • Terms of Service

Copyright © 2021 Buzz Chronicles - All right reserved