<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by MZ on Medium]]></title>
        <description><![CDATA[Stories by MZ on Medium]]></description>
        <link>https://medium.com/@infectoone?source=rss-1ccb32e0e071------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hqJ73XNXg_zRT3dBJY_QdQ.jpeg</url>
            <title>Stories by MZ on Medium</title>
            <link>https://medium.com/@infectoone?source=rss-1ccb32e0e071------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 12:28:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@infectoone/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Korona— opasna pandemija ili opasna zabluda?]]></title>
            <link>https://medium.com/@infectoone/korona-opasna-pandemija-ili-opasna-zabluda-2e08300f5256?source=rss-1ccb32e0e071------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e08300f5256</guid>
            <dc:creator><![CDATA[MZ]]></dc:creator>
            <pubDate>Tue, 01 Sep 2020 06:40:53 GMT</pubDate>
            <atom:updated>2020-09-10T10:27:02.872Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*560ac1vICxLQrEHK" /><figcaption>Izvor: <a href="https://unsplash.com/photos/Z9arfr0f248">https://unsplash.com/photos/Z9arfr0f248</a>, <a href="https://unsplash.com/@adamsky1973">Adam Nieścioruk</a></figcaption></figure><p>Naslov ovog članak nije slučajno odabran — inspiran je <a href="https://www.statnews.com/2020/03/17/a-fiasco-in-the-making-as-the-coronavirus-pandemic-takes-hold-we-are-making-decisions-without-reliable-data/">izjavom </a>jednog od najcitiranijih medicinskih naučnika na svijetu, profesora Johna Ioannidisa sa Univerziteta u Stanfordu. Njegove izjave i studije, kao i studije brojnih drugih uvaženih naučnika se često kose sa politički motivisanim drakonskim mjerama i medijskim lešinarenjem koje nam svakodnevno biva nabijano na nos. Takva atmosfera nažalost potiskuje diskusiju oko srži današnje situacije — koliko je SARS-CoV-2, prostonarodno nazvan „korona virus“, zapravo opasan? Jesu li mjere koje sprovodimo srazmjerne opasnosti i šta smo sve spremni žrtvovati zarad sigurnosti od iste?</p><h3>Smrtnost, zaraznost i morbiditet</h3><p>Šta sve čini jedan virus opasnim? Ono što nas sasvim razumljivo prvo zabrine je samo pitanje života i smrti tj. da li bi neko nama drag ili mi sami mogli umrijeti, odnosno kolika je <strong>stopa smrtnosti</strong> — udio zaraženih ljudi koji umru od posljedica zaraze. Niska stopa smrtnosti i dalje može koštati mnogo života ako je apsolutni broj zaraženih ljudi visok, što se može desiti ako je virus veoma <strong>zarazan</strong>. Međutim, smrt je krajni ekstrem opasnosti. Oboljenja i trajne posljedice takođe želimo izbjeći — <strong>morbiditet</strong> je još jedan značajan faktor opasnosti. Koje podatke o tim faktorima imamo u slučaju virusa SARS-CoV-2 i oboljenja COVID-19 i koliko su ti podaci pouzdani?</p><p>Podatak koji obično najveći šok izaziva je broj umrlih. Prema <a href="https://coronavirus.jhu.edu/map.html">podacima univerziteta Johns Hopkins</a> sveukupan broj umrlih širom svijeta trenutno (31.08.2020) iznosi 847 847. Takve brojke imaju snažnu šok vrijednost i kolike god da su, svaka smrt je tragična. Međutim, strah, afektivne reakcije, zloupotreba smrti i iskrivljene statistike bi mogle imati tragičnije posljedice nego sam virus.</p><p>Prethodno pomenuti broj „Covid-19 umrlih“ je zbir zvaničnih dojava vlada država širom svijeta. Generalno, kumulativna statistika globalnih razmjera je podložna raznim greškama koje kada se „nakupe“ mogu rezultirati u ogromnom iskrivljenju statistike. Svaki ozbiljan statističar je svjestan toga i zna da je uz svaki zastrašjući broj potreban i kontekst da bi taj broj imao ikakvu iskaznu snagu. Jedan moj dobar prijatelj koji se profesionalno bavi time nije bez razloga rekao da je statistika David Copperfield matematike. Samo par čarobnih trikova je dovoljno da se broj pretvori u željeni iskaz.</p><p>Različitost među prozvođačima PCR-testova, zabušavanja pri dijagnostici i tretmanu pacijenata, suvišne intubacije, dubiozni lijekovi koji dodatno ugrožavaju život pacijenta, opširnost definicije „Covid-19 smrti“ i brojni drugi faktori čine ovu brojku vrlo glomaznom. Naročito je poslednji faktor važan za razmotriti: koji smrtni slučajevi se uopšte smatraju „Covid-19“ slučajevima?</p><p><strong>Ko su to „preminuli od Covid-19“ ?</strong></p><p>Države kao što su <a href="https://www.sozialministerium.at/Informationen-zum-Coronavirus/Neuartiges-Coronavirus-(2019-nCov).html">Austrija </a>i <a href="https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Situationsberichte/Gesamt.html">Njemačka </a>su vrlo transparentne po pitanju te definicije te se na stranicama državnih institucija jasno vidi da se „Covid-19“ smrtnim slučajem smatra svako ko je prije smrti bio pozitivno testiran bez obzira na uzrok smrti. Ista definicija vrijedi i u <a href="https://europa.today.it/attualita/coronavirus-contati-decessi-ue.html">Italiji </a>i u raznim drugim državama Evrope. <a href="https://www.cdc.gov/nchs/nvss/covid-19.htm">Definicija u Sjedinjenim Američkim Državama</a> je eventualno strožja, međutim, uzimajući u obzir veličinu SAD-a, različitost među saveznim državama i brojne političke nemire, sasvim je prirodno očekivati da su i kumulativni podaci iz SAD-a vrlo upitni. Ukratko, gotovo nigdje se ne razlikuje ko je umro <strong>od</strong> korone, a ko <strong>sa</strong> koronom. Te statistike ne govore kod koga je postojala direktna kauzalnost između Covid-19 infekcije i smrti, kao ni o tome u kolikoj mjeri je Covid-19 infekcija dovela do smrti pacijenata, čak ni o simptomima pacijenata. Pacijent koji je preminuo od npr. raka ili već postojećeg srčanog oboljenja i koji je prethodno bio pozitivno testiran na SARS-CoV-2 bez obzira na mali do nikakav doprinos infekcije na smrt bi bio obuhvaćen prethodno pomenutim definicijama i ušao u statistiku. Čak i ekstremniji slučajevi gdje bi ljudi bili pozitivno testirani i preminuli u saobraćajnoj nesreći bi zvanično bili obuhvaćeni definicijom, premda je upitno u kojoj mjeri se u praksi stvarno takav slučaj evidentira. Takođe treba uzeti u obzir da to koji preminuli ulaze u statistiku, velikim dijelom zavisi od procjene i odluke pojedinačnih doktora tj. medicinskih radnika u bolnicama. Uz to sve, jedno je sigurno — svi smo nevjerovatno senzibilizrani na korona virus, testiramo više nego na ikad u istoriji virologije i za očekivati je da će mu se pripisivati više nego što treba. U nekim slučajevima, kao npr. u bolnicama u SAD-u postoje čak i f<a href="https://eu.usatoday.com/story/news/factcheck/2020/04/24/fact-check-medicare-hospitals-paid-more-covid-19-patients-coronavirus/3000638001/">inansijski motivi za preuveličavanje broja preminulih</a>. O političkim da ne govorim.</p><p>Takva definicija je u svrhe naučne evidencije uredu, jer je SARS-CoV-2 zvanično dosad nepoznat virus. Međutim, kada se govori o broju umrlih u medijima ili kada se političke odluke dovode, taj broj se ne smije uzimati iz konteksta. Neki mediji to vješto sroče to kao „smrtni slučajevi vezani za Covid-19“ dok neki mediji direktno lažu govoreći o „umrlima OD korone“. Isto vrijedi i za broj zaraženih ljudi — govori se o „oboljelima“ uprkos tome što mnogi zaraženi nemaju uopšte simptome. Jedino što je sigurno je da je nad tim ljudima izvršen test koji je dao pozitivan rezultat. Takozvani PCR-testovi samo ukazuju na eventualno prisustvo određenog dijela genomske sekvence virusa, a ne samo da ne govore o tome da li je neko uopšte bolestan ili ne, nego ni ne govore o tome <a href="https://www.cebm.net/covid-19/infectious-positive-pcr-test-result-covid-19/">da li je neko infekciozan</a> tj. da li uopšte može zaraziti druge, što dovodi do toga da velikom broju ljudi suvišno biva propisan zakonski obavezan karantin. Ukratko, PCR-test nije prikladno sredstvo za dijagnostiku i uz to sve posjeduje implicitnu i nezanemarljivu stopu <a href="https://www.medrxiv.org/content/10.1101/2020.04.26.20080911v3.full.pdf">pogrešno pozitivnih odnosno „false positive“ rezultata</a> koja je naročito značajna kada se populacija masovno testira.</p><p>Uz tu veoma opširnu i diskutabilnu definiciju „zaraženih i umrlih od Covid-19“, pogledajmo podatke koji su nam na raspolaganju. Sjeverna Italija je početkom marta bila epicentar pandemije u Evropi. To možda i nije začuđujuće, uzimajući u obzir neke lokalne karakteristike tog područja koji su i <a href="https://milano.corriere.it/notizie/cronaca/18_gennaio_10/milano-terapie-intensive-collasso-l-influenza-gia-48-malati-gravi-molte-operazioni-rinviate-c9dc43a6-f5d1-11e7-9b06-fe054c3be5b2.shtml">ranije dovodili do preplavljenih bolnica</a>. Šokatni snimci masovnih intubacija i mnogobrojnih kovčega su poljuljale cijeli svijet i sigurno dobrim dijelom doprinijele odlukama političara širom svijeta da uvedu policijske časove i masovne karantine.</p><p><a href="https://www.epicentro.iss.it/en/coronavirus/bollettino/Report-COVID-2019_22_july_2020.pdf">Izvještaj vodećeg italijanskog zdravstvenog instituta <em>Istituto Superiore di Sanità </em>izdat 22. jula</a> sadrži tabelu komorbiditeta 2441 preminulih koji su prethodno bili pozitivno testirani na virus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*bwAZfSG5LggZ2RTfaRiPoA.png" /><figcaption>Izvor: Characteristics of SARS-CoV-2 patients dying in Italy Report based on available data on July 22nd, 2020, <strong><em>Istituto Superiore di Sanità</em></strong></figcaption></figure><p>Medijan već postojećih oboljenja u prikazanom uzorku je 3.4, dok je 61.8% preminulih imalo najmanje 3 već postojeća oboljenja. Prosječna starost preminulih je 80, a medijan 82 godine. Institut je počevši od marta redovno objavljivao izvještaje i u svakom izvještaju su do današnjeg dana podaci bili gotovo isti.</p><p>Njemački doktor i bivški SPD političar Wolfgang Wodarg je jedan od najvećih kritičara mjera koje se sprovode za suzbijanje korona virusa. Pored brojnih fenomenalnih argumentacija i podataka koje navodi na <a href="https://www.wodarg.com/">svojoj stranici</a>, Wodarg je napravio malu tabelu koja pokazuje prosječne starosti preminulih Covid-19 pacijenata u raznim državama (informacije su preuzete sa vodećih zdravstvenih instituta navedenih država). Ta prosječna starost se grubo podudara sa očekivanim životnim vijekom. Drugim riječima, većina Covid-19 umrlih je u životnom dobu kada se uglavnom svakako umire — ta činjenica, kombinovana sa opširnom definicijom Covid-19 preminulog može rezultirati u vrlo razvučenoj i nepouzdanoj statistici.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*SlRJPSlRxPkYSs3RSioHNw.png" /><figcaption>Izvor: wodarg.com</figcaption></figure><p>Da bi se pouzdanije saznalo ko stvarno umire od Covid-19, zar se najdirektniji odgovor ne može dobiti ako se pregledaju sami preminuli? Njemački <em>Robert Koh Institut </em>(RKI) je javno uputio medicinare da ne obduciraju tijela preminulih Covid-19 pacijenata zbog opasnosti infekcije. Profesor pravne medicine Klaus Püschel iz Hamburga smatra to pogrešnim i uprkos tome j<a href="https://www.focus.de/gesundheit/news/er-obduziert-hamburger-corona-tote-alle-denken-killervirus-rechtsmediziner-genervt-von-stellenwert-der-todeszahlen_id_12036203.html">e do 27. maja obducirao preko 200 preminulih Covid-19 pacijenata</a> i kod gotovo svakog preminulog pronašao brojne komorbiditete koji su ukazivali na to da bi ti pacijenti bez obzira na Covid-19 nažalost svakako preminuli u skorije vrijeme. Püschel smatra strah i trenutni uticaj virusa na naše živote apsolutno nesrazmjernim opasnošću koja iz njega proizilazi, <a href="https://www.youtube.com/watch?v=170lOpoIu-k">govoreći da ovo definitivno nije „virus-ubica“</a>.</p><p><strong>Zaraznost i stopa smrtnosti</strong></p><p>Iako gore pomenuti podaci upućuju na to da je veoma malo Covid-19 pacijenata kojima život svakako nije bio ugrožen, potrebno je uzeti u obzir koliko je ljudi uopšte zaraženo virusom da bi se njegova opasnost, koja uključuje i stopu smrtnosti, objektivnije procijenila. U martu se smatralo da se korona virus tek tada počeo širiti u populaciji, međutim, ograničeni kapaciteti za testiranje, isključivo testiranje ozbiljno oboljelih, činjenica da mnogi zaraženi uopšte nemaju simptome (što tada nije bilo poznato), kao i pronalasci sekvence virusa <a href="https://medicalxpress.com/news/2020-06-virus-italy-december.html">u uzorcima otpadnih voda iz decembra 2019. u Italiji</a> ili u <a href="https://www.ub.edu/web/ub/en/menu_eines/noticies/2020/06/042.html#:~:text=This%20chronology%20on%20the%20evolution,collected%20in%20March%2012%2C%202019.">uzorcima iz Španije koji datiraju čak od marta 2019</a>. ukazuju na to da se virus vjerovatno mnogo ranije proširio po svijetu. Uostalom, sasvim je zdravorazumno očekivati da je pravi broj zaraženih mnogo veći od zvaničnog jer imati virus i biti evidentiran su dvije različite stvari.</p><p>Još na početku ovog članka pomenuti John Ioannidis je zajedno sa kolegama 3. i 4. aprila 2020. testirao jedan dio stanovništva Santa Klare u Kalofirniji na prisutnost antitijela. <a href="https://www.medrxiv.org/content/10.1101/2020.04.14.20062463v2">I</a>straživanje je pokazalo da je broj zaraženih SARS-CoV-2 virusom u tom regionu znatno veći od zvaničnog broja zaraženih (možda čak i <strong>50 puta </strong>veći), ukazujući na značajan broj asimptomatičnih ili blago simptomatičnih slučajeva, što se naravno direktno odražava na stopu smrtnosti, jer time broj umrlih postaje manji u odnosu na broj sveukupno zaraženih, dovodeći stopu smrtnosti <a href="https://www.medrxiv.org/content/medrxiv/early/2020/06/08/2020.05.13.20101253.full.pdf">na vrijednost uporedivu sa tipičnom sezonskom gripom tj. oko 0.2%</a>. Takođe kritikuje drakonske mjere masovne izolacije i karantina bez čvrste osnove i podataka, <a href="https://www.youtube.com/watch?v=jGUgrEfSgaU&amp;feature=youtu.be%C5%BE">ukazujući da bi kolateralna šteta sprovedenih mjera mogla biti znatno opasnija od samog virusa</a>. Između ostalog, Ioannidis pominje i već od ranije poznatu pojavu da na svaki procenat porasta nezaposlenosti slijedi i procenat porasta samoubistava. Ioannidis naglašava da korona virus jeste stvaran problem, ali daleko od apokaliptičnog ubice kojim ga većina ljudi smatra.</p><p><a href="https://www.nature.com/articles/d41586-020-00885-w">Među putnicima broda <em>Diamond Princess </em>se SARS-CoV-2 raširio</a> i uprkos velikom broju ljudi koji su uglavnom prebivali u zatvorenom prostoru (njih 3711) se samo 700 zarazilo odnosno oko 19%. Oko 18% zaraženih nije uopšte imalo simptome, dok je stopa smrtnosti iznosila 1%. Ta stopa smrtnosti nije tako mala, premda je neophodno uzeti u obzir da je većina putnika bilo starije dobi . Uz to je potrebno naglasiti da i virusi klasične prehlade (koji su srodni SARS-CoV-2) mogu imati stopu smrtnosti <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2095096/">od čak 8% u staroj populacij</a>i.</p><p>Njemački virolog Hendrik Streeck je izvršio <a href="https://www.medrxiv.org/content/10.1101/2020.05.04.20090076v2.abstract">istraživanje </a>u malom gradu Gangelt, gdje je došlo do masovne zaraze SARS-CoV-2 nakon karnevala koji je održan sredinom februara. Gangelt ima oko 13000 stanovnika i zvanični podaci su govorili da je oko 3% stanovništva bilo zaraženo. Masovno testirajući na antitijela i istražujući cijele porodice u Gangeltu, Streeck i njegove kolege zaključuju da je pravi broj zaraženih u Gangeltu zapravo 5 puta veći od zvaničnog broja jer mnogi zaraženi nisu ni imali simptome te nisu ni bili testirani PCR-testom od strane nadležnih institucija. Usljed toga, Streeck i kolege procjenjuju stopu smrtnosti sa 0.36%. Što se tiče zaraznosti, Streeck smatra da se zaraze većinski dešavaju u zatvorenim prostorima, ali je uprkos tome usljed svog istraživanja uočio mnogo slučajeva gdje je jedan član porodice bio zaražen virusom dok njegovi ukućani nisu, procjenjujući šansu zaraze po osobi u domaćinstvu gdje je jedan član već zaražen na oko 40% u zavisnosti od toga koliko je ukućana. U brojnim intervjuima na njemačkoj državnoj televiziji Streeck ukazuje na to da korona virus nije toliko opasan kao što se prvobitno mislilo i da moramo naučiti živjeti s njim. <a href="https://www.youtube.com/watch?v=zx5tZ9UdQE0">Ukazuje na to da nam generalno “fali kompas“ </a>i da ne možemo tako dugotrajno ograničavati cijelokupno društvo.</p><p>U sklopu <a href="https://medicalxpress.com/news/2020-06-virus-hit-austria-resort-antibodies.html">istraživanja</a> Medicinskog univerziteta u Innsbrucku je gotovo cijelokupno stanovništvo turističkog sela Ischgl u Austriji, koje je u medijima bilo ozloglašeno kao mjesto koje je lansiralo virus svuda po Evropi, ispitano na antitijela protiv korone. 40% stanovništva posjeduje antitijela dok 80% slučajeva su imali nikakve do vrlo blage simptome.</p><p>Usljed masovne zaraze u njemačkoj mesnoj fabrici „Tönnies“ u Güterslohu je došlo do oko 2100 slučajeva zaraze. <a href="https://www.faz.net/aktuell/politik/inland/was-wurde-aus-dem-corona-ausbruch-in-guetersloh-16901964.html">Većina zaraženih nije imala nikakve simptome</a>. Ono što je zanimljivo je da ni u Ischglu, niti u Gangeltu, niti u Güterslohu nije došlo do očekivanog masovnog obolijevanja i umiranja ili kolapsa zdravstvenog sistema, baš kao i u mnogim drugim žarištima infekcija.</p><p>Sve gore navedene studije kada govore o stopi smrtnosti govore o tzv. „infection fatality rate (IFR)“ što odgovara broju umrlih u odnosu na broj zapravo zaraženih, a ne <em>poznatom</em> broju zaraženih kao što je to slučaj kod „case fatality rate (CFR)“.</p><p><strong>Tok bolesti</strong></p><p>Iz prethodnih poglavlja se jasno kristališe da veliki broj zaraženih uopšte nema simptome. Premda jednoj studiji <a href="https://www.bmj.com/content/369/bmj.m1375#:~:text=Chinese%20authorities%20began%20publishing%20daily,coronavirus%20infections%20caused%20no%20illness">80% pozitivno testiranih nema simptome</a>. Na već pomenutom brodu <em>Diamond Princess </em>je čak i među zaraženima starosti između 70 i 79 godina <a href="https://www.niid.go.jp/niid/en/2019-ncov-e/9407-covid-dp-fe-01.html">oko 60% bilo bez ikakvih simptoma</a>.</p><p>Čest argument za opasnost korone i broj teško oboljelih jeste to da je SARS-CoV-2 nov virus i da zbog toga ne postoji nikakva vrsta imuniteta u populaciji. Ne postoji čvrst naučni konsenzus o trajnosti i efikasnosti antitijela protiv SARS-CoV-2. Prethodno pomenuti virolog Streeck kao i imunolog Micheal Mine sa Harvarda govore o tome <a href="https://www.nytimes.com/2020/07/22/health/covid-antibodies-herd-immunity.html">da je povremeni gubitak antitijela sasvim normalna pojava</a> i da se dugotrajni imunitet zapravo više stiče T-ćelijama i B-limfocitima sa „memorijom“ koji po potrebi pri ponovnoj pojavi virusa u tijelu stvaraju antitijela. <a href="https://www.mwgfd.de/2020/08/covid-19-immunitaet-und-impfung-prof-dr-med-sucharit-bhakdi">Istog mišljenja je i njemački mikrobiolog tajlandskog porijekla Sucharit Bhakdi</a>, argumentujući time da je vakcinisanje protiv SARS-CoV-2 suvišno i prema tome predstavlja uzaludan rizik.</p><p>Već smo pomenuli da je upitno koliko je SARS-CoV-2 u pravom smislu riječi „nov“. Sigurno da je tek krajem 2019. godine „uočen“, ali kada se on zapravo prvi put pojavio među ljudima je i dalje upitno. Na svu sreću, određeni podaci upućuju na to da SARS-CoV-2 u svakom slučaju nije „toliko nov“, jer je srodan virusima prehlade. <a href="https://www.researchsquare.com/article/rs-35331/v1%20">Novija istraživanja </a>pokazuju da antitijela nisu jedini vid imuniteta na SARS-CoV-2, nego i takozvane T-ćelije mogu da spriječe oboljenja. Jedno istraživanje je analiziralo 185 krvnih proba koje su uzete ljudima u između 2007. i 2019. godina (dakle, prije ove pandemije). U 80% tih krvnih proba su se nalazile T-ćelije nastale usljed oboljenja drugih korona virusa (npr. prehlade) koje takođe pružaju zaštitu od Covid-19. <a href="https://www.cell.com/cell/fulltext/S0092-8674(20)30610-3">Jedna prethodna studija</a> je pronašla iste te T-ćelije u 60% slučajeva.</p><p>Međutim, ukoliko uprkos gore navedenim informacijama pojedinac i dalje oboli od SARS-CoV-2, koje simptome može da ima? Generalno, simptomi oboljenja Covid-19 su mnogobrojni i slični simptomima gripe. Uključuju bezazlene simptome kao što su kašalj, povišena tjelesna temperatura, privremeni gubitak čula mirisa, ali i veoma ozbiljna i opasna oboljenja kao što su pneumonija ili formiranje trombona. Ta ozbiljna i dugotrajna oboljenja su moguća i kod gripe, premda <a href="https://swprs.org/post-acute-covid-long-covid/">određeni podaci </a>ukazuju na to da su kod ozbiljno oboljelih od Covid-19 ta oboljenja češća i jača. Pored istraživanja, svjedoci smo brojnih medijskih dojava o ekstremnim posljedicama Covid-19 kod pojedinaca koji uključuju i srčana i moždana oštećenja .<a href="https://www.forbes.com/sites/victoriaforster/2020/07/08/brain-damage-and-hallucinations-associated-with-even-mild-covid-19-coronavirus-infection/"> Neki podaci su naročito ekscentričn</a>i, govoreći o halucinacijama sa priviđanjima majmuna i lavova.</p><p>Bez sumnje da teški Covid-19 slučajevi nažalost postoje i zaslužuju da budu dostojanstveno tretirani kao i svaki ugrožen ljudski život. Za dovođenje društveno značajnih odluka i opšteg pogleda na opasnost ovog virusa je ipak potrebno uzeti i kontekst u obzir i zapitati se: kod koliko tih slučajeva se radi o pravoj kauzalnosti (virus direktno prouzrokuje bolest), a kod koliko o korelaciji (pojedinac je bio pozitivno testiran i ima određeno oboljenje, bez informacije o tome koliko je virus doprinijeo tom oboljenju)? Da li su ti slučajevi možda podjednako česti i kod drugih čestih virusnih oboljenja npr. gripe, samo što nikada nismo toliko testirali na druge viruse kao što to sada radimo sa SARS-CoV-2 ? Rizik za opštu populaciju je sudeći po svemu i dalje jako nizak, te eventualne mjere prevencije treba fokusirati na rizične grupe umjesto na cijelokupnu populaciju.</p><p><strong>Zaključak</strong></p><p>Sudeći po prethodno prodiskutovanom sadržaju se može zaključiti da je opasnost SARS-CoV-2 virusa zapanjujuće precijenjena. Da li ovo sve znači da je SARS-CoV-2 otprilike opasan koliko i sezonska gripa? Vjerovatno. Možda i ne. Mnogo toga ukazuje na to, ali za preciznije poređenje je potrebno još podataka i istraživanja. Čak iako je to pogrešno i ako je ovaj korona virus zapravo opasniji od gripe, da li možda iz straha od smrti vršimo kolektivno samoubistvo?</p><h3><strong>Ljudski problem</strong></h3><p>Zašto vlade širom svijeta reaguju na isti način? Česta pomisao je da virus nije toliko opasan, politički lideri ne bi ovako žustro reagovali da ga suzbiju.</p><blockquote><em>Ukoliko virus nije toliko opasan, onda jedino objašnjenje za ovu situaciju je da su se sve države svijeta zavjerile protiv vlastitog stanovništva.</em></blockquote><p>Ova pomisao je bazirana na jednoj opasno pogrešnoj pretpostavci, a ta je da „oni gore“ sve znaju i prema tome ne griješe. Ukoliko griješe, to mora da je zavjera, a takvu zavjeru s toliko ljudi je skoro nemoguće organizovati. Zbog čega uprkos labavim statistikama i raznim indikatorima da korona možda ipak nije toliko opasna vlade širom svijeta reaguju tako žustro vjerovatno nećemo nikada moći na jednostavan način objasniti. Današnje čovječanstvo je komplikovanije nego ikad i „oni gore“ nisu jedna osoba, niti samo jedna grupacija, nego kompleksno isprepletan skup čitavih institucija sa različitim mišljenjima, agendama i izvjesnom stepenu nezavisnosti te je klišeisanje i nalaženje banalnih objašnjenja iracionalno. Neka velika zavjera ili nekakav đavolski plan uopšte nisu potrebni da bi se ovo desilo. Fenomeni kao što su masovna histerija, kolektivne zablude, kolektivni strah, medijski i socijalni pritisak isprepadanog stanovništva pružaju sasvim plauzibilno (ali ne obavezno i tačno) objašnjenje zašto bi se na koronu uprkos svim relativno smirujućim podacima tako dramatično reagovalo. Nije ni naročita tajna da političke, farmaceutske, finansijske pa čak i akademske institucije imaju svoje (nezavisne) interese koje sada mogu ostvariti po principu „<em>Never let a good crisis go to waste</em>“. Svako grabi svoje, čisti oportunizam. Šta od svega gore navedenog stvarno jeste pogon za ovu pandemiju, ne znam, ali mogućnosti su brojne. Uz to sve: ne treba suditi o nekoj pojavi na osnovu ljudske reakcije na istu, nego obrnuto, treba suditi o ljudskoj reakciji na osnovu same pojave (virusa)!</p><p><em>A zašto rizikovati? Zašto nije ipak bolje za svaki slučaj spriječiti nego kasnije liječiti? Šta ima veze malo prebivati kući i nositi komad platna na faci ako će to spasiti silne živote. Nije sad da se samo zbog toga se treba bojati neke diktature ili totalitarizma.</em></p><p>Da, tako je. Nije sad da je prouzrokovana jedna od najvećih ekonomskih kriza svih vremena i da su milioni, ako ne čak i do milijardu ljudi ostali bez posla. Nije sad da je gotovo cijelokupno svjetsko stanovništvo mjesecima bilo pritvoreno u svojim domovima, oronulim zgradama ili šatorima. Nije sad da su <a href="https://bjssjournals.onlinelibrary.wiley.com/doi/10.1002/bjs.11746">milionima ljudi odgođeni medicinski tretmani</a> rezultirajući i smrću od drugih mnogo opasnijih bolesti od Covid-19, sve u ime kolektivnog zdravlja i da bi se bolnice pripremile za najezdu Covid-19 oboljelih koje maltene nigdje nije ni bilo. Nije sad da je generalni mortalitet populacije u gotovo svakoj evropskoj državi porastao istog momenta <a href="https://medium.com/@JohnPospichal/questions-for-lockdown-apologists-32a9bbf2e247">baš onda kad je masovni karantin odnosno tzv. „lockdown“ uveden</a> (kakva slučajnost!). Nije sad da su ljudi toliko prestrašeni i da svakog stranca gledaju manje kao čovjeka, a više kao potencijalnu virološku opasnost. Nije sad da smo svi u strahu, bilo od virusa ili neizvijesne budućnosti, depresivni i manični. Nije sad da smo iz straha zašili maske za naša lica i da ih vlasti širom svijeta zakonski propisuju, uprkos tome <a href="https://swprs.org/face-masks-evidence/">što brdo podataka govori o tome da maska nema smisla</a> i da čak može biti i štetna. Nije sad da ne možemo da posjetimo svoje voljene koji negdje daleko žive. Nije da ionako siromašni ljudi u manje razvijenim dijelovima svijeta sada još više gladuju i umiru. Nije sad da su se osnovna ljudska prava prekršila time što je odjednom postalo prihvatljivo da policija pritvara ljude, kontroliše ih čak u njihovim vlastitim domovima i kažnjava ih jer imaju posjetu prijatelja ili člana porodice. Nije sad da je odjednom postalo čak dobro djelo pritvoriti zdrave ljude jer je neki dubiozni PCR-test bez ikakve iskazne snage dao pozitivan rezultat. Nije sad da svaka racionalna i na zvaničnim informacijama bazirana kritika sprovedenih mjera biva podmuklo nazvana „teorijom zavjere“. Nije sad da je „nauka“ o kojoj besjedi nekoliko „globalno priznatih stručnjaka“ postala nova religija. Nije sad da je upotreba tehnologije za masovno nadgledanje kao npr. <a href="https://www.faz.net/aktuell/politik/wer-die-corona-app-hat-soll-zuerst-wieder-ins-restaurant-duerfen-16759932.html">mobilne „corona-tracking“ aplikacije</a>, <a href="https://www.youtube.com/watch?v=wYsguXv_HLM">roboti</a>, <a href="https://id2020.org/">digitalne identifikacije</a> i praćenje privatnih kontakata odjednom najnormalnija stvar na cijelom svijetu, kao da Snowden, Assange, Orwell i Huxley nikada nisu postojali.</p><p>Ova globalna narušavanja ljudskih prava nas prate već mjesecima i svi se nadamo da su ona samo privremena. Ako jesu, kada će im biti kraj? Koliko dugo ćemo preživljavati, a kada ćemo živjeti? Virusa je bilo i biti će. Neki se nadaju vakcini. Vakcine same po sebi nisu loše i spašavaju mnoge živote, ali je činjenica da svaka vakcina nosi rizik koji je potreban izvagati u odnosu na prijeteću opasnost. Upitno je i da li bi vakcina funkcionisala. Politika argumentuje: „Hej, cirkuliše opasan virus od kog većina ljudi ni ne osjeti da ga ima. Evo, ubrizgat ćemo ti <a href="https://www.who.int/publications/m/item/draft-landscape-of-covid-19-candidate-vaccines">neku novu vakcinu na bazi nove DNK/RNK-tehnologije</a> koja nikad dosad nije masovno upotrijebljena na ljudima. Inače je potrebno čak i do 10–15 godina da se ispita sigurnost neke vakcine, ali mi smo to uspjeli sklepati za manje od godinu dana, opušteno. Uz to sve, vakcinu su proizvele dubiozne farmaceutske kompanije koje <a href="https://www.deadlymedicines.dk/">redovno isplaćaju gigantske milionske kazne zbog korupcije, lažiranja istraživanja, zataškivanja nuspojava ili čak i indirektnog ubistva</a>. Garantujemo, nećemo nikoga tjerati da je primi, ali je upitno gdje ćeš moći raditi ili putovati bez nje.“</p><p>Gdje onda povlačimo crtu? Neki su je već povukli, organizovali demonstracije i javno izrazili svoje nezadovoljstvo, ne samo nerazjašnjenim mjerama suzbijanja korone, nego i zloupotrebom iste od strane politike. Baš kao i u svakoj grupaciji, naravno da se i među kritičarima nađe neki tzv. “teoretičar zavjere” ili neko “neodgovaran” i “pogrešno informisan”. Problem je što se trenutno gotovo svako mišljenje o pandemiji koje se ne podudara sa opšteprihvaćenim etiketira na taj način. Na kraju krajeva, i da svi kritičari stvarno jesu “teoretičari zavjere” (a nisu), da li su oni samim time zli ljudi koje treba ućutkati cenzurom ili pripisivanjem kojekakvih šugavih epiteta? Mnogi od tih ljudi su istinski zabrinuti, baš kao što je zabrinut svako ko se boji virusa i podržava sve mjere prevencije. Diskusija oko pandemije se u svijetu se sve više polarizuje. Politika i mediji su dodatni pogon za taj konflikt, šireći rascjep između navodno “dobrih” i navodno “loših” ljudi.</p><blockquote>“Granica između dobra i zla ne prolazi granicama država, rasa ili ideologija, nego kroz svako ljudsko srce.“<br>- Aleksandar Solženjicin</blockquote><p>Licemjerje svjetske politike i medija se kristalno jasno oslikava u tome da su „Black lives matter“ protesti gotovo širom svijeta bili dopušteni i čak podržani od strane politike i medija. Bez obzira na to kakvo mišljenje neko ima o samom motivu za te konkretne proteste, može li iko objasniti zbog čega su ti protesti sa epidemiološke tačke gledišta prihvatljivi, a drugi vidovi okupljanja nisu?<br>McDonald’s, Coca-Cola i proizvođači alkohola i dalje nesmetano lijepe svoje plakate u svakom velegradu. Masovne kampanje za širenje svijesti o zdravoj ishrani, manjku stresa i borbi protiv gojaznosti su gotovo nepostojane, dok su cigarete i narkotici dostupni na svakom čošku, a vlasti se sad odjednom tako brinu za zdravlje populacije dok s nevjerovatnom efikasnošću sve čine da ovu relativno gledano malu opasnost suzbiju po svaku cijenu, pa čak i cijenu slobode, sve u ime zdravljai nekakve opšte dobrobiti.</p><p>Vrijeme prolazi, a mi se na svako ograničenje slobode polako povremeno navikavamo i otupljujemo na isto. Tu crtu koja ne smije da bude pređena pomijeramo sve dalje i dalje.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e08300f5256" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A few handy Vue.js tricks]]></title>
            <link>https://itnext.io/a-few-handy-vue-js-tricks-832703cff426?source=rss-1ccb32e0e071------2</link>
            <guid isPermaLink="false">https://medium.com/p/832703cff426</guid>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[vuejs-2]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[MZ]]></dc:creator>
            <pubDate>Sun, 08 Sep 2019 11:39:10 GMT</pubDate>
            <atom:updated>2019-09-25T18:59:06.429Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Yl5Hfqn5bhq1en0OcZsTA.jpeg" /></figure><h3><strong>1. Forwarding all props of a parent component to a child component</strong></h3><p>If you are a Vue.js developer, at some point you will surely be writing a component which is merely “wrapped” around another component. A so-called <strong>wrapper component </strong>will often be accepting all props that the component which it wraps also accepts. You would then want to “forward” those props to the wrapped component. Instead of doing this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa588e07dd5e496863d2f37715142887/href">https://medium.com/media/fa588e07dd5e496863d2f37715142887/href</a></iframe><p>you can simply forward all of the props of the wrapper component at once by doing this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ca5c8bc5efa572b55211179c543bb40/href">https://medium.com/media/4ca5c8bc5efa572b55211179c543bb40/href</a></iframe><h3><strong>2. Ensuring two components accept the same props</strong></h3><p>This trick can be powerfully combined with Trick #1. Now that it’s known how to forward all props to a wrapped component, one might wonder how to make sure that the wrapper component accepts the same props as the wrapped component in the first place. In the wrapper component, one would most likely write something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/23d2108904d9e6395010bce5714c0297/href">https://medium.com/media/23d2108904d9e6395010bce5714c0297/href</a></iframe><p>This has some disadvantages. One of them is, if you rewrite ChildComponent and maybe add some new props, you would have to make changes in the wrapper component as well. Another disadvantage is code duplication and generally bad code aesthetics. Fortunately, there is a very simple solution to this problem:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68ae56176ffcfbd108374a44ffa2998d/href">https://medium.com/media/68ae56176ffcfbd108374a44ffa2998d/href</a></iframe><h3>3. Forwarding all event listeners of a parent component to a child component</h3><p>You do not need to do this if the child component you want to pass the event listeners to is at the root of the parent component, as it gets all the listeners per default then. However, if that is not the case, like in the following example, you can do this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8de168f2b1faea056938a511884f68ca/href">https://medium.com/media/8de168f2b1faea056938a511884f68ca/href</a></iframe><h3>4. Beautiful slot syntax</h3><p>Since Vue 2.6, there is a shorthand for slot names, just like there is for events e.g @click instead of v-on:click` . If you have a &lt;my-table&gt; component which has a slot called row, which has a slot-prop called item , you can now pass a piece of template to it and access the item prop this way:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/92c4544011dc1a09b2369fc5ef89a45a/href">https://medium.com/media/92c4544011dc1a09b2369fc5ef89a45a/href</a></iframe><h3>5. Dynamic directive arguments</h3><p>This might be the most impressive and powerful feature Vue 2.6 offers: to dynamically pass directive arguments to a component. Suppose that you have a &lt;my-button&gt; component. For some reason, sometimes you want to listen to a click event on it, but other times you want listen to dblclick . You could solve that using dynamic directives like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14c4c9409d1abd3177c2bc541b068090/href">https://medium.com/media/14c4c9409d1abd3177c2bc541b068090/href</a></iframe><p>Dynamically providing event listeners is just one of the many things you can do with this — you can apply the same pattern to dynamic HTML attributes, props and much more!</p><h3><strong>6. Dynamic image src</strong></h3><p>A frequent use case of this is when you need to display a locally stored image which path is stored in some variable or some object’s property. While there are multiple solutions to this, the one I prefer is using webpack’s require function. Suppose that in your Vue component’s data you have an object which looks like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/82a413dee9d1d61b22b8c992e3ac79b8/href">https://medium.com/media/82a413dee9d1d61b22b8c992e3ac79b8/href</a></iframe><p>The path of the image you want to display is stored in the logo property of the company object. In this example, we’ll assume that all your images of your project are in src/assets , which is where it is recommended you place your images anyway. There is also a subfolder called logos, containing a bunch of logo images. So the full path of your image in this case would be: src/assets/logos/cashmoneylogo.png.</p><p>Therefore, in the &lt;template&gt; of your component, you would create an &lt;img&gt; tag and provide the src attribute dynamically:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4409c3b32c3fe56cd3b9b2d24f1d7fca/href">https://medium.com/media/4409c3b32c3fe56cd3b9b2d24f1d7fca/href</a></iframe><p>A few things to consider here:</p><ul><li>The string path passed to the require function is a <strong>ES6 template string with backticks (`…`). </strong>This way, you can put in a variable neatly using ${...} instead of concatenating using the + operator.</li><li>The <a href="https://webpack.js.org/api/module-methods/">require function</a> will<strong> not </strong>work with a path that is purely dynamic<strong>, </strong>as webpack needs to know which files to bundle already at compile time. You need to provide a partially static path expression. Webpack will then bundle all files which <em>potentially </em>match that expression*. This is why the @/assets/logos part is hard-coded in our example. By the way, the @ essentially means “relative to the src folder”. You can use it no matter where the file you’re typing that is and I’d strongly recommend using it instead of declaring ugly paths in relative form such as ./../../../ . Another advantage: if you later decide to move your file somewhere else, the path using @will still remain valid.</li></ul><p>*<em> Note: This could impact performance if there are a lot of files which match the path expression you provided. If that is the case, make sure your path expression is as narrowly defined as possible or look up possible optimizations offered by Webpack.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=832703cff426" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/a-few-handy-vue-js-tricks-832703cff426">A few handy Vue.js tricks</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How the Internet works in a nutshell]]></title>
            <link>https://medium.com/@infectoone/how-the-internet-works-in-a-nutshell-a7431ef125d1?source=rss-1ccb32e0e071------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7431ef125d1</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[network-protocols]]></category>
            <dc:creator><![CDATA[MZ]]></dc:creator>
            <pubDate>Tue, 26 Feb 2019 08:44:24 GMT</pubDate>
            <atom:updated>2019-08-20T16:32:28.706Z</atom:updated>
            <content:encoded><![CDATA[<p>The Internet is intimidatingly complicated. The ideas behind the numerous buzzword networking acronyms such as HTTP, DHCP, IP, TCP are overwhelming and headache-inducing. What do they mean and how does it all fit in the bigger picture?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3rwP8djmrFM_iIiW" /><figcaption>Photo by <a href="https://unsplash.com/@dnevozhai?utm_source=medium&amp;utm_medium=referral">Denys Nevozhai</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Consider human civilization — a true systematic chaos, far too complicated to be entirely comprehended by a single person. But that is not necessary. You, as an individual, solely need to play <em>your </em>role, other individuals <em>theirs </em>and the interconnection of those roles makes up civilization. Let us approach the Internet the same way. We shall recognize distinct layers of functionality which are small enough to be understood and see how they interact and what role they play in a everyday action we almost consider trivial — loading a website!</p><h3><strong>The Layers of the Internet</strong></h3><p>In a nutshell, the Internet is a communication network. Therefore, the basic and most fundamental service offered by the internet is sending a piece of information e.g. a textual message or a file from sender A to recepient B. This service is a complex multi-step process which can be separated into <strong>layers. </strong><br>The layers of the internet are not literally something physical —<strong> they are abstract logical layers. </strong>They make up a model which makes the Internet easily comprehendible and managable.</p><p>This article is based on a <a href="https://www.pearson.com/us/higher-education/program/Kurose-Computer-Networking-A-Top-Down-Approach-7th-Edition/PGM1101673.html">excellent classic computer networking book by Kurose and Ross,</a> which I’d strongly recommed if you wish to dive more into the details. The book is used worldwide by lecturers on universities and it does not take too much preknowledge to understand the content. The model used in the book consists of the following layers:</p><ul><li><strong>Application Layer</strong></li><li><strong>Transport Layer</strong></li><li><strong>Network Layer</strong></li><li><strong>Link Layer</strong></li><li><strong>Physical Layer</strong></li></ul><p>The ordering of the layers is significant — each layer offers a certain service and relies on the services of the layers underneath for that. Every layer has its own <strong>protocols</strong>.<strong> A protocol is nothing but a set of communication rules </strong>(what is the format of a message, when is it being sent etc.). Internet protocols work analogous to real-life human protocols such as greeting people, speaking when spoken to, not interrupting others while they speak and so on. All the acronyms I have mentioned in the first section refer to protocols.</p><h3><strong>Application Layer</strong></h3><p>As the name suggests, this layer is responsible for communication on application-level only. Concretely, when loading a website, the two applications participating in the communication are:</p><ul><li>the <strong>client </strong>(your web browser, e.g. Firefox)</li><li>the <strong>server </strong>(the server app running on some remote device where the website is stored, e.g Apache Tomcat)</li></ul><p>A website is fundamentally nothing else but a textual file in HTML format. Your client obtains that file, by asking the server for it. Then, the client parses the HTML file and represents it visually for you.</p><p>How does the client ask the server for the file? The protocol being used is the <strong>HTTP (Hypertext Transfer Protocol):</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uY7K-TUY-_Q6oLbohyTk4Q.jpeg" /><figcaption>A simplified representation of the application layer. The client sends a HTTP file request and gets a HTTP response from the server</figcaption></figure><p><strong>DNS — How to find out where to send the message</strong></p><p>You might be wondering, how does Firefox know to whom to send that HTTP message in the first place? When you want to load e.g. <a href="http://www.medium.com,/">www.medium.com,</a> how does Firefox know to whom it should send the request? Devices on the internet are uniquely (at least in theory) identified with <strong>IP addresses </strong><em>(about which we will talk about more in the Network Layer section)</em><strong>,</strong> which are analogous to telephone numbers. When you type in the URL <a href="http://www.medium.com,/">www.medium.com,</a> a <strong>local DNS server (Domain Name System)</strong> maps the URL to the corresponding IP address and sends that address back to Firefox (just like a telephone book!). Your interaction with the local DNS Server is usually already pre-configured by your internet provider. If the local DNS server does not have the corresponding entry in its database, it will query other DNS servers. In a nutshell, the DNS database is a distributed database.</p><p>To sum it all up: The application layer implements the application-level communication, taking place in your browser. The most prominent protocols used are <strong>HTTP </strong>and <strong>DNS</strong>. There are many more of them, such as <strong>FTP </strong>(used for direct file transfer) or <strong>SMTP </strong>(for emails).</p><h3><strong>Transport Layer</strong></h3><p>A <strong>process </strong>is the computer science term for a running application. Our two <em>processes </em>(Firefox and the server) run on two distinct devices (a.k.a. <strong>hosts</strong>), maybe with thousands kilometers of distance between them. The application layer is blissfully unaware of that and treats it all as a “blackbox”, as “the layers below” take care of that anyways. But we are very well aware that a <em>lot</em> happens under the hood.</p><p>The transport layer is mainly concerned with the following two problems:</p><ul><li><strong>Problem #1</strong>: A single host can run multiple apps simultaneously (e.g. you have Firefox running on your laptop but at the same time, you may play an online game in another window). Let’s assume that the two communicating devices are magically connected together (by the way, the network layer takes care of that). You would still need to make sure that the HTTP message you are sending reaches the <em>correct process </em>at the recepient. You don’t want your HTTP request to end up being recieved by a World of Warcraft process.</li><li><strong>Problem #2:</strong> The two communicating devices are everything else but magically connected. We rely on an unreliable network layer for that. The data could be lost or corrupted while travelling through all these cables.</li></ul><p><strong>Solution to Problem#1</strong>: A<strong> port number</strong> is essentially an identifier which distinguishes a process from other running processes. So, yes, we also need <strong>encapsulate our HTTP message</strong> in a message which contains the source and destination port number. An open connection associated with a port number is called a <strong>socket</strong>.</p><p><strong>Solution to Problem #2:</strong> The data being sent is separated into smaller <strong>chunks </strong>and those chunks are sent out successively. For every correctly recieved chunk, the recepient has to send the sender a response, saying “Yes, I recieved this chunk correctly. You can now send the next one”. Those are so-called <strong>ACK (acknowledgement)</strong> messages. Transport layer protocols also attach <strong>sequence numbers</strong> to the chunks they send, so that the recepient may re-order them upon recieving them and drop eventual duplicate chunks. On the sender’s side, a <strong>timer </strong>is used for every chunk sent. If a timeout happens before an ACK is recieved, the sender assumes that the chunk was lost and resends it.</p><p>The two prominent transport layer protocols are known as<strong> UDP </strong>and <strong>TCP.</strong></p><p><strong>UDP </strong>is a simple no-frills protocol, which does not even care about the problem #2. It just adds the source and destination port number to our HTTP message and that’s it. That’s why loss-tolerant apps with high speed requirements such as video-streaming apps often rely on UDP.</p><p><strong>TCP</strong> is much more sophisticated<strong>, </strong>it uses the aforementioned ACK messages and even reacts to problems such as network congestion. Loading websites is certainly not loss-tolerant, so we use TCP for that purpose.</p><p>To sum it all up: The transport layer implements the <strong>process-to-process communication </strong>while relying on the underlying network layer, which implementes the<strong> host-to-host </strong>communication. The issue is solved using ports. <strong>UDP </strong>is as simple as a transport layer protocol can be. <strong>TCP </strong>is more sophisticated and uses ACKs, congestion control mechanisms etc.</p><h3><strong>Network layer</strong></h3><p>We already discusses in the Transport Layer section how data reaches the correct application process, once it arrives at the destination host. But well…how does it reach the destination host in the first place?</p><p>A port to a host is like a door to a house. A port is identified with a port number, while hosts are identified using <strong>IP addresses</strong> and the protocol used for <strong>host-to-host communication </strong>in the Internet is the prominent<strong> IP (Internet Protocol).</strong></p><p>For obvious reasons, your device is not physically directly connected to every possible IP address in the world. The data you send usually goes through numerous intermediary interconnected devices, also known as <strong>routers</strong>. Routers have a bunch of input/outpot ports (at least 2, of course) and have a distinct IP address for every input/output port.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-rYxRavHBHmrsTUQTsfcgQ.jpeg" /><figcaption>A simplified representation of the network layer. Notice how the routers have distinct IP addresses for every input/output port and how the IP address of “your device” somewhat overlaps with the nearest router’s IP. That is essentially what defines a subnet.</figcaption></figure><p>So yes, you have your HTTP message, you encapsulated that in a transport layer TCP message by adding port numbers to it and some other fancy stuff. Now, you encapsulate that packet even deeper by appending the source and destination IP address and some other infos, all of it resulting in an <strong>IP datagram</strong> that you just push out in the outer world. The nearest router recieves the datagram and does…what? It inspects the datagram by looking at the destination IP address and <strong>checking to which output port it should forward the datagram</strong>. Another router recieves the datagram and the same process is repeated over and over until the datagram finally reaches its destination (the server).</p><p>Routers do the forwarding using their own <strong>forwarding tables</strong>. Those tables are nothing else but pairs, which say “forward all datagrams with an IP destination addresses starting with xxx.xxx…. to output port X”. The routers themselves configure the forwarding tables automatically by constantly sharing messages among themselves and using various <strong>routing algorithms</strong>.</p><p><strong>IPv4 </strong>addresses are 32-bit numbers usually represented in decimal-dot notation (four numbers ranging from 0 to 255, e.g. 128.13.7.212). That means, IPv4 offers a pool of 2³² (around 4 billion) distinct addresses. Does not sound like too much, considering the rapid expansion of the Internet. The lack of addresses is solved by switching to <strong>IPv6 </strong>which expands the address pool by using 128-bit addresses. A dirtier (but nevertheless widespread) solution is <strong>NAT (Network Address Translation)</strong>. In simple terms, this is the idea of your device having an IP address, which is not <em>universally </em>unique, but it is unique inside the <strong>subnet </strong>(<em>a smaller network inside a network, identified with a mutual IP-prefix</em>, <em>a so-called </em><strong><em>subnet mask</em></strong>) you reside in (e.g. in your home network, you may have the address 123.123.123.123 but your router may translate that address to some other when sending data to the outside world).</p><h3><strong>Link layer</strong></h3><p>So, in order to send data from source to destination, our data packets must pass through multiple intermediary routers. The network layer implements the solutions to that. But how are two adjacent routers connected? Or how is your device locally connected to your router at home? That is where the link layer comes in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CegzmbVgYjFjfHVr" /><figcaption>An ethernet cable. Photo by <a href="https://unsplash.com/@rawpixel?utm_source=medium&amp;utm_medium=referral">rawpixel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>There are many ways in which the devices may be interconnected. The most straightforward is obviously a direct physical connection, like a cable. The link layer protocol used in this case is usually the prominent <strong>Ethernet 802.3 </strong>protocol. You have probably heard about <strong>ethernet cables</strong>, too. Those cables consist of twisted-pair copper wires or sometimes even fiber optics, which implies that the Ethernet protocol also covers a bit of the underlying Physical Layer.</p><p>You most likely have a WLAN router at your home. Obviously, a different type of protocol is needed in this case, as other problems arise (e.g. signal loss weakness due to some physical obstacle a.k.a<em> the hidden terminal problem</em>). For those purposes, the<strong> WLAN 802.11</strong> protocol is used.</p><p>In addition to an IP address, devices have a link layer address called <strong>MAC address. </strong>Unlike the IP address, which is <em>hierarchical </em>and changes depend on the router/local network you are connected to, a MAC address is constant, has a flat hierarchy and is <em>universally unique </em>(in theory, at least). The MAC address is hardware-intergrated into your device, in your <strong>Network Interface Card (NIC)</strong> to be more exact. Unlike routers, <strong>hubs and switches</strong> are link layer devices which are used for transfering data inside a local network. They primarily work with MAC addresses instead of IP addresses, though the terminology is often chaotically mixed up and even some devices are hybrid, offering both link layer AND network layer services.</p><p>All the aforementioned protocols, addresses and mechanisms are especially significant if multiple devices share the same link among themselves, e.g. when using WiFi. If multiple devices try to send data over the link at the same time, collisions and data corruption may occur. The respective link layer protocols handle those problems in various ways.</p><h3>Physical Layer</h3><p>This layer is not officially part of the<a href="https://en.wikipedia.org/wiki/Internet_protocol_suite"> Internet protocol suite</a>, but we will shortly mention, how this layer is obviously the first one which deals with something actually physical — not logical packets, but actual bits and their physical transfer. Bits can be physically represented in various ways, depending on the type of medium used. The most common cases are electric impulses, where a weak impulse represents a “0” whereas a strong impulse represents a “1”. Light impulses are used if the medium is fiber optics.</p><h3>Summary</h3><p>As expected, this article is somewhat of an oversimplification of how the Internet works, but it is nevertheless more than sufficient for giving you a general idea of how it all works.</p><p>The article didn’t cover too many details of the aforementioned protocols. For those who would like to know what the exact format of a HTTP message looks like or how TCP makes sure the recepient recieves all data chunks correctly, I strongly recommend the book by Kurose &amp; Ross.</p><p>Besides that, there is surely a vast amount of free literature on the Internet, where you can learn about… well, the Internet, instead of spending hours of research in libraries or book stores. Raw knowledge and power, right on the tips of your fingers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7431ef125d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Everything you’ve been doing your whole life is wrong — here’s why]]></title>
            <link>https://medium.com/@infectoone/everything-youve-been-doing-your-whole-life-is-wrong-here-s-why-def2c56ac4f4?source=rss-1ccb32e0e071------2</link>
            <guid isPermaLink="false">https://medium.com/p/def2c56ac4f4</guid>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[productivity-hacks]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[lifehacks]]></category>
            <dc:creator><![CDATA[MZ]]></dc:creator>
            <pubDate>Mon, 19 Nov 2018 22:00:13 GMT</pubDate>
            <atom:updated>2018-11-19T22:15:49.711Z</atom:updated>
            <content:encoded><![CDATA[<h3>Everything you’ve been doing your whole life is wrong — here’s why</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_WGLXrYjCH2_NNbPVnbpbQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/8rj4sz9YLCI?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Mathew Schwartz</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>We, as humans beings, rely heavily on empirism. The external stimuli which we percieve using our five senses, plus the way we categorize and logically process those stimuli might be a fitting definition of “experience”. As a byproduct of experience, we develop mechanisms for coping with problems we face in our surroundings. It appears to function properly, most of the time. However, that does not necessarily guarantee we won’t face a problem which is located out of reach of our five senses and our logical system. This raises the question: is there a reality beyond our senses?</p><blockquote><strong>Hmmmm……….. I don’t know, man.</strong></blockquote><p>This basically implies, that you don’t know anything. Most people do things in life totally normally and rationally, but what most people fail to realize is <strong>that they are pretty fucking stupid, while I, some petty Medium-writer, your life coach and productivity guru, am much smarter than they are. </strong>You, as being LE TRVE INTELLECTUAL by clicking on this <strong>totally-not-clickbait</strong> article are most likely not that stupid, but you still need to learn a lot from me. Have no worries, I will explain everything, while you listen, with your jaw dropped so that you can swallow this enlightment:</p><blockquote>You have been doing everything wrong your whole life.</blockquote><p>Yes, you read that correctly. Here’s why it be like that:</p><p>Suppose you face <em>Problem X </em>in your life. What most people do in that situation is: they apply <em>Solution Y</em>. Even though <em>Solution Y</em> intuitively appears to be logically flawless and totally OK and really is like that, it actually isn’t! People tend to overlook the <em>Flaw Z</em> which only I can see, as <strong>I am a very wise sage who uses his snow-white beard as a sleeping bag. </strong>Acknowledging the existence of<em> Flaw Z </em>might even be <strong>the one and only universal solution to all problems of mankind</strong>, but most people do not realize that, <strong>because they are very low IQ individuals. </strong>But now that I have shared my secret with you, you may go on and improve your own life. You may transcend to the next level of existence and make further progress <strong>on your way to become a divine entity and grab God himself by his astronomically massive spacetime-bending penis</strong>. Or, if you try hard enough — you might even proceed beyond that and become like me. I just know things and that is why you should care and why you should listen to me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=def2c56ac4f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All-inclusive Vue.js beginner tutorial — building a converter app]]></title>
            <link>https://medium.com/@infectoone/all-inclusive-vue-js-beginner-tutorial-building-a-converter-app-db28fcf5583e?source=rss-1ccb32e0e071------2</link>
            <guid isPermaLink="false">https://medium.com/p/db28fcf5583e</guid>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[MZ]]></dc:creator>
            <pubDate>Sun, 09 Sep 2018 21:09:11 GMT</pubDate>
            <atom:updated>2018-09-13T19:02:22.603Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0Rj1EhS4Nwe1h2TZyyRyA.png" /><figcaption>The converter app which you will be building in this tutorial. Complete code available on GitHub : <a href="https://github.com/InfectoOne/Vue-Converter-Example-App">https://github.com/InfectoOne/Vue-Converter-Example-App</a></figcaption></figure><p>Let’s just get straight to the point, without philosophizing about Vue.js and making vague statements about its concepts, powers, scalability and blah blah blah. The fact is: you <strong>want to learn Vue.js</strong> <strong>now </strong>and you want to <strong>see it in action.</strong> Understanding the underlying philosophy of a development tool is a necessity for every <em>wise</em> software developer, but starting off by reading a bunch of theory doesn’t really ignite a fire of motivation. Obtaining some intuition beforehand does though. The idea of <em>this </em>article is to help beginners quickly grasp the basic Vue.js concepts “on-the-go” while building an actual app, while experienced developers may use it as a cheat-sheet or to revise their knowledge.</p><h4>Objectives of this tutorial:</h4><ul><li>build a simple converter app</li><li>learn how to start a new project using vue-cli</li><li>provide a step-by-step explanation while minimizing relying on prerequired knowledge*</li><li>explain all basic vue concepts such as <em>components, directives, computed properties, props</em> and see how to use them in our converter app</li></ul><p><em>*the only requirements for this tutorial would be the basics of HTML, CSS, Javascript and basic usage of the terminal</em></p><h3><strong>1. Initializing a new project</strong></h3><p>First of all, <a href="https://nodejs.org/en/download/">install Node.js</a> on your device. Node.js is a server-side platform on which your app will run, but you don’t need to know much about it for this tutorial. What we actually need is <strong>NPM</strong>, which gets installed alongside Node.js. NPM is a package manager — in other words, a program for downloading and managing modules (<em>module = basically, a bundle of code files, a fragment of software </em>). We will use NPM to install <strong>vue-cli, a command-line interface for scaffolding and managing Vue.js apps. </strong>Now, open up your terminal and proceed with the following instructions:</p><ul><li>having installed <em>Node.js</em>, install <em>vue-cli</em> by running the following command: npm install -g @vue/cli</li><li>now, go the folder where you’d like to create your project and run the following command: vue create my-converter</li><li>for the sake of simplicity, choose the default preset</li></ul><p>DAYUMN! You have just created the foundation for your app! And we’re just getting started…</p><p>Switch to the newly created folder in your terminal (cd vue-converter on Windows), run the command npm run serve and finally (don’t close the terminal), open <a href="http://localhost:8080/">http://localhost:8080/</a> in your favorite web browser. What you should see is the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NlCB2lBKKeUGruvhoi-47Q.png" /><figcaption>The pre-generated stuff in your app. We will completely replace this with our own code later on.</figcaption></figure><p>Keep your browser open. We’re about to start coding, my friend!</p><h3><strong>2. Vue Components</strong></h3><p>Grab your favorite text editor <em>(mine is </em><a href="https://code.visualstudio.com/"><em>Visual Studio Code</em></a><em>)</em> and open the folder of your newly created project. Check out the project strucutre.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*JilMOqSfkoeb3UlZ39Upzg.png" /><figcaption>Structure of your new project</figcaption></figure><p>The only relevant folder for this tutorial is the <em>src </em>folder and it’s generally the folder where you will be doing something 90% of the time. Notice the <em>components</em> folder and the files with the <em>.vue</em> extension. Those are <em>Single-File-Components</em>. <strong>Components are decoupled fragments of your app responsible for a single task<em>.</em> </strong>Every component may have its own variables, template, styling etc. In other words - <strong>components are the building bricks of your app</strong>. They are relatively isolated from each other, but Vue offers certain means of communication between them. There can be a hierarchy between them, too (one component may include some other).The philosophy behind it is <em>divide and conque</em>r — splitting your app into separate components enhances readability, maintanance and reusability.</p><p>The skeleton of every vue components consists of the following:</p><ul><li>&lt;template&gt; : it’s where you write your HTML</li><li>&lt;script&gt; : where you write your javascript</li><li>&lt;style&gt; : where you write your CSS</li></ul><p>That means, all three things are neatly bundled in a single .vue file. The starting point of your app is the <em>App.vue </em>component. It will include and display all the other components. Let’s delete everything inside of it except the &lt;template&gt;, &lt;script&gt; and &lt;style&gt; opening and closing tags.</p><p>Finally, we will start coding. A little hint before that : check out your browser again — the app has been updated (it’s blank) even though you didn’t refresh the page! DAYUMN! This happens thanks to something called <em>hot-reloading.</em></p><h3><strong>3. Creating our components — navbar and converter</strong></h3><p>Take a look at the screenshot of our app (at the beginning of this article). In what logical components could we split up our app? It makes sense to have the following 3 components:</p><ul><li><strong>Navbar </strong>— a component for the vertical navigation bar, where the user can pick his desired physical quantity (length, time, temperature)</li><li><strong>Converter </strong>— a component where the user can choose units and do the actual conversion</li><li><strong>App.vue </strong>— this one we already have and it’s pretty much obligatory. This will be the “boss” component, containing and synchronising the other two.</li></ul><p>Let’s start! In the <em>components </em>folder, create two files: <em>Navbar.vue </em>and <em>Converter.vue </em>and write the empty &lt;template&gt;, &lt;script&gt; and &lt;style&gt;tags inside them. We will start with coding the navbar.</p><h4><strong>3.1 Navbar.vue</strong></h4><p>Starting off with the &lt;template&gt; part: create a &lt;div&gt; element which will be the parent element wrapping all of the other elements. To be more exact, every &lt;template&gt; MUST have just one direct child element. Now create three &lt;a&gt; elements for length, time and temperature:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f87814f32f1607417ac8256e4e5190c/href">https://medium.com/media/6f87814f32f1607417ac8256e4e5190c/href</a></iframe><p>Moving on to the script tag to write some javascript. Write this inside the script tag:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ae4026a9c017a5882748ab8dac35309a/href">https://medium.com/media/ae4026a9c017a5882748ab8dac35309a/href</a></iframe><p>data() is a function which returns a plain javascript object where you declare your component’s variables. We have declared len, temp, time . Replace the hardcoded text in the &lt;a&gt; elements with the respective variables: replace &lt;a&gt;Length&lt;/a&gt; with &lt;a&gt;{{len}}&lt;/a&gt; and so on. Your template-tag should now look like this:</p><pre>&lt;template&gt;         <br>   &lt;div id=&quot;nav&quot;&gt;      <br>         &lt;a&gt; {{len}} &lt;/a&gt;      <br>         &lt;a&gt; {{temp}} &lt;/a&gt;   <br>         &lt;a&gt; {{time}} &lt;/a&gt;                 <br>   &lt;/div&gt;                       <br>&lt;/template&gt;</pre><p>Take a look at your app in the browser: at first it seems as if nothing changed at all. You might wonder what advantage we got from doing. The crucial difference is, that the text values <em>Length</em>, <em>Time</em> and <em>Temperature </em>are not statically displayed anymore. They are dynamic — if we were to change the value of len e.g. by triggering some function, the<strong> displayed text would be updated immediately</strong>! That’s called <strong>data binding </strong>or <strong>interpolation </strong>and that syntax with the curly braces is called “<strong>Mustache</strong>” syntax. DAYUMN!</p><p>Now we will make the code even more elegant: instead of having three separate&lt;a&gt; tags, let’s declare an array of physical quantities and dynamically display &lt;a&gt; tags accordingly. Inside data(), create an array called quantities. Also, we won’t directly use strings like “<em>Length</em>”. Instead, the array will contain <em>objects</em>. An object will represent a physical quantity and contain its <em>name </em>and <em>units</em>. The <em>name </em>will be the actual string which we will display. Proceed with making those changes. data() should now look like this:</p><pre>data(){<br>  return{<br>    quantities: [  <br>       {name:&quot;Length&quot;, units:[&quot;mm&quot;,&quot;cm&quot;,&quot;m&quot;]},</pre><pre>       {name:&quot;Temperature&quot;, units:[&quot;C&quot;,&quot;K&quot;,&quot;F&quot;]},</pre><pre>       {name:&quot;Time&quot;, units:[&quot;s&quot;,&quot;min&quot;,&quot;h&quot;]}</pre><pre>     ]<br>   }<br>},</pre><p>How are we going to display these? Of course, we could make three separate &lt;a&gt; tags again, but there is a more elegant generic solution. Remove those three &lt;a&gt; tags and replace them with the following:</p><pre>&lt;a v-for=&quot;quantity in quantities&quot; <br>   v-bind:key=&quot;quantity.name&quot; <br>   @click=&quot;$emit(&#39;select-quantity&#39;,quantity)&quot; &gt;</pre><pre>    {{quantity.name}}</pre><pre>&lt;/a&gt;</pre><p>What’s new? The v-for you see is called a <strong>directive</strong>. Directives are something like vue-specific attributes of HTML elements. Our v-for iterates the quantities array and generates an &lt;a&gt; tag for every element inside the array , displaying its <em>name </em>attribute : {{quantity.name}}</p><p>The elements need to be uniquely identifiable. That’s what v-bind:keyis for.</p><p>What about @click=&quot;$emit(&#39;select-quantity&#39;, quantity)&quot;? Obviously, when the user clicks on e.g. <em>Length</em>, we need to let the other components know what the user has clicked on. We will do that using <strong>custom events — </strong>one of the basic means of communication between vue components. Here in our case: when the user clicks on one of the &lt;a&gt; tags, we emit a <strong>custom event </strong>which<strong> </strong>we named &#39;select-quantity&#39; and pass the corresponding physical quantity object. That event will be caught and reacted to in the App.vue component later on. But for now, spice the Navbar.vue component up with some CSS and you’re done.</p><p>Full code of the Navbar.vue component can be found <a href="https://github.com/InfectoOne/Vue-Converter-Example-App/blob/master/src/components/Navbar.vue">HERE</a>.</p><h4>App.vue</h4><p>We have created the Navbar.vue component. Now we will import it to App.vue and actually display it. We will also import and display the yet-to-be-implemented Converter.vue component. Also, App.vue will contain a variable called chosenQuantity which will represent the currently chosen physical quantity. That variable should change every time the user clicks a different button in the navbar — that means, every time the previously created custom event &#39;select-quantity&#39; is emitted by the Navbar.vue component. Here’s how the code for all of that looks like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/344f2ad2f55365476689af5e041ed43f/href">https://medium.com/media/344f2ad2f55365476689af5e041ed43f/href</a></iframe><h4>3.2 Converter.vue</h4><p>Before we move on to the last component, take a look at App.vue again. In Navbar.vue we click on an &lt;a&gt; tag and that click changes the chosenQuantity variable in App.vue. Now we need to pass that variable from App.vue to Converter.vue . This line does the job:</p><pre>&lt;Converter v-bind:physicalQuantity=&quot;chosenQuantity&quot;/&gt;</pre><p>In that line, we have added the Converter.vue component to our app and passed it the variable physicalQuantity. This is something called <strong>props</strong>. We pass the chosenQuantityvariable to a props variable called physicalQuantity(yet to be defined in Converter.vue) from the parent to the child component. That’s the basic mechanism of parent-child communication. The other way around (child parent) is done using <strong>custom events</strong>, and we have already seen an example of that when we were emitting that &#39;select-quantity&#39; event from Navbar.vue to App.vue. Moving on to Converter.vue:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/db806ebb70f3b2f45074ec42aec3e969/href">https://medium.com/media/db806ebb70f3b2f45074ec42aec3e969/href</a></iframe><p>Alrighty, we have now sucessfully passed the currently chosen quantity to Converter.vue and recieved it as a props called physicalQuantity . The expected type of physicalQuantity is Object because, if you recall, in Navbar.vue we represented a physical quantity as a javascript object, containing the <em>name </em>and its <em>units</em>.</p><p>What else is new? We have declared the variables fromValue, fromUnit, resultUnit which respectively stand for the value, the unit we are converting FROM and the unit we are converting TO.</p><h4><strong>Display name of currently selected physical quantity</strong></h4><p>We want to display the name of the currently selected physical quantity. We can do that using a &lt;h1&gt; element and interpolation :</p><p>&lt;h1&gt; {{physicalQuantity.name}} &lt;/h1&gt;</p><h4><strong>Value to be converted</strong></h4><p>We want to create an input box, where the user can type in the desired value. This will determine the value of the fromValue variable. We can do that using the v-model directive, which will bind the fromValue variable to whatever the user types in and update its value accordingly:</p><pre>&lt;input type=&quot;text&quot; v-model=&quot;fromValue&quot;&gt;</pre><h4><strong>Choosing between units</strong></h4><p>We want to create drop-down menus for picking the from-unit and the to-unit. When the user selects a unit, we need to bind the selection to the fromUnit variable in the first case or resultUnit in the second case. For that, we will create a basic HTML &lt;select&gt; element and using the v-for directive, we will generate possible selection options (&lt;option&gt; elements ) from the units array from physicalQuantity:</p><pre>&lt;-- UNIT TO CONVERT FORM --&gt;<br>&lt;select v-model=&quot;fromUnit&quot;&gt;   <br>&lt;option v-for=&quot;unit in physicalQuantity.units&quot; v-bind:key=&quot;unit&quot;&gt;              {{unit}}<br>&lt;/option&gt;<br>&lt;/select&gt;</pre><pre>&lt;-- UNIT TO CONVERT TO --&gt;<br>&lt;select v-model=&quot;resultUnit&quot;&gt;   <br>&lt;option v-for=&quot;unit in physicalQuantity.units&quot; v-bind:key=&quot;unit&quot;&gt; {{unit}} <br>&lt;/option&gt;<br>&lt;/select&gt;</pre><h4><strong>Display the result</strong></h4><p>Now, let’s implement the actual logic for the computation of the result. In order to reduce logic complexity, I have decided on the following: For each physical quantity, let there be an <em>“intermediary” </em>unit. All values will be converted to that intermediary unit and then converted from the intermediary unit to the desired result unit. For example, if our intermediary unit for time is <em>minutes(min)</em>, then, when converting seconds to hours, we convert <em>seconds to minutes</em>, then <em>minutes to hours</em>. This applies to every other possible case as well.</p><p>Right after data(), declare the functions (methods) for converting to intermediary units in our Converter.vue component:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5b004a05c2af4136f3d70293b92f49d/href">https://medium.com/media/a5b004a05c2af4136f3d70293b92f49d/href</a></iframe><p>And finally, we are going to calculate the actual result. Let’s store the result in a variable called result. Notice that this isn’t an ordinary value — it’s a value which depends on other values. In our case, result depends on the fromValue the user types in, the chosen fromUnit and resultUnit. In other words, result is a variable which will be the result of a computation. That’s why we will declare result as a <strong>computed property</strong> and we will implement the logic for the computation right away:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b02fbe435d9f1155801f62bb41a019fc/href">https://medium.com/media/b02fbe435d9f1155801f62bb41a019fc/href</a></iframe><p>Looking good! Whenever one of the dependency values (e.g. fromValue) changes, the value of result will be updated accordingly right away! The only thing that remains is to actually display result in our template-part of the component. Let’s put it between the &lt;select&gt; elements:</p><pre>&lt;p id=&quot;result&quot;&gt;<br>  {{result}}<br>&lt;/p&gt;</pre><p>Spice it all up with some nice CSS (which you can check out <a href="https://github.com/InfectoOne/Vue-Converter-Example-App/blob/master/src/components/Converter.vue">HERE</a> in the whole Converter.vue file) and you have finally successfully implemented your own Vue.js converter app! DAYUMN!</p><h3><strong>Objective (hopefully) accomplished!</strong></h3><p>Thank you for taking the time to read this tutorial. My objective was to fill a gap in teh interwebz by publishing a straightforward hands-on Vue.js tutorial and provide an explanation of some basic Vue concepts in a straightforward manner. The idea of this article was to give you a quick and efficient head start — for advanced Vue.js concepts and more in-detail explanations, the <a href="https://vuejs.org/v2/guide/">official documentation</a> would definetly be the best learning source!</p><p>If you feel like this tutorial has helped you, I will appreciate thankfulness from your side, too, which you can express by giving this article a “clap” or by leaving some feedback in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db28fcf5583e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>