···11+---
22+title: "Treachery of Representation"
33+date: 2020-04-27T13:06:26+02:00
44+lastmod: 2020-04-27T13:06:26+02:00
55+description: |
66+ Representation is not data - something that developers (and not only them)
77+ often forgot when working with different data.
88+tags:
99+ - programming
1010+ - linguistic
1111+ - culture
1212+---
1313+1414+
1515+1616+I had that discussion on different chats few times already, but it is always
1717+troublesome for people (not just programmers):
1818+1919+> **Representation is not data**
2020+2121+And this concept is confused **a lot**.
2222+2323+Almost any of you know that you can do `ping 1.1.1.1`, however did you know that
2424+you can also do `ping 16843009` and the result will be the same? Magic? Not
2525+really. What we commonly treat as an IPv4 address `1.1.1.1` is only textual
2626+representation of the IPv4 which in reality is single 32-bit number which is
2727+represented as dot separated 8-bit values just out of convenience. The same
2828+applies to SHA-1 hashes, UUIDs, etc.
2929+3030+We people are great in finding patterns and simplifications, so when one sees
3131+something like:
3232+3333+```
3434+-----BEGIN PGP PUBLIC KEY BLOCK-----
3535+3636+mQINBFd1CwMBEADTJG+QszZ9JK6G+IZpvK/g8mJicqKVTV1OmI1toIml5c/5r/70
3737+dBc1FuASTM58PPZYJoKkbIh489QIvTm+8UdYu9zNRkT33el7pW1lEe5A6sq2bvoY
3838+GE8DioHTewdoSDPf7KIaZQeRcIY4n93rUOwA6GEtNpyYGP6ss5Y7BGk4ltSioe7N
3939+o+4ZmWoQZwZzRon3t1eWVVP9tRMG5nLzL3XA5FK8TqoYuuIOR0Kw9+yK/CIJi6EV
4040+NGXidQEhRX/e6cDcqmo6LQuQluuhpwKjD3rVIq5P55kDcyUXHkcr9/RBIY1GCw0m
4141+r03H053xYhPib4S3fkcGMz1zrvgPR8M6T8VYXERZDjKzQbkkjKx2umP+MQb57N/m
4242+Ndr+vks5PoPOPTGS9DYPaWf0fTVWQz/Wr6SuqKYWOObw2Ql1fOFS9dlQ26VHqtdP
4343+CjCS/+kxTWP0SNIlvmICj68JNq0Elti8DNF+8K4U/zjqphqLUOMYo+bfxF3Xudlx
4444+…
4545+X5tXXRd2Jx3rkquLhlOaIfwx5ZKkc0jFvFq6L6iQ8M3w2osTTQ8wzLVrKcA/1E37
4646+vzFw0eLlAHxqKKx8AGXhlG+bu4z9
4747+=HbWE
4848+-----END PGP PUBLIC KEY BLOCK-----
4949+```
5050+5151+Then they will automatically say that this is PGP public key, however it is not!
5252+This is only armored (textual) representation of such. We can find infinite
5353+amount of ways to represent this in different formats that will suit our needs.
5454+We can use binary format, we can post it as huge integer:
5555+5656+```
5757+1657454081776872747238013876359322713234391537499703933766980145269184386317049
5858+8330933605635736383746482612365150874768089262930090931944711968773749521913699
5959+7027071169368463413472374786860753667060249108643195012586135134901393013828317
6060+1125513524511702912188470760919764295140961468869648430645347829208242125220011
6161+3151968877120814976862830922750002170809783899223077039784557147675345249970781
6262+5464553976008128226157133495317638249211710007765696991167161819945117066390428
6363+3919051957061561015867974004807638646034325543036054946820462087690124141551114
6464+9854678368254378572150652196681912690617688434615368858186497935662439355552496
6565+4729580502224487557084501045154245589928832642849687361389957940229955065758222
6666+6366651257907657297666835432894495612402178521246832570964915000759172307812244
6767+6160593540459285722105074344450899751799861113519463231780643100018160335021016
6868+1172711806124926227346822406879926575104066365513850591901167977031017773147553
6969+3494796072257580113875396010361380353105632085492892479603715336182682602428143
7070+5608690637230685977144014723666813959973503662453370415571851701179428151882882
7171+8889353256564968091064157105454996484998754991348566666564916601887263240881070
7272+4832198618558083182213501188928625277122728831796445123889707032846261305648630
7373+2527176048898518342591580941543224978208167594213111446673112848581061191825984
7474+1291021894031447958561527430552161385666081569185835507259834732917990092146589
7575+8117077934368522739843309368028814069423002395997449936891495583107309283509271
7676+1180077432800679370662483747523408021854844321836016009650358574989381886337852
7777+1722516883913145519094014205375128862340002341518180047810642843228568880540172
7878+3417922325879216322183112046755680152782225539937453280161300294135511699130848
7979+0976433759293246140554344092404212626999402181891603820290765820423321186458935
8080+1984485518225135337585187247603955326905920439923621172092130464391731498388744
8181+8750392578000721268878463072511675222925230106406594118598329633269324358794764
8282+4929066475821912729913815944439237132097525066761248367529760023296968812652711
8383+1354078624366444615698555226671150629567656072692570827367021777825853318746140
8484+2863318577339635525264674498700520998767957283494612638659115064541050609931927
8585+0626267703727694820552442716314957841578389580288169926927235290811137237887434
8686+4221841397313800123531757418475100660454200912589623058183943877051413097869194
8787+2339339754985429142461984170624136785051296102102697817632037910221364646864651
8888+9855796964298457614203439681372147302465919398126442059583983219983682993673878
8989+5195511144366725918343436684113783818943460018156359275075623210303933783990867
9090+1450770230403557029292899962005967013424432778295850913345133681904640414130225
9191+6074976712103846157531047532174675106877834562907257767751866399263004265826476
9292+2927779415738730155062074319337848630585696081256539500213340093725740025118088
9393+1549556332762444079547546812082703704589345493095057789148939194264110489919019
9494+4566170053142149254913384680974964028594308712215301647785051390937700375621904
9595+6850793920957951588471978130651986351908543266002688052663010508763853950782008
9696+2184664457189708083557342565742275344614046037371745586008320578024563750973078
9797+8918522749313602046891225282398255933496131418430638794803291508377033406843725
9898+5993318777198284973711860102116509775279126577240620025658230260626934855295524
9999+0163482197624118826096325983427230149324714688555788577159485966979794672252786
100100+2049579060682321390550407916111513505775215286804094663126348519235979240267931
101101+1393177415036576603095965158893137047832256486627193835346772464826381170364046
102102+9672727436992842647585191196834755720506018282532384722445185130057363544741494
103103+9620010167886013834746116804462363836560880757170533362435237472884909654085819
104104+2200315846789415790035979932125380804930427597237917426179754754825031469057587
105105+5408385218092192305802900158223031488228733997920493838052062060383233685427730
106106+2479303637471252558356068491271641497786414938837109276566129349124360527596986
107107+0939690673802611552820885948021359288569430897510414990828683956519429277901630
108108+3954037665434237643444138532861028612543250728043306643540240455527506302759025
109109+2547253114427400839942700506775082503198395916277602696346477632254520324291510
110110+7176423995375530679412205690580599798550778233049642580773735945645101772412041
111111+9770061447364487938863821369661007066965634140967634082532169232884947757170676
112112+4001778436464233464495522570739848976059303542657842980445747616892332657374307
113113+3505719849994753220744681385854225182109628156151628193674787620122409837550175
114114+0873904989000402627417710830371222663052469412680310145900108150056384479011904
115115+2835209300157229749112634620468892621559922849964862659975166458450846483410310
116116+9108533277021935459848755879666329563851612903497154909548344186653653532596030
117117+1909102262515819267424216040525600483418895125777391628629285735284199384249913
118118+4569616259150374342828948745370477195614375418738814522169402762983961841736104
119119+6795438095408475881223956725863549758305981513146677968273034768754628733774741
120120+5601175386054118189600876918455578756071642172440419960753296039010117418642333
121121+0700157761536698272554982837358908293635750455157297675798024638098958969267103
122122+6863406950021125691193872800648046146136177370993251603456335654259717488367827
123123+4221891453042458615303763101765455461453483141839094655158338636716818847773378
124124+3089958604524376415306549473187862340575705348685942443697841897636463859949926
125125+4444464568286807145435412305718175821967958934523535510530750957533464207224580
126126+2279373368828019548205439249352189164575083536583721094688224573324098240189090
127127+5336968277502282844656778779596324101840145138970262636945152077842421376473220
128128+7492641493346476621126619083363859115527821109445021807274717048079752479814069
129129+8489075707866445180273917549185493159488867602009975459154326516617446093785735
130130+7657409659738148136025968774346968795138906298743560267773358615395905430092434
131131+4090587183336112957335092481531071573600577415752552329335484584825448451281828
132132+8397267947223750920443272557916925997060835636847307503958963847413230458654999
133133+1510218368567378788057116023931994479266585942028846093606765504042151064449401
134134+7535053560571943565326163798733090077562063019270432774405336624206120162684878
135135+2795961016400131165092351347259003395336488326011264715606875560607985355101479
136136+1760498444803027184543196012361666512501664115266209446783611568980849759393366
137137+9004607206787763941830633066297736259437811557856982004496007136271945140295164
138138+1021123058841472126203195417354602182201593697351601555663719500088120144234523
139139+6489841188841869277921900098197497636848312736842577887524394082685476810652434
140140+4368023998666968889307055236194661569426524463555778731728379410827687126847841
141141+9767542567328134223554830928399001003746312827667717886760656045983730239481725
142142+0247192299979431368314503262526820359421826762698555934534502139292008724527340
143143+8566373287784944330515935635629564982235980178134875308234950470548865802766425
144144+3860142806266365958072884321048903006167833769100547151312160642686817573070175
145145+8517347856656124090595544002510378196552188147101332012713619529417880258338847
146146+9548595874229820385574539354556804227765871124740709294288382971201998678678558
147147+1135393032892116765181068789505132747404363007086649489491404624220840121961493
148148+9770980821410301887703418151100099801563662384204228166203260763728750184267283
149149+0131194615371938999731752172864595591147593535783229858980094812827904216900881
150150+0264484164635513605434976822336090709152508883040986176420243997392303278619543
151151+7132483818824284005791373572104029624554831023783619373272102143855002602772145
152152+1625555397693952027234647740913597061447733291018249879406776786602117249183252
153153+3028866932885668665387107476073897428999191152484269358567755332923524842064600
154154+3794929412192609471679420879441380627388660584277219132508113058600032222404868
155155+2912812185436951502936757180777020507704813293182422695970566889605944405493165
156156+1013050164683342445192514465075993459075480256309099680013258781889270979210377
157157+2978191200620386753171174166739274414356307635252359045515977252139725132495302
158158+4643451106675617568043015073444443099894159838269138387489278049925887086707284
159159+7829572513234800005657626866917894409850513692287942317924246061209211855433159
160160+9474862901923613493886199119281189221558415812534549155894713481042125093206748
161161+5327877884372067603958264162802943954426330867112852706462838411380034486572690
162162+0832825677844671600199639823373591008100835318576086939856769129801540454104086
163163+1677822021197754242364262145059312498290181267047980332959890135114462272477083
164164+2267001649763807453258389353505463199327476285470780889266423077199955133598911
165165+4228000626496272875548822896127419699372645929502724379809375313984715132685176
166166+4622127184084472238931211915326009413737074357833496656532089093339434182463301
167167+4308133856938907909683630708624133178764345576977957526210285792755588339502313
168168+8908965753207073692034844982785108219589789141504389489294521808974273153775683
169169+4710352841094853913320997396720648350856909009547717827126308937619267105900330
170170+5101845147776164022119091114165228791856934734405699522377750777712347632477472
171171+1009173135645423776920173241282009759190193451325534130721465706915799208352319
172172+7599436014849832502702741642253476812447287458898351283245611697635355626967353
173173+1666248190388798775893317097285333032144668959144551590316718826094121548655064
174174+7327190413743862383571166391385591854324294967408637687666499017919659934556270
175175+6341760473807628223322195796330107447627192021125501916257505545056806593020009
176176+7877518699192190569125611877551646125360935329152981694983591991442830972118425
177177+6024578420108611596786779391910078283535602332400676206290364979979566874130677
178178+6262721807685562884678614519635750114010818380727834704599313495363241399979019
179179+0070441245844791323697888362361156445150402411489057842369956860981561106349532
180180+0427329254749281230185541338204013332686802017845355478766281601177626930879718
181181+3924781109376832016663185405467845874107109473909888472781931298639743129405819
182182+9018728534014004893438844921156199392052668509822766055873031732621412819415997
183183+5106658073874599600482906898626458321908644717727705714148184312035554569461172
184184+2571014234210898150511238337764888383510750920318252617219954833323650772315822
185185+8694765635893382122506622111504457282650772215884112102663088591828929423478423
186186+4630228876316754232955789012778765153858505693804419173581459528959967049577393
187187+3203503330240909044864203529502068033769777504652970513017398216284525619584395
188188+7399576075789549294657904493999442658423657409794863027890740986637503143358200
189189+1934990177507763078658788020042351989886877390781804018450451154174423611071016
190190+3402098758156739497049080279046203857466871438452835345118677125325469128068133
191191+1366454054797295342986762057003055457075865166635455089017691661317421628642115
192192+4993805637263456481774330967345531754745117304815930559577694749501153002539548
193193+5404256140871044730263074060283878378820730250169561914787775689729320033889071
194194+6450665587233640719268830704525315924153018596256798187945369509492198616718735
195195+1727110697661735449130358956047142033543848955222885833760237898733698724067547
196196+8419101187420106748225373809326555034920972273032855852671672606413074751824780
197197+5154501659974029329400410688611596507780739224024571262805816781734162995302986
198198+6056046847929263719956354500493986529434154889061593903845247605955487265601755
199199+6043989537334852057279780609368927725387526205357590787648273036069019155497325
200200+7284579301234574132272242978804776467287642325689728908190752748762036032550553
201201+0297580281513471442798728664035839834832168788094160691038978903832691745390723
202202+8280774908923640913005731937007494753031663001263187085109076785504199996190411
203203+2645973159719700472616661742318567810513248327998862965177705803004760763074321
204204+2313603449759152065701241959565937761991117902298693865777609004090724789824238
205205+3972666226870968534310397976577839690259724502877323852210276007099716458281622
206206+0266833622323608118226700555948541874878778700732590694206338358355846043998302
207207+2076998169472117379362890485627714537422759747305703434242979589456473320420530
208208+3798100254154945537756689378818628238489975669085399495869198707118002332356201
209209+2860990261282434269797439143900692337984204234325905652408969984088094424603914
210210+1324281031601472803905094128246361871536795078781179969095901324385165589352908
211211+5570928042409387112284705341815718794836739937616493333506970623215543845017075
212212+9783614942442566404035374016694617857746139989520230332862060498894309587704609
213213+2307147218032013573247425767983972450327115251550658313094143782360088885333289
214214+5608157274415946459185147621933085094399365522400749862053761657227728398780469
215215+7624550738125029927864820017089079162293784666905532642099274666498693255031122
216216+2889026525933407361948759134200215183348933115884125348251449445229741605009136
217217+5213445919902677380093249284489832185317941999559970629694476644944502557922299
218218+4045467263054565580347599600913022630568314834909143526070011238471771326443583
219219+5999517514967645625805546197521789593944893957635299668589873242979729214565080
220220+2261124045260532526154306748833731566597485067054072337617187788422439611692535
221221+6816154352988676611143089545607089006494597803681742408872009589972348314218354
222222+5885756829028538416517815718956811889863727858335798002033148984814372442071252
223223+2067544365025698588181983841271622441543580184070308095038169545529105805899001
224224+5825565028451412722300055213104773432923209992505613530612435181227942384006400
225225+6523874291660768676182135558923684054785558197662748591717032047925055385422584
226226+8826587112169068650291428518318455696828296955217726852703371476729712500873714
227227+9472757285042561083989577043290348125840395005244750850424202067248954262318073
228228+3815815411200758900340511052777147951522351782525348580404031636340281256009099
229229+3622685663270098759448305092624146163465790024589793366278716865415624355235291
230230+3985878069536487297514629837101726802175517221106646456169044468305875210017956
231231+3762872046696988950422497705388225997904571624738961093738188347083184831994615
232232+5653340873908308859802165057177945265893576798033839250748977766722025452484918
233233+4969906442004769360577067228954632576483279588054785969942183381969384204862823
234234+5527295851917376805942967603231125591852023457112648669282453139677076502138626
235235+9831545895899997311194908866099892662200438185858903893802349550297108232343975
236236+7063807807
237237+```
238238+239239+Before you ask - yes, this is my PGP public key as a single decimal integer.
240240+241241+Next time you will see someone asking for "shorter UUID" you can point them
242242+there and say - just pick shorter representation.
243243+244244+[so-uuid]: https://stackoverflow.com/a/2117523/1017941