Blog   701665

« earlier    

Repeat yourself, do more than one thing, and... — programming is terrible
Repeat yourself, do more than one thing, and rewrite everything
If you ask a programmer for advice—a terrible idea—they might tell you something like the following: Don’t repeat yourself. Programs should do one thing and one thing well. Never rewrite your code from scratch, ever!.

Following “Don’t Repeat Yourself” might lead you to a function with four boolean flags, and a matrix of behaviours to carefully navigate when changing the code. Splitting things up into simple units can lead to awkward composition and struggling to coordinate cross cutting changes. Avoiding rewrites means they’re often left so late that they have no chance of succeeding.

The advice isn’t inherently bad—although there is good intent, following it to the letter can create more problems than it promises to solve.

Sometimes the best way to follow an adage is to do the exact opposite: embrace feature switches and constantly rewrite your code, pull things together to make coordination between them easier to manage, and repeat yourself to avoid implementing everything in one function..

This advice is much harder to follow, unfortunately.
advice  prog  blog 
13 hours ago by kmt

« earlier    

related tags

#plasticfree  -  2018-08-16  2018  20180620  2cv  ====  acroyoga  advice  agile  ai  alternate  alternative  anza  apologetics  architecture  art  article  artist  august  auto  bible  bigdata  bitcoin  blockchain  blog  blogging  blogs  bloom  book  business  calculator  cancer  care  career  categories  chase  check  christianity  citroen  code  collection  collections  complex-systems  concepts  configure  consulting  contact  content  cooking  coolstuff  craftic  crochet  cryptocurrency  currency  current  czech  dance  dat  data-science  data  data_engineer  datascience  dataviz  de  decentralized  deep-learning  design  development  devops  disney  divisible  doctor  documentation  dutch  economics  elpais  english  environment  erik  example  excerpt  explanation  film  finance  fire  firefox  first  fist  food  foodblog  foot  from_pocket  fromtabs  fun  gamedev  gatsby  google  grid  guardian  guide  hackreactor  health  howto  ifttt  improvisation  inspiration  integrate  iptables  iron  isssues  issue  javascript  jquery  jump  k8s  language  layout  layouts  links  linux  liquid  list  lunch  mac  machine-learning  machinelearning  mailchimp  mailing  mallozzi  management  marvel  math  me  menus  mining  ml  moblog  modulo  money  movies  nativesociety  netflix  network  news  number  nyc  object  oliverestreich  opensource  opinion  orders  orlando  overview  page  paginate  pagination  pandas  people  person  philipgreenspun  png  podcasting  podiatrist  post  prepschool  privacy  product  prog  programming  python  queer  ramblings  reading  recipes  reference  remainder  research  resistance  restauration  review  s.m.a.r.t  screenwriting  search  security  sga  shopify  smart  social  society  software-engineering  software  source:newsletter  sports  star  store  subcategories  syntax  systems-architecture  systems  tags  tech  techniques  technology  template  templates  thauvin  theme  theology  tolearn  tools  toread  totry  tounderstand  trailer  travel  trialtags  tutorial  tv  types  unix  untagged  update  vapes  vaping  vendors  via.fem  video  visualization  wars  waste  web  webdesign  webdev  weblog  wordpress  writing  zerowaste 

Copy this bookmark: