[Python Tips] DRY Programming
programming·@themarkymark·
0.000 HBD[Python Tips] DRY Programming
 This really isn't about Python directly, but it is an important topic every developer should know. **DRY** (*Don't Repeat Yourself*) is a popular programming concept of avoiding repeat code. The main goal of DRY programming is to eliminating code multiple pieces of code that do the same thing and reducing them to a single function or class. This reduces errors, improves performance, reduces memory usage, and makes your code easier to understand. The concept of DRY programming was first named in the book **The Pragmatic Programmer** by Andy Hunt and Dave Thomas although it is not a new concept. This tip is really simple to understand and doesn't need much explanation. When writing your code, always keep an eye out for classes, methods, and functions that are duplicating logic elsewhere in your code. # My Python Tips Series * [f-strings in Python 3.6](https://steemit.com/programming/@themarkymark/python-tips-f-strings-in-python-3-6-and-why-you-should-be-using-them) * [Underscores in numeric literals](https://steemit.com/programming/@themarkymark/python-tips-underscores-in-numeric-literals) * [A better interactive shell](https://steemit.com/programming/@themarkymark/python-tips-a-better-interactive-shell) * [Secrets Module - New in 3.6](https://steemit.com/programming/@themarkymark/python-tips-secrets-module-new-in-3-6) * [PEP 8](https://steemit.com/programming/@themarkymark/python-tips-pep-8) * [Slices](https://steemit.com/programming/@themarkymark/python-tips-slices) * [Named Tuples](https://steemit.com/programming/@themarkymark/python-tips-named-tuples) * [Destructuring](https://steemit.com/programming/@themarkymark/python-tips-destructuring) * [Counter](https://steemit.com/programming/@themarkymark/python-tips-counter) * [Type Annotation](https://steemit.com/programming/@themarkymark/python-tips-type-annotation) * [Jupyter Notebooks](https://steemit.com/programming/@themarkymark/python-tips-jupyter-notebooks) * [Getting Help](https://busy.org/@themarkymark/python-tips-getting-help) * [Virtual Environments](https://steemit.com/programming/@themarkymark/python-tips-virtual-environments) * [Expiring Dict](https://steemit.com/programming/@themarkymark/python-tips-expiring-dict)
👍 upmyvote, doverun, ipromote, nightdragon, kelvo, faustofraser, aicurator, unmesh, iflagtrash, daycrypter, wanwenguo, abd.ghafarbahari, china-mobile, makerhacks, vibvir, nelkeljdm, kryptogermany, samuelhull, yoshiko, kayoko, tuts, tadstrange, suniltikar, votehumanity, cryptogem, tdogvoid, natsch, luli1, dieterhubert, erarnitox, bigboy9, oyundelisi, voaputra, busy.pay, viperblckz, shintamonica, stabilowl, hairshares, bosjaya, freebornsociety, cryptokeepr, kessielynbote, gtmatze, anyx, kushed, complexring, steemychicken1, aizensou, b0y2k, stoner19, hagie, coinbar, platinum-blue, bigdaddy, kingsmind, papadimos, romedog, spg, sammosk, dream-o, reviewsatrandom, memesplease, tushy, berniesanders, ozchartart, z8teyb289qav9z, nextgencrypto, thecyclist, engagement, thedelegator, ngc, richman, razvanelulmarin, fabio, shawnamawna, caesarion, thebluepanda, thisisbenbrick, einsteinpotsdam, tejma, allesgruen, dannystravels, jerryblanceton, ssekulji, timbernana, sherlockcupid, dougkarr, dark.horse, toyman, i-gordan, buzzbeergeek, dolphinstudios, sunshinetraveler, freefuture, arbitrarykitten, biancajapan, horsepower, teneiced, sumayyahsaidso, linkyourlife, teslaman, blondephysics, dadview, adventureevryday, steemitcitizen, kriptonoob, patricklancaster, pharesim, devkapoor423, solascriptura, steemitlotteries, smartdeveloper, openledgerio, icmarkets, smartbot, thecryptodrive, lazzelazer, epixar, playfulfoodie, nicnas, shahab3211, purepinay, investfourmore, saqibnazir, khayziljoy, donnjoez, steemcenterwiki, germanaure, renulia, journeyfreedom, thecreativerebel, kenistyles, yulem, blerdrage, sanja-cash, torico, drmincu, mohsen63, alexzicky, davinsh, suntree, ahmed26, clearbluecrypto, erodedthoughts, soma909, votebott, necio, amos811, cyber-smiley, bullish27, piensocrates, tymba, magnat, qurator-tier-1-2, viraldrome, steemernoob, denisechips, steemusa, payasochrostty, jvhteach, jvhplays, kadri, kiddarko, jordan1219444, macchiata, akashsagar, jbrrd, mohak1999, prameshtyagi, febrirmd, andreasgrubhofer, drmake, nnnpr3, azharchughtai, nicnicy, fiberfrau, onlinecrazytip, umar1144, yabapmatt, taaveti, hope-on-fire, abchit, skorpsim, adnansyahir, kryzsec, shahin749954, akirito, univer86, samue2013, codemonkeyindy,