diff --git a/atom.xml b/atom.xml index fd6f293..397ab44 100644 --- a/atom.xml +++ b/atom.xml @@ -1,5 +1,5 @@ -Kevin Yaphttp://kevinyap.ca/2023-11-13T14:41:41-08:00Building a Hackintosh2021-01-23T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2021-01-23:/2021/01/building-a-hackintosh/<p>2020 was an exciting year for Mac users because Apple finally released computers powered by their own custom silicon. Despite this, for some reason, it was the year that I finally caved and decided to build a Hackintosh. For about 7 years …</p><p>2020 was an exciting year for Mac users because Apple finally released computers powered by their own custom silicon. Despite this, for some reason, it was the year that I finally caved and decided to build a Hackintosh. For about 7 years, I only ever owned laptops, and the 15&#8221; MacBook Pro was what I used as a &#8220;desktop substitute&#8221;. I liked the idea of using a portable as my primary machine, as it meant that whether I was at home, at school, or traveling, I would have access to all of my files. In addition, the most intensive activities that I used my computer for were compiling code and playing League — both workloads that MacBook Pro can easily&nbsp;handle.</p> +Kevin Yaphttp://kevinyap.ca/2023-11-16T13:56:26-08:00Building a Hackintosh2021-01-23T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2021-01-23:/2021/01/building-a-hackintosh/<p>2020 was an exciting year for Mac users because Apple finally released computers powered by their own custom silicon. Despite this, for some reason, it was the year that I finally caved and decided to build a Hackintosh. For about 7 years …</p><p>2020 was an exciting year for Mac users because Apple finally released computers powered by their own custom silicon. Despite this, for some reason, it was the year that I finally caved and decided to build a Hackintosh. For about 7 years, I only ever owned laptops, and the 15&#8221; MacBook Pro was what I used as a &#8220;desktop substitute&#8221;. I liked the idea of using a portable as my primary machine, as it meant that whether I was at home, at school, or traveling, I would have access to all of my files. In addition, the most intensive activities that I used my computer for were compiling code and playing League — both workloads that MacBook Pro can easily&nbsp;handle.</p> <p>However, when Riot released <span class="caps">VALORANT</span>, that was the first <span class="caps">PC</span> game that pushed the performance of the machine. To Riot&#8217;s credit, the game is impressively well-optimized for lower-spec devices, and I was used to playing on minimal graphical settings from my Team Fortress 2 days (loading custom ultra-low spec configs to gain every last frame), but once I started streaming gameplay for archival purposes, that really started to push the limits of the&nbsp;laptop.</p> <p>Perhaps the straw that finally broke the camel&#8217;s back is that one day I noticed that my laptop kind of… rocked back and forth on a flat surface, and it turns out that was because the battery was starting to bulge. Feeling guilty that this was probably a result of me stressing it whilst in clamshell mode for several hours at a time, I decided it was time to build a real desktop <span class="caps">PC</span> to play the games that I wanted to play. Since one of my other friends who feels equally strongly about macOS built a dual-booting Hackintosh earlier this year without much trouble (allegedly), I was convinced. Also, Apple&#8217;s move to ditch Intel and move to native silicon suggests that macOS compatibility will only become worse as time goes on, meaning I might as well get in on the action&nbsp;now.</p> <h2>Onto the&nbsp;Build</h2> @@ -40,7 +40,7 @@ <p>After some searching, I stumbled upon <a href="https://www.reddit.com/r/hackintosh/comments/dmn84u/rx_vega_64_freezes_system_during_hw_accel_encode/">this Reddit post</a> in which someone with an <span class="caps">RX</span> Vega 64 (a similar graphics card to my own) had system freezes when performing hardware-accelerated audio encoding. They recommended running a <code>log</code> command to stream kernel-related logs to a file, such that when the crash occurred, it would dump the logs before the system failed, meaning information would be captured even though no kernel panic was actually&nbsp;produced.</p> <p>Fortunately, the crash <em>did</em> happen during a day where I happened to remember to run the command at startup, and much like the discussion that went on in the comments of that Reddit post, the logs right before the crash seemed to be audio-related, and <code>AppleGFXHDA.kext</code> was the culprit. I disabled the extension by renaming it (which meant I had to first disable <span class="caps">SIP</span>, something I didn&#8217;t initially intend to do on my Hackintosh), and I haven&#8217;t witnessed the crash since, so I&#8217;m guessing that solved&nbsp;it.</p> <hr> -<p>All in all, building a Hackintosh was a really fun experience, and I realized just how sheltered I was from the whole world of &#8220;how modern PCs really work&#8221;. I always just nodded my head and pretended to understand when people at work or friends would talk about their <em><span class="caps">BIOS</span></em> and stuff like that, but now I can at least sort of join in on those discussions. Of course, now I&#8217;m a bit sad that I won&#8217;t be able to justify buying an M1 Mac anytime&nbsp;soon.</p>Architecting zeal.gg2020-03-01T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2020-03-01:/2020/03/architecting-zeal-gg/<p>Back while I was interning at Riot Games, I spent one weekend throwing together a prototype for what would eventually become <a href="https://zeal.gg">zeal.gg</a>. The purpose of it was to graph the <a href="https://support-leagueoflegends.riotgames.com/hc/en-us/articles/4406004330643-Ranked-Tiers-Divisions-and-Queues">solo queue ranking</a> of our intern cohort while we were working …</p><p>Back while I was interning at Riot Games, I spent one weekend throwing together a prototype for what would eventually become <a href="https://zeal.gg">zeal.gg</a>. The purpose of it was to graph the <a href="https://support-leagueoflegends.riotgames.com/hc/en-us/articles/4406004330643-Ranked-Tiers-Divisions-and-Queues">solo queue ranking</a> of our intern cohort while we were working there, since like most of the League of Legends population, a handful of us got really competitive about&nbsp;it.</p> +<p>All in all, building a Hackintosh was a really fun experience, and I realized just how sheltered I was from the whole world of &#8220;how modern PCs really work&#8221;. I always just nodded my head and pretended to understand when people at work or friends would talk about their <em><span class="caps">BIOS</span></em> and stuff like that, but now I can at least sort of join in on those discussions. Of course, now I&#8217;m a bit sad that I won&#8217;t be able to justify buying an M1 Mac anytime&nbsp;soon.</p>Architecting zeal.gg2020-03-01T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2020-03-01:/2020/03/architecting-zeal-gg/<p>Back while I was interning at Riot Games, I spent one weekend throwing together a prototype for what would eventually become <a href="https://zeal.gg">zeal.gg</a>. The purpose of it was to graph the <a href="https://support-leagueoflegends.riotgames.com/hc/en-us/articles/4406004330643-Ranked-Tiers-Divisions-and-Queues">solo queue ranking</a> of our intern cohort while we were working …</p><p>Back while I was interning at Riot Games, I spent one weekend throwing together a prototype for what would eventually become <a href="https://zeal.gg">zeal.gg</a>. The purpose of it was to graph the <a href="https://support-leagueoflegends.riotgames.com/hc/en-us/articles/4406004330643-Ranked-Tiers-Divisions-and-Queues">solo queue ranking</a> of our intern cohort while we were working there, since like most of the League of Legends population, a handful of us got really competitive about&nbsp;it.</p> <p>I ended up registering the domain name for fun; <em>Zeal</em> is an item you can purchase in the game, and I was surprised to find that such a short domain name wasn&#8217;t taken yet. Having a nice domain gave me grander ambitions for the site &#8212; I wanted to polish it up and make it available for other League players to use with their friend groups as&nbsp;well.</p> <p>This was the perfect task to occupy my free time, since I ended up taking the fall semester of my the final year of my undergrad off. While the initial <span class="caps">MVP</span> was a single page that graphed our ranks, the final product would need a landing page where anyone could create a leaderboard for their own friend&nbsp;group.</p> <p>I worked on final version of the site during November and December, and made an <a href="https://www.reddit.com/r/leagueoflegends/comments/agp6qj/introducing_zealgg_custom_solo_queue_leaderboards">announcement on /r/leagueoflegends</a> the week before the new ranked season started the following January. To my surprise, over 10k people visited the site on the day I made the post, and I continued to have hundreds of consistent users for weeks afterwards! To top it all off, it still hasn&#8217;t gone down yet: a mild reassurance that I at least somewhat know what I&#8217;m doing in this&nbsp;profession.</p> @@ -88,7 +88,7 @@ <p>Since I had already created a <a href="https://www.reddit.com/r/zealgg/">subreddit</a> to discuss changes to the site, I decided to leverage it. I added an endpoint to the backend that uses Reddit&#8217;s <span class="caps">API</span> to check for any posts pinned on the subreddit. The frontend calls that endpoint, and if it finds a pinned post, it displays an alert using the title of the post as the alert text, and links to the full post for futher&nbsp;context.</p> <hr> <p>Even though zeal.gg is pretty straightforward at its core, it fills a niche that, to the best of my knowledge, wasn&#8217;t served by any other of the multitude of League of Legends websites out there. Figuring out that I had the skills to go from <em>&#8220;this would be a cool idea to make for my friends&#8221;</em> to a site that tens of thousands of League players around the world decided to check out cured my imposter syndrome for a fleeting&nbsp;moment.</p> -<p>At some point, when I feel like it&#8217;s not worth paying the few dollars a month to host the site anymore, I&#8217;ll get around to open-sourcing the repository. For now though, I&#8217;m keeping the code private, mostly to protect everyone else from laying their eyes upon the monstrosity of the main leaderboard React&nbsp;component.</p>The Year of Communication2020-02-24T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2020-02-24:/2020/02/the-year-of-communication/<p>The idea of a new year being a time to reflect and set goals always felt reasonable to me, though I had never set any personally. I think I had always (correctly) predicted the difficulty of sticking with a single resolution for …</p><p>The idea of a new year being a time to reflect and set goals always felt reasonable to me, though I had never set any personally. I think I had always (correctly) predicted the difficulty of sticking with a single resolution for the entire year, even past the honeymoon phase of the first couple of weeks of&nbsp;January.</p> +<p>At some point, when I feel like it&#8217;s not worth paying the few dollars a month to host the site anymore, I&#8217;ll get around to open-sourcing the repository. For now though, I&#8217;m keeping the code private, mostly to protect everyone else from laying their eyes upon the monstrosity of the main leaderboard React&nbsp;component.</p>The Year of Communication2020-02-24T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2020-02-24:/2020/02/the-year-of-communication/<p>The idea of a new year being a time to reflect and set goals always felt reasonable to me, though I had never set any personally. I think I had always (correctly) predicted the difficulty of sticking with a single resolution for …</p><p>The idea of a new year being a time to reflect and set goals always felt reasonable to me, though I had never set any personally. I think I had always (correctly) predicted the difficulty of sticking with a single resolution for the entire year, even past the honeymoon phase of the first couple of weeks of&nbsp;January.</p> <p>Despite this, near the end of last decade, I decided to set a goal for myself &#8212; I wanted to start journaling <em>on paper</em>. Throughout my time learning how to become a functional human on this planet with actual responsibilities, I&#8217;ve gone through way too many different productivity and to-do apps in the quest to find one that &#8220;just works&#8221; (and have toyed on more than one occasion with the idea of just writing my&nbsp;own).</p> <p>I had always avoided settling on a system that involved me writing on paper, since my penmanship is wanting in legibility, and I can type several times faster than I can write. However, the more I thought about it, the better idea it seemed to keep some physical planner with me, if only to provide me with a break from staring at screens all day long. Having a dedicated time before going to sleep to reflect on the day&#8217;s events would also prove&nbsp;cathartic.</p> <p>Many people online have touted <a href="https://bulletjournal.com">bullet journaling</a>. The appeal of this system to me was that it was lightweight and was flexible for different styles of journaling. I thought: since I was never able to stick with any productivity apps in the past, maybe paper journaling was the secret? I went out and purchased a nice notebook and set up all my different journaling spreads, prepared to tackle the new year with my new bullet&nbsp;journal.</p> @@ -99,7 +99,7 @@ <p>I&#8217;m not sure why, but pretty early on in high school, my brain had made up its mind and decided that sharing thoughts online was something that I should avoid. Irrational, but that&#8217;s how I have existed for the majority of adulthood. Perhaps it was wanting to maintain a cleaner divide between my online persona and my real life, Now, though, I have to accept that having opinions that people might disagree with is okay, and just a side-effect of living in our (increasingly polarized, <em>ugh</em>)&nbsp;world.</p> <p>Another part of my writing paralysis is due to all of the written content that I <em>do</em> consume. I spend the majority of my waking hours reading articles posted on Hacker News and the more tasteful sides of Reddit. Within these circles, it really feels like every engineer and their dog is able to pump out grandiose yet captivating technical&nbsp;articles.</p> <p>Posting more means coming to terms with a few of things: firstly, that not every blog post needs to be a groundbreaking thesis, and that <em>that&#8217;s actually okay</em>. Random monthly status updates are perfectly fine things to publish on this blog (after all, what else is going to go here?). Also, Twitter and Reddit are not actually read-only services, and lurking gets boring after a while. Finally, I don&#8217;t have to adopt the stiff tone that I usually have when writing. It&#8217;s hard to break from carefully curating one&#8217;s identity, but it&#8217;s what got me into this silent pickle in the first&nbsp;place.</p> -<p>Consider this post my first foray into random posting in the last five years or so. All I can hope for is that this yearly theme sticks a lot better than any&nbsp;resolution.</p>Going Fast in Advent of Code2019-12-08T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2019-12-08:/2019/12/going-fast-in-advent-of-code/<p>I have been a big fan of <a href="https://adventofcode.com">Advent of Code</a> since it started back in 2015, and have spent every December since diligently solving as many problems as I can right at 9pm. Rather than a chocolate hiding behind each day like …</p><p>I have been a big fan of <a href="https://adventofcode.com">Advent of Code</a> since it started back in 2015, and have spent every December since diligently solving as many problems as I can right at 9pm. Rather than a chocolate hiding behind each day like with a regular advent calendar, in Advent of Code, every day brings a two-part holiday-themed puzzle &#8212; the first part introducing the context, and the second part building on the theme of the&nbsp;first.</p> +<p>Consider this post my first foray into random posting in the last five years or so. All I can hope for is that this yearly theme sticks a lot better than any&nbsp;resolution.</p>Going Fast in Advent of Code2019-12-08T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2019-12-08:/2019/12/going-fast-in-advent-of-code/<p>I have been a big fan of <a href="https://adventofcode.com">Advent of Code</a> since it started back in 2015, and have spent every December since diligently solving as many problems as I can right at 9pm. Rather than a chocolate hiding behind each day like …</p><p>I have been a big fan of <a href="https://adventofcode.com">Advent of Code</a> since it started back in 2015, and have spent every December since diligently solving as many problems as I can right at 9pm. Rather than a chocolate hiding behind each day like with a regular advent calendar, in Advent of Code, every day brings a two-part holiday-themed puzzle &#8212; the first part introducing the context, and the second part building on the theme of the&nbsp;first.</p> <p>I think my favourite part of Advent of Code is that, unlike with <a href="https://en.wikipedia.org/wiki/International_Collegiate_Programming_Contest"><span class="caps">ICPC</span>-style</a> programming contests, the puzzles are simpler and don&#8217;t require knowledge of esoteric algorithms to solve. This makes it more approachable to a wider variety of people, and can also be done for fun and used as a learning&nbsp;tool.</p> <p>There are a lot of developers who work through Advent of Code at a relaxed pace, either to help learn a new programming language or solidify their skills in general, but every year there is a dedicated group of people who compete for <a href="https://adventofcode.com/2019/leaderboard">global leaderboard points</a>.</p> <p>The first 100 people to collect a &#8220;star&#8221; (ie. solve a part of the puzzle) on each day collect points based on what position they finished in. I have placed somewhere on the global leaderboard every year (peaking at 11th place in 2016), but the competition is only getting tougher. The top competitors often clock in at under 5 minutes for finishing <em>both parts</em> of the&nbsp;problem.</p> @@ -138,7 +138,7 @@ <hr> <p><em>Edit: (December 2,&nbsp;2022)</em></p> <p>It&#8217;s been a few years since I wrote this post, and figured it was due for an update! Both <a href="https://blog.vero.site/post/advent-leaderboard">betaveros</a> and <a href="https://gist.github.com/mcpower/87427528b9ba5cac6f0c679370789661">mcpower</a>, two people who perform <em>significantly</em> better on the global leaderboard than I do, have written their own posts with tips and tricks for going quickly; I highly recommend giving them a&nbsp;read.</p> -<p>Also, for 2022, I&#8217;m <a href="https://www.youtube.com/@iKevinY">streaming my attempts on YouTube</a> &#8212; come watch if you&#8217;re&nbsp;interested!</p>Eval Golf (PlaidCTF Writeup)2019-04-15T00:00:00-07:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2019-04-15:/2019/04/eval-golf-plaidctf-writeup/<p>Sticking with the theme of <span class="caps">CTF</span> writeups, here&#8217;s one of a fairly simple challenge from <a href="http://plaidctf.com">PlaidCTF 2019</a>. Given that Python is my programming language of choice, it was fun to work on a Python-based challenge (rather than the low-level exploits that …</p><p>Sticking with the theme of <span class="caps">CTF</span> writeups, here&#8217;s one of a fairly simple challenge from <a href="http://plaidctf.com">PlaidCTF 2019</a>. Given that Python is my programming language of choice, it was fun to work on a Python-based challenge (rather than the low-level exploits that are more common in&nbsp;CTFs).</p> +<p>Also, for 2022, I&#8217;m <a href="https://www.youtube.com/@iKevinY">streaming my attempts on YouTube</a> &#8212; come watch if you&#8217;re&nbsp;interested!</p>Eval Golf (PlaidCTF Writeup)2019-04-15T00:00:00-07:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2019-04-15:/2019/04/eval-golf-plaidctf-writeup/<p>Sticking with the theme of <span class="caps">CTF</span> writeups, here&#8217;s one of a fairly simple challenge from <a href="http://plaidctf.com">PlaidCTF 2019</a>. Given that Python is my programming language of choice, it was fun to work on a Python-based challenge (rather than the low-level exploits that …</p><p>Sticking with the theme of <span class="caps">CTF</span> writeups, here&#8217;s one of a fairly simple challenge from <a href="http://plaidctf.com">PlaidCTF 2019</a>. Given that Python is my programming language of choice, it was fun to work on a Python-based challenge (rather than the low-level exploits that are more common in&nbsp;CTFs).</p> <p>The service that we&#8217;re trying to retrieve the flag from executes this&nbsp;script:</p> <div class="codehilite"><pre><span></span><code><span class="ch">#!/usr/bin/env python3</span> @@ -196,7 +196,7 @@ <span class="n">conn</span><span class="o">.</span><span class="n">interactive</span><span class="p">()</span> </code></pre></div> -<p>This <span class="caps">22KB</span> payload is accepted by the service and gives us our&nbsp;flag!</p>Rickety Roulette (picoCTF Writeup)2019-03-25T00:00:00-07:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2019-03-25:/2019/03/rickety-roulette-picoctf-writeup/<p>Recently, I&#8217;ve taken an interest in <a href="https://en.wikipedia.org/wiki/Capture_the_flag#Computer_security">CTFs</a>: computer security competitions with tasks that have been specifically designed to have a specific weakness. The goal is to exploit these weaknesses through various methods &#8212; such as reverse engineering, binary exploitation, or cryptanalysis &#8212; in …</p><p>Recently, I&#8217;ve taken an interest in <a href="https://en.wikipedia.org/wiki/Capture_the_flag#Computer_security">CTFs</a>: computer security competitions with tasks that have been specifically designed to have a specific weakness. The goal is to exploit these weaknesses through various methods &#8212; such as reverse engineering, binary exploitation, or cryptanalysis &#8212; in order to recover a &#8220;flag&#8221;: a password that follows a specific format, like <code>flag{s3cret_c0de}</code>.</p> +<p>This <span class="caps">22KB</span> payload is accepted by the service and gives us our&nbsp;flag!</p>Rickety Roulette (picoCTF Writeup)2019-03-25T00:00:00-07:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2019-03-25:/2019/03/rickety-roulette-picoctf-writeup/<p>Recently, I&#8217;ve taken an interest in <a href="https://en.wikipedia.org/wiki/Capture_the_flag#Computer_security">CTFs</a>: computer security competitions with tasks that have been specifically designed to have a specific weakness. The goal is to exploit these weaknesses through various methods &#8212; such as reverse engineering, binary exploitation, or cryptanalysis &#8212; in …</p><p>Recently, I&#8217;ve taken an interest in <a href="https://en.wikipedia.org/wiki/Capture_the_flag#Computer_security">CTFs</a>: computer security competitions with tasks that have been specifically designed to have a specific weakness. The goal is to exploit these weaknesses through various methods &#8212; such as reverse engineering, binary exploitation, or cryptanalysis &#8212; in order to recover a &#8220;flag&#8221;: a password that follows a specific format, like <code>flag{s3cret_c0de}</code>.</p> <p>My university started a <a href="https://ubcctf.github.io"><span class="caps">CTF</span> club</a> last month, and since I&#8217;m quite new to this field, I&#8217;ve been working my way through <a href="https://picoctf.com">picoCTF</a>, which is an oft-recommended beginner resource. Since I haven&#8217;t written any technical articles in a while, I thought it would be interesting to provide write-ups for some of the more interesting problems, starting with one called <code>roulette</code>. (The source code as provided by picoCTF can be found <a href="http://kevinyap.ca/files/roulette.c">here</a>, in case you&#8217;d like to try the challenge yourself&nbsp;first.)</p> <p>If we connect to the service, we see the&nbsp;following:</p> <div class="codehilite"><pre><span></span><code>Welcome to ONLINE ROULETTE! @@ -444,7 +444,7 @@ Wow, I can&#39;t believe you did it.. You deserve this flag! picoCTF{redacted} </code></pre></div> -<p>Success! This was an interesting problem because all it took to find the vulnerabilities was a careful pass through the source code. In addition, both the bugs are things that could easily sneak their way into an actual codebase if not careful. For my next writeup, I&#8217;m planning on tackling a problem that requires more sophisticated tooling and background&nbsp;knowledge.</p>Breaking the Enigma Code With Rust2017-04-17T00:00:00-07:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2017-04-17:/2017/04/breaking-the-enigma-code-with-rust/<p>If I had to pick something from the humanities to study in university, I would probably go with history. Not only is history interesting in and of itself, but having a good grasp on history clarifies a lot of modern geopolitics. War …</p><p>If I had to pick something from the humanities to study in university, I would probably go with history. Not only is history interesting in and of itself, but having a good grasp on history clarifies a lot of modern geopolitics. War is probably one of the more &#8220;exciting&#8221; aspects of history, and while it goes without saying that war is terrible, a lot of technologies and even new fields of research are the product of wartime&nbsp;conditions.</p> +<p>Success! This was an interesting problem because all it took to find the vulnerabilities was a careful pass through the source code. In addition, both the bugs are things that could easily sneak their way into an actual codebase if not careful. For my next writeup, I&#8217;m planning on tackling a problem that requires more sophisticated tooling and background&nbsp;knowledge.</p>Breaking the Enigma Code With Rust2017-04-17T00:00:00-07:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2017-04-17:/2017/04/breaking-the-enigma-code-with-rust/<p>If I had to pick something from the humanities to study in university, I would probably go with history. Not only is history interesting in and of itself, but having a good grasp on history clarifies a lot of modern geopolitics. War …</p><p>If I had to pick something from the humanities to study in university, I would probably go with history. Not only is history interesting in and of itself, but having a good grasp on history clarifies a lot of modern geopolitics. War is probably one of the more &#8220;exciting&#8221; aspects of history, and while it goes without saying that war is terrible, a lot of technologies and even new fields of research are the product of wartime&nbsp;conditions.</p> <p>The Enigma machines are a series of electromechanical cipher machines that were famously used by Germany in World War <span class="caps">II</span> to encrypt military communications. Breaking the Enigma code had a huge impact on the Allies&#8217; ability to win the war. Most of what I could write about the history of cracking Enigma is already covered by <a href="https://en.wikipedia.org/wiki/Cryptanalysis_of_the_Enigma">this Wikipedia article</a> (or if you prefer a more dramatized version, a <a href="https://en.wikipedia.org/wiki/The_Imitation_Game">certain movie</a> starring Benedict Cumberbatch), so I won&#8217;t go over it in&nbsp;detail.</p> <p>Inspired by the <a href="https://en.wikipedia.org/wiki/Colossus_computer">computers</a> that were born out of cryptanalysis, I decided to write my own Enigma-cracking program in Rust &#8212; <a href="https://github.com/iKevinY/ultra"> <code>ultra</code></a>. &#8220;Ultra secret&#8221; was the classification level used by the Allies to refer to intelligence obtained via deciphering German communications at <a href="https://en.wikipedia.org/wiki/Bletchley_Park">Bletchley Park</a>. If the Germany had discovered that the Allies could read their messages, they easily could have switched to a completely new encryption method, nullifying all the effort spent breaking Enigma in the first&nbsp;place.</p> <p>To demonstrate how the Enigma cipher was employed, here is some example usage from <code>ultra</code>. First, we encrypt this plaintext message using some random machine&nbsp;settings:</p> @@ -528,10 +528,10 @@ A<span class="w"> </span>few<span class="w"> </span>mile <p>The sequential version of <code>ultra</code> already runs about twice as fast as the C version, and after adding the parallelization described above, it jumps to nearly 10 times as&nbsp;fast!</p> <p>When writing <code>ultra</code>, I didn&#8217;t explicitly set out to implement a hyper-optimized version of James&#8217; code. Instead, I used the description of the algorithm described in his blog post and wrote what I felt was idiomatic Rust. I think this nicely demonstrates the fact that Rust makes it easy to write programs that are readable and also&nbsp;performant.</p> <p>Cargo also plays a large role in making Rust nice work with. Nothing is more annoying than coming across an open source project that seems useful, but struggling to figure out how to even compile it. With a Rust project, however, you&#8217;re essentially guaranteed that <code>cargo build</code> will work &#8212; no Makefiles or manual dependency management&nbsp;required.</p> -<p>I really enjoyed learning about Rust while building <a href="https://github.com/iKevinY/ultra"><code>ultra</code></a>, and will definitely be using it more in the future. Given the results of Stack Overflow&#8217;s recent <a href="https://stackoverflow.com/insights/survey/2017">developer survey</a>, it seems like Rust is growing in popularity &#8212; it will be very exciting if it becomes adopted by&nbsp;industry.</p>The Joy of Problem Solving2016-12-30T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2016-12-30:/2016/12/the-joy-of-problem-solving/<p>This past semester, I took one of my favourite computer science courses to date &#8212; <em>Intermediate Algorithm Design and Analysis</em>. The course helped me realize my passion for reasoning about interesting problems, and being able to convey ideas about these problems to others …</p><p>This past semester, I took one of my favourite computer science courses to date &#8212; <em>Intermediate Algorithm Design and Analysis</em>. The course helped me realize my passion for reasoning about interesting problems, and being able to convey ideas about these problems to others. After all, the human mind has evolved to be shockingly good at identifying patterns, and solving puzzles is one of many ways to scratch that itch. This is what I personally find so appealing about programming: a problem that may initially seem straightforward can almost always be approached from many different&nbsp;angles.</p> +<p>I really enjoyed learning about Rust while building <a href="https://github.com/iKevinY/ultra"><code>ultra</code></a>, and will definitely be using it more in the future. Given the results of Stack Overflow&#8217;s recent <a href="https://stackoverflow.com/insights/survey/2017">developer survey</a>, it seems like Rust is growing in popularity &#8212; it will be very exciting if it becomes adopted by&nbsp;industry.</p>The Joy of Problem Solving2016-12-30T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2016-12-30:/2016/12/the-joy-of-problem-solving/<p>This past semester, I took one of my favourite computer science courses to date &#8212; <em>Intermediate Algorithm Design and Analysis</em>. The course helped me realize my passion for reasoning about interesting problems, and being able to convey ideas about these problems to others …</p><p>This past semester, I took one of my favourite computer science courses to date &#8212; <em>Intermediate Algorithm Design and Analysis</em>. The course helped me realize my passion for reasoning about interesting problems, and being able to convey ideas about these problems to others. After all, the human mind has evolved to be shockingly good at identifying patterns, and solving puzzles is one of many ways to scratch that itch. This is what I personally find so appealing about programming: a problem that may initially seem straightforward can almost always be approached from many different&nbsp;angles.</p> <p>One of the best ways to improve one&#8217;s problem solving skills is being exposed to a lot of different problems and approaches to these problems. The web is a goldmine for this type of content, and I really enjoy reading long-form articles that go in-depth into a given topic. I have a lot of respect for anyone who can take a complex idea and distill it into something that is both approachable and engaging; this skill that I would like to perfect. After all, in the grand scheme of things, knowledge that cannot be shared is virtually&nbsp;worthless.</p> <p>After I moved my blog to Pelican, I wrote a few posts of this sort of explanatory nature, but haven&#8217;t done so over the past couple of years. I think the problem is that whenever I set out to get some writing done, I imagined the final product as some sort of grandiose thinkpiece. This is clearly a flawed approach, as I didn&#8217;t end up publishing any posts this year (apart from this one). Throughout high school, my ability to produce coherent essays at the last minute was something I prided myself upon. Now that I&#8217;m studying computer science, proofs of correctness are the most writing I ever have to do, so I&#8217;d really like to return to writing informative blog&nbsp;posts.</p> -<p>Fortunately, the New Year is <em>that time</em> where people arbitrarily decide to make drastic changes to their lives. I&#8217;ve learned my lesson from last year, and this time around, I think I&#8217;ll make some more general resolutions. I&#8217;ll be trying out a few ideas from Alex Vermeer&#8217;s page on <a href="https://alexvermeer.com/life-hacking/">life hacking</a>. I want my Twitter feed to be more of a stream of consciousness rather than meticulously curated timeline. I want to write a bunch of blog posts that other people (might) find useful. Let&#8217;s see what comes of&nbsp;2017.</p>Reflections and Resolutions2015-12-31T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2015-12-31:/2015/12/reflections-and-resolutions/<p>It&#8217;s already the last day of 2015, and I&#8217;ve only published a single post this year (and on the first of January, no less). It turns out I&#8217;m not actually limited to posting technical articles here, so I figured …</p><p>It&#8217;s already the last day of 2015, and I&#8217;ve only published a single post this year (and on the first of January, no less). It turns out I&#8217;m not actually limited to posting technical articles here, so I figured I would ramble on about various things from this year and set some goals for 2016. With any luck, this might even become a regular&nbsp;occurrence!</p> +<p>Fortunately, the New Year is <em>that time</em> where people arbitrarily decide to make drastic changes to their lives. I&#8217;ve learned my lesson from last year, and this time around, I think I&#8217;ll make some more general resolutions. I&#8217;ll be trying out a few ideas from Alex Vermeer&#8217;s page on <a href="https://alexvermeer.com/life-hacking/">life hacking</a>. I want my Twitter feed to be more of a stream of consciousness rather than meticulously curated timeline. I want to write a bunch of blog posts that other people (might) find useful. Let&#8217;s see what comes of&nbsp;2017.</p>Reflections and Resolutions2015-12-31T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2015-12-31:/2015/12/reflections-and-resolutions/<p>It&#8217;s already the last day of 2015, and I&#8217;ve only published a single post this year (and on the first of January, no less). It turns out I&#8217;m not actually limited to posting technical articles here, so I figured …</p><p>It&#8217;s already the last day of 2015, and I&#8217;ve only published a single post this year (and on the first of January, no less). It turns out I&#8217;m not actually limited to posting technical articles here, so I figured I would ramble on about various things from this year and set some goals for 2016. With any luck, this might even become a regular&nbsp;occurrence!</p> <p>The computer science courses that I took this term were based around C and C++ rather than Java, and so thankfully I was able to forgo using an <span class="caps">IDE</span> for development. As a result, this also meant that I could ditch my Chromebook and pack even lighter. I decided to try using an iPad as my computing device because iOS 9 made multitasking a viable option, and it worked quite well. I was able to <span class="caps">SSH</span> into the department machines to write and compile code, which gave me the perfect excuse to learn Vim to some degree of&nbsp;competency.</p> <p>I also spent the my most recent academic term applying for jobs through the <a href="https://en.wikipedia.org/wiki/Cooperative_education">co-op program</a> at my university, and I&#8217;m excited about spending the next few months interning as a software engineer &#8212; quite the change in scenery from the perpetual lecture hall. If there&#8217;s one piece of advice I have for others applying for their first internships, it&#8217;s to <em>work on personal projects</em>. Not only do projects demonstrate your technical ability, but they also provide talking points for the more behavioural aspects of interviews. The important part isn&#8217;t so much that they&#8217;ve gone viral or are hundreds of thousands of lines of code long, but that you are able to discuss decisions you made and things you learned during the&nbsp;process.</p> <hr> @@ -544,7 +544,7 @@ A<span class="w"> </span>few<span class="w"> </span>mile <p>Another observation I&#8217;ve made is that extended, gapless music has become increasingly key to my bursts of productivity. When I&#8217;m not listening to podcasts, I tend to throw on an hour-long mashup or medley, since it allows me to better concentrate. I haven&#8217;t composed anything for years now, so this is yet another thing I&#8217;d like to focus on. The one quantifiable goal I have for 2016 is to release at least 30 minutes of music, which I&#8217;ll hopefully be able to transform into some sort of continuous&nbsp;mix.</p> <p>One of the most rewarding aspects of the software industry is the emphasis placed on continual learning; there&#8217;s always a new language or technology cropping up. At times, this goes from interesting to overwhelming, but for the most part, it&#8217;s possible to filter out the extraneous. Apple&#8217;s open sourcing of Swift earlier this month was monumental for the <span class="caps">OSS</span> world, and contributing to Rust was a valuable learning experience for me as well. This year, I&#8217;d like to actually develop projects using these two&nbsp;languages.</p> <p>As it turns out, natural languages are pretty important as well for communicating with fellow Earth-dwellers. As far as language acquisition goes, the younger the better, so the best time to learn a new language is now, not later. I&#8217;ve always been fascinated by Japanese due to the combination of logographic (kanji) and syllabic (kana) characters used in its writing system. It&#8217;s been a long time since I&#8217;ve learned a new language so I&#8217;m not sure how much progress I will make, but my final resolution for the new year is to begin learning&nbsp;Japanese.</p> -<p>Here&#8217;s to a great 2016,&nbsp;everyone!</p>On Git and GitHub Flow2015-01-01T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2015-01-01:/2015/01/on-git-and-github-flow/<p>Recently, I have been making an added effort to seek out and contribute to open source projects on GitHub. The motivation behind this was largely the <a href="http://24pullrequests.com">24 Pull Requests</a> project, which encourages developers to submit one pull request for each day in …</p><p>Recently, I have been making an added effort to seek out and contribute to open source projects on GitHub. The motivation behind this was largely the <a href="http://24pullrequests.com">24 Pull Requests</a> project, which encourages developers to submit one pull request for each day in December leading up to Christmas. The prospect of being a new contributor to a large, open source project can be daunting, especially to the novice programmer, so this little bit of extrinsic motivation was a nudge in the right&nbsp;direction.</p> +<p>Here&#8217;s to a great 2016,&nbsp;everyone!</p>On Git and GitHub Flow2015-01-01T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2015-01-01:/2015/01/on-git-and-github-flow/<p>Recently, I have been making an added effort to seek out and contribute to open source projects on GitHub. The motivation behind this was largely the <a href="http://24pullrequests.com">24 Pull Requests</a> project, which encourages developers to submit one pull request for each day in …</p><p>Recently, I have been making an added effort to seek out and contribute to open source projects on GitHub. The motivation behind this was largely the <a href="http://24pullrequests.com">24 Pull Requests</a> project, which encourages developers to submit one pull request for each day in December leading up to Christmas. The prospect of being a new contributor to a large, open source project can be daunting, especially to the novice programmer, so this little bit of extrinsic motivation was a nudge in the right&nbsp;direction.</p> <p>In learning how to properly make use of Git and GitHub, I&#8217;ve referenced a multitude of different resources. With 2015 having just arrived, I&#8217;m sure many people have &#8220;contribute to more open source projects&#8221; on their list of New Year&#8217;s resolutions as well, so hopefully this article serves as a useful starting&nbsp;point.</p> <h2>Finding a&nbsp;Project</h2> <p>Choosing a project is left as an exercise to the reader. However, here are my&nbsp;suggestions:</p> @@ -620,7 +620,7 @@ git<span class="w"> </span>push<span class="w"> </span>- <li>Commit the changes that have been staged. Continue to commit new changes and rebase when&nbsp;needed.</li> <li>Push the <code>my-feature</code> branch to remote repository aliased as <code>origin</code> (your fork), using the <code>-u</code> flag to add the branch as a remote tracking branch. (Subsequent pushes will only requre a <code>git push</code> with no additional parameters.) Then, open a pull request using GitHub&#8217;s web&nbsp;interface!</li> </ol> -<p>For other Git-related problems that one may run into, Google can usually provide the answer. Be sure to look at <a href="https://help.github.com">GitHub&#8217;s help page</a> and the <a href="http://git-scm.com/doc">Git documentation</a> itself. Here&#8217;s to lots of open source contributions in&nbsp;2015!</p>EulerPy — Streamlining Project Euler2014-06-27T00:00:00-07:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2014-06-27:/2014/06/eulerpy-streamlining-project-euler/<p>As someone relatively new to the world of programming, I&#8217;m always looking for resources that will help me become more experienced. I had read the name <a href="http://projecteuler.net">Project Euler</a> countless times, but had attempted to work through the problems before, and ultimately …</p><p>As someone relatively new to the world of programming, I&#8217;m always looking for resources that will help me become more experienced. I had read the name <a href="http://projecteuler.net">Project Euler</a> countless times, but had attempted to work through the problems before, and ultimately became annoyed at the process of solving the problems. I had to switch between writing code in Sublime Text, debugging the output in Terminal, and finally, comparing my solution to the accepted solution found somewhere on the Internet. Because of this, I put Project Euler on the&nbsp;backburner.</p> +<p>For other Git-related problems that one may run into, Google can usually provide the answer. Be sure to look at <a href="https://help.github.com">GitHub&#8217;s help page</a> and the <a href="http://git-scm.com/doc">Git documentation</a> itself. Here&#8217;s to lots of open source contributions in&nbsp;2015!</p>EulerPy — Streamlining Project Euler2014-06-27T00:00:00-07:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2014-06-27:/2014/06/eulerpy-streamlining-project-euler/<p>As someone relatively new to the world of programming, I&#8217;m always looking for resources that will help me become more experienced. I had read the name <a href="http://projecteuler.net">Project Euler</a> countless times, but had attempted to work through the problems before, and ultimately …</p><p>As someone relatively new to the world of programming, I&#8217;m always looking for resources that will help me become more experienced. I had read the name <a href="http://projecteuler.net">Project Euler</a> countless times, but had attempted to work through the problems before, and ultimately became annoyed at the process of solving the problems. I had to switch between writing code in Sublime Text, debugging the output in Terminal, and finally, comparing my solution to the accepted solution found somewhere on the Internet. Because of this, I put Project Euler on the&nbsp;backburner.</p> <p>When learning about the world of programming, I was fascinated by the fact that you could install packages or formulae with a simple <code>pip install</code> or <code>brew install</code> command from the terminal and instantly be able to run it, and was determined to write my own package (if only for the novelty of being able to <code>pip install</code> something that I had&nbsp;written).</p> <p>It wasn&#8217;t until a few weeks ago that the thought of going through the Project Euler problems revisited my mind, and of course, it was during the point of time when Project Euler was down. Remembering my prior experience with Project Euler, I set out to write a tool that would streamline the process of solving problems &#8212; <a href="https://github.com/iKevinY/EulerPy">EulerPy</a>. Essentially, it helps with two aspects of Project Euler: it creates a file containing a docstring with the problem as its body (for reference), and it verifies whether a problem has been solved&nbsp;correctly.</p> <p>I started out with an idea where the script would parse the problem&#8217;s page on Project Euler using a library like Beautiful Soup in order to determine the problem body. I had a working prototype and was testing it on problems, and all seemed to be well until I got to <a href="http://projecteuler.net/problem=4">problem #4</a>, where the times symbol is displayed as an image rather than a character. I then did some searching and found a feature on Project Euler where a minimal version of the problem text could be accessed through a <code>/minimal=n</code> page where <code>n</code> is the problem number. However, I think that this functionality was linked to the Project Euler account system, and since it was only brought back as a static site, it is not accessible anymore. While I could have improved the logic of the script to automatically translate images to their text-based equivalents, I realize that this wasn&#8217;t the best solution at all, since it would require Internet access to fetch new&nbsp;problems.</p> @@ -628,7 +628,7 @@ git<span class="w"> </span>push<span class="w"> </span>- <p>Making use of Armin Ronacher&#8217;s <a href="https://github.com/mitsuhiko/click">click</a> library to parse command line arguments, I put together EulerPy. I tried to make it as easy as possible to solve Project Euler problems. With this goal in mind, I wrote the package so that it would check the output of a <code>.py</code> file containing the attempted solution to the problem. Because of this, some of the problems can be solved with simple <code>print</code> one-liners, allowing the ability to quickly run <code>euler</code> to move on to the next&nbsp;problem.</p> <p>Also convenient is the fact that the <code>euler</code> command itself will automatically print the output of the Project Euler file to the terminal. Because of this, debugging is made (ever so slightly) easier by the fact that you don&#8217;t need to switch between two different commands when testing the output of the problem file and verifying if it outputs the correct&nbsp;solution.</p> <p>Having just been introduced to Travis <span class="caps">CI</span> after setting it up to <a href="http://kevinyap.ca/2014/06/deploying-pelican-sites-using-travis-ci/">automatically deploy</a> the latest version of my website, I figured it would be interesting to set it up for EulerPy as well. I ended up writting a couple of simple tests to ensure anyone updating <code>problems.txt</code> had not transcribed the problems in an errant&nbsp;fashion.</p> -<p>Hopefully there aren&#8217;t too many <em>faux pas</em> in my coding, as EulerPy is one of my first Python&nbsp;projects.</p>Deploying Pelican Sites Using Travis CI2014-06-11T00:00:00-07:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2014-06-11:/2014/06/deploying-pelican-sites-using-travis-ci/<p>After learning about Travis <span class="caps">CI</span> through browsing open-source projects on GitHub, I became interested in seeing if it was possible to incorporate it into my already existing workflow <a href="http://kevinyap.ca/2013/12/hosting-with-github-pages/">based on GitHub Pages</a>. Even though Pelican is a static site generator, adding Travis …</p><p>After learning about Travis <span class="caps">CI</span> through browsing open-source projects on GitHub, I became interested in seeing if it was possible to incorporate it into my already existing workflow <a href="http://kevinyap.ca/2013/12/hosting-with-github-pages/">based on GitHub Pages</a>. Even though Pelican is a static site generator, adding Travis <span class="caps">CI</span> into the mix would allow changes to the theme or content to be made from anywhere that can push to a Git repository &#8212; even directly from the GitHub website &#8212; and the newly generated files would be pushed to the live server in a fairly timely manner, almost like a WordPress site. Thankfully, quite a few other people had already combined Pelican and Travis <span class="caps">CI</span>, so setting it up was fairly&nbsp;straightforward.</p> +<p>Hopefully there aren&#8217;t too many <em>faux pas</em> in my coding, as EulerPy is one of my first Python&nbsp;projects.</p>Deploying Pelican Sites Using Travis CI2014-06-11T00:00:00-07:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2014-06-11:/2014/06/deploying-pelican-sites-using-travis-ci/<p>After learning about Travis <span class="caps">CI</span> through browsing open-source projects on GitHub, I became interested in seeing if it was possible to incorporate it into my already existing workflow <a href="http://kevinyap.ca/2013/12/hosting-with-github-pages/">based on GitHub Pages</a>. Even though Pelican is a static site generator, adding Travis …</p><p>After learning about Travis <span class="caps">CI</span> through browsing open-source projects on GitHub, I became interested in seeing if it was possible to incorporate it into my already existing workflow <a href="http://kevinyap.ca/2013/12/hosting-with-github-pages/">based on GitHub Pages</a>. Even though Pelican is a static site generator, adding Travis <span class="caps">CI</span> into the mix would allow changes to the theme or content to be made from anywhere that can push to a Git repository &#8212; even directly from the GitHub website &#8212; and the newly generated files would be pushed to the live server in a fairly timely manner, almost like a WordPress site. Thankfully, quite a few other people had already combined Pelican and Travis <span class="caps">CI</span>, so setting it up was fairly&nbsp;straightforward.</p> <p>Most of the solutions that I found suggested using the <a href="https://github.com/davisp/ghp-import"><code>ghp-import</code></a> package to handle pushing to the GitHub repository. I was not satisfied with this solution as I wanted to keep intact the incremental changes being tracked by the repository itself (one of the upsides of using GitHub Pages as a host, in my opinion). I came across <a href="http://zonca.github.io/2013/09/automatically-build-pelican-and-publish-to-github-pages.html">Andrea Zonca&#8217;s post</a>, which described a setup using <code>rsync</code> and <code>git clone</code> to update the branch. Since his blog post is written in a very detailed manner, I won&#8217;t rewrite it here verbatim. In&nbsp;short:</p> <ol> <li>Add <code>.travis.yml</code> (which describes to Travis how to build your project) and <code>requirements.txt</code> (which lists the packages to be installed via pip) to the source file branch of your site&#8217;s&nbsp;repository.</li> @@ -663,7 +663,7 @@ M<span class="w"> </span>archive/index.html M<span class="w"> </span>index.html </code></pre></div> -<p>Since my version of <code>deploy.sh</code> was based on the script that I used to test and deploy changes locally, I wrote it so that it could be executed from a local development machine by checking against the <code>$TRAVIS</code> variable. When run locally, it can be used to check what changes would be pushed to the GitHub Pages branch given the modifications that have been made locally. In practice, it wouldn&#8217;t ever be useful to push changes manually since Travis would automatically repeat the exact same steps, but if the integration between GitHub and Travis were to ever stop working, I would still have a way to make modifications to the GitHub Pages&nbsp;branch.</p>On Programming and Turtles2014-01-05T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2014-01-05:/2014/01/on-programming-and-turtles/<p>Minecraft is one of my favourite games. At the time of writing, over 13 million copies have been sold for the <span class="caps">PC</span> alone &#8212; an impressive statistic considering the game was in alpha merely three years ago. Minecraft&#8217;s popularity is due primarily …</p><p>Minecraft is one of my favourite games. At the time of writing, over 13 million copies have been sold for the <span class="caps">PC</span> alone &#8212; an impressive statistic considering the game was in alpha merely three years ago. Minecraft&#8217;s popularity is due primarily to its open-ended nature. The ever-growing variety of blocks appeals to those who enjoy the building aspect of the game, and survival mode only augments the gratification of building by having the player work for their building materials. As for PvP combat, there are numerous community-created custom maps with their own unique rulesets. Expanding on this, through the use of elaborate server-side modding, Minecraft functions more as a game engine than a standalone game, enabling players with unmodded clients to instantly connect to a server and play game modes such as a Minecraft version of the Hunger Games. There is a niche in the game for every type of&nbsp;player.</p> +<p>Since my version of <code>deploy.sh</code> was based on the script that I used to test and deploy changes locally, I wrote it so that it could be executed from a local development machine by checking against the <code>$TRAVIS</code> variable. When run locally, it can be used to check what changes would be pushed to the GitHub Pages branch given the modifications that have been made locally. In practice, it wouldn&#8217;t ever be useful to push changes manually since Travis would automatically repeat the exact same steps, but if the integration between GitHub and Travis were to ever stop working, I would still have a way to make modifications to the GitHub Pages&nbsp;branch.</p>On Programming and Turtles2014-01-05T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2014-01-05:/2014/01/on-programming-and-turtles/<p>Minecraft is one of my favourite games. At the time of writing, over 13 million copies have been sold for the <span class="caps">PC</span> alone &#8212; an impressive statistic considering the game was in alpha merely three years ago. Minecraft&#8217;s popularity is due primarily …</p><p>Minecraft is one of my favourite games. At the time of writing, over 13 million copies have been sold for the <span class="caps">PC</span> alone &#8212; an impressive statistic considering the game was in alpha merely three years ago. Minecraft&#8217;s popularity is due primarily to its open-ended nature. The ever-growing variety of blocks appeals to those who enjoy the building aspect of the game, and survival mode only augments the gratification of building by having the player work for their building materials. As for PvP combat, there are numerous community-created custom maps with their own unique rulesets. Expanding on this, through the use of elaborate server-side modding, Minecraft functions more as a game engine than a standalone game, enabling players with unmodded clients to instantly connect to a server and play game modes such as a Minecraft version of the Hunger Games. There is a niche in the game for every type of&nbsp;player.</p> <p>Added in Minecraft Alpha 1.0.1, Redstone opened up an entirely new world in terms of gameplay. <a href="http://minecraft.gamepedia.com/Redstone#Redstone_Dust">Redstone Dust</a> carries a Redstone current between various Redstone components while <a href="http://minecraft.gamepedia.com/Redstone_Torch">Redstone Torches</a> function as a <a href="http://en.wikipedia.org/wiki/Inverter_(logic_gate)">signal inverter</a>. In conjunction with one another, it is possible to construct elementary logic gates, and therefore, fully functional <a href="http://en.wikipedia.org/wiki/Arithmetic_logic_unit">ALUs</a> and other more complex circuits. This means that Minecraft is Turing-complete, but I&nbsp;digress.</p> <p>The concept of Redstone captivated me even though I had no experience with anything involving logic gates prior to playing Minecraft. At first, using Redstone involved searching for designs that had the functionality that was required. However, as I became more exposed to it, it became increasingly second nature to build circuits based on their constituent logic gates rather than needing to search for schematics. With this learning process came realizations such as the fact that an <span class="caps">XOR</span> gate is what controls circuits where two light switches are linked to a single light bulb, or that an <span class="caps">AND</span> gate can be constructed as an <span class="caps">OR</span> gate with its inputs and output inverted (which <a href="http://en.wikipedia.org/wiki/De_Morgan%27s_laws">De Morgan&#8217;s laws</a> prove). In other words, I learned about logic gates by playing Minecraft &#8212; a peculiar yet satisfying realization. Using boolean logic when programming felt very straightforward despite never having formally learned about&nbsp;it.</p> <p>My theory of why Redstone was so appealing is that situations arose where building a circuit was necessary in order to overcome a problem in-game. The lack of tangibility of learning boolean logic in a different manner would have probably been discouraging, or at least uninteresting. By learning through Minecraft, it felt substantial, even though in reality, the product being created was only changes made within a video game world. I thought back to this while learning how to program. Most coding examples that novice programmers are supplied with output text to a terminal without producing a tangible product. Many exercises attempt to teach the basics of writing a program, but to someone without much programming experience, it may prove difficult to bridge the cognitive gap between theory and practicality in terms of how lines of code can be applied to real-world&nbsp;scenarios.</p> @@ -739,7 +739,7 @@ M<span class="w"> </span>index.html <p>In an educational environment, ComputerCraft could be used to create coding assignments for students. An interesting result of this is that all of the students could simply connect to the same <span class="caps">LAN</span> world through pit their Turtle scripts against one another in order to determine whose algorithm is the most efficient; after all, friendly competition is always a good motivator. For a younger audience, this would be more engaging than nearly any other approach to teaching programming that I can think of, considering Minecraft&#8217;s popularity with the younger demographic. Perhaps this style of teaching would be better suited for a club or co-curricular activity rather than a class, since all of its participants would need to have Minecraft accounts. That being said, Minecraft has been used in academic settings to teach subjects from <a href="http://www.reddit.com/r/Minecraft/comments/1pk6zl/learning_logic_gates_in_electronics_class/">logic gates to an electronics class</a> to <a href="http://www.reddit.com/r/Minecraft/comments/1dvpnj/today_my_teacher_used_minecraft_to_teach/">perspective in art</a>. Organizations such as <a href="https://minecraft.fandom.com/wiki/MinecraftEdu">MinecraftEdu</a> seek to bring Minecraft into the classroom by offering a discount on bulk sales and also providing a mod to the game that improves the teaching&nbsp;process.</p> <p>If something unexpected were to happen to a Turtle on a long mining expedition, it could get stuck, and time and resources would need to be spent in order to locate and retrieve it. To avoid this, it would be wise to debug the Turtle&#8217;s movements in a low-risk environment before actually deploying it on a mining expedition. This might include checking to see how the Turtle would react if a mob wandered in front of the Turtle and obstructed its movement functions, for example. These debugging habits can be applied when the code being written is no longer a Turtle script but rather a more conventional computer&nbsp;program.</p> <p>Another benefit of learning programming through ComputerCraft is that ideas for new features or added functionality arise simply by using the program. Perhaps the mining script could be extended to instruct the Turtle to automatically return to the start of the branch when its inventory fills up or throw out unwanted materials and only keep ores. Maybe fuel could be a factor, and it could automatically consume any fuel sources that it mines in order to extend the mining expedition. This process of beginning with a basic program and expanding its functionality can be applied when programming independently of&nbsp;ComputerCraft.</p> -<p>I believe that ComputerCraft is a great way to teach people who are already interested in Minecraft the basics of programming. Lua is a very beginner friendly language as, much like Logo, it features a syntax similar to normal English. Turtles will almost certainly more engaging to a novice programmer than a Lua prompt. The mod is not only limited to working with Turtles, either; a more traditional approach can be taken to the programming involved. There are a wide variety of programs that various people have written, from basic APIs to <a href="https://github.com/oeed/PearOS">operating systems with GUIs</a>. In this age of computing, more unorthodox approaches to teaching and learning can be experimented with, and with ComputerCraft, <s>the sky</s> <code>Y = 255</code> is the&nbsp;limit.</p>Styling Code Blocks Using Pelican2013-12-10T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2013-12-10:/2013/12/styling-code-blocks-using-pelican/<p>Although <a href="http://studiostyl.es/schemes/monokai">Monokai</a> is my colour scheme of choice when coding in <a href="http://www.sublimetext.com">Sublime Text 2</a>, it was not the best option for displaying code blocks on my website. Favouring a lighter colour scheme, I opted to use a GitHub style colour scheme and …</p><p>Although <a href="http://studiostyl.es/schemes/monokai">Monokai</a> is my colour scheme of choice when coding in <a href="http://www.sublimetext.com">Sublime Text 2</a>, it was not the best option for displaying code blocks on my website. Favouring a lighter colour scheme, I opted to use a GitHub style colour scheme and also add line numbers (because why not). Referring to a <a href="http://alexpeattie.com/blog/github-style-syntax-highlighting-with-pygments/">blog post by Alex Peattie</a> explaining how to implement this using Pygments, I made some modifications to make it work with my website. While the process is largely the same as what he already explained, I felt like writing this Pelican-specific guide on the off chance that it might be useful to somebody in the&nbsp;future.</p> +<p>I believe that ComputerCraft is a great way to teach people who are already interested in Minecraft the basics of programming. Lua is a very beginner friendly language as, much like Logo, it features a syntax similar to normal English. Turtles will almost certainly more engaging to a novice programmer than a Lua prompt. The mod is not only limited to working with Turtles, either; a more traditional approach can be taken to the programming involved. There are a wide variety of programs that various people have written, from basic APIs to <a href="https://github.com/oeed/PearOS">operating systems with GUIs</a>. In this age of computing, more unorthodox approaches to teaching and learning can be experimented with, and with ComputerCraft, <s>the sky</s> <code>Y = 255</code> is the&nbsp;limit.</p>Styling Code Blocks Using Pelican2013-12-10T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2013-12-10:/2013/12/styling-code-blocks-using-pelican/<p>Although <a href="http://studiostyl.es/schemes/monokai">Monokai</a> is my colour scheme of choice when coding in <a href="http://www.sublimetext.com">Sublime Text 2</a>, it was not the best option for displaying code blocks on my website. Favouring a lighter colour scheme, I opted to use a GitHub style colour scheme and …</p><p>Although <a href="http://studiostyl.es/schemes/monokai">Monokai</a> is my colour scheme of choice when coding in <a href="http://www.sublimetext.com">Sublime Text 2</a>, it was not the best option for displaying code blocks on my website. Favouring a lighter colour scheme, I opted to use a GitHub style colour scheme and also add line numbers (because why not). Referring to a <a href="http://alexpeattie.com/blog/github-style-syntax-highlighting-with-pygments/">blog post by Alex Peattie</a> explaining how to implement this using Pygments, I made some modifications to make it work with my website. While the process is largely the same as what he already explained, I felt like writing this Pelican-specific guide on the off chance that it might be useful to somebody in the&nbsp;future.</p> <p>While Alex&#8217;s tutorial implemented line numbering using <span class="caps">CSS</span>, the <a href="https://python-markdown.github.io/extensions/code_hilite/">CodeHilite</a> extension for <a href="https://pypi.python.org/pypi/Markdown">Python-Markdown</a> has the option to add line numbers automatically, which saves a bit of work. To enable them, CodeHilite&#8217;s <code>linenums</code> setting needs to be set to <code>True</code>. This can be done through the <code>MD_EXTENSIONS</code> option in the settings file supplied to&nbsp;Pelican.</p> <div class="codehilite"><pre><span></span><code><span class="ch">#!python</span> <span class="n">MD_EXTENSIONS</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;codehilite(linenums = True)&#39;</span><span class="p">]</span> @@ -777,7 +777,7 @@ M<span class="w"> </span>index.html <span class="p">}</span> </code></pre></div> -<p>After following these steps, everything should be working properly. Of course, the stylesheet used and properties of the code blocks can be changed depending on personal&nbsp;preference.</p>Hosting With GitHub Pages2013-12-07T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2013-12-07:/2013/12/hosting-with-github-pages/<p>Over the past couple of days, I made the switch to using GitHub as the hosting platform for my website by using <a href="http://pages.github.com">GitHub Pages</a>. This felt like a natural progression as I already used GitHub for version control for the source of …</p><p>Over the past couple of days, I made the switch to using GitHub as the hosting platform for my website by using <a href="http://pages.github.com">GitHub Pages</a>. This felt like a natural progression as I already used GitHub for version control for the source of my website. I initially thought the move would be confusing and time-consuming, but after the <span class="caps">DNS</span> changes propagated, everything was up and running just as it had been before the&nbsp;move.</p> +<p>After following these steps, everything should be working properly. Of course, the stylesheet used and properties of the code blocks can be changed depending on personal&nbsp;preference.</p>Hosting With GitHub Pages2013-12-07T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2013-12-07:/2013/12/hosting-with-github-pages/<p>Over the past couple of days, I made the switch to using GitHub as the hosting platform for my website by using <a href="http://pages.github.com">GitHub Pages</a>. This felt like a natural progression as I already used GitHub for version control for the source of …</p><p>Over the past couple of days, I made the switch to using GitHub as the hosting platform for my website by using <a href="http://pages.github.com">GitHub Pages</a>. This felt like a natural progression as I already used GitHub for version control for the source of my website. I initially thought the move would be confusing and time-consuming, but after the <span class="caps">DNS</span> changes propagated, everything was up and running just as it had been before the&nbsp;move.</p> <p>When dealing with User Pages with GitHub Pages, the hosted files must be located in the <code>master</code> branch of the repository. Since I didn&#8217;t want to have separate repositories for the source of the website and for the generated files, I opted to make an orphaned branch named <code>src</code> which would contain the source files. While I thought this would be complicated, it turned out to be quite&nbsp;straightforward.</p> <p>Within the root directory of my website&#8217;s source, there is an <code>output</code> directory that the static site files generated by <a href="http://getpelican.com">Pelican</a> go. Prior to using GitHub Pages, I had written a Bash script that would run the <code>pelican</code> command to generate the static site files and upload them using <a href="http://en.wikipedia.org/wiki/Rsync">rsync</a>. Obviously, this script had to be rewritten, as in order to use GitHub Pages, changes need to be pushed to a Git repository rather than being uploaded to a web&nbsp;server.</p> <p>To accomplish this, there are two Git repository: one in the root directory of my website&#8217;s source and one in the output directory. Both remotes are configured to push to the same remote repository stored on GitHub. The local repository in the root directory has the <code>output/</code> directory in its <code>.gitignore</code> file and commits to the <code>src</code> branch while the <code>output/</code> repository commits to the <code>master</code> branch. While they are technically part of the same remote repository, each local repository is completely separate from the&nbsp;other.</p> @@ -801,11 +801,11 @@ git<span class="w"> </span>push <p>The command <code>git rev-parse HEAD</code> returns the hash of the last commit in the Git repository&#8217;s history and is stored in the variable <code>$commitHash</code>. The directory is then changed to <code>output/</code> and <code>git checkout</code> is run to ensure the branch that changes will be committed to is the <code>master</code> branch (not that it should change, but in case I were to accidentally change branches manually, this would prevents anything problematic from happening). Any changes made are then added via <code>git add -A</code>.</p> <p>Following this, the script prompts for an extended commit message (what gets shown on GitHub after expanding the message). The first line of the commit message is &#8220;Generated by&#8221; followed by the hash of the last commit made in the <code>src</code> branch, and if an extended commit message is provided, the script will add it in. Finally, the commit is pushed to the <code>master</code> branch on&nbsp;GitHub.</p> -<p>All in all, this solution seems to work very well. I would highly recommend using GitHub Pages for static&nbsp;sites.</p>The Great (White) Pelican Migration2013-07-14T00:00:00-07:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2013-07-14:/2013/07/the-great-white-pelican-migration/<p>When browsing <a href="http://www.reddit.com/r/programming">/r/programming</a> a while back, I came across a link to a blog post written by <a href="http://www.gregreda.com">Greg Reda</a>. While reading the post, I noticed the platform that his website was generated with &#8212; <a href="http://getpelican.com/">Pelican</a> &#8212; and at the time, I was in …</p><p>When browsing <a href="http://www.reddit.com/r/programming">/r/programming</a> a while back, I came across a link to a blog post written by <a href="http://www.gregreda.com">Greg Reda</a>. While reading the post, I noticed the platform that his website was generated with &#8212; <a href="http://getpelican.com/">Pelican</a> &#8212; and at the time, I was in the process of searching for a replacement for WordPress. When I initially created kevinyap.ca, WordPress was appealing due to being easy-to-install <span class="caps">CMS</span> and versatile in its support and compatibility (themes and plugins), but over time I realized that it was too bulky; what I actually needed was a simple blogging platform rather than a full-fledged <span class="caps">CMS</span>.</p> +<p>All in all, this solution seems to work very well. I would highly recommend using GitHub Pages for static&nbsp;sites.</p>The Great (White) Pelican Migration2013-07-14T00:00:00-07:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2013-07-14:/2013/07/the-great-white-pelican-migration/<p>When browsing <a href="http://www.reddit.com/r/programming">/r/programming</a> a while back, I came across a link to a blog post written by <a href="http://www.gregreda.com">Greg Reda</a>. While reading the post, I noticed the platform that his website was generated with &#8212; <a href="http://getpelican.com/">Pelican</a> &#8212; and at the time, I was in …</p><p>When browsing <a href="http://www.reddit.com/r/programming">/r/programming</a> a while back, I came across a link to a blog post written by <a href="http://www.gregreda.com">Greg Reda</a>. While reading the post, I noticed the platform that his website was generated with &#8212; <a href="http://getpelican.com/">Pelican</a> &#8212; and at the time, I was in the process of searching for a replacement for WordPress. When I initially created kevinyap.ca, WordPress was appealing due to being easy-to-install <span class="caps">CMS</span> and versatile in its support and compatibility (themes and plugins), but over time I realized that it was too bulky; what I actually needed was a simple blogging platform rather than a full-fledged <span class="caps">CMS</span>.</p> <p>I decided that it would be wise to make the move to another platform sooner rather than later, so I began the migration to Pelican. The transition from WordPress to Pelican was quite simple; the installation itself was fairly straightforward, and I manually transferred over my previous blog posts. (Pelican does have an automatic blog importer, but with the tiny number of previous posts, it was simpler to just complete the process&nbsp;manually.)</p> <p>In my opinion, one of the most appealing features of using Pelican for a blog is the fact that posts (and pages) can be composed in Markdown, an easy-to-use and familiar markup language. This change also made it easier to incorporate <a href="http://www.iawriter.com/">iA Writer</a> into my blog-writing workflow instead of fumbling around with the WordPress dashboard consistently. Also, iA Writer’s iCloud integration makes it easy to write&nbsp;anywhere.</p> <p>One minor hitch that I had was with setting up the <a href="https://python-markdown.github.io/extensions/code_hilite/">CodeHilite</a> extension for Markdown. In the configuration file for Pelican, I had the entry <code>MD_EXTENSIONS = ['codehilite']</code>, as the documentation stated that <code>MD_EXTENSIONS</code> needed to be defined as a list. Although this did not raise any warnings when generating the site through Pelican. When I added the <a href="https://python-markdown.github.io/extensions/extra/">Markdown Extra</a> to the list of extensions &#8212; <code>MD_EXTENSIONS = ['codehilite', 'extra']</code> &#8212; the code highlighting worked. Apparently there needed to be more than one item in the list of Markdown&nbsp;extensions.</p> -<p>Many thanks to Greg Reda whose Pelican theme (which can be found in the <a href="http://github.com/gjreda/gregreda.com">GitHub repository</a> for his website) I am currently using on my&nbsp;website.</p>The Power of AppleScript2012-11-28T00:00:00-08:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2012-11-28:/2012/11/the-power-of-applescript/<p>One of my favourite genres of music is video game music. Because of this, it was no surprise that I was ecstatic when OverClocked ReMix announced that ReMixes 1-2500 were available to download via torrent, and that every file contained &#8220;complete and …</p><p>One of my favourite genres of music is video game music. Because of this, it was no surprise that I was ecstatic when OverClocked ReMix announced that ReMixes 1-2500 were available to download via torrent, and that every file contained &#8220;complete and consistent <span class="caps">ID3</span> tags&#8221;. While the tags for most fields are great, I wasn&#8217;t particularly fond of the format of the track titles. Instead of <em>TrackName (GameName)</em> like I would have preferred, the format was <em>GameName &#8216;TrackName&#8217; <span class="caps">OC</span> ReMix</em>. There are a few reasons why I don&#8217;t like the provided format (namely that the &#8220;<span class="caps">OC</span> ReMix&#8221; suffix feels redundant to me and it feels more appropriate to not see the songs grouped by their source game), but that&#8217;s besides the&nbsp;point.</p> +<p>Many thanks to Greg Reda whose Pelican theme (which can be found in the <a href="http://github.com/gjreda/gregreda.com">GitHub repository</a> for his website) I am currently using on my&nbsp;website.</p>The Power of AppleScript2012-11-28T00:00:00-08:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2012-11-28:/2012/11/the-power-of-applescript/<p>One of my favourite genres of music is video game music. Because of this, it was no surprise that I was ecstatic when OverClocked ReMix announced that ReMixes 1-2500 were available to download via torrent, and that every file contained &#8220;complete and …</p><p>One of my favourite genres of music is video game music. Because of this, it was no surprise that I was ecstatic when OverClocked ReMix announced that ReMixes 1-2500 were available to download via torrent, and that every file contained &#8220;complete and consistent <span class="caps">ID3</span> tags&#8221;. While the tags for most fields are great, I wasn&#8217;t particularly fond of the format of the track titles. Instead of <em>TrackName (GameName)</em> like I would have preferred, the format was <em>GameName &#8216;TrackName&#8217; <span class="caps">OC</span> ReMix</em>. There are a few reasons why I don&#8217;t like the provided format (namely that the &#8220;<span class="caps">OC</span> ReMix&#8221; suffix feels redundant to me and it feels more appropriate to not see the songs grouped by their source game), but that&#8217;s besides the&nbsp;point.</p> <p>Obviously, manually renaming nearly 2500 tracks in iTunes would be a ridiculous undertaking. Luckily, AppleScript happens to be the perfect tool to automate this task. While I had never used AppleScript previous to this, the syntax was easy enough to learn quickly. <a href="http://dougscripts.com/itunes/">Doug&#8217;s AppleScripts for iTunes</a> proved itself to be a useful resource for learning (and happens to be where I downloaded other scripts from in the past). It is also where I derived the skeleton of this script from. At first, I attempted to figured out how to handle regular expressions within strings in AppleScript, but I soon realized that a crude piece of code would work just as well; it just wouldn&#8217;t be useful for any other situation. I set off in search of AppleScript documentation to learn to to manipulate the track name string in the way that I&nbsp;wanted.</p> <p>The easiest part of the track title to manipulate was removing the <em><span class="caps">OC</span> ReMix</em> text at the end of every track. The way I did it was by setting the track name track to itself after removing 9 characters from the end of the string (as it includes the leading space character). With AppleScript, this was very easy to do: <code>set trackName to text 1 thru -10 of trackName</code> (<code>-1</code> represents the last character in the string, so <code>-2</code> would remove the last character, and so&nbsp;on).</p> <p>After that, to search for the part of the string that contained the song name, I initially tried looking for the first apostrophe in the track title and used the next character as the beginning of the song name string, and ended the string one character before the end of the track title. In most cases, this would (as expected) take the text between the apostrophes &#8212; the song name &#8212; and store it in a dedicated song name string. Great! Fortunately, I tested this script in batches of 10 tracks or so at a time and manually vetted the result, as this definitely did not work. The flaw with this method may already be obvious; if the game name itself contained an apostrophe (for example, Legend of Zelda: Link&#8217;s Awakening), the script would use all the characters after this apostrophe until the final apostrophe as the song name, which is&nbsp;incorrect.</p> @@ -834,7 +834,7 @@ git<span class="w"> </span>push <span class="w"> </span><span class="n">end</span><span class="w"> </span><span class="n">repeat</span> <span class="w"> </span><span class="n">end</span><span class="w"> </span><span class="k">if</span> <span class="n">end</span><span class="w"> </span><span class="n">tell</span> -</code></pre></div>Hello, Blogosphere!2011-10-15T19:35:00-07:002023-11-13T14:41:41-08:00tag:kevinyap.ca,2011-10-15:/2011/10/hello-blogosphere/<p>After much consideration, I&#8217;ve finally decided to start a blog. One reason is to expand my writing skills (I don&#8217;t write nearly enough), but the main reason I&#8217;ve decided to do so is because I now have my own …</p><p>After much consideration, I&#8217;ve finally decided to start a blog. One reason is to expand my writing skills (I don&#8217;t write nearly enough), but the main reason I&#8217;ve decided to do so is because I now have my own space on the Internet to write about, well, anything&nbsp;really.</p> +</code></pre></div>Hello, Blogosphere!2011-10-15T19:35:00-07:002023-11-16T13:56:26-08:00tag:kevinyap.ca,2011-10-15:/2011/10/hello-blogosphere/<p>After much consideration, I&#8217;ve finally decided to start a blog. One reason is to expand my writing skills (I don&#8217;t write nearly enough), but the main reason I&#8217;ve decided to do so is because I now have my own …</p><p>After much consideration, I&#8217;ve finally decided to start a blog. One reason is to expand my writing skills (I don&#8217;t write nearly enough), but the main reason I&#8217;ve decided to do so is because I now have my own space on the Internet to write about, well, anything&nbsp;really.</p> <p>I suppose this is the obligatory mini-biography post, so here goes. I&#8217;m a high school student living in Vancouver, Canada. I quite enjoy school, which I suppose is a good quality. I play the piano, and my favourite sport (to play) is Ultimate Frisbee, which is apparently very popular in the Pacific Northwest, something I wasn&#8217;t aware of until I started playing. Music is one of my passions, and I enjoy composing music in my free time. I&#8217;m also very interested in programming, and there&#8217;s quite a story behind how I became interested in&nbsp;it.</p> <p>One Christmas, I got an iPod Touch as a present from my parents. It was a first generation iPod Touch, only running iPhone <span class="caps">OS</span> 1.1 at the time (it wasn&#8217;t even called iOS back then). It was an amazing device, but the issue was there were no apps for it. The concept of third-party apps wasn&#8217;t even existent. iPhone <span class="caps">OS</span> 1.1.3 added &#8220;Web Clips&#8221;, which were essentially pseudo-apps, or in other words, glorified bookmarks. What was truly amazing, though, was the release of iPhone <span class="caps">OS</span> 2.0. This <span class="caps">OS</span> update contained the debut of the App Store, and it was outstanding. The fact that you could find a game that looked interesting, buy it, and have it playable within a matter of minutes was mind-blowing. To put icing on the cake, the highly awaited games such as Enigmo and Super Monkey Ball were only $10 each, much less than games on any other console (although now, they&#8217;re $1 and $3 respectively; that&#8217;s a blog post for another time). Most apps and games were around the $3–5 range at the time, and only your Apple <span class="caps">ID</span> password stood between you and a shiny new program for your&nbsp;iDevice.</p> <p>When I learned that, unlike the other game consoles at the time, there was essentially no barrier to entry for programming iOS apps, I immediately checked it out. I downloaded Xcode and the iPhone <span class="caps">SDK</span> and messed around with it. I made very rudimentary apps, but nothing at all that was App Store-worthy. Eventually, I found a tutorial that explained how to make a basic Breakout-esque game, which I was pretty proud of. However, I soon realized that while I could follow a tutorial, I wasn&#8217;t able to code on my own. I took a break from Objective-C for a while, and got a book on C. I also bought the <span class="caps">PDF</span> version of <a href="http://learnpythonthehardway.org/">Learn Python the Hard Way</a>, and worked my way through it. While I&#8217;m gaining a better grasp on the concept of coding, I&#8217;m still nowhere near being a programmer; I&#8217;m slowly working on it though! As of now, I&#8217;ve decided to take a break with learning how to program, and instead focus on other things, like making this&nbsp;blog.</p>