Niklas KorzCo-Founder of and Developer at alugha. Love the modern web and languages. All articles are property of and written by Niklas Korz.
https://niklaskorz.de/
Fri, 23 Jun 2017 21:08:33 +0000Fri, 23 Jun 2017 21:08:33 +0000Jekyll v3.4.0Studying Mathematics with Anki and MathJax<p>In this tutorial, we will learn how to effectively use <a href="http://www.ankisrs.net/">Anki</a> flashcards for learning mathematics. For this, we are going add a little bit of magic to our cards by using <a href="https://www.mathjax.org/">MathJax</a> and <a href="https://en.wikibooks.org/wiki/LaTeX/Mathematics">LaTeX</a>.</p>
<p>This approach has the following benefits over Anki’s built-in LaTeX support or other users’ solutions:</p>
<ul>
<li>Resolution-independent rendering (your equations will look sharp on any device, be it your phone or your laptop)</li>
<li>Card editing does not require any additional software except Anki (even AnkiWeb works)</li>
<li>Works flawlessly in Anki desktop, <a href="https://ankiweb.net/">AnkiWeb</a> and <a href="https://play.google.com/store/apps/details?id=com.ichi2.anki">AnkiDroid</a> (and probably on iOS as well, although I have not tested it there)</li>
<li>Does <strong>not</strong> require the <a href="https://ankiweb.net/shared/info/1280253613">JS Booster</a> addon</li>
<li>Relatively easy to setup</li>
</ul>
<p>And if you have been wondering, it also works <em>offline</em> on AnkiDroid after you have synced and reviewed your cards with an active internet connection once. The MathJax code will be cached by AnkiDroid.</p>
<h2 id="requirements">Requirements</h2>
<p>This tutorial assumes that you are already familiar with the Anki software and have edited card templates before. If not, have a look at the <a href="https://apps.ankiweb.net/docs/manual.html">Anki manual</a>, particularly the <a href="https://apps.ankiweb.net/docs/manual.html#templates"><em>Cards and Templates</em></a> section.
Some knowledge of HTML and JavaScript might come in handy, but is not required. For that extra bit of fine tuning, take a look at <a href="https://www.youtube.com/watch?v=F1j1Zx0mXME&amp;yt:cc=on"><em>Anki 2: Styling Cards</em></a> as well. Now to the interesting parts.</p>
<h2 id="integrating-mathjax-with-anki">Integrating MathJax with Anki</h2>
<p>To make use of MathJax in our cards, we have to add some boilerplate code, which I will explain in detail.</p>
<p>First, we will add the MathJax configuration script. Insert the code at the end of your front <strong>and</strong> your back template. The card type does not matter, but I personally prefer <a href="https://apps.ankiweb.net/docs/manual.html#cloze-deletion">cloze cards</a> for mathematics. I also suggest <a href="https://apps.ankiweb.net/docs/manual.html#adding-a-note-type">cloning one of the default card types instead of modifying them directly</a>.</p>
<div class="language-html highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">processSectionDelay</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="na">messageStyle</span><span class="p">:</span> <span class="s1">'none'</span><span class="p">,</span>
<span class="na">showProcessingMessages</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="na">tex2jax</span><span class="p">:</span> <span class="p">{</span>
<span class="na">inlineMath</span><span class="p">:</span> <span class="p">[[</span><span class="s1">'$'</span><span class="p">,</span> <span class="s1">'$'</span><span class="p">]],</span>
<span class="na">displayMath</span><span class="p">:</span> <span class="p">[[</span><span class="s1">'$$'</span><span class="p">,</span> <span class="s1">'$$'</span><span class="p">]],</span>
<span class="na">processEscapes</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
</code></pre>
</div>
<p><em>Config by <a href="https://www.reddit.com/r/Anki/comments/54c967/how_to_use_mathjax_in_anki_ankidroid_online_and/">Dude_From_Canada, Reddit</a></em></p>
<p>This configuration sets the process delay to zero, so MathJax starts translating your raw input as soon as it has finished loading. Next, we tell MathJax to hide error messages (optional). Furthermore, we change the symbols for defining mathematic expressions to <code class="highlighter-rouge">$</code> for inline equations and <code class="highlighter-rouge">$$</code> for block equations. For my cards, I personally have only used inline equations so far, but you will have to experiment which one suits your needs better.</p>
<p>Next, let’s load MathJax itself. Again, insert this code at the <strong>end</strong> of both your front and back template.</p>
<div class="language-html highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">&gt;</span>
<span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">MathJax</span> <span class="o">!=</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">card</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="s1">'.card'</span><span class="p">);</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s1">'Typeset'</span><span class="p">,</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">,</span> <span class="nx">card</span><span class="p">]);</span>
<span class="k">return</span><span class="p">;</span>
<span class="p">}</span>
<span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s1">'script'</span><span class="p">);</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">type</span> <span class="o">=</span> <span class="s1">'text/javascript'</span><span class="p">;</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s1">'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML'</span><span class="p">;</span>
<span class="nb">document</span><span class="p">.</span><span class="nx">body</span><span class="p">.</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span>
<span class="p">})();</span>
<span class="nt">&lt;/script&gt;</span>
</code></pre>
</div>
<p>First, this checks if MathJax has already been loaded. This is necessary to avoid loading MathJax twice when reviewing more than one card. If MathJax has been detected, we also tell it to process the current card. Otherwise, we would be stuck with raw LaTeX code when reviewing our cards.</p>
<p>If MathJax has indeed not been loaded yet, we create a script tag that loads the MathJax code from <a href="https://cdnjs.com/">cdnjs</a>. In this case, MathJax will automatically process the card once it finished loading. The query parameter at the end of the script src (<code class="highlighter-rouge">?config=TeX-MML-AM_CHTML</code>) specifies that MathJax should be loaded with support for TeX/LaTeX, <a href="https://en.wikipedia.org/wiki/MathML">MathML</a> and <a href="http://asciimath.org/">AsciiMath</a> input and CommonHTML output. Note that Anki desktop does not properly support Common HTML as output, so you might want to switch the query to <code class="highlighter-rouge">?config=TeX-MML-AM_SVG</code> for SVG output if you rely on Anki desktop for reviewing. This mode will work on AnkiDroid and AnkiWeb as well, but takes slightly longer to process than CHTML.</p>
<h2 id="writing-cards">Writing cards</h2>
<p>Now that we have finished the cumbersome parts, let’s get started with the real fun. For a real presentation, I have included the same MathJax code I have just shown you as part of this tutorial.</p>
<p>We may have simple equations like $x^2 = 4$ (<code class="highlighter-rouge">$x^2 = 4$</code>), but the complicated ones are far more interesting.</p>
<p>We can do sums:</p>
<script type="math/tex; mode=display">\sum \limits_{n=0}^\infty a_n = 5</script>
<div class="language-latex highlighter-rouge"><pre class="highlight"><code><span class="p">$$</span><span class="nv">\sum</span><span class="nb"> </span><span class="nv">\limits</span><span class="p">_{</span><span class="nb">n</span><span class="o">=</span><span class="m">0</span><span class="p">}^</span><span class="nv">\infty</span><span class="nb"> a</span><span class="p">_</span><span class="nb">n</span><span class="p">$$</span>
</code></pre>
</div>
<p>And we can write some conclusions:</p>
<script type="math/tex; mode=display">\forall n \in \mathbb{N}: n - 5 \ge 0 \rightarrow n - 4 \ge 0</script>
<div class="language-latex highlighter-rouge"><pre class="highlight"><code><span class="p">$$</span><span class="nv">\forall</span><span class="nb"> n </span><span class="nv">\in</span><span class="nb"> </span><span class="nv">\mathbb</span><span class="p">{</span><span class="nb">N</span><span class="p">}</span><span class="nb">: n </span><span class="o">-</span><span class="nb"> </span><span class="m">5</span><span class="nb"> </span><span class="nv">\ge</span><span class="nb"> </span><span class="m">0</span><span class="nb"> </span><span class="nv">\rightarrow</span><span class="nb"> n </span><span class="o">-</span><span class="nb"> </span><span class="m">4</span><span class="nb"> </span><span class="nv">\ge</span><span class="nb"> </span><span class="m">0</span><span class="p">$$</span>
</code></pre>
</div>
<p>To do this, simply wrap your equations in <code class="highlighter-rouge">$</code> for inline equations, and <code class="highlighter-rouge">$$</code> for block equations.
When reviewing your cards, MathJax will turn your raw input into beautiful math:</p>
<p><img src="/assets/anki-example-141b6d6ea46f10c778faa9a82d15d153185bdccef85d4680dfcda58b92b515ab.png" width="818" height="203" alt="anki-example.png" /></p>
<h2 id="further-reading">Further reading</h2>
<ul>
<li><a href="https://www.reddit.com/r/Anki/comments/43mf83/guide_how_to_anki_maths_the_right_way/">How to Anki Maths the right way.</a></li>
<li><a href="https://www.supermemo.com/en/articles/20rules">Effective learning: Twenty rules of formulating knowledge</a></li>
<li><a href="http://lesswrong.com/r/discussion/lw/o8e/how_i_use_anki_to_learn_mathematics/">How I use Anki to learn mathematics</a></li>
</ul>
<p>Thanks for your attention. If you still have any questions, feel free to ask them below in the comment section.</p>
<script type="text/x-mathjax-config">
MathJax.Hub.processSectionDelay = 0;
MathJax.Hub.Config({
messageStyle: 'none',
showProcessingMessages: false,
tex2jax: {
inlineMath: [['$', '$']],
displayMath: [['$$', '$$']],
processEscapes: true
}
});
</script>
<script type="text/javascript">
(function() {
if (window.MathJax != null) {
var card = document.querySelector('.card');
MathJax.Hub.Queue(['Typeset', MathJax.Hub, card]);
return;
}
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML';
document.body.appendChild(script);
})();
</script>
Sun, 11 Jun 2017 11:20:00 +0000https://niklaskorz.de/2017/06/studying-mathematics-with-anki-and-mathjax.html
https://niklaskorz.de/2017/06/studying-mathematics-with-anki-and-mathjax.htmlLG Vertretungsplan App for Android<p><em>Disclaimer: All data and names appearing in these screenshots are fictitious. Any resemblance to real data or real persons, living or dead, is purely coincidental. They do not include any data shared by the online substitution plan and therefore comply with its terms of use.</em></p>
<p>The last few weeks, I’ve been developing an app for the substitution plan of my school (hence the name: “Vertretungsplan” is German for substitution plan).</p>
<h2 id="previous-situation">Previous Situation</h2>
<p>Before the development of the Android app, students of my school were able to view the substitution plan…</p>
<ul>
<li>in the school building</li>
<li>online (currently limited to students of the MSS)</li>
</ul>
<p>The online substitution plan was introduced this school year, allowing students to view it “comfortably” after school, or right before at about 7:30am.</p>
<p><img src="https://www.dropbox.com/s/7ucpe3tvyio62ed/wCiVkmCezxfQAAAAABJRU5ErkJggg%3D%3D.png?raw=1" alt="Small viewport" title="Small viewport" /></p>
<p>Albeit a nice a feature, it also has its problems:</p>
<ul>
<li>Ugly user interface</li>
<li>Bad readability, thanks to the poorly chosen contrast of text and background</li>
<li>No mobile interface, and a bad user experience for mobile users (too much scrolling, hardly reachable control elements)</li>
</ul>
<h2 id="the-idea">The Idea</h2>
<p>Basically, the idea was to develop an app that provides the user only the data that is relevant to him. Currently, this means that he is only displayed the courses for his class level.</p>
<p><img src="https://www.dropbox.com/s/p9ao5r11nvgedm7/device-2015-05-12-231625.png?raw=1" alt="Android app" title="Android app" /></p>
<p>To keep things clear, the user would only see the most relevant data at a glance, further information being available at a single click.</p>
<h2 id="the-problem">The Problem</h2>
<p>In theory, receiving the necessary data would be the easiest part. I would contact the responsible AG (“Arbeitsgemeinschaft”, working group) and ask them to either give me access to the source code and let me implement a machine-readable API, or let them implement the API themselves. I didn’t even get a response to my request by the responsible developers.</p>
<p>So as it turns out, it wasn’t that easy. Cooperation was pretty much non-existent and communication was sparse. And having some pride myself, I thought I could do this on my own, without having their support.</p>
<h2 id="the-solution">The Solution</h2>
<p>Thankfully, I am more or less experienced in web scraping, as a result of past jobs involving data gathering from multiple websites. This was no different.
The idea is that you would read and use the website as if you were a user. So in this case, I worked with the <a href="http://jsoup.org/">jsoup library</a> and CSS selectors. Jsoup describes itself as a “convenient API for extracting and manipulating data”.
Of course, users don’t parse websites by using CSS selectors, but it’s a good idea to begin with.</p>
<p><img src="https://www.dropbox.com/s/3j85b6dkv2ss1tp/YYAAAAASUVORK5CYII%3D.png?raw=1" alt="Structure" title="Structure" /></p>
<p>The steps for gathering the plan data are:</p>
<ol>
<li>Get the HTML code for the plan we want to get (/heute for today and /morgen for tomorrow)</li>
<li>Parse the code using jsoup</li>
<li>Get all table rows using a CSS selector: <code class="highlighter-rouge">#vertretungsplan tr</code></li>
<li>For each row, get all <code class="highlighter-rouge">td</code> elements, parse the data, and feed it to a list</li>
</ol>
<p>Having parsed all the data, we could display it as intended.
One more problem I ran into was authentication. The online substitution plan uses PHP session ids and cookies for authentication. The authentication flow would be as follows: Enter your data into the login form, POST request to the index page to have your session id authenticated and from there on, get the data you want from <code class="highlighter-rouge">/heute</code> and <code class="highlighter-rouge">/morgen</code>.
But this meant an extra request for authentication each time we needed to login. And not being authenticated still needed me to parse the page to check for errors, since this “beast of a product” simply makes use of no HTTP feature whatsoever. The HTML code is malformed as well: Ids, which ought to be unique, are reused multiple times and typos are included as well.</p>
<p>As I later discovered, it does not matter which page you send the post request to. So to save traffic, authentication information is sent with each request to either <code class="highlighter-rouge">/heute</code> or <code class="highlighter-rouge">/morgen</code>. At first glance, this might be considered a security issue, but the requests are performed using TLS and no sensitive data is connected to the accounts.</p>
<h2 id="future-ideas">Future Ideas</h2>
<p>The biggest feature planned for the future are notifications based on a list of your courses. At a fixed interval, the app would refresh the plan data, generate a changeset and based on this set, show notifications concerning your courses.
I am not sure yet, however, whether I will include a cloud sync feature for this, since the app is currently running without further server software, save the online substitution plan.</p>
<h2 id="open-source">Open Source</h2>
<p>The <a href="https://github.com/vertretungen/android">complete app’s source code</a> is available at Github under the BSD-2-clause-license.</p>
Mon, 11 May 2015 22:00:00 +0000https://niklaskorz.de/2015/05/lg-vertretungsplan-app-for-android.html
https://niklaskorz.de/2015/05/lg-vertretungsplan-app-for-android.htmlProgress on KaraPy<p><em>This is a follow-up on my previous article <a href="http://niklaskorz.de/post/77482981811/updating-karas-python">Updating Kara’s Python</a></em></p>
<p>KaraPy – the Kara replacement I have been working on using Python – is nearing its open source release.
Everything but the “tools” object is implemented, although that does not mean there is not more development to do on it.</p>
<video autoplay="" loop="" poster="http://i.imgur.com/DSrPUAT.png" width="278" height="308"><source src="http://zippy.gfycat.com/BitesizedPoshAfricanelephant.mp4" type="video/mp4" /><source src="http://zippy.gfycat.com/BitesizedPoshAfricanelephant.webm" type="video/webm" /><img src="http://zippy.gfycat.com/BitesizedPoshAfricanelephant.gif" width="278" height="308" alt="Kara Demo" />&lt;/source&gt;&lt;/source&gt;</video>
<p>As you can see in the small demo above, I also have found replacement for Kara’s images and the respective authors will be named along the images’ licenses in the repository as soon as it is on GitHub.
I would also like to add that it is working in both Python 2 and 3 (tested in PyPy 2.1, Python 2.7 and Python 3.3).</p>
<h2 id="what-still-has-to-be-done">What Still Has To Be Done</h2>
<p>First of all and as already mentioned, there are still methods of the “tools” object left to be implemented:</p>
<ul>
<li><code class="highlighter-rouge">void showMessage(String string)</code> “Write string to dialog window”</li>
<li><code class="highlighter-rouge">void checkState()</code> “Checks the execution controller”</li>
<li><code class="highlighter-rouge">String stringInput(String title)</code> “Lets the user input a string in a dialog window with a <code class="highlighter-rouge">title</code>. Returns <code class="highlighter-rouge">null</code> if the dialog is aborted using <code class="highlighter-rouge">Cancel</code>.”</li>
<li><code class="highlighter-rouge">int intInput(String title)</code> “Lets the user input a[n] integer number in a dialog window with a <code class="highlighter-rouge">title</code>. Returns <code class="highlighter-rouge">Integer.MIN_VALUE</code> if the dialog is aborted using <code class="highlighter-rouge">Cancel</code>.”</li>
<li><code class="highlighter-rouge">double doubleInput(String title)</code> “Lets the user input a real number in a dialog window with a <code class="highlighter-rouge">title</code>. Returns <code class="highlighter-rouge">Double.MIN_VALUE</code> if the dialog is aborted using <code class="highlighter-rouge">Cancel</code>.”`</li>
</ul>
<p>Secondly, it barely has any tests yet, partly because I am still not used to them, but that definitely is something I have to fix.</p>
<h2 id="ideas-for-the-future">Ideas For The Future</h2>
<p>There are some, but I consider these this one the most important: Adding a world editor to KaraPy itself so we do not have to rely on Kara’s editor at all.
But I do not think that we already have to stop there. I have good faith that this program could become more than just a Kara clone, meaning that eventually its API will get bigger and that it might get a custom map format supporting more than just the bug, trees, mushrooms and leaves.</p>
Sat, 22 Feb 2014 23:00:00 +0000https://niklaskorz.de/2014/02/progress-on-karapy.html
https://niklaskorz.de/2014/02/progress-on-karapy.htmlUpdating Kara’s Python<p>Recently we started learning programming in my computer science course in school using Python. For this, we are using Kara, which looks like a game for children at first sight, but actually is pretty cool.
In case you do not know Kara…</p>
<h2 id="what-is-kara">What Is Kara</h2>
<p>In <a href="http://www.swisseduc.ch/informatik/karatojava/pythonkara/">Kara</a>, you have a grid which as a preset consists of 9 times 9 fields.
On these fields, you can place either a tree, a mushroom, a leaf, Kara or Kara on a leaf. Kara is both the name of the program itself and of its controllable ladybug.
Using Python, Java, JavaScript and perhaps a few other languages, you can move, turn and do a bunch of other things with Kara.
But Kara’s Python version is not perfect.</p>
<h2 id="the-problem">The Problem</h2>
<p>Kara for Python only supports Python 2.2, which already is 13 years old. The latest stable version is 3.3.4.
Already being a programmer for nearly four years, I decided to fix this. At first I tried replacing the Jython library bundled with Kara, which did not really work. So instead, I decided to rewrite the whole thing using the latest version of Python. Aside of that, I think that it makes sense to write a program for learning Python in Python itself.</p>
<h2 id="rewriting-kara">Rewriting Kara</h2>
<p>As already mentioned, I decided on using Python 3 for rewriting Kara.
To make it as portable as possible, I also decided on using Tkinter for the GUI.
And since Kara’s worlds are saved in an XML format, I could just use them as-is, which in turn meant I wouldn’t have to rewrite its world editor.
So far drawing the world works, and a few other internal things do too.
Of course I will have to replace the images since I am not the copyright holder, but while it is in development I will keep on using them.
I will post an update as soon as its programmable and release the source code on Github.</p>
<p><img src="http://i.imgur.com/RdjjvSy.png" alt="KaraPy" /></p>
Fri, 21 Feb 2014 23:00:00 +0000https://niklaskorz.de/2014/02/updating-karas-python.html
https://niklaskorz.de/2014/02/updating-karas-python.htmlHow I Learn Languages<p>Usually one might expect an article by an experienced polyglot speaking a dozen
of languages when reading such a headline. But in this case, it’s just a German
teenager who’s only fluent in German and English, while also learning Spanish
and French.</p>
<p>So if you think you’ll encounter the Holy Grail of Language Learning here, move
on. This is not the article you’re looking for.
Instead, I will tell you about my experience and show you what has and what has not
worked for me.
To begin with, I will tell you about…</p>
<h2 id="my-story">My story</h2>
<p>In elementary school, I basically didn’t learn any English. Truth be told, we
had English class for two years, but still, I would not say that it had
a lasting effect on me.</p>
<p>So it wasn’t until I left the elementary school and attended a <a href="http://en.wikipedia.org/wiki/Gymnasium_(school)">Gymnasium</a>
that I really started to learn English.
Oh, so language learning must be so much better at a high school, right? Not
really. Looking back, I think what really helped me learning English is that it
basically surrounds you everywhere, especially me. I was already used to
listening to English music, but I do not consider music a good source for
learning languages.
I pushed things further when I started playing video games in English. Honestly,
the beginning was hard. Starting to learn a language is always hard.
I barely understood anything at the beginning. But this is only natural, isn’t
it? Do children understand anything when they start learning their native
language? No, they don’t. They see actions in combination with spoken gibberish.
And their brains just start to connect them so eventually they end up
understanding what these things mean and they start to <strong>speak</strong> the language.</p>
<p>It works for children, so why shouldn’t it work for you?
I am not making the assumption that stuffing rules and vocabulary into your head
does not work. I am just trying to say that it does not work <strong>if it is your
only way of learning</strong>.
Learning grammar rules should only be a backup until all these decisions start
sounding natural to you.
I consider learning vocabulary more important and useful, as long as you do not
start to translate things word by word. You do not have to learn the translation
of a word, but instead the <strong>idea</strong>. Again, I want to compare this to a child.
A child does not even have the option of translating its native language to
Babyish. Instead, it picks up the words from its environment by learning what
the word wants to express, no matter if it is feeling, hearing or seeing.</p>
<p>So here comes the nearly most important element of learning a language:</p>
<h2 id="immersion">Immersion</h2>
<p>In four years of school French, I could barely speak or understand any French.
After two years of school Spanish I could not speak to my exchange partner in
the language I really wanted to learn.
I started thinking. Learning English worked, so why not these two? What was
different?
Right, I was immersed, into games in English and later movies. I also picked up
lots of words after I started learning programming and was reading lots of tech
related articles in English, but that really is just another way of learning
vocabulary since I still had to look them up.
I do not know how, but it works. It is weird at the beginning, but it will
eventually start to make sense. All those sentences slowly start to make sense,
even if you do not know some of the words, because you can get those out of the
context.</p>
<p>But as I said, this is not <strong>the</strong> most important element of learning
a language. What’s far more important is…</p>
<h2 id="motivation">Motivation</h2>
<p>You cannot get immersed if you do not have any motivation for learning the
language.
You can probably live years in a country, but as long as you do not want to
learn the language, you won’t. They same goes for a class room. Motivation and
commitment are the key elements for achieving fluency. I know, it sounds so
simple and yet, I didn’t get it. I was attending the French and Spanish courses
thinking that it would eventually just get into my brain, that I do not have to
learn the language in my leisure time. But now I know that language classes in
school should only be considered as a way to ask questions. Most of what you
will learn comes from what you do on your own.</p>
<h2 id="about-software-for-learning-languages">About software for learning languages</h2>
<p>These can be quite helpful, but some are not.
For example, Rosetta Stone seems to be a great choice for language immersion at first glance,
but to me, it’s not. I think the issue is that this is creating a fake
environment for someone learning the language. Sure, games and movies do these,
too, but their audience are fluent speakers, not people learning the language.
In this case, jumping in at the deep end seems to be working better.
So far, I can only recommend using spaced repitition tools for learning
vocabulary (for example, <a href="http://ankisrs.net/">Anki</a> or <a href="http://www.memrise.com/">Memrise</a>). Software cannot create the
environment things targetting a fluent speaker can.</p>
<h2 id="conclusion">Conclusion</h2>
<p>As I said, what has worked for me and what I’m currently doing is playing video
games and watching movies in the target language. If you can, try moving to
a country where the language is spoken, because – let’s be honest – that’s as
immersed as you can get.
Also try to at least pick up a basic set of vocabulary using spaced repitition
software (or another way of learning vocabulary if there is one that works
better for you).</p>
<p>That’s it. Hopefully I did not disappoint you. This article is not based on
any scientific research nor does it try to imply that. This is just based on my
personal experience.</p>
Wed, 01 Jan 2014 23:00:00 +0000https://niklaskorz.de/2014/01/how-i-learn-languages.html
https://niklaskorz.de/2014/01/how-i-learn-languages.htmlMucoce 2.0 Coming Soon<p>Lately, I have been working on version 2.0 of my Mac application called “Mucoce”.</p>
<p>For those of you who don’t know Mucoce:
It was my first big Objective-C project, which hit the Mac App Store in July 2011. Basically, it’s a mini player for iTunes (and Spotify, as of version 2.0) which you can access from your menu bar.</p>
<h4 id="version-10">Version 1.0:</h4>
<p><img src="http://i.imgur.com/7dADs8Q.png" alt="Mucoce 1" /></p>
<h4 id="version-20">Version 2.0:</h4>
<p><img src="http://i.imgur.com/RyXy0k8.png" alt="Mucoce 2" />
<img src="http://i.imgur.com/7O7fMbm.png" alt="Mucoce 2 on hover" /></p>
<h4 id="whats-new">What’s new?</h4>
<ul>
<li>Spotify support</li>
<li>New design</li>
<li>Complete rewrite of Mucoce</li>
<li>Faster, using <strong>far</strong> less system resources (I have to admit, Mucoce 1 was pretty wasteful)</li>
</ul>
<h4 id="which-features-of-mucoce-1-are-currently-missing">Which features of Mucoce 1 are (currently) missing?</h4>
<ul>
<li>Notifications</li>
<li>Current position and duration of the track</li>
</ul>
<h4 id="which-features-wont-come-back">Which features won’t come back?</h4>
<ul>
<li>Sharing which song you’re listening to via Twitter</li>
</ul>
<p>Aside of that, I’m not sure yet whether I’ll add the rating feature again.</p>
<p>You can get Mucoce 1.2.1 for $0.99 (0,79€) on the Mac App Store.</p>
<p><a href="http://clk.tradedoubler.com/click?p=23761&amp;a=1725532&amp;url=http%3A%2F%2Fitunes.apple.com%2Fen%2Fapp%2Fmucoce%2Fid444546172%3Fmt%3D12%26uo%3D4%26partnerId%3D2003"><img src="http://ax.phobos.apple.com.edgesuite.net/images/web/linkmaker/badge_macappstore-lrg.gif" alt="Mac App Store" /></a></p>
<p>Version 2.0 will probably be a bit more expensive, but the upgrade for customers of Mucoce 1 will be free.</p>
Sun, 01 Sep 2013 22:00:00 +0000https://niklaskorz.de/2013/09/mucoce-2-0-coming-soon.html
https://niklaskorz.de/2013/09/mucoce-2-0-coming-soon.htmlSmall BF Interpreter in Scala<p>This is a small interpreter for <a href="https://en.wikipedia.org/wiki/Brainfuck">BF</a> I wrote about a month ago. Nothing new, but I thought I might share it anyway.</p>
<p>A small usage example:</p>
<script src="https://gist.github.com/niklaskorz/dca5f433cfc1b33c13fe.js" type="text/javascript"></script>
<script src="https://gist.github.com/niklaskorz/4523503.js" type="text/javascript"></script>
<p>I’ve tested it with the hello world program from Wikipedia and the “99 Bottles of Beer” program which I found on this page.</p>
<p>Hello world:</p>
<script src="https://gist.github.com/niklaskorz/4523505.js" type="text/javascript"></script>
<p>Edit (19th January 2013): As mentioned in the comments, the way this interpreter handles loops is more like a do-while instead of a while loop.</p>
Mon, 24 Jun 2013 22:00:00 +0000https://niklaskorz.de/2013/06/small-bf-interpreter-in-scala.html
https://niklaskorz.de/2013/06/small-bf-interpreter-in-scala.htmlgfxCardStatus Crashes Source Engine Games on OS X 10.8<p>Since the release of OS X Mountain Lion, Source engine games (like Team Fortess 2 or Garry’s Mod) haven’t worked for me at all. They always crashed as soon as the game launched.</p>
<p>Today, I recognized that when I close gfxCardStatus or set it to automatic, those games work again.
I hope that this tip can help anyone.</p>
Mon, 10 Sep 2012 22:00:00 +0000https://niklaskorz.de/2012/09/gfxcardstatus-crashes-source-engine-games-on-os-x-10-8.html
https://niklaskorz.de/2012/09/gfxcardstatus-crashes-source-engine-games-on-os-x-10-8.htmlAbout Valve, Steam and Linux: Linux on a Steam Console?<p>A few minutes ago, I’ve been reading an article about Valve releasing the new Big Picture Mode for Steam (beta).</p>
<p>As you probably know, Valve’s porting Steam and the Source engine to Linux and there have been many assumptions about why Valve is doing this.
Is it because of Windows 8 and its marketplace? Or is it just about expanding to other platforms?</p>
<p>Now there have been many rumors about Valve working on a Steam console.</p>
<p>“<em>But how are those related to each other?</em>” you may think.</p>
<p>In my opinion, there’s a pretty good chance that Valve will use Linux on their console, because:</p>
<ul>
<li>They won’t need to develop everything from scratch.</li>
<li>They won’t need to pay Microsoft for Windows licenses (there have been some rumors about that Valve could also use Windows on their console, because of the amount of games that run on it).</li>
<li>They could get the Linux community on their side (well that depends on how open the Steam console would be, but getting more games on Linux itself is also a nice thing).</li>
</ul>
<p>I also think that this could get more developers for Linux games, because it won’t be just about “developing Linux games”, but also about “developing games for Valve’s console”.</p>
<p>I highly appreciate discussion about this topic. If I’m wrong at some point, please tell me.</p>
Sun, 09 Sep 2012 22:00:00 +0000https://niklaskorz.de/2012/09/about-valve-steam-and-linux-linux-on-a-steam-console.html
https://niklaskorz.de/2012/09/about-valve-steam-and-linux-linux-on-a-steam-console.html