<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <id>https://carnagion.github.io/blog/atom.xml</id>

    <title>Indraneel Mahendrakumar's blog</title>
    
    
        <updated>2025-09-06T16:45:00+02:00</updated>
    

    <author>
        <name>Indraneel Mahendrakumar</name>
        <uri>https://carnagion.github.io</uri>
        <email>indraneel.mahendrakumar@gmail.com</email>
    </author>

    <link rel="self" type="application/atom+xml" href="https://carnagion.github.io/blog/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://carnagion.github.io/blog"/>

    <generator uri="https://github.com/Carnagion/carnagion.github.io">carnagion.github.io</generator>
    
    
        
            
            <entry xml:lang="en">
                <id>https://carnagion.github.io/blog/hobbying-again</id>

                <title>Hobbying Again</title>

                <published>2025-09-06T16:45:00+02:00</published>
                <updated>2025-09-06T16:45:00+02:00</updated>

                <author>
                    <name>Indraneel Mahendrakumar</name>
                    <uri>https://carnagion.github.io</uri>
                    <email>indraneel.mahendrakumar@gmail.com</email>
                </author>

                <link rel="alternate" type="text/html" href="https://carnagion.github.io/blog/hobbying-again"/>

                <content type="html" xml:base="https://carnagion.github.io/blog/hobbying-again">
                    
                    &#60;p&#62;A lot has happened in the past few months. I graduated from university, acquired a j*b, and experienced the last three-month summer break of my life.&#60;/p&#62;
&#60;p&#62;During this time, I came to realise a number of things, of which the biggest was that programming had almost completely taken over my free time. And I don’t mean the programming I do for university assignments or work, I mean programming as a &#60;em&#62;hobby&#60;/em&#62;.&#60;/p&#62;
&#60;p&#62;I started programming way back in 2020, when COVID was at its worst and schools pivoted to online learning, providing students with plenty of opportunities to slack off while teachers were unable to observe their activities. My preferred method of procrastination at the time was to play &#60;a href=&#34;https://store.steampowered.com/app/294100/RimWorld/&#34;&#62;&#60;em&#62;RimWorld&#60;/em&#62;&#60;/a&#62; nearly every waking hour, and before long I found myself writing mods for the game.&#60;sup class=&#34;footnote-ref&#34;&#62;&#60;a href=&#34;#fn-rimworld-playtime&#34; id=&#34;fnref-rimworld-playtime&#34; data-footnote-ref&#62;1&#60;/a&#62;&#60;/sup&#62;&#60;/p&#62;
&#60;p&#62;In the relatively short span of a year or so, I went from not knowing what a variable was to studying computer science at university. My habit of hyperfixation latched on to this newfound fascination with programming, and I started using it as a means of procrastinating other tasks — including other programming tasks.&#60;sup class=&#34;footnote-ref&#34;&#62;&#60;a href=&#34;#fn-good-rectangle&#34; id=&#34;fnref-good-rectangle&#34; data-footnote-ref&#62;2&#60;/a&#62;&#60;/sup&#62;&#60;/p&#62;
&#60;p&#62;Unfortunately, this spelled disaster for most of my other forms of entertainment, including but not limited to reading, gaming, composing and playing music, &#60;em&#62;LEGO&#60;/em&#62;, and watching movies or shows.&#60;/p&#62;
&#60;p&#62;Reading in particular was disproportionately impacted, probably because it one of my more frequent activities besides gaming. Whereas earlier I’d burn through a couple of books a week, by the time I joined university I had stopped reading books almost entirely.&#60;/p&#62;
&#60;p&#62;Actually, that’s not &#60;em&#62;quite&#60;/em&#62; true — I &#60;em&#62;did&#60;/em&#62; read throughout my time at university, just not anything other than manga and webtoons. And while there’s some great literature to be found in there, the varying quality of unofficial scanlations and constant recycling of the same few &#60;em&#62;isekai&#60;/em&#62; plotlines leaves a lot to be desired. I’m officially sick of reading stories about an overpowered teenage student or overworked wagie being summoned to a medieval-era world with magic or other RPG mechanics.&#60;/p&#62;
&#60;p&#62;Anyways. One of the triggers for having this realisation in the first place was getting to know and spending more time with people who actively pursued hobbies other than programming or gaming in my final year. As it turns out, having friends with a variety of interests is a great way to discover said interests and develop new hobbies. Who could’ve thunk it, really.&#60;/p&#62;
&#60;p&#62;Although it’s not just that — in the past eight months or so I’ve had a surplus of time that has been incredibly hard to come by during my degree. And since I’m now living in a different country to most of my friends, I’ll have to make some new ones, which is rather difficult if all I ever do is sit at home and code all day.&#60;/p&#62;
&#60;p&#62;So now here I am, trying to pick up the hobbies I had abandoned so long ago and unlearning that pesky habit of rushing to my phone or laptop upon encountering the first sign of boredom.&#60;/p&#62;
&#60;p&#62;For starters, I’ve taken up &#60;a href=&#34;/blog&#34;&#62;blogging&#60;/a&#62; and &#60;a href=&#34;/reviews&#34;&#62;writing music reviews&#60;/a&#62;, which has been a really enjoyable experience so far. That said, it’s something of a double-edged sword since my website is entirely custom-built, making it laughably easy to sidetrack myself from blogging with “just one more feature bro”. But that’s a problem for future me.&#60;/p&#62;
&#60;p&#62;I also bought myself a Kindle, which has done wonders for my motivation to read, as I:&#60;/p&#62;
&#60;ul&#62;
&#60;li&#62;No longer need to carry physical books or make space to store them (although there is still something nice about the feeling of actual paper on your hands),&#60;/li&#62;
&#60;li&#62;Don’t have to strain my eyes trying to read from a phone screen,&#60;/li&#62;
&#60;li&#62;And can acquire any book I want at any time (I mean 🏴‍☠️ of course; I would never purchase books from Amazon).&#60;/li&#62;
&#60;/ul&#62;
&#60;p&#62;Not to mention that spending money on something also makes me more likely to use it than let it collect dust, so there’s that. As of writing this I’ve already read three books on it and will probably read another one soonish. Good progress, considering I’ve only read around four other books this year and practically none the previous three years.&#60;/p&#62;
&#60;p&#62;I’ve been gaming more too, and not just the same old ones. One of my best friends recommended &#60;a href=&#34;https://store.steampowered.com/app/1328670/&#34;&#62;&#60;em&#62;Mass Effect&#60;/em&#62;&#60;/a&#62; to me not too long ago, which I absolutely loved and would highly recommend to anyone looking for action-RPGs with a complex and emotional story line. I’m hoping to also revisit &#60;a href=&#34;https://store.steampowered.com/app/489830/&#34;&#62;&#60;em&#62;Skyrim&#60;/em&#62;&#60;/a&#62; and &#60;em&#62;RimWorld&#60;/em&#62; again, both of which I haven’t touched since 2023.&#60;/p&#62;
&#60;p&#62;And there’s still more hobbies to get back into, of course (sadly, they’re like Tasks ™ — there’s always more to do). I’ll probably join a band or music group, although that’ll have to wait until after I’ve started my job and have a decent idea of my schedule. And I plan to buy more &#60;em&#62;LEGO&#60;/em&#62; sets to make my living space appear less bleak. But for now, this is a good start.&#60;/p&#62;
&#60;hr /&#62;
&#60;section class=&#34;footnotes&#34; data-footnotes&#62;
&#60;ol&#62;
&#60;li id=&#34;fn-rimworld-playtime&#34;&#62;
&#60;p&#62;I now have over 1000 hours on &#60;em&#62;RimWorld&#60;/em&#62;. Oops. &#60;a href=&#34;#fnref-rimworld-playtime&#34; class=&#34;footnote-backref&#34; data-footnote-backref data-footnote-backref-idx=&#34;1&#34; aria-label=&#34;Back to reference 1&#34;&#62;↩&#60;/a&#62;&#60;/p&#62;
&#60;/li&#62;
&#60;li id=&#34;fn-good-rectangle&#34;&#62;
&#60;p&#62;Perhaps unsurprisingly, the &#60;strong&#62;Good Rectangle ™&#60;/strong&#62; is great for distracting yourself from the &#60;strong&#62;Bad Rectangle ™&#60;/strong&#62;. &#60;a href=&#34;#fnref-good-rectangle&#34; class=&#34;footnote-backref&#34; data-footnote-backref data-footnote-backref-idx=&#34;2&#34; aria-label=&#34;Back to reference 2&#34;&#62;↩&#60;/a&#62;&#60;/p&#62;
&#60;/li&#62;
&#60;/ol&#62;
&#60;/section&#62;

                </content>
            </entry>
        
    
        
            
            <entry xml:lang="en">
                <id>https://carnagion.github.io/blog/over-engineering-playlist-generation</id>

                <title>Over-Engineering Playlist Generation</title>

                <published>2024-11-20T18:12:00+00:00</published>
                <updated>2024-11-20T19:12:00+00:00</updated>

                <author>
                    <name>Indraneel Mahendrakumar</name>
                    <uri>https://carnagion.github.io</uri>
                    <email>indraneel.mahendrakumar@gmail.com</email>
                </author>

                <link rel="alternate" type="text/html" href="https://carnagion.github.io/blog/over-engineering-playlist-generation"/>

                <content type="html" xml:base="https://carnagion.github.io/blog/over-engineering-playlist-generation">
                    
                    &#60;p&#62;Imagine you want a power metal playlist for your hour-long gym session. Or maybe something relaxing for your daily commute. Or some pirate metal&#60;sup class=&#34;footnote-ref&#34;&#62;&#60;a href=&#34;#fn-pirate-metal&#34; id=&#34;fnref-pirate-metal&#34; data-footnote-ref&#62;1&#60;/a&#62;&#60;/sup&#62; to blast as you play drinking games with your friends. Or… whatever, you get the idea. In any case, you want some kind of playlist.&#60;/p&#62;
&#60;p&#62;Now, the normal and totally sane way of doing this would be to go through your music library and add the songs you want until you’re satisfied. Maybe you even do this on a regular basis.&#60;/p&#62;
&#60;p&#62;But there’s no &#60;em&#62;fun&#60;/em&#62; in doing that — it requires &#60;em&#62;time&#60;/em&#62; and &#60;em&#62;effort&#60;/em&#62; to pick the best songs. Plus, you might end up with a playlist that’s longer than you want it to be, and then you’d potentially have to stop a song mid-way! Can’t have that.&#60;/p&#62;
&#60;p&#62;So instead, you can write a program to automatically &#60;em&#62;generate&#60;/em&#62; playlists in the most optimal way possible, such that you never get a playlist that’s longer than you want, and only the most relevant songs — according to some given metric — are included in it.&#60;/p&#62;
&#60;p&#62;How does one do this, you ask? By solving the knapsack problem, of course.&#60;/p&#62;
&#60;h2&#62;&#60;a href=&#34;#the-knapsack-problem&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34; id=&#34;the-knapsack-problem&#34;&#62;&#60;/a&#62;The knapsack problem&#60;/h2&#62;
&#60;p&#62;The knapsack problem is a very common problem in the field of &#60;a href=&#34;https://en.wikipedia.org/wiki/Combinatorial_optimization&#34;&#62;combinatorial optimisation&#60;/a&#62;. From &#60;a href=&#34;https://en.wikipedia.org/wiki/Knapsack_problem&#34;&#62;Wikipedia&#60;/a&#62;:&#60;/p&#62;
&#60;blockquote&#62;
&#60;p&#62;&#60;em&#62;Given a set of items, each with a weight and a value, determine which items to include in the collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.&#60;/em&#62;&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;I’m specifically referring to the variant known as the &#60;em&#62;0-1 knapsack problem&#60;/em&#62;, wherein each item can only be included or excluded (you cannot, for example, include the same item multiple times, or include a fractional amount of an item).&#60;/p&#62;
&#60;h3&#62;&#60;a href=&#34;#okay-but-what-does-this-have-to-do-with-generating-playlists&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34; id=&#34;okay-but-what-does-this-have-to-do-with-generating-playlists&#34;&#62;&#60;/a&#62;Okay, but what does this have to do with generating playlists?&#60;/h3&#62;
&#60;p&#62;You might think that generating playlists is quite simple, and that there’s no need for all this fancy mathematical optimisation nonsense.&#60;/p&#62;
&#60;p&#62;And that’s true — kind of. It’s easy if you just want to shove all relevant songs into one big playlist.&#60;/p&#62;
&#60;p&#62;But things get more complicated when you add a duration limit while wanting to maximise relevance. You can’t, for example, just reverse-sort songs by relevance and then keep taking them until you hit the duration limit, because there might be a different combination that has a greater total relevance and is still under the duration limit.&#60;/p&#62;
&#60;p&#62;If you look closely, however, this is actually just the 0-1 knapsack problem in disguise. It’s easier to see if we rephrase the earlier problem statement like so:&#60;/p&#62;
&#60;blockquote&#62;
&#60;p&#62;&#60;em&#62;Given a set of songs, each with a duration and a relevance, determine which songs to include in the playlist so that the total duration is less than or equal to a given limit and the total relevance is as large as possible.&#60;/em&#62;&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;This description exactly matches that of the knapsack problem!&#60;/p&#62;
&#60;p&#62;More specifically, the playlist’s duration limit corresponds to the knapsack’s weight limit, and a song’s duration corresponds to an item’s weight.&#60;/p&#62;
&#60;p&#62;What about item value then? Well, you may have noticed that I mentioned “relevance” a couple times. What I mean by this is a quantification of how desirable a song is for the playlist you want to generate. This corresponds to an item’s value in the original knapsack problem description.&#60;/p&#62;
&#60;p&#62;For example, if you wanted a playlist full of relaxing songs, then a song’s relevance is a measure of how relaxing it is. Or if you wanted a playlist of songs you hadn’t listened to in a long time, then relevance is a measure of how long ago you listened to the song.&#60;/p&#62;
&#60;h2&#62;&#60;a href=&#34;#solving-the-problem&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34; id=&#34;solving-the-problem&#34;&#62;&#60;/a&#62;Solving the problem&#60;/h2&#62;
&#60;p&#62;It turns out that the knapsack problem is quite hard to solve. In fact, it’s &#60;a href=&#34;https://en.wikipedia.org/wiki/NP-completeness&#34;&#62;NP-complete&#60;/a&#62;, making the playlist generation problem NP-complete too (as it is equivalent to the knapsack problem).&#60;/p&#62;
&#60;p&#62;It is also, however, one of the most well-researched problems in the field of optimisation, so there are plenty of established approaches to solving it.&#60;/p&#62;
&#60;p&#62;As an example,&#60;sup class=&#34;footnote-ref&#34;&#62;&#60;a href=&#34;#fn-incomplete-example&#34; id=&#34;fnref-incomplete-example&#34; data-footnote-ref&#62;2&#60;/a&#62;&#60;/sup&#62; we can implement an &#60;a href=&#34;https://en.wikipedia.org/wiki/Iterated_local_search&#34;&#62;Iterated Local Search (ILS)&#60;/a&#62; metaheuristic using my experimental Rust library &#60;a href=&#34;https://github.com/Carnagion/heur&#34;&#62;&#60;code&#62;heur&#60;/code&#62;&#60;/a&#62;. Given the following types for representing problem data and solutions:&#60;/p&#62;
&#60;pre style=&#34;background-color: #282828; color: #EBDBB2;&#34;&#62;&#60;code&#62;&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;struct&#60;/span&#62; &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Problem&#60;/span&#62; &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;{&#60;/span&#62;
    max_duration&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;:&#60;/span&#62; &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Duration&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62;
    available_songs&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;:&#60;/span&#62; &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Vec&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;&#38;lt;&#60;/span&#62;&#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Song&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;&#38;gt;&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62;
&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;}&#60;/span&#62;

&#60;span style=&#34;color: #928374; background-color: #282828;font-style: italic;&#34;&#62;&#38;#x2f;&#38;#x2f; Each `bool` represents whether the song at the given index in the `Problem` is included or not.&#60;/span&#62;
&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;type&#60;/span&#62; &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Solution&#60;/span&#62; = &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Vec&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;&#38;lt;&#60;/span&#62;&#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;bool&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;&#38;gt;&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;
&#60;/code&#62;&#60;/pre&#62;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;We can define an &#60;em&#62;evaluation function&#60;/em&#62; (also known as a cost function) for quantifying how good a given solution is:&#60;/p&#62;
&#60;pre style=&#34;background-color: #282828; color: #EBDBB2;&#34;&#62;&#60;code&#62;&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;fn&#60;/span&#62; &#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;cost&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;
    &#60;span style=&#34;color: #83A598; background-color: #282828;font-style: italic;&#34;&#62;solution&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;:&#60;/span&#62; &#60;span style=&#34;color: #D3869B; background-color: #282828;&#34;&#62;&#38;amp;&#60;/span&#62;&#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Solution&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62;
    &#60;span style=&#34;color: #83A598; background-color: #282828;font-style: italic;&#34;&#62;problem&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;:&#60;/span&#62; &#60;span style=&#34;color: #D3869B; background-color: #282828;&#34;&#62;&#38;amp;&#60;/span&#62;&#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Problem&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62;
&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62; -&#38;gt; &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;NotNan&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;&#38;lt;&#60;/span&#62;&#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;f64&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;&#38;gt;&#60;/span&#62; &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;{&#60;/span&#62;
    &#60;span style=&#34;color: #928374; background-color: #282828;font-style: italic;&#34;&#62;&#38;#x2f;&#38;#x2f; Calculate the sum of relevances and the total duration for the playlist.&#60;/span&#62;
    &#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;relevance&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62; duration&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62; = solution
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;iter&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;copied&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;zip&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;problem&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;available_songs&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;filter_map&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;|&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;included&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62; song&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;| &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;{&#60;/span&#62;
            included&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;then_some&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;song&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;}&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;fold&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #D3869B; background-color: #282828;&#34;&#62;0.0&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62; &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Duration&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #D3869B; background-color: #282828;&#34;&#62;ZERO&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62; |&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;rel&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62; dur&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62; song| &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;{&#60;/span&#62;
            &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;rel + &#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;relevance&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;song&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62; dur + song&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;duration&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;}&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;

    &#60;span style=&#34;color: #928374; background-color: #282828;font-style: italic;&#34;&#62;&#38;#x2f;&#38;#x2f; Use the negative of the duration as the cost if the duration violates our maximum duration constraint.&#60;/span&#62;
    &#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; cost = &#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;if&#60;/span&#62; duration &#38;gt; problem&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;max_duration &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;{&#60;/span&#62;
        -duration&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;as_secs_f64&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
    &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;}&#60;/span&#62; &#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;else&#60;/span&#62; &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;{&#60;/span&#62;
        relevance
    &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;}&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;

    &#60;span style=&#34;color: #928374; background-color: #282828;font-style: italic;&#34;&#62;&#38;#x2f;&#38;#x2f; Wrap it in a `NotNan&#38;lt;f64&#38;gt;`, since `f64`s don&#38;#x27;t have a total order.&#60;/span&#62;
    &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;NotNan&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;new&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;cost&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;unwrap&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;}&#60;/span&#62;
&#60;/code&#62;&#60;/pre&#62;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And finally, we can construct the metaheuristic by combining a few metaheuristic operators like so, and run it on a given problem instance to produce a solution:&#60;/p&#62;
&#60;pre style=&#34;background-color: #282828; color: #EBDBB2;&#34;&#62;&#60;code&#62;&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; problem&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;:&#60;/span&#62; &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Problem&#60;/span&#62; = &#60;span style=&#34;color: #928374; background-color: #282828;font-style: italic;&#34;&#62;&#38;#x2f;* ... *&#38;#x2f;&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;

&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; flip_chance = &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Bernoulli&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;new&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #D3869B; background-color: #282828;&#34;&#62;0.1&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;unwrap&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;
&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; rng = rand&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;thread_rng&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;

&#60;span style=&#34;color: #928374; background-color: #282828;font-style: italic;&#34;&#62;&#38;#x2f;&#38;#x2f; Define the individual &#38;quot;operators&#38;quot; or components for the metaheuristic.&#60;/span&#62;
&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; init = init&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;from_individual&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #83A598; background-color: #282828;&#34;&#62;vec&#60;/span&#62;&#60;span style=&#34;color: #83A598; background-color: #282828;&#34;&#62;!&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;[&#60;/span&#62;&#60;span style=&#34;color: #D3869B; background-color: #282828;&#34;&#62;false&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62; problem&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;available_songs&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;len&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;]&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;
&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; mutate = &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;FlipAllBits&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;new&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;flip_chance&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62; rng&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;
&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; search = &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;SteepestAscentBitClimb&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;new&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;
&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; accept = &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;NonWorsening&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;new&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;
&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; stop = &#60;span style=&#34;color: #FABD2F; background-color: #282828;&#34;&#62;Iterations&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;new&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #D3869B; background-color: #282828;&#34;&#62;1000&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;

&#60;span style=&#34;color: #928374; background-color: #282828;font-style: italic;&#34;&#62;&#38;#x2f;&#38;#x2f; Create the metaheuristic itself by combining the above operators.&#60;/span&#62;
&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; &#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;mut&#60;/span&#62; ils = op&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;hint&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;init&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;then&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;
    op&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;hint&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;mutate&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;then&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;search&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;accept_if&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;accept&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;ignore&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;
        &#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;repeat_until&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;stop&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62;
&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;

&#60;span style=&#34;color: #928374; background-color: #282828;font-style: italic;&#34;&#62;&#38;#x2f;&#38;#x2f; Wrap our evaluation function into something that can be passed to `solve`.&#60;/span&#62;
&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; &#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;mut&#60;/span&#62; eval = eval&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;::&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;from_fn&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;cost&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;

&#60;span style=&#34;color: #928374; background-color: #282828;font-style: italic;&#34;&#62;&#38;#x2f;&#38;#x2f; Run the metaheuristic to produce a solution.&#60;/span&#62;
&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;let&#60;/span&#62; solution = ils&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;.&#60;/span&#62;&#60;span style=&#34;color: #B8BB26; background-color: #282828;&#34;&#62;solve&#60;/span&#62;&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;(&#60;/span&#62;&#60;span style=&#34;color: #D3869B; background-color: #282828;&#34;&#62;&#38;amp;&#60;/span&#62;problem&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;,&#60;/span&#62; &#60;span style=&#34;color: #D3869B; background-color: #282828;&#34;&#62;&#38;amp;&#60;/span&#62;&#60;span style=&#34;color: #FB4934; background-color: #282828;&#34;&#62;mut&#60;/span&#62; eval&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;)&#60;/span&#62;?&#60;span style=&#34;color: #FE8019; background-color: #282828;&#34;&#62;;&#60;/span&#62;
&#60;/code&#62;&#60;/pre&#62;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;It’s quite basic, so it’s debatable whether this metaheuristic is actually good. However, the same metaheuristic performed quite well on a challenging knapsack problem instance in &#60;a href=&#34;https://github.com/Carnagion/heur/blob/main/examples/knapsack.rs&#34;&#62;one of &#60;code&#62;heur&#60;/code&#62;’s examples&#60;/a&#62;, so it might work better than expected.&#60;/p&#62;
&#60;p&#62;Of course, metaheuristics aren’t the only way to solve the knapsack problem. You could, for example, create a &#60;a href=&#34;https://en.wikipedia.org/wiki/Integer_programming&#34;&#62;mixed-integer programming&#60;/a&#62; model and apply an algorithm such as simplex or branch-and-bound to solve it. There’s also a &#60;a href=&#34;https://en.wikipedia.org/wiki/Knapsack_problem#Dynamic_programming_in-advance_algorithm&#34;&#62;dynamic programming algorithm&#60;/a&#62; that solves it in &#60;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34; display=&#34;inline&#34;&#62;&#60;mi&#62;O&#60;/mi&#62;&#60;mo&#62;(&#60;/mo&#62;&#60;mi&#62;n&#60;/mi&#62;&#60;mi&#62;W&#60;/mi&#62;&#60;mo&#62;)&#60;/mo&#62;&#60;/math&#62; time, where &#60;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34; display=&#34;inline&#34;&#62;&#60;mi&#62;n&#60;/mi&#62;&#60;/math&#62; is the number of items and &#60;math xmlns=&#34;http://www.w3.org/1998/Math/MathML&#34; display=&#34;inline&#34;&#62;&#60;mi&#62;W&#60;/mi&#62;&#60;/math&#62; is the knapsack’s weight limit.&#60;/p&#62;
&#60;h2&#62;&#60;a href=&#34;#how-useful-is-all-this-anyway&#34; aria-hidden=&#34;true&#34; class=&#34;anchor&#34; id=&#34;how-useful-is-all-this-anyway&#34;&#62;&#60;/a&#62;How useful is all this anyway?&#60;/h2&#62;
&#60;p&#62;It depends. I mean, most people probably don’t care about optimising their playlists to fit under specific durations and contain only the most relevant songs according to an algorithm.&#60;/p&#62;
&#60;p&#62;Then again, &#60;em&#62;I&#60;/em&#62; found it quite neat and would definitely want it as a feature in media players, so maybe someone else will too. Who knows?&#60;/p&#62;
&#60;hr /&#62;
&#60;section class=&#34;footnotes&#34; data-footnotes&#62;
&#60;ol&#62;
&#60;li id=&#34;fn-pirate-metal&#34;&#62;
&#60;p&#62;What’s pirate metal, you ask? It’s the most glorious sub-genre of metal ever conceived. Go read &#60;a href=&#34;https://en.wikipedia.org/wiki/Pirate_metal&#34;&#62;its Wikipedia page&#60;/a&#62;. &#60;a href=&#34;#fnref-pirate-metal&#34; class=&#34;footnote-backref&#34; data-footnote-backref data-footnote-backref-idx=&#34;1&#34; aria-label=&#34;Back to reference 1&#34;&#62;↩&#60;/a&#62;&#60;/p&#62;
&#60;/li&#62;
&#60;li id=&#34;fn-incomplete-example&#34;&#62;
&#60;p&#62;I would usually provide complete snippets and a more detailed explanation. Unfortunately, I’m neck deep in university coursework and want to keep this post short, so I won’t be providing a fully reproducible example. &#60;a href=&#34;#fnref-incomplete-example&#34; class=&#34;footnote-backref&#34; data-footnote-backref data-footnote-backref-idx=&#34;2&#34; aria-label=&#34;Back to reference 2&#34;&#62;↩&#60;/a&#62;&#60;/p&#62;
&#60;/li&#62;
&#60;/ol&#62;
&#60;/section&#62;

                </content>
            </entry>
        
    
</feed>