Ifyou'rejustouttodestroy a codebasebecauseyou're a disgruntledemployee, ormaybeyoujustwanttowatchtheworldburnthenandtimepartnersareanexcellentwaytodoit.
You'llcreate a function, acceptsanintegerthat's a lineofcode.
I shouldbeexecutedincrementseachrecursiveintegration.
Andsothebodyofthefunctionwouldessentiallybe a bunchofifstatementscheckingwhichlineofcodetoexecuteitwouldthenexecutethatlineofcode, andtheyrecursiveLeecallitselfagain.
Nooneelsewillknowhowtotouchthispieceofcode, andthenwhenyouleave, isgoingtostaythereandremainancientcodeandschoolingtojustsitthereandruntheothergreatthembyhavinglotsofcomments, especiallyatthetopof a file.
Ifyouhave a hugepageofcomments, aspeoplearereadingthecode, theyneedtobejumpingbackandforthbetweenthecodeandthecommentstotrytounderstandwhattheprogramisdoing.
Andpeoplearegoingtohave a reallyhardtimetryingtofollowyourcodebecauseeverythingisnamedsomethingdifferently.
Tipnumbersixistouselotsofvariables.
Themorethebetter.
Youmayonlyneedonevariable, butyoucouldjustsaythatyou'retryingtocashthevalues, bemoreperformanceandcreate, like 10 differentvariablesthatalldependonthisonesinglevariablesvalue.
Thisis a greatwaytoaddadditionalcomplexityto a class, andit's especiallygreatifyoudon't keepthevalleysofthesvariablesupdatedlikeyoumighthave a variablecalledisdone, butyouhaveanotherverybrokeoffisnotdone.