this repo has no description

feat: add article about treachery of representation

Changed files
+248 -1
content
static
+1 -1
config.toml
···
baseURL = "/"
languageCode = "en-gb"
-
title = "Hauleth"
+
title = "Hauleth's blog"
theme = "terminal"
[params]
+244
content/post/treachery-of-representation.md
···
+
---
+
title: "Treachery of Representation"
+
date: 2020-04-27T13:06:26+02:00
+
lastmod: 2020-04-27T13:06:26+02:00
+
description: |
+
Representation is not data - something that developers (and not only them)
+
often forgot when working with different data.
+
tags:
+
- programming
+
- linguistic
+
- culture
+
---
+
+
![Treachery of Images](/img/treachery-of-images.jpg)
+
+
I had that discussion on different chats few times already, but it is always
+
troublesome for people (not just programmers):
+
+
> **Representation is not data**
+
+
And this concept is confused **a lot**.
+
+
Almost any of you know that you can do `ping 1.1.1.1`, however did you know that
+
you can also do `ping 16843009` and the result will be the same? Magic? Not
+
really. What we commonly treat as an IPv4 address `1.1.1.1` is only textual
+
representation of the IPv4 which in reality is single 32-bit number which is
+
represented as dot separated 8-bit values just out of convenience. The same
+
applies to SHA-1 hashes, UUIDs, etc.
+
+
We people are great in finding patterns and simplifications, so when one sees
+
something like:
+
+
```
+
-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+
mQINBFd1CwMBEADTJG+QszZ9JK6G+IZpvK/g8mJicqKVTV1OmI1toIml5c/5r/70
+
dBc1FuASTM58PPZYJoKkbIh489QIvTm+8UdYu9zNRkT33el7pW1lEe5A6sq2bvoY
+
GE8DioHTewdoSDPf7KIaZQeRcIY4n93rUOwA6GEtNpyYGP6ss5Y7BGk4ltSioe7N
+
o+4ZmWoQZwZzRon3t1eWVVP9tRMG5nLzL3XA5FK8TqoYuuIOR0Kw9+yK/CIJi6EV
+
NGXidQEhRX/e6cDcqmo6LQuQluuhpwKjD3rVIq5P55kDcyUXHkcr9/RBIY1GCw0m
+
r03H053xYhPib4S3fkcGMz1zrvgPR8M6T8VYXERZDjKzQbkkjKx2umP+MQb57N/m
+
Ndr+vks5PoPOPTGS9DYPaWf0fTVWQz/Wr6SuqKYWOObw2Ql1fOFS9dlQ26VHqtdP
+
CjCS/+kxTWP0SNIlvmICj68JNq0Elti8DNF+8K4U/zjqphqLUOMYo+bfxF3Xudlx
+
+
X5tXXRd2Jx3rkquLhlOaIfwx5ZKkc0jFvFq6L6iQ8M3w2osTTQ8wzLVrKcA/1E37
+
vzFw0eLlAHxqKKx8AGXhlG+bu4z9
+
=HbWE
+
-----END PGP PUBLIC KEY BLOCK-----
+
```
+
+
Then they will automatically say that this is PGP public key, however it is not!
+
This is only armored (textual) representation of such. We can find infinite
+
amount of ways to represent this in different formats that will suit our needs.
+
We can use binary format, we can post it as huge integer:
+
+
```
+
1657454081776872747238013876359322713234391537499703933766980145269184386317049
+
8330933605635736383746482612365150874768089262930090931944711968773749521913699
+
7027071169368463413472374786860753667060249108643195012586135134901393013828317
+
1125513524511702912188470760919764295140961468869648430645347829208242125220011
+
3151968877120814976862830922750002170809783899223077039784557147675345249970781
+
5464553976008128226157133495317638249211710007765696991167161819945117066390428
+
3919051957061561015867974004807638646034325543036054946820462087690124141551114
+
9854678368254378572150652196681912690617688434615368858186497935662439355552496
+
4729580502224487557084501045154245589928832642849687361389957940229955065758222
+
6366651257907657297666835432894495612402178521246832570964915000759172307812244
+
6160593540459285722105074344450899751799861113519463231780643100018160335021016
+
1172711806124926227346822406879926575104066365513850591901167977031017773147553
+
3494796072257580113875396010361380353105632085492892479603715336182682602428143
+
5608690637230685977144014723666813959973503662453370415571851701179428151882882
+
8889353256564968091064157105454996484998754991348566666564916601887263240881070
+
4832198618558083182213501188928625277122728831796445123889707032846261305648630
+
2527176048898518342591580941543224978208167594213111446673112848581061191825984
+
1291021894031447958561527430552161385666081569185835507259834732917990092146589
+
8117077934368522739843309368028814069423002395997449936891495583107309283509271
+
1180077432800679370662483747523408021854844321836016009650358574989381886337852
+
1722516883913145519094014205375128862340002341518180047810642843228568880540172
+
3417922325879216322183112046755680152782225539937453280161300294135511699130848
+
0976433759293246140554344092404212626999402181891603820290765820423321186458935
+
1984485518225135337585187247603955326905920439923621172092130464391731498388744
+
8750392578000721268878463072511675222925230106406594118598329633269324358794764
+
4929066475821912729913815944439237132097525066761248367529760023296968812652711
+
1354078624366444615698555226671150629567656072692570827367021777825853318746140
+
2863318577339635525264674498700520998767957283494612638659115064541050609931927
+
0626267703727694820552442716314957841578389580288169926927235290811137237887434
+
4221841397313800123531757418475100660454200912589623058183943877051413097869194
+
2339339754985429142461984170624136785051296102102697817632037910221364646864651
+
9855796964298457614203439681372147302465919398126442059583983219983682993673878
+
5195511144366725918343436684113783818943460018156359275075623210303933783990867
+
1450770230403557029292899962005967013424432778295850913345133681904640414130225
+
6074976712103846157531047532174675106877834562907257767751866399263004265826476
+
2927779415738730155062074319337848630585696081256539500213340093725740025118088
+
1549556332762444079547546812082703704589345493095057789148939194264110489919019
+
4566170053142149254913384680974964028594308712215301647785051390937700375621904
+
6850793920957951588471978130651986351908543266002688052663010508763853950782008
+
2184664457189708083557342565742275344614046037371745586008320578024563750973078
+
8918522749313602046891225282398255933496131418430638794803291508377033406843725
+
5993318777198284973711860102116509775279126577240620025658230260626934855295524
+
0163482197624118826096325983427230149324714688555788577159485966979794672252786
+
2049579060682321390550407916111513505775215286804094663126348519235979240267931
+
1393177415036576603095965158893137047832256486627193835346772464826381170364046
+
9672727436992842647585191196834755720506018282532384722445185130057363544741494
+
9620010167886013834746116804462363836560880757170533362435237472884909654085819
+
2200315846789415790035979932125380804930427597237917426179754754825031469057587
+
5408385218092192305802900158223031488228733997920493838052062060383233685427730
+
2479303637471252558356068491271641497786414938837109276566129349124360527596986
+
0939690673802611552820885948021359288569430897510414990828683956519429277901630
+
3954037665434237643444138532861028612543250728043306643540240455527506302759025
+
2547253114427400839942700506775082503198395916277602696346477632254520324291510
+
7176423995375530679412205690580599798550778233049642580773735945645101772412041
+
9770061447364487938863821369661007066965634140967634082532169232884947757170676
+
4001778436464233464495522570739848976059303542657842980445747616892332657374307
+
3505719849994753220744681385854225182109628156151628193674787620122409837550175
+
0873904989000402627417710830371222663052469412680310145900108150056384479011904
+
2835209300157229749112634620468892621559922849964862659975166458450846483410310
+
9108533277021935459848755879666329563851612903497154909548344186653653532596030
+
1909102262515819267424216040525600483418895125777391628629285735284199384249913
+
4569616259150374342828948745370477195614375418738814522169402762983961841736104
+
6795438095408475881223956725863549758305981513146677968273034768754628733774741
+
5601175386054118189600876918455578756071642172440419960753296039010117418642333
+
0700157761536698272554982837358908293635750455157297675798024638098958969267103
+
6863406950021125691193872800648046146136177370993251603456335654259717488367827
+
4221891453042458615303763101765455461453483141839094655158338636716818847773378
+
3089958604524376415306549473187862340575705348685942443697841897636463859949926
+
4444464568286807145435412305718175821967958934523535510530750957533464207224580
+
2279373368828019548205439249352189164575083536583721094688224573324098240189090
+
5336968277502282844656778779596324101840145138970262636945152077842421376473220
+
7492641493346476621126619083363859115527821109445021807274717048079752479814069
+
8489075707866445180273917549185493159488867602009975459154326516617446093785735
+
7657409659738148136025968774346968795138906298743560267773358615395905430092434
+
4090587183336112957335092481531071573600577415752552329335484584825448451281828
+
8397267947223750920443272557916925997060835636847307503958963847413230458654999
+
1510218368567378788057116023931994479266585942028846093606765504042151064449401
+
7535053560571943565326163798733090077562063019270432774405336624206120162684878
+
2795961016400131165092351347259003395336488326011264715606875560607985355101479
+
1760498444803027184543196012361666512501664115266209446783611568980849759393366
+
9004607206787763941830633066297736259437811557856982004496007136271945140295164
+
1021123058841472126203195417354602182201593697351601555663719500088120144234523
+
6489841188841869277921900098197497636848312736842577887524394082685476810652434
+
4368023998666968889307055236194661569426524463555778731728379410827687126847841
+
9767542567328134223554830928399001003746312827667717886760656045983730239481725
+
0247192299979431368314503262526820359421826762698555934534502139292008724527340
+
8566373287784944330515935635629564982235980178134875308234950470548865802766425
+
3860142806266365958072884321048903006167833769100547151312160642686817573070175
+
8517347856656124090595544002510378196552188147101332012713619529417880258338847
+
9548595874229820385574539354556804227765871124740709294288382971201998678678558
+
1135393032892116765181068789505132747404363007086649489491404624220840121961493
+
9770980821410301887703418151100099801563662384204228166203260763728750184267283
+
0131194615371938999731752172864595591147593535783229858980094812827904216900881
+
0264484164635513605434976822336090709152508883040986176420243997392303278619543
+
7132483818824284005791373572104029624554831023783619373272102143855002602772145
+
1625555397693952027234647740913597061447733291018249879406776786602117249183252
+
3028866932885668665387107476073897428999191152484269358567755332923524842064600
+
3794929412192609471679420879441380627388660584277219132508113058600032222404868
+
2912812185436951502936757180777020507704813293182422695970566889605944405493165
+
1013050164683342445192514465075993459075480256309099680013258781889270979210377
+
2978191200620386753171174166739274414356307635252359045515977252139725132495302
+
4643451106675617568043015073444443099894159838269138387489278049925887086707284
+
7829572513234800005657626866917894409850513692287942317924246061209211855433159
+
9474862901923613493886199119281189221558415812534549155894713481042125093206748
+
5327877884372067603958264162802943954426330867112852706462838411380034486572690
+
0832825677844671600199639823373591008100835318576086939856769129801540454104086
+
1677822021197754242364262145059312498290181267047980332959890135114462272477083
+
2267001649763807453258389353505463199327476285470780889266423077199955133598911
+
4228000626496272875548822896127419699372645929502724379809375313984715132685176
+
4622127184084472238931211915326009413737074357833496656532089093339434182463301
+
4308133856938907909683630708624133178764345576977957526210285792755588339502313
+
8908965753207073692034844982785108219589789141504389489294521808974273153775683
+
4710352841094853913320997396720648350856909009547717827126308937619267105900330
+
5101845147776164022119091114165228791856934734405699522377750777712347632477472
+
1009173135645423776920173241282009759190193451325534130721465706915799208352319
+
7599436014849832502702741642253476812447287458898351283245611697635355626967353
+
1666248190388798775893317097285333032144668959144551590316718826094121548655064
+
7327190413743862383571166391385591854324294967408637687666499017919659934556270
+
6341760473807628223322195796330107447627192021125501916257505545056806593020009
+
7877518699192190569125611877551646125360935329152981694983591991442830972118425
+
6024578420108611596786779391910078283535602332400676206290364979979566874130677
+
6262721807685562884678614519635750114010818380727834704599313495363241399979019
+
0070441245844791323697888362361156445150402411489057842369956860981561106349532
+
0427329254749281230185541338204013332686802017845355478766281601177626930879718
+
3924781109376832016663185405467845874107109473909888472781931298639743129405819
+
9018728534014004893438844921156199392052668509822766055873031732621412819415997
+
5106658073874599600482906898626458321908644717727705714148184312035554569461172
+
2571014234210898150511238337764888383510750920318252617219954833323650772315822
+
8694765635893382122506622111504457282650772215884112102663088591828929423478423
+
4630228876316754232955789012778765153858505693804419173581459528959967049577393
+
3203503330240909044864203529502068033769777504652970513017398216284525619584395
+
7399576075789549294657904493999442658423657409794863027890740986637503143358200
+
1934990177507763078658788020042351989886877390781804018450451154174423611071016
+
3402098758156739497049080279046203857466871438452835345118677125325469128068133
+
1366454054797295342986762057003055457075865166635455089017691661317421628642115
+
4993805637263456481774330967345531754745117304815930559577694749501153002539548
+
5404256140871044730263074060283878378820730250169561914787775689729320033889071
+
6450665587233640719268830704525315924153018596256798187945369509492198616718735
+
1727110697661735449130358956047142033543848955222885833760237898733698724067547
+
8419101187420106748225373809326555034920972273032855852671672606413074751824780
+
5154501659974029329400410688611596507780739224024571262805816781734162995302986
+
6056046847929263719956354500493986529434154889061593903845247605955487265601755
+
6043989537334852057279780609368927725387526205357590787648273036069019155497325
+
7284579301234574132272242978804776467287642325689728908190752748762036032550553
+
0297580281513471442798728664035839834832168788094160691038978903832691745390723
+
8280774908923640913005731937007494753031663001263187085109076785504199996190411
+
2645973159719700472616661742318567810513248327998862965177705803004760763074321
+
2313603449759152065701241959565937761991117902298693865777609004090724789824238
+
3972666226870968534310397976577839690259724502877323852210276007099716458281622
+
0266833622323608118226700555948541874878778700732590694206338358355846043998302
+
2076998169472117379362890485627714537422759747305703434242979589456473320420530
+
3798100254154945537756689378818628238489975669085399495869198707118002332356201
+
2860990261282434269797439143900692337984204234325905652408969984088094424603914
+
1324281031601472803905094128246361871536795078781179969095901324385165589352908
+
5570928042409387112284705341815718794836739937616493333506970623215543845017075
+
9783614942442566404035374016694617857746139989520230332862060498894309587704609
+
2307147218032013573247425767983972450327115251550658313094143782360088885333289
+
5608157274415946459185147621933085094399365522400749862053761657227728398780469
+
7624550738125029927864820017089079162293784666905532642099274666498693255031122
+
2889026525933407361948759134200215183348933115884125348251449445229741605009136
+
5213445919902677380093249284489832185317941999559970629694476644944502557922299
+
4045467263054565580347599600913022630568314834909143526070011238471771326443583
+
5999517514967645625805546197521789593944893957635299668589873242979729214565080
+
2261124045260532526154306748833731566597485067054072337617187788422439611692535
+
6816154352988676611143089545607089006494597803681742408872009589972348314218354
+
5885756829028538416517815718956811889863727858335798002033148984814372442071252
+
2067544365025698588181983841271622441543580184070308095038169545529105805899001
+
5825565028451412722300055213104773432923209992505613530612435181227942384006400
+
6523874291660768676182135558923684054785558197662748591717032047925055385422584
+
8826587112169068650291428518318455696828296955217726852703371476729712500873714
+
9472757285042561083989577043290348125840395005244750850424202067248954262318073
+
3815815411200758900340511052777147951522351782525348580404031636340281256009099
+
3622685663270098759448305092624146163465790024589793366278716865415624355235291
+
3985878069536487297514629837101726802175517221106646456169044468305875210017956
+
3762872046696988950422497705388225997904571624738961093738188347083184831994615
+
5653340873908308859802165057177945265893576798033839250748977766722025452484918
+
4969906442004769360577067228954632576483279588054785969942183381969384204862823
+
5527295851917376805942967603231125591852023457112648669282453139677076502138626
+
9831545895899997311194908866099892662200438185858903893802349550297108232343975
+
7063807807
+
```
+
+
Before you ask - yes, this is my PGP public key as a single decimal integer.
+
+
Next time you will see someone asking for "shorter UUID" you can point them
+
there and say - just pick shorter representation.
+
+
[so-uuid]: https://stackoverflow.com/a/2117523/1017941
+3
static/img/treachery-of-images.jpg
···
+
version https://git-lfs.github.com/spec/v1
+
oid sha256:92bb372ddf2914e34e785b110e43dfda092cd3926736e7ecfb72cb9f8fb93ba5
+
size 16569