<?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 Marks Polakovs on Medium]]></title>
        <description><![CDATA[Stories by Marks Polakovs on Medium]]></description>
        <link>https://medium.com/@markspolakovs?source=rss-d496ae37b740------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Z1eMMZuMjVZlfTHIKSKO8g.png</url>
            <title>Stories by Marks Polakovs on Medium</title>
            <link>https://medium.com/@markspolakovs?source=rss-d496ae37b740------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 13:57:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@markspolakovs/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[I’m Tired of Trump]]></title>
            <link>https://medium.com/marks-polakovs/im-tired-of-trump-d1f2bd699f9f?source=rss-d496ae37b740------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1f2bd699f9f</guid>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[trump]]></category>
            <dc:creator><![CDATA[Marks Polakovs]]></dc:creator>
            <pubDate>Thu, 19 Jul 2018 08:04:57 GMT</pubDate>
            <atom:updated>2018-07-19T08:07:00.324Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uCkoNa5YMZXkREa0Jij8LQ.png" /></figure><p>It seems like every time I scroll through the reddit front page I see another story about how Trump’s done something shocking, unbelievable, and/or hilarious. And I can’t help but sigh and say <em>“Just another Trump story”</em>, maybe skim the echo chamber comments, and get on with my day.</p><p>This is the point to which he has driven us. During the race he did so many things on a daily basis that we were all sure that he’s so bad he’d never set foot in the Oval Office. As soon as he did set foot in the oval office, the streak continued: every day, more awful appointments, more people speaking out against him, more democrats, more emails, more liberals, and covfefe.</p><p>I mean, fuck, the President of the United States of America commits treason almost every day. It’s come to the point that if he were to be impeached the charge sheet would be longer than the tax code.</p><p>And yet it all goes in one ear and out the other.</p><p>Even worse than that: when discussion around my friends and family inevitably turns to politics I automatically get an innate reflex: <em>“oh god they’re talking about trump again”</em> and I either switch off or try to steer the conversation away.</p><p>Don’t get me wrong, I detest the man as much as anyone else would and I can’t wait for the opportunity to go to the States just to piss on his grave.</p><p>But I can’t do anything about it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LpSj7-XeUQ5Ffvx_a7WqsQ.png" /></figure><p>I’m a citizen of the Republic of Latvia, a democratic country (for now) in the east of Europe. I’m not a United States citizen. I can’t vote him out. I can’t vote Republicans out of Congress. If I were to call them they would laugh at me and disconnect the call. But the shit this guy is pulling is affecting more than just America, for fuck’s sake he’s the President of the United States, the so-called Leader of the Free World, of course his actions will have an effect across the world, and people of other countries will be affected, so what he does makes international headlines — and rightly so.</p><p>But every day there’s another treason.</p><p>There’s so much treason we grow tired of the treason.</p><p>But every day there’s another protest.</p><p>There’s so much protest we grow tired of the protest.</p><p>But every day there’s another bribe.</p><p>There’s so much bribe we grow tired of the bribe.</p><p>But every day there’s another Ivanka.</p><p>There’s so much Ivanka we grow tired of the Ivanka.</p><p>But every day there’s another lie.</p><p>There’s so much lie we grow tired of the lie.</p><p>But every day there’s another tweet.</p><p>There’s so much tweet we grow tired of the tweet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VezISYU0NX3Y-VmaB8Fl6A.png" /></figure><p>I don’t like lamenting about problems unless I can at least propose a solution. I’m a technologist, I’m blessed and cursed to always think of technological solutions to every problem. But although my brain is buzzing with ideas all of them are totally impractical.</p><p>We could have news networks restrict Trump programming to a certain time in the week.</p><p>We could have digest emails with itemised lists of what Trump’s done this week.</p><p>But none of these will work.</p><p>You know why? Because Trump gets eyeballs, and eyeballs get ad views, and ad views get money. In fact, for these networks it’s perversely beneficial to roll stories about Trump even when everyone’s sick of them, because it makes them money.</p><p>US citizens can call up their representatives in Congress, and US citizens can vote them out in the midterms. But I can’t. But I’m still subjected to hearing about Trump whether I like it or not. There’s a word for that.</p><p>Torture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sqTcXUE1gVNhXE4wBe_krg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1f2bd699f9f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marks-polakovs/im-tired-of-trump-d1f2bd699f9f">I’m Tired of Trump</a> was originally published in <a href="https://medium.com/marks-polakovs">Marks Polakovs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thoughts And Prayers]]></title>
            <link>https://medium.com/marks-polakovs/thoughts-and-prayers-55439654fdb2?source=rss-d496ae37b740------2</link>
            <guid isPermaLink="false">https://medium.com/p/55439654fdb2</guid>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[mass-shootings]]></category>
            <category><![CDATA[guns]]></category>
            <category><![CDATA[gun-control]]></category>
            <dc:creator><![CDATA[Marks Polakovs]]></dc:creator>
            <pubDate>Sat, 17 Feb 2018 20:52:00 GMT</pubDate>
            <atom:updated>2018-02-17T20:59:04.628Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ppo72wrKHqGwjXiGWqjbEA.jpeg" /></figure><p>A few days before I sat down to write this, a 19-year-old man walked into Marjory Stoneman Douglas High School in Parkland, Florida with an assault rifle and gunned down seventeen students. Four months before that, a man opened fire on a concert in Las Vegas, leaving 58 people dead. In 2012, a gunman walked into Sandy Hook Elementary School in Connecticut and gunned down 20 six- and seven-year-old children. The United States of America has had more mass shootings than any other country in history. And nothing has happened about it.</p><p>Well that’s not entirely true, of course. After the Sandy Hook shooting, President Obama proposed many congressional actions to limit gun sales. Two bills were introduced, one banning assault weapons sales and another expanding background checks, and both were defeated in the Senate. Instead, the National Rifle Association proposed armed police officers in every school in the country.</p><p>I’d like to take a moment to personally comment on this, as a student, although not an American student. It’s quite frankly ludicrous that this country has descended to the point where putting men with guns in every school sounds like a reasonable proposal. I’m lucky enough that I live in Luxembourg, which strongly restricts access to guns. But I shouldn’t be lucky. I shouldn’t have to thank my lucky stars every time I leave school alive.</p><p>And, of course, lawmakers, politicians, public figures, and everybody with a Twitter follower number with a comma in it offered the age-old standby “thoughts and prayers”. <em>Except this time they specifically didn’t use those words, because they have developed a negative association.</em></p><p>Take a wild guess as to why they have developed a negative association.</p><p>It’s got to the point where there is even a game called Thoughts And Prayers: The Game. In the game you are shown fictional shootings at major cities across the US (each complete with a #PrayForCityNameHere hashtag, of course), and the player is encouraged to press two buttons — to think and to pray — while the game scolds them for attempting to ban assault weapons sales.</p><p>People will say, of course, that it’s not just access to guns that causes this, that mental health is the main cause, that these people were disturbed. And it’s true. They were. Some still are. But the correlation is incredibly weak. In an analysis of 235 mass killings, only 22% of the perpetrators had mental health issues.</p><p>In addition, the media is in a sense almost an accomplice. It amplifies the senseless violence. It names the shooter, describes him, details the crime, numbers the victims, and even ranks the shooter among previous “successful” attackers, essentially doing everything except putting the focus on those people whose lives will never be the same again.</p><p>To the parents, siblings, friends, and relatives of Alyssa Alhadeff, Scott Beigel, Martin Duque, Nicholas Dworet, Aaron Feis, Jaime Guttenberg, Chris Hixon, Luke Hoyer, Cara Loughran, Gina Montalto, Joaquin Oliver, Alaina Petty, Meadow Pollack, Helena Ramsay, Alex Schachter, Carmen Schentrup, and Peter Wang, whose families have been torn apart, whose lives will never be the same again, as well as everyone else who is now traumatised for life and deserves sympathy, pity, and all the help the world can give them, as well as everyone else who has lost their lives in senseless attacks on humanity in the past, I’m truly sorry that your memory is being dragged through the mud and forever associated with a tragedy that will, unfortunately, repeat again and again. My heart goes out to you. Thoughts and prayers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55439654fdb2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marks-polakovs/thoughts-and-prayers-55439654fdb2">Thoughts And Prayers</a> was originally published in <a href="https://medium.com/marks-polakovs">Marks Polakovs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Disconnecting]]></title>
            <link>https://medium.com/marks-polakovs/disconnecting-d9691c5012b3?source=rss-d496ae37b740------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9691c5012b3</guid>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[disconnecting]]></category>
            <category><![CDATA[instagram]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[snapchat]]></category>
            <dc:creator><![CDATA[Marks Polakovs]]></dc:creator>
            <pubDate>Mon, 27 Feb 2017 00:52:49 GMT</pubDate>
            <atom:updated>2017-02-27T00:52:49.154Z</atom:updated>
            <content:encoded><![CDATA[<p>Some time ago I installed an add-on in Chrome to block www.facebook.com, and I uninstalled Facebook, Instagram and Snapchat from my phone.</p><p>There were a few conditions. Messenger and Groups stayed, as I needed those to communicate with people for my work (our over-reliance on these tools being an annoyance, but that’s a story for another time). I could also use www.messenger.com on my computer to access Facebook chat. I knew that I was uninstalling my primary boredom repellent, however I also knew that I would find some other apps and websites on which to waste my time. So, instead of Facebook, Instagram and Snapchat, I turned to Medium, Hacker News, Reddit, and YouTube to cure my boredom.</p><p>The &quot;withdrawal symptoms&quot; were surprisingly minor. It was weird opening my phone and searching for the Facebook icon, only for it to not be there. However, I wasn’t fully &quot;addicted&quot;, and I felt like I would survive if I wasn’t informed about where and with whom you’d been on Friday night. I’d probably be missing out on juicy gossip about peoples&#39; crushes, but oh well.</p><p>It was curious, however, that when I told people of my plan, most reacted in one of two ways: either telling me that it’s brave, or that it’s crazy. The fact that uninstalling these three apps can be considered &quot;brave&quot; or &quot;crazy&quot; just shows how much our generation takes them for granted. It also makes me admire even more the people that haven’t joined these platforms, and makes me think about the sort of reactions that they get from others when they say the four magic words: &quot;I don’t have Facebook”.</p><p>However, I weirdly like the feeling. When I thought about the disconnection, I felt like I knew more about the lives of random people whom I followed on Instagram or whose stories I saw on Snapchat, than I did about the lives of those people that I really cared about. Awful, but true. And this feeling is all too common in today’s ultra-connected age, when no matter where I am or what I’m doing, a beam of radio waves always connects me to the rest of the world.</p><p>There’s a certain compulsion that makes you check Facebook every ten minutes to make sure you aren’t missing something, often even when you’re talking to someone else. Think back to the last time that you had a meal with someone. How long did it take for half the people at the table to pull out their phones? Exactly.</p><p>To anyone who is considering doing something like this, I highly encourage it. Even if only for a few days, especially if you have a low self-esteem. Search &quot;block website Chrome&quot; or &quot;block website Firefox&quot; on Google and delete the apps off your phone. Or, if even that feels too drastic, the next time you have a conversation with someone, switch off your phone and actually talk to them instead of liking all your friends&#39; photos every five minutes. Go and live your life without the need to post about it. We will survive without your duckface.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9691c5012b3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marks-polakovs/disconnecting-d9691c5012b3">Disconnecting</a> was originally published in <a href="https://medium.com/marks-polakovs">Marks Polakovs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[We need to have words.]]></title>
            <link>https://medium.com/marks-polakovs/america-we-need-to-talk-186d87d7113f?source=rss-d496ae37b740------2</link>
            <guid isPermaLink="false">https://medium.com/p/186d87d7113f</guid>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[bigotry]]></category>
            <category><![CDATA[failure]]></category>
            <category><![CDATA[donald-trump]]></category>
            <category><![CDATA[2016-election]]></category>
            <dc:creator><![CDATA[Marks Polakovs]]></dc:creator>
            <pubDate>Wed, 09 Nov 2016 21:54:38 GMT</pubDate>
            <atom:updated>2016-11-09T22:16:15.057Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XmiHW5z4ke8D7URVGMC0lg.png" /></figure><p>I’m not angry, just disappointed. Actually, that’s not true, I just wanted to put that cliche in there. Of course I am angry.</p><p>With an issue as complex as this, there is never just one singular cause. You always have to look at the bigger picture. There’s just so many variables. The best way to do this, I feel, is to divide and conquer. Break the issue down into smaller issues.</p><p>There are many things that caused what we saw when we woke up this morning. The media caused it. The Clinton campaign caused it. Angry white supremacists and misogynists caused it. The voting system caused it.</p><p>This is the year of the soundbite, the year of shitty Facebook memes, the year that anything is shared to death without a second thought, without any consideration for the truth, only ratings and the number of “Haha” reactions on your Facebook page. This is the year when shouting whatever comes out of your mouth is enough to get you into the highest office in the land, whatever your words be. This is the year of massive flashing red “NEWS ALERT” boxes after every rally. <strong>The media is supposed to be a check to power, but, for years now, it has basked in becoming power in its own right. </strong>Where journalists and bloggers feel like they have to tell every story just because someone else is saying it and they’ll miss out on those clicks.</p><p>I hope the media takes a good, hard look at itself and realises just how badly it fucked up in this election. Trump has repeated over and over again how the media is corrupt and dishonest. And the chickens have truly come home to roost. For what? Ratings, likes, analytics page views, advertising money.</p><p>The media’s job is to keep the public informed and present the facts without any influence, bias or spin. Not to influence and shape the public.</p><p>And what happens now? Well, we won’t know. But it’s nothing good. Trump is in the White House. Republicans have control of Senate and the House of Representatives. They can appoint whatever Supreme Court judge they bloody well feel like.</p><p>This means goodbye to all the laws giving us the equality we’ve been fighting for.</p><p>Goodbye Roe v Wade, which is the case that allowed abortion.</p><p>Goodbye Affordable Care Act, which is the law that literally allows some people to survive.</p><p>Goodbye Obergefell v. Hodges, which is the famous gay marriage case.</p><p>And the rabbit hole gets deeper. Mike Pence, the Vice President-elect, has stated that he supports gay conversion therapy. Potentially including electroshocking people until they’re no longer gay. He is for shutting down Planned Parenthood, which provides HIV testing and contraception. He has publicly opposed same-sex marriage. He said condoms are ineffective. He said the LGBT community should not be protected from discrimination.</p><p>But the real danger of Trump is not in his policies. It is the vindication that he gives to all the racists, white supremacists, xenophobes, homophobes, transphobes, and misogynists. He has shown that this message of fear and hate can lead him to the highest office in the land, and that will be nothing but pure vindication for everyone else seeing it this way.</p><p>Many LGBT+ people are terrified now. Some are considering getting a concealed carry license, because they feel it’s necessary to protect themselves.</p><p>The same thing happened with Brexit. People voted for the (false) economic benefits, people voted because they were angered by the political elite, but even more people voted because they were unhappy about <strong>DEM IMMIGRANS</strong> and they got what they wanted. And now, with a white supremacist as the leader of the free world, they couldn’t be more overjoyed.</p><p>Hillary may have done some things wrong, but she stood for unity, not divisiveness. One of her slogans was “Stronger together.” Meanwhile, the one on the opposite side shouted about bad hombres, Muslims, Syrians, and anyone else he could direct his anger at.</p><p>Yesterday America gave into fear. When confronted with adversity, it found itself unable to stand up for its core values. What happened to life, liberty and the pursuit of happiness? America proved it’s okay to be lied to as long as it’s the right kind of lies. America proved that it will reward dishonesty and bigotry with the highest office in the land.</p><p>I’m only 15 years old. I recognise how little of the world I have seen and how I simply don’t know enough about people to recognise just how damaging something like this can be. I can only piece together facts. But I’ve seen enough to know that we’re heading for a bad time.</p><p>Congratulations.</p><p>Hail to the king.</p><p>May the best man win.</p><p>You truly made America hate again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=186d87d7113f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/marks-polakovs/america-we-need-to-talk-186d87d7113f">We need to have words.</a> was originally published in <a href="https://medium.com/marks-polakovs">Marks Polakovs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Spoiler Effect]]></title>
            <link>https://medium.com/@markspolakovs/the-spoiler-effect-555ce56fa0f1?source=rss-d496ae37b740------2</link>
            <guid isPermaLink="false">https://medium.com/p/555ce56fa0f1</guid>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[donald-trump]]></category>
            <category><![CDATA[jill-stein]]></category>
            <category><![CDATA[gary-johnson]]></category>
            <category><![CDATA[hillary-clinton]]></category>
            <dc:creator><![CDATA[Marks Polakovs]]></dc:creator>
            <pubDate>Thu, 03 Nov 2016 11:44:34 GMT</pubDate>
            <atom:updated>2016-11-03T11:58:02.726Z</atom:updated>
            <content:encoded><![CDATA[<p>Suppose there were only two candidates: Donald Trump and Hillary Clinton. After the election, the results are 52% Clinton and 48% Trump. Clinton wins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*g6EBgz_cw6KsxSvz2o6Q2Q.png" /></figure><p>However, suppose now there are four candidates: Clinton, Trump, Gary Johnson, and Jill Stein. The results are in: 48% Trump, 47% Clinton, 3% Johnson, 2% Stein. Trump wins, <strong>despite 52% of the country voting against him</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*CpV6HrIElHdzz-oTqiNcwA.png" /></figure><p>Do you see what happened here? Previously, everyone who was against Trump had to vote Clinton. Now, they can’t decide between the three anti-Trump candidates, and split the vote. 5% of the anti-Trumpers decide they don’t like Clinton, and switch to third party candidates, blissfully unaware that <strong>they just gave Trump the election</strong>.</p><p>This is the Spoiler Effect, also known as vote-splitting. Johnson and Stein are candidates with no real chance of getting elected (the reasons for which are a story for another time), yet they still siphon votes from Clinton, the sole non-Trump candidate with an actual chance of winning, which ends up splitting the vote and having Trump be elected by a minority of the country.</p><p>How could this happen? Simple. There are people who are categorically against Trump but think Clinton is the child of the devil himself and thus refuse to vote for her either (I’m looking at you, Bernie-or-busters). They flock to the third party candidates, and thus indirectly elect their worst enemy.</p><p>The only long term solution to this is a different voting system. First-past-the-post (the current system, where each person gets one vote and the one who gets the most wins) is prone to the spoiler effect. Something like Single Transferable Vote (where you rank the candidates from 1 to n in order of how much you like them) isn’t prone to the Spoiler Effect. However, I highly doubt that will happen, but that’s also story for another time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=555ce56fa0f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying apps is too hard. There has to be a better way.]]></title>
            <link>https://medium.com/@markspolakovs/deploying-apps-is-too-hard-there-has-to-be-a-better-way-1dccb2669e76?source=rss-d496ae37b740------2</link>
            <guid isPermaLink="false">https://medium.com/p/1dccb2669e76</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Marks Polakovs]]></dc:creator>
            <pubDate>Tue, 01 Nov 2016 12:11:58 GMT</pubDate>
            <atom:updated>2016-11-01T12:11:58.612Z</atom:updated>
            <content:encoded><![CDATA[<p>Yesterday, I wrote a simple static site in about 20 minutes. I deployed it to GitHub Pages. I added it to my Cloudflare account as a subdomain.</p><p>I then spent three hours troubleshooting the resulting redirect loops and SSL errors.</p><p>There has to be a better way.</p><p>What I’d ideally want is a bit of tooling that runs on the server and lets me provision apps with just a few clicks. Let’s call it <em>The Setup</em>.</p><p>I want a static site? Click a few times and it gives me a Git URL. It configures nginx and DNS automatically, giving the app a subdomain. It provisions a Let’s Encrypt cert.</p><p>I want something more, perhaps a simple PHP site? Configure nginx and php-fpm for me pls k thnx. Also give me a mysql database, don’t have me configure it myself.</p><p>Something more advanced, perhaps a small Node.js miniserver? Let me deploy it, run some deploy scripts, and then automatically set up a reverse proxy in nginx.</p><p>If I want to make an app, I want to make an app, not faff around with server configuration.</p><p>Does something like this already exist?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1dccb2669e76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How computers store time, the year 2038 problem, and how to brick an iPhone.]]></title>
            <link>https://medium.com/@markspolakovs/how-computers-store-time-the-year-2038-problem-and-how-to-brick-an-iphone-47c677c976c9?source=rss-d496ae37b740------2</link>
            <guid isPermaLink="false">https://medium.com/p/47c677c976c9</guid>
            <category><![CDATA[computers]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Marks Polakovs]]></dc:creator>
            <pubDate>Mon, 02 May 2016 19:45:26 GMT</pubDate>
            <atom:updated>2016-05-02T19:45:26.472Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<p>How do you think of a date and a time? You most probably think of it as a year, month, day, hour, minute, and second. Computers don’t do it that way. That’s far too complicated. No, computers store the time as the number of seconds since midnight, the 1st January 1970, GMT . Remember that GMT bit, it will be important later.</p><p>For example, as I record this, the time is one billion, four hundred fifty-five million, two hundred eighty-five thousand, six hundred eighty-four.</p><p>Sounds complicated, but it really isn’t.</p><p>I think you all know that there are 60 seconds in a minute, right? Well, if you divide that number by sixty, you get the number of minutes since 1st January 1970. Next, sixty minutes in an hour, sixty seconds in a minute, sixty times sixty is 3600, dividing the time by 3600 gives you the number of hours, and so on, and so forth.</p><p>I hope you can see that this way of storing the date and time takes up much less space than the old fashioned way. Instead of storing six numbers, you only have to store one.</p><p>However, clever readers may have identified a problem. What is the maximum for this number? Well, as it turns out, two billion, one hundred and forty-seven million, four hundred and eighty-three thousand, six hundred and forty-seven. This is the maximum value what we in the computer science field call a “32-bit signed integer”. (For any of you mathy types out there, the reason this is called a 32-bit signed integer is that it is 31 bits long (plus one bit for whether it is negative), and that number is two to the power of 31.) This was chosen simply because back in the 1970s nobody thought they needed a bigger number. It could have been set to a “64-bit signed integer”, which has a maximum value of nine quadrillion. However, this doubles the amount of space the value takes up, and space was a precious commodity back then.</p><p>However, there is a problem.</p><p>What if this time value reaches the maximum?</p><p>And when? Well, the “when” question is simple: at 3:14:08 AM GMT on 19 January 2038. What will happen at that point is that the value of time would go down to its minimum, that being negative two billion, <em>yadda yadda</em>, six hundred and fourty eight.</p><p>And that time value is 8:46:03 PM GMT on 13 February 1901. And many computers around the world, if they haven’t been updated, will think it’s 1901.</p><p>The solution seems simple: Use a bigger field, so you can keep track of time for 292 billion years for example, with a 64-bit number. However, changing that causes all kinds of compatibility issues, such as programs not expecting the number to be that high and crashing. Not good.</p><p>But I promised in the intro that I would talk about bricking iPhones. Well, some time ago a bug was reported for iOS 8 to 9.3, wherein setting the date to be January 1st 1970 can brick the device in certain timezones.</p><p>Basically, when your phone shows you the time, it first has to account for what timezone you are in, as internally it counts time since midnight 1st January 1970 UTC, remember? Well, first it has to adjust that time for your timezone, so it adds or subtracts a number of seconds, based on your timezone.</p><p>However, since 1st January 1970 is time 0, it is possible that it subtracts enough seconds to make the timezone-adjusted value of time negative. Then it goes on its merry way, dividing the time value by all kinds of things, to get a series of six numbers that you will understand (year, month, day, hour, minute, second).</p><p>However, when it does those divisions, it will get negative numbers. And then it will go, “Hang on a second, why am I in the hour -13? That doesn’t make sense?”</p><p>And it will crash.</p><p>And reboot.</p><p>And crash again.</p><p>And so on, in a perpetual cycle of fail. So don’t do it. And I realise that my saying “don’t do it” will make you all want to do it, but, unless you want a 500 dollar paperweight, please don’t actually do it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47c677c976c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>