Beruflich Dokumente
Kultur Dokumente
Thisisadoubleentryaccountingprimerforsoftwaredeveloperswhowritecodetotrack
money.Itdistillstheessenceofaccountinginanefforttohelpdevelopersbridgethe
vocabularyandconceptualdividethatexistsbetweenengineeringandfinance.There's
nothingspecificallyabout
Subledger
until
AccountingforDevelopers103
.
Background
Bothofushaveknownforaverylongtimethataccountantsuseddoubleentry
accounting(hereafteraccounting)totrackmoney.Weknewitwasthelanguageof
business,andthatWarrenBuffettconsidersitessential.
Eventhoughweknewthesethings,weneveronceconsideredusingitasatechniquein
softwarethatwewrote.It'sprobablyagoodthing:everythingwethoughtweunderstood
weactuallymisunderstood!
HavingimplementedSubledger,we'reamazedbyaccounting'seleganceandsimplicity.
Ourgoalforthisseriesofdocumentsistoallowyoutoappreciateitaswedo.
History
Ifyoulookatorusemodernaccountingsoftwareit'seasytooverlooktheeleganceand
simplicity.Thesepackagesmakeaccountingappearbroad,deepandmysterious.
Architecturally,mostofthemappeartobebusinessdocumentdatabasesthatproduce
accountingreports,asopposedtopureaccountingsystems.Infact,themostpopular
packagesviolatesomeofthebasictenetsofaccountinginanefforttomakethem
"simpler"touse.
LucaPacioli
,oftenreferredtoas"TheFatherofAccounting,"wrote,printedand
distributedthefirstcompletedescriptionofdoubleentryaccountingin1494.Itwas
writteninvernacularItalian,whichmadeitwidelyconsumable.
Itistragicthattheactualcreatorofaccounting,whichisknowntohavebeeninusefor
atleast2centuries(!)beforeLucadescribedit,willlikelyneverreceivetherecognition
thatshe/hedeserves.Somehistoriansbelievethatitsuseleddirectlytothe
Renaissancebyincreasingtrust,allowingmorecapitaltoberaised,andimprovingthe
efficiencyofputtingthecapitaltowork.
Luca's
ParticularisdeComputisetScripturis
(DetailsofCalculationandRecording)was
anappendixtothemathtext
SummadeArithmetica,Geometria,Proportioniet
Proportionalit
(SummaryofArithmetic,Geometry,Proportion,andProportionality).It's
hardtoimaginethatonebookintroducedAlgebra,Geometry,andAccountingto
Europe!
LucamentoredLeonardodaVinci,whodrewtheillustrationsoftheregularsolidsused
inanotherPacioliwork,
DeDivinaProportione
(TheDivineProportion).Apparently,
geniusreallydoeslovecompany!
Thefundamentalsofaccountingpredate,yetbearstrikingresemblanceto,
Newton's
ThirdLawofMotion
:"Foreveryaction,thereisanequalandoppositereaction,"and
Lavoisier'sLawofConservationofMass
:"Masscanneitherbecreatednordestroyed,
onlyrearrangedorconvertedtootherforms."
Accountingisa700+yearoldtechnology.Howmanytechnologieshavesurvivedthat
lengthoftime,letaloneflourishunchanged!
Accountingistheuniversallyaccepted
goldstandardfortrackingtheflowofvalue,worksforeverybusinessmodel,and
hasnoapparentsuccessors
.
Toputitsdurabilityintoperspective,doubleentryaccountingwascreatedtomanage
financialconcernsbeforenegativenumberswereinwidespreaduseinEurope.
Knowingthathelpedusunderstandthecommonlyencountered,yetrarelydefined
termsdebit,creditandbalanceinanentirelynewlight.
Givenitspositionasthebedrockoffinance,wefinditverystrangethatfewapplications
useaccountingtotrackmoney.
hasandexpectstoreceive
owestovendorsandcustomers
owestoshareholders(owners)
hasearned
hasspent
Accountingexposeswherevalueisstoredwithin,andhowitflowsthroughabusiness.
Itdoessowithgreataccuracywhichinspiresgreatconfidence.Businessmetricsand
ratiossuchasgrossandnetincome,grossandnetmarginandROIshouldbebased
uponaqualityaccountingrecord.Whensuchmetricsarenotbasedonaccountingthey
areconsideredsuspectandlikelyunreliable.
Qualityaccountingisasignof,andthe
fundamentalbasistoprove,thetrustworthinessofanentitysfinancialrecords
.
What is Accounting?
Accountingisamethodologyoftrackingthemovementofvaluethroughasystemof
accounts.
Thefundamentalruleofaccountingisthatwhatthebusinessownsandisowedmust
alwaysEXACTLYEQUALwhatitowestoothers.Wefoundthishighlycounterintuitive.
It'seasytoimaginetransactionsthatappeartoviolatethisrule,untilyouunderstand
thataccountingdemandsthatanyvaluethataccumulateswithinthebusinessisowed
totheshareholdersofthebusinessindeveloper'sterms,accountingmaintainsvery
strictseparationofconcerns.
Thisfundamentalruleisexpressedbytheaccountingequation:
MustEqual
Whatthe
BusinessOwes
toVendorsand
Customers
Plus
Whatthe
BusinessOwes
toShareholders
Assets
Liabilities
Equity
Translation
UsefulMnemonics
Debito
Owedto
To/Destination
Credito
Owedby
From/Source
Accounts
Accountsexistintwobasicforms:thosethatareexpectedtohaveapreponderanceof
debit(debitnormalbalance),andthosethatareexpectedtohaveapreponderanceof
credit(creditnormalbalance).
MustEqual
WhattheBusiness
OwestoVendors
andCustomers
Plus
WhattheBusiness
Owesto
Shareholders
Assets
Liabilities
Equity
DebitNormal
CreditNormal
CreditNormal
Addingadebittoadebitnormalaccountincreasesthevalueinthataccount.
Conversely,addingacredittoadebitnormalaccountdecreasesthevalueinthat
account.
Accountsareusedtomeasurevalueasitflowsthroughthebusiness.Accountscan
representinternalviewsofexternalrelationshipssuchasbankaccounts,ortheymay
beusedpurelyforinternalmanagerialpurposessuchasinventoryaccounts.
Balance
Thenextfundamentalconceptinaccountingisbalance.Balanceinaccountingisthatof
anoldfashionedbalancescale.Ratherthanweighingphysicalobjects,accounting
weighsdebitandcredit.
AlldebitandcreditinanaccountingsystemMUSTbalance.Ifyou'veeverheardabout
anaccountantlosingsleepatnightbecausetheywereoffbyapenny,it'snotthepenny
they'reworriedabout!It'sknowingthattheirsystemisoutofbalance.Accountants,like
softwaredevelopers,donotlikeinconsistentdata!
Whilewethinkofaccountbalancesasasinglevalue,buttheyarenot.Balancesin
accountingarecomposedoftwovalues:thesumofdebitandthesumofcredittothat
pointintime.Thesinglevaluewe'refamiliarwithisthenetbalance,whichisthesmaller
amountofthetwosubtractedfromthelarger:
debit(5):credit(10)=credit(105)=credit(5)
credit(5):debit(10)=debit(105)=debit(5)
Netbalancesinaccountsareconsiderednormalifthelargervalue(debitorcredit)
matchesthenormalbalanceoftheaccount,ortheaccountisperfectlyinbalance,i.e.
sumofdebitequalssumofcredit,i.e.isinbalance,i.e.hasazeronetbalance.Ifthe
largersumdoesnotmatchthenormalbalanceoftheaccount,thenthebalanceis
consideredabnormalandisdisplayedinparenthesis.
Fromamathematical
perspective,abnormalbalancesareessentiallynegativebalances,thoughin
accountingnegativenumbersshouldneverbeusedorallowed
.
Description
5/17/2015
cashreceived
5/18/2015
5/19/2015
Debit
Credit
Balance
0.00
10.00
10.00
cashspent
5.00
5.00
cashspent
10.00
(5.00)
Noticethelastlinewherewecredit(decrease)10fromabalanceof5.Thebalanceisin
parenthesisbecausethebalanceisabnormal:ithasmorecredit(5+10)thandebit(10).
TheresultisNOTnegative5,asaccountinghasnonegativenumbers.Instead,itisa
netcreditbalanceof5inanaccountthatnormallyshouldhaveapreponderanceof
debit,i.e.isadebitnormalaccount.
Thisprobablyseemslikeasubtlepointatfirst,butitisVERYimportant:doubleentry
accountingisfundamentallybasedontheentiresystembeinginbalancejustlikethat
oldfashionedbalancescale.
Everythingworkstheoppositeforcreditnormalaccounts,i.e.acreditincreasesthe
balance,andadebitdecreasesthebalance.
Debitandcreditaresimplytheoppositeofeachother.Thiswasahardconceptforus
sincewewereusedtolookingatbankstatements,whereadebitalwaysdecreasedthe
balanceoftheaccountandcreditalwaysincreasedthebalance.Wedidntknowthat
bankaccountstatementsareliterallyjusttranscriptionsofthebank'sliability(credit
normalbalance)accounts!
Journal Entries
JournalEntriesarehowentriesaremadeintoaccounts.Sincetheentiresystemmust
remaininbalanceatalltimes,eachjournalentrymustalsobeinbalance.
Thismeansthatentriesaremadeinatleasttwoaccounts,hencethename
doubleentryaccounting.Oneentryfortheaccountthevalueisgoing
to
(debit)andone
fortheaccountthevaluecame
from
(credit).Noticehowourboldedmnemonicsmakeit
easytounderstandwhichaccountneedstobedebited,andwhichcredited.
Moresubtlesplitsarepossible,aswe'llseein
AccountingforDevelopers102
.This
fundamentaluseofoffsettingentriesmakesitunlikelythatinnocentmistakesor
larcenywillgounnoticed.
Let'ssayyouborrow$5fromyourfriendSamforlunch.Howwouldyourecordthisasa
journalentry?
Hereisajournalentrythatrecordswherethe$5wentto(debit),andwherethe$5
camefrom(credit):
Description:BorrowedmoneyfromSam
Account
Debit
Add
to
PettyCash(assetaccount/debitnormal)
Credit
5.00
Loan
from
Sam(liabilityaccount/creditnormal)
5.00
TotalDebit/Credit:
5.00
5.00
Sincethisjournalentryhas5debitand5credit,itisinbalance,andapplyingittothe
systemwillkeepthesysteminbalanceaswell.
Ifyoudepositthat$5
to
(debit)yourcheckingaccount
from
(credit)pettycash,here'sa
journalentrythatdescribesthattransaction:
Description:DepositPettyCashtoChecking
Account
Debit
Deposit
to
checking(assetaccount/debitnormal)
Credit
5.00
from
PettyCash(assetaccount/debitnormal)
5.00
TotalDebit/Credit:
5.00
5.00
Noticethatwealwayslistdebitbeforecredit.Thisisanindustrystandarddatingbackto
(atleast)Pacioli.Whilewerespectthestandard,it'sclearlyastylisticissuethathasno
effectonthedata.
Inthenextpost,
AccountingforDevelopers102
,we'lltaketheseconceptsforwardand
explainthechartofaccounts,reportingingeneral,thebalancesheetandincome
statementspecifically,cashvsaccrualaccounting,andtheaccountingcycle.