<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Brecht Verhoeve on Medium]]></title>
        <description><![CDATA[Stories by Brecht Verhoeve on Medium]]></description>
        <link>https://medium.com/@brecht.verhoeve?source=rss-b0e0b97d735------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_XnWc3Z6dod7UVevMe_acw.jpeg</url>
            <title>Stories by Brecht Verhoeve on Medium</title>
            <link>https://medium.com/@brecht.verhoeve?source=rss-b0e0b97d735------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 06:03:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brecht.verhoeve/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Migrating to Pydantic V2]]></title>
            <link>https://medium.com/codex/migrating-to-pydantic-v2-5a4b864621c3?source=rss-b0e0b97d735------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a4b864621c3</guid>
            <category><![CDATA[pydantic]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Brecht Verhoeve]]></dc:creator>
            <pubDate>Wed, 27 Mar 2024 13:56:54 GMT</pubDate>
            <atom:updated>2024-03-27T13:56:54.320Z</atom:updated>
            <content:encoded><![CDATA[<p>On the 30th of June 2023, the second version of <a href="https://github.com/pydantic/pydantic">Pydantic</a>, the popular data validation and parsing Python library was <a href="https://blog.pydantic.dev/blog/2023/06/30/pydantic-v2-is-here/">released</a>. This major overhaul of the library promises to bring better performance and reliability. This is achieved by a new implementation of pydantic-corein Rust instead of Python, which executes the validation logic. Based on <a href="https://github.com/pydantic/pydantic-core/tree/main/tests/benchmarks">benchmarks</a>, this makes Pydantic v2 between 4x and 50x faster than Pydantic v1.9.1. Its reliability and consistency are also improved, by offering a strict mode that no longer magically coerces data, clear rules on required vs nullable fields, and more flexible validation options.</p><p>At <a href="https://www.qargo.io/">Qargo</a>, we heavily rely on Pydantic for various tasks, including data validation for our APIs, deserialization of unstructured data from databases, and providing structured schemas for internal templating tools. However, as our data volume grew with our scaling operations, we began experiencing performance bottlenecks during (de)serialization of Pydantic models. The increasing complexity of our data, particularly with numerous nested BaseModels, resulted in unacceptable delays, sometimes taking multiple seconds for certain models, no bueno.</p><p>Our motivation was clear, we needed to migrate to V2 to maintain optimal performance in our transportation management system (TMS). However, this decision came with challenges. Given the business-critical nature of our TMS, any downtime or data loss results in immediate user impact. Furthermore, with a codebase comprising hundreds of thousands of lines of Python, there’s a lot to cover in a migration. Complicating matters, compatibility issues arose between Pydantic V1 and upgraded versions of mypy, meaning that we had to suspend type checks for quite a bunch of files containing Pydantic code, as we were getting incorrect errors.</p><p>As I embarked on this project, I quickly realized there’s not much out there to guide a migration of this magnitude. Aside from the (excellent) <a href="https://docs.pydantic.dev/latest/">Pydantic documentation</a>, I only came across a <a href="https://www.youtube.com/watch?v=sD_xpYl4fPU&amp;t=1257s&amp;ab_channel=TheFastAPIExpert">single video</a> and one <a href="https://www.linkedin.com/pulse/some-thoughts-after-switching-pydantic-v2-jebin-subedi-kpvie/">article</a> that deemed the migration process as straightforward. This left me to navigate the task largely on my own. That’s why I decided to write this article, so it can hopefully help you when undertaking a large-scale Pydantic migration. I’ll cover the approach we took, the problems we encountered, and the lessons learned.</p><h3>The migration in theory</h3><p>First of all, the folks at Pydantic did a fantastic job at providing a host of tools to help migrate from V1 to V2. Their <a href="https://docs.pydantic.dev/latest/migration/">comprehensive migration guide</a> details all the differences between V1 and V2 and the recommended way of transforming your code to a V2 way of working. This guide became my best friend throughout the process.</p><p>As with any major library upgrade, quite a few concepts have different behavior, classes, and methods that have been renamed or deprecated and new patterns to solve problems. The guide lays out the changes made and does a decent job explaining design choices. Because the guide is so extensive, you’ll find plenty of detail, but it’s also easy to get lost. I recommend reading it fully once and then focusing on the V1 features used most in your code base.</p><p>Beyond the documentation, the team also built a code transformation tool <a href="https://github.com/pydantic/bump-pydantic">Bump Pydantic</a> that you can apply to the files you want to upgrade. The tool offers some rules it will use to change common V1 patterns to common V2 patterns, such as adding a default None value to optional fields:</p><pre># V1 code<br>class User(BaseModel):<br>    name: Optional[str]<br><br># New V2 Code<br>class User(BaseModel):<br>    name: Optional[str] = None</pre><p>Encouraged by the documentation and tooling stating that the migration is not too difficult and can be completed in a couple of hours, it’s time to set out on our migration journey!</p><h3>The migration in practice</h3><h4>Upgrading to V2</h4><p>We started by upgrading Pydantic to V2 without migrating. This is possible because the full V1 library is contained in the V2 library to help for a smooth upgrade process. All we had to do across the codebase was change our imports:</p><pre># OLD pydantic V1 import<br>from pydantic import BaseModel<br><br># NEW pydantic v1 import in V2<br>from pydantic.v1 import BaseModel</pre><p>I encourage first upgrading and working with V2 in this way. This ensures stability for existing code while providing access to V2 so you can start using it for new models. This helps you and your team gain experience working with V2 features, reducing the risk of breaking things.</p><h4>Gradually migrating to V2</h4><p>To further mitigate risk, we opted to migrate parts of the codebase. We determined some key Pydantic models that were often (de)serialized and showed subpar performance, based on metrics from the production system.</p><p>Migrating the system in parts means you’ll have both V1 and V2 concepts mixed in your codebase. This can be confusing, considering a lot of concepts share the same names (i.e. BaseModel ). Therefore we opted for explicit V1 imports with V2 as the default for upgraded modules, resulting in more consistency.</p><pre>from pydantic import BaseModel, Field, model_validator<br>from pydantic import v1 as pydantic_v1<br><br>class Bar(BaseModel):<br>    foo: int<br><br>class Foo(pydantic_v1.BaseModel):<br>    bar: int </pre><h4><strong>Mixing V1 and V2 models</strong></h4><p>The first challenge we encountered was the widespread use of models that were nested within each other. As Pydantic’s V1 BaseModel is not compatible with the V2 BaseModel, once you decide to upgrade one model to V2, you have to upgrade all of the models that it has as its attributes and the models that include it. If your codebase has thousands of Pydantic models with a high degree of reuse, this can feel like pulling the bottom block from a Jenga tower. These dependencies hindered the plan of migrating module by module. This process can be made easier by using dependency mapping tools like <a href="https://github.com/thebjorn/pydeps">pydeps</a>. However, even using these tools we were sometimes unable to catch all of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MoWgm_g3kxuMnd4eTXDhYw.jpeg" /><figcaption><a href="https://www.pexels.com/photo/wood-hand-texture-sitting-4009748/">Photo by cottonbro studio</a></figcaption></figure><p>When you have a mix of V1 and V2 models, two errors will show up:</p><p><strong>&quot;pydantic\validators.py&quot;: no validator found for &lt;class &#39;YourBaseModel&#39;&gt;</strong></p><p>This error shows up when you have a V2 model used as an attribute in a V1 model. They’re easy to catch, as they will trigger at import time, e.g. when running a test suite. However, If your V1 model has an arbitrary_types_allowed in its model config, you’re out of luck. In that case, this error won’t trigger but you will get weird runtime behaviour, such as .dict() and .json() not behaving as expected. This can be mitigated by temporarily disabling the arbitrary_types_allowed config during migration.</p><p><strong>TypeError: BaseModel.validate() takes 2 positional arguments but 3 were given</strong></p><p>You’ll get this error message when an instance of a BaseModel is instantiated, indicating that a V1 model is being used as an attribute of a V2 model. Unfortunately, it only triggers at runtime and is notoriously hard to spot and debug. The error will only trigger when data is passed that is used by the attribute, which is a pain if you have many optional fields in your model. In the error message, you won’t find the V2 model raising the exception, nor the V1 model that is causing it. To debug inspect the data being passed and scour the model to find the culprit. We resorted to writing unit tests for the data triggering the error and inspecting each of its attributes separately.</p><p>If the model dependencies were too many, we put up clear boundaries by providing both V1 and V2 variants of the same model. This helps isolate the upgrade but does lead to code duplication, which can result in inconsistencies. This technique should be used sparingly and refactored as soon as possible after the initial upgrade. We prefixed every model with a V1/V2 prefix, depending on direction, making this boundary explicit.</p><pre>class Bar(BaseModel):<br>    key: str<br>    name: str<br><br><br>class V1Bar(pydantic_v1.BaseModel):<br>    key: str<br>    name: str<br><br>class Foo:<br>    bar: Bar<br><br>class V1Model:<br>    bar: V1Bar</pre><p>It would be very beneficial if the Pydantic framework could detect a mix of V1 and V2 at import time and provide meaningful error messages to resolve them.</p><h4><strong>Missing functionality</strong></h4><p>Although most features have been ported 1:1 with improved usability, not all features made it into V2.</p><p><strong>each_item=True</strong></p><p>One of these is validators using a <a href="https://docs.pydantic.dev/1.10/usage/validators/#subclass-validators-and-each_item">each_item=True</a> parameter. This V1 concept caused the validation logic to run for every item of an iterable attribute, validating each item individually. If the item you’re iterating over is also a BaseModel you can move the validation to that model instead. But if you need another attribute of the parent object for that validation then each_item was very handy, as showcased by the following trivial example.</p><pre>class Wheel(BaseModel):<br>    size_cm: float<br>    <br>class Vehicle(BaseModel):<br>    vehicle_type: Literal[&quot;car&quot;, &quot;truck&quot;]<br>    wheels: list[Wheel]<br><br>    @validator(&#39;wheels&#39;, each_item=True)<br>    def check_wheel(cls, v, values):<br>        if values.get(&#39;vehicle_type&#39;) == &#39;car&#39; and v.size_cm &gt; 50:<br>            raise ValueError(&#39;Tire size is too big for a car!&#39;)<br>        elif values.get(&#39;vehicle_type&#39;) == &#39;truck&#39; and v.size_cm &lt; 50:<br>            raise ValueError(&#39;Tire size is too small for a truck!&#39;)<br><br>        return v</pre><p>In V2, this feature no longer exists, but we can still implement it in different ways, although more verbose.</p><p><strong>Manually iterating over the iterable and triggering the validation</strong> <br>This is a simple approach but it doesn’t group the exceptions, leading to an “N+1” validation problem. I.e. if there are multiple violating items in the iterable, only the first one will trigger. To validate the others, the first one has to be fixed, then the next, and so on, resulting in a bad user experience.</p><pre># Approach nr. 1 using separate validators<br><br>class Wheel(BaseModel):<br>    size_cm: float<br><br><br>class Vehicle(BaseModel):<br>    vehicle_type: Literal[&quot;car&quot;, &quot;truck&quot;]<br>    wheels: list[Wheel]<br><br>    @field_validator(&quot;wheels&quot;)<br>    def check_wheel(cls, v, info):<br>        vehicle_type = info.data.get(&quot;vehicle_type&quot;)<br><br>        for wheel in v:<br>            if vehicle_type == &quot;car&quot; and w.size_cm &gt; 50:<br>                raise ValueError(&quot;Tire size is too big for a car!&quot;)<br>            elif vehicle_type == &quot;truck&quot; and w.size_cm &lt; 50:<br>                raise ValueError(&quot;Tire size is too small for a truck!&quot;)<br><br>        return v</pre><p><strong>By ‘injecting’ the dependent attribute into the child model as a private attribute implementing the validation</strong>. <br>Contrary to the first approach, this does group the exceptions but is quite a bit more complex as the parent model needs to control the instantiation of the child model(s). When the child model is reused by other models, each of them will have to implement the injection logic.</p><pre># Approach nr. 2 using injection<br><br>class Wheel(BaseModel):<br>    _vehicle_type: PrivateAttr[str]<br>    size_cm: float<br><br>    @model_validator(mode=&#39;after&#39;)<br>    def check_size(self):<br>        if self._vehicle_type == &quot;car&quot; and self.size_cm &gt; 50:<br>            raise ValueError(&quot;Tire size is too big for a car!&quot;)<br>        elif self._vehicle_type == &quot;truck&quot; and self.size_cm &lt; 50:<br>            raise ValueError(&quot;Tire size is too small for a truck!&quot;)<br><br>        return self<br><br>class Vehicle(BaseModel):<br>    vehicle_type: Literal[&quot;car&quot;, &quot;truck&quot;]<br>    wheels: list[Wheel]<br><br>    @model_validator(mode=&quot;before&quot;)<br>    def check_wheel(cls, data):<br>        if not isinstance(data, dict):<br>            return data<br>        <br>        vehicle_type = data.get(&quot;vehicle_type&quot;)<br>        for wheel in data.get(&quot;wheels&quot;, []):<br>            wheel[&#39;_vehicle_type&#39;] = vehicle_type<br>        <br>        return data</pre><p>We went for the second approach as the additional complexity was justified by the exception grouping. This could be solved by ExceptionGroup available in Python 3.11.</p><p><strong>json_encoders</strong></p><p>V1json_encoders allow you to define custom serializers for data types. These have been replaced by functional serializers such as field_serializer, which indicate for each field how it should be serialized. The new approach motivates you to write dedicated functions or annotated fields with their serialization logic. This makes the serialization logic more reusable and explicit. However, there are two drawbacks to this approach:</p><ol><li>The field has to be added to each model individually, adding more boilerplate code. This doesn’t outweigh its benefits though, as the amount of boilerplate is limited.</li><li>If you have a top-level model that wants to enforce different serialization for a lower-level model, you’re stuck. An example case for us was a date time field that omitted milliseconds during serialization. For reuse, we didn’t implement this in the low-level model, so higher-level models can choose how they implement this. Using field_serializer means you need to add it to the lower model and cannot differentiate. Another solution is to override the .model_dump() method, but I find this a very imperative way of implementing and goes against the Pydantic framework.</li></ol><h4><strong>Finding and replacing deprecated methods and functions</strong></h4><p>A lot of V1 functions have been marked for deprecation in V2. It’s great that the Pydantic team didn’t straight up remove them, as that would result in a lot of breaking code. Instead, a DeprecationWarning is emitted when called at runtime, indicating that the method should be replaced by its new counterpart. Some static code analysis tools such as Pylance, will indicate it in your IDE further assisting the upgrade. You can also run these tools from a terminal to find all deprecated calls across your codebase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*S8i_e-dtejQpy2g7zoFx0A.png" /></figure><p>Although easy to find and non-breaking, I found it difficult to have the team consistently use the new methods, as there is no real incentive to update them. This is a matter of educating and motivating the team and checking for this during PR reviews.</p><h4><strong>Business logic checking for </strong><strong>BaseModel</strong></h4><p>We sometimes have logic that checks if a variable is a Pydantic model using isinstance(BaseModel) . This code breaks if the actual model of the variable is a V2 model, while the code checks for V1 models. These can be hard to spot, as the code checking for Pydantic models is often quite low-level, so the implicit assumption is not immediately visible. We found it best to add both V1 and V2 BaseModel to the isinstance checks by default, as this removes the chances of errors entirely until the full codebase has been upgraded.</p><h4>Field no longer supports **kwargs</h4><p>As we have been using Pydantic for quite some time, we built some internal tooling using additional annotations for Field classes. These were provided via **kwargs , which were stored as extra metadata on the field. We used this to annotate if fields contained sensitive data such as credentials, provide samples, etc.</p><p><a href="https://docs.pydantic.dev/latest/migration/#changes-to-pydanticfield">This feature is no longer supported in V2</a>. If **kwargs are passed, the model definition will break at import time. This can be solved by working with realAnnotated fields, and using internal framework concepts such as the examples field which puts a sample in the JSON schema of the model. If it’s just metadata, this can also be provided by passing a dictionary to the json_schema_extra keyword argument.</p><h3>Conclusion</h3><p>The migration from Pydantic V1 to V2 posed bigger challenges than expected based on sources and the migration guide. I argue for a carefully planned migration process in multiple steps, to mitigate risk and let the team gain experience with the new V2 features. The detailed migration guide, the inclusion of V1 in V2, and deprecation warnings help smoothen this process.</p><p>However, some challenges could be alleviated by better support from the Pydantic framework, such as import time checks for mixing V1 and V2 models, improved error messaging, and strategies for dealing with missing functionality.</p><p><em>Brecht is the backend engineering team lead at Qargo, working on the ongoing Pydantic migration effort.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a4b864621c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/migrating-to-pydantic-v2-5a4b864621c3">Migrating to Pydantic V2</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python GroupBy Tricks]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codex/python-groupby-tricks-234004132c14?source=rss-b0e0b97d735------2"><img src="https://cdn-images-1.medium.com/max/1318/1*tApdJkIkSat_5o8DW6zyMQ.png" width="1318"></a></p><p class="medium-feed-snippet">Whenever you&#x2019;re working with data, inevitably you&#x2019;ll want to group it based on some property. This is typically called a &#x2018;GroupBy&#x2019;&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/codex/python-groupby-tricks-234004132c14?source=rss-b0e0b97d735------2">Continue reading on CodeX »</a></p></div>]]></description>
            <link>https://medium.com/codex/python-groupby-tricks-234004132c14?source=rss-b0e0b97d735------2</link>
            <guid isPermaLink="false">https://medium.com/p/234004132c14</guid>
            <category><![CDATA[itertools]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[group-by]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Brecht Verhoeve]]></dc:creator>
            <pubDate>Sun, 17 Apr 2022 07:01:26 GMT</pubDate>
            <atom:updated>2022-04-17T07:01:26.488Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Six essential tools to teach programming online]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/geekculture/six-essential-tools-to-teach-programming-online-b5769fede9f?source=rss-b0e0b97d735------2"><img src="https://cdn-images-1.medium.com/max/2600/1*6VT_fPByLKOyW3aWd4zV5w.jpeg" width="7196"></a></p><p class="medium-feed-snippet">A craftsman is only as good as his tools</p><p class="medium-feed-link"><a href="https://medium.com/geekculture/six-essential-tools-to-teach-programming-online-b5769fede9f?source=rss-b0e0b97d735------2">Continue reading on Geek Culture »</a></p></div>]]></description>
            <link>https://medium.com/geekculture/six-essential-tools-to-teach-programming-online-b5769fede9f?source=rss-b0e0b97d735------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5769fede9f</guid>
            <category><![CDATA[side-hustle]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[teaching]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Brecht Verhoeve]]></dc:creator>
            <pubDate>Wed, 10 Nov 2021 21:02:48 GMT</pubDate>
            <atom:updated>2021-11-10T21:02:48.447Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Working in consulting or a startup?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@brecht.verhoeve/working-in-consulting-or-a-startup-f607729abd5?source=rss-b0e0b97d735------2"><img src="https://cdn-images-1.medium.com/max/2600/1*8YwoYpKb0eYxXVt7akktxA.jpeg" width="3200"></a></p><p class="medium-feed-snippet">A candid reflection on my experience as a consultant and startup employee.</p><p class="medium-feed-link"><a href="https://medium.com/@brecht.verhoeve/working-in-consulting-or-a-startup-f607729abd5?source=rss-b0e0b97d735------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@brecht.verhoeve/working-in-consulting-or-a-startup-f607729abd5?source=rss-b0e0b97d735------2</link>
            <guid isPermaLink="false">https://medium.com/p/f607729abd5</guid>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[consulting]]></category>
            <category><![CDATA[career-paths]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Brecht Verhoeve]]></dc:creator>
            <pubDate>Wed, 10 Mar 2021 07:31:40 GMT</pubDate>
            <atom:updated>2021-04-25T11:59:35.156Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[10 software engineering books to read in 2021]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codex/10-software-engineering-books-to-read-in-2021-181a4f093e60?source=rss-b0e0b97d735------2"><img src="https://cdn-images-1.medium.com/max/2000/0*84ZXY-xYOzfj9JuG" width="2000"></a></p><p class="medium-feed-snippet">A suggestion on what to read during the next lockdown</p><p class="medium-feed-link"><a href="https://medium.com/codex/10-software-engineering-books-to-read-in-2021-181a4f093e60?source=rss-b0e0b97d735------2">Continue reading on CodeX »</a></p></div>]]></description>
            <link>https://medium.com/codex/10-software-engineering-books-to-read-in-2021-181a4f093e60?source=rss-b0e0b97d735------2</link>
            <guid isPermaLink="false">https://medium.com/p/181a4f093e60</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[reading]]></category>
            <dc:creator><![CDATA[Brecht Verhoeve]]></dc:creator>
            <pubDate>Wed, 06 Jan 2021 20:58:10 GMT</pubDate>
            <atom:updated>2021-01-10T09:54:45.634Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to prepare a new snowboard]]></title>
            <link>https://medium.com/@brecht.verhoeve/how-to-prepare-a-new-snowboard-474bada1f4cc?source=rss-b0e0b97d735------2</link>
            <guid isPermaLink="false">https://medium.com/p/474bada1f4cc</guid>
            <category><![CDATA[snowboarding-tips]]></category>
            <category><![CDATA[snowboarding]]></category>
            <category><![CDATA[snowboard-gear]]></category>
            <category><![CDATA[snowboard-tutorials]]></category>
            <dc:creator><![CDATA[Brecht Verhoeve]]></dc:creator>
            <pubDate>Sun, 15 Nov 2020 15:57:14 GMT</pubDate>
            <atom:updated>2020-11-15T15:57:14.448Z</atom:updated>
            <content:encoded><![CDATA[<h4>A guide on how to prepare your new wood for a long and snowy life</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3JR_i5UE6qQ1x0uNYYH9Hg.jpeg" /></figure><p>So you’ve recently succumbed to the craving of having your own snowboard or to the craving of buying yet another one to add to your quiver. The plank is sitting there, all shiny and wrapped up with stickers from the factory and you can’t wait to go out and test it.</p><p>You’ll often hear from the salespeople at the snowboard shop that “the snowboard has factory wax on it, and it’s good to go!” Although this is true; pretty much all brands will have some kind of factory wax on their boards, there are still a couple of things you can do to prepare your new plank for the slopes and with it, greatly increase the lifespan of the snowboard.</p><h3>Where factory defaults fall short</h3><p>When you pick a brand-new snowboard off the shelf, it comes straight from the factory and has been prepared by the brand for use. The one thing you’ll keep hearing is that there’s factory wax on it. But what the salesperson usually doesn’t tell you is that this factory wax is actually a very thinly applied coat of wax that doesn’t really do anything. Often, the base of the board also hasn’t been ground and will barely have an embedded structure. This does vary a lot from brand to brand; some do a terrific job with factory coats (looking at you Capita) while others, eh, not so much.</p><p>Additionally, the edges of the snowboard are also nice shiny and razor-sharp at a 90 degrees angle across the whole board. Unless you plan to ride on a sheet of ice the whole season this is more sharpness than you’ll ever need. The additional sharpness can actually be harmful as well, as it can cause you to more quickly catch an edge.</p><p>This doesn’t mean that the brands are selling you a crappy board which isn’t properly prepped, there’s a reason why the boards are sold this way. The thin factory wax serves to keep the board from drying out while sitting on the shelves of shops, not to ride a full day (or season on). Likewise, the sharp edges make sure that riders can customize their boards since there’s only so much edge you can grind off.</p><p>So now that argument’s been made, what can you do to properly prepare your board for the snow?</p><h3>Step 1 — Unwrapping and removing stickers</h3><p>This one should rather speak for itself, but you wouldn’t believe the number of times I’ve seen people on the slopes complaining that their board is slow; only to discover that there’s still a big fat sticker sitting dead center in the middle of the base of their board.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIq9yZdIBxs04l9lwJthrg.jpeg" /><figcaption>Peel off those stickers!</figcaption></figure><p>So have a good look and remove all of that marketing material. If you’re one of those people who’s in love with that stuff, you can always stick it back on the top sheet.</p><p>Sometimes the stickers won’t come loose very easily (especially the barcodes, those suck big time). Pro tip: you can loosen up the glue of the stickers by warming them up; you can use a hairdryer to blow hot air to do so. Afterward, you’ll have no issue peeling off the stickers.</p><h3>Step 2 — Detuning the edges</h3><p>Like I said previously, new snowboards will come with dangerously sharp edges. Whatever kind of rider you are, it’s definitely worth detuning your edges! The area just beyond the effective edge — where the board curves upwards from your wide points towards the tip and tail — should not be kept sharp. This is to avoid the contact points feeling twitchy when engaging a turn, which can result in you catching an edge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hDr5La2f9EtuHOutidZ2bg.jpeg" /><figcaption>Detuning the edges of my Gangplank</figcaption></figure><p>To detune the edges, you’ll need a metal file, no fancy diamond files, or precise edging tools required. You’ll need to rub the file at an angle diagonal to both the board and the edge. The idea is to blunt the edge, so focus on the corner and keep filing back and forth until it is slightly beveled. You can keep adjusting the angle slightly to round it off smoothly.</p><p>Depending on the type of riding you want to do with the board you can further blunt the edges if you want. If you’re more into jibbing, you’d want to detune the edges along the full width of the board to really avoid catching edges on boxes and rails. If you’re more into all-mountain riding you’d want to stop at the wide points and keep the effective edge sharp.</p><p>A good way to know if your effective edge is still sharp enough is to run the nail of your thumb along the edge. If your nail gets scratched easily and you can see the marks, that means the edge is sharp enough.</p><p>If you really want to, you can use an edging tool as well to tune your edges to a specific angle, but unless you’re a racer or you ride 10m tall halfpipes that might be a bit overkill.</p><h3>Step 3 — Dulling the top sheet edge</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/0*aDbNMFD6xJaFc0Il" /><figcaption>Delamination sucks</figcaption></figure><p>This step might be a bit of an unorthodox one and one that you don’t hear often. But I’ve found that detuning your top sheet has some benefits. If you ski or snowboard in Europe, you know that people in the lift lines don’t exactly know what personal space is and often you end up being squeezed together. This often results in skis and snowboards going over one another, which can blemish your top sheet. Best case scenario, you end up with a couple of scratches. Worst-case scenario, you end up with a delaminated top sheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Q1PllzpqYp2XtG9Q31N0w.jpeg" /><figcaption>Dulling the top sheet edge</figcaption></figure><p>I’ve found that by dulling the edges of the top sheet a bit, you can actually reduce your chances of getting your top sheet chipped. Basically, you do the same as when you detune your edges, but on the top. This will make the edge smoother and prevent it from catching and flipping up as easily. You do this all across the width of the snowboard. You can either do this using the same metal file as before or by rubbing some sandpaper along the edge.</p><p>The metal file technique yields the most aesthetic result in my opinion.</p><h3>Step 4 — Waxing the board</h3><p>Finally, the last thing you want to do to prepare is waxing the board. Hopefully, by now I’ve convinced you that the factory wax isn’t really all that great for your first ride. Giving your board its first wax before it even touches the snow is a great way to increase the lifespan of the base so definitely recommend doing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IhUrIIpkCA9jZyFKJgpF6g.jpeg" /><figcaption>Waxing my Gangplank</figcaption></figure><p>Since waxing is an art in and of its own, I won’t go into detail here, but you can check out this <a href="https://whitelines.com/snowboard-gear/set-up-maintenance/how-to-wax-a-snowboard.html">guide</a> to learn how to do it.</p><p>If you’re like me and you buy snowboards in the off-season (it’s way cheaper), you might want to leave the wax on the board for storage. It’ll help to prevent the snowboard from drying out. And when you’re ready to go shred, just scrape the wax right off and you’re ready to go!</p><h3>Conclusion</h3><p>And there you go, all the steps you can do to prepare your snowboard for a long snowy life! There’s still a couple of more things to do to get you properly set up, like figuring out your stance, mounting your bindings, and customizing them to your boots, but I’ll maybe go into that in a future guide. Hopefully, you’ve learned a thing or two by reading this article, and if you liked it, feel free to leave a clap or two.</p><p><em>I’m a passionate snowboarder for a good ten plus years for now. I’ve prepared and maintained my own equipment for ages and worked in a snowboard shop where I learned all about snowboard gear.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=474bada1f4cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simulating (Dynamic) Locations With Xcode]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/simulating-dynamic-locations-with-xcode-c72ccfacef9e?source=rss-b0e0b97d735------2"><img src="https://cdn-images-1.medium.com/max/2600/1*oShYlWojZlVAefte6Dx2xQ.jpeg" width="3840"></a></p><p class="medium-feed-snippet">How to simulate driving, walking and running to test your iOS application</p><p class="medium-feed-link"><a href="https://medium.com/swlh/simulating-dynamic-locations-with-xcode-c72ccfacef9e?source=rss-b0e0b97d735------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/simulating-dynamic-locations-with-xcode-c72ccfacef9e?source=rss-b0e0b97d735------2</link>
            <guid isPermaLink="false">https://medium.com/p/c72ccfacef9e</guid>
            <category><![CDATA[simulation]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[gps]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Brecht Verhoeve]]></dc:creator>
            <pubDate>Wed, 11 Nov 2020 13:33:54 GMT</pubDate>
            <atom:updated>2020-11-12T19:25:02.649Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Running is boring (and that’s fine)]]></title>
            <link>https://medium.com/@brecht.verhoeve/running-is-boring-and-thats-fine-c7a3877a6a3a?source=rss-b0e0b97d735------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7a3877a6a3a</guid>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[health]]></category>
            <dc:creator><![CDATA[Brecht Verhoeve]]></dc:creator>
            <pubDate>Sun, 03 May 2020 13:23:05 GMT</pubDate>
            <atom:updated>2020-05-03T16:20:18.477Z</atom:updated>
            <content:encoded><![CDATA[<p>Running is boring. I find it so incredibly boring that I’ve loathed running my entire life.</p><p>In high school in Belgium (like most countries) running is an essential part of the physical education curriculum. And every time I knew it was going to be on the menu for that week, I dreaded going to that class. For me, it represented a pure physical activity, just for the sake of it, which wasn’t very appealing. It made me exhausted with the only point being able to tell yourself that you’d run 5k or 15 minutes straight. This was unlike other sports I did at the time (ball sports and snowboarding) where the physical activity had a purpose: to win the game or land that hard trick.</p><p>And now after university and recently having started my first job, no one forces me to run anymore and I thought I would be rid of it forever! But despite all that, recently I’ve picked up running.</p><figure><img alt="A woman in running gear laying down on a staircase to rest." src="https://cdn-images-1.medium.com/max/1000/0*0voq0rcnz8MVNzv1.jpg" /><figcaption>Running is so boring you might fall asleep while doing it</figcaption></figure><h3>It’s a busy busy world</h3><p>As a consultant, my daily life can be quite busy. Multiple projects, demanding clients, tight deadlines, complex problems… If that wasn’t enough, I’m also guilty of the nasty habit of checking my phone every few minutes. There’s always another article to read, another email to check, another friend to chat with, another video to watch. And I’ve begun to notice that this bombardment of information is frying my brain.</p><p>When I wake up, the first thing I check is my phone. I can’t eat my breakfast anymore without compulsively checking Instagram, Linkedin, or watching the news. I stare at a computer screen for 8 hours a day for my job. Even when walking on the street I regularly pull out my phone to check my social media or catch Pokémon. All of this makes me lose focus and become easily distracted.</p><p>And so through those same social media and articles, I’ve discovered that my situation hints to information overload and dopamine habituation. Mindfulness is often proposed as an effective way of dealing with this. I’ve tried it in the past but practicing effectively directing my focus has proved too difficult.</p><p>Due to the worldwide COVID-19 crisis I’m currently stuck at home like many others. I also recently returned from a ski season. There I discovered that my physical fitness was far from perfect (sitting behind a desk for most of your days will do that for you). Therefore, I decided to not let myself slip that far again and keep in shape. But since I can’t snowboard or ski anymore and everything else is closed, running has become the only option. So I started running.</p><h3>White noise</h3><p>I first started running fully prepared. I had my flashy running gear, one of those armbands where you can keep your phone in, I made a running playlist and downloaded Strava, the whole shebang. The first few times, this went great. The music got me pumped, I was stoked on the achievements I got on Strava and I generally thought I was doing a good job.</p><p>But after a while I noticed that I started counting the songs to see how long I still ‘had’ to run, I kept skipping songs, I’d stop to walk and find a new song or to see how well I was doing on Strava. And in no time, I was checking my phone again and forgot why I put on that ridiculous running outfit in the first place. Since that couldn’t possibly be my goal it was time to act.</p><p>So I started an experiment. I’ve started running with no music and no phone, with a bit of a predetermined route in my head. I notice that I no longer counted down until I see a landmark telling me I’m halfway, I get less annoyed at not going fast enough or my knees hurting. I’m just running. It allows me to let my thoughts run free, and it generates a sort of ‘white noise’ that I’m finding ever more satisfying.</p><p>Due to the lack of information input during those runs, my mind can process information gathered during the day better and when I get back I feel ever more refreshed and focused. By deliberately making my runs more boring, I’m enjoying them a lot more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQflBnqNvEgCXBmt9Uf9gw.png" /><figcaption>How my runs are starting to look like</figcaption></figure><h3>Benefits of being bored and the right way of doing it</h3><p>Traditionally, boredom is seen as something unpleasant that we’d rather not feel. There are studies out there that show that most <a href="https://www.ncbi.nlm.nih.gov/pubmed/26847946">people on average prefer giving themselves electric shocks than being bored for 15 minutes</a>.</p><p>But boredom isn’t all bad either. Being bored can <a href="https://onlinelibrary.wiley.com/doi/abs/10.1002/j.2162-6057.1977.tb00631.x">spark your creativity</a> and problem-solving by allowing your mind to wander and daydream. It’s also supposedly good for your mental health as it allows you to step away from the constant stream of information coming from technology (which I experienced first hand).</p><p>The key here, however, is being bored the right way. It’s important not to mix boredom with relaxation. A purposefully relaxing activity, like yoga or meditation, which requires a lot of focus, likely doesn’t meet the definition of trying and failing to find stimulation.</p><p>Instead, try doing an activity that requires little or no concentration, like swimming laps, sitting on the porch and watching the clouds, or in my case go running, and simply let your mind wander, without music or stimulation to guide it.</p><h3>Making your day a bit duller</h3><p>So instead of trying to make your day as exciting as possible, I challenge you to try and make your day a bit duller. Next time you find yourself waiting in line at the grocery store, in a monotonous meeting or a run around the block, resist using your phone. You’re bound to get a bit more bored which might just improve your focus, mood, and ideas.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7a3877a6a3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Foreign worker in Canda]]></title>
            <link>https://medium.com/@brecht.verhoeve/foreign-worker-in-canda-290970553a04?source=rss-b0e0b97d735------2</link>
            <guid isPermaLink="false">https://medium.com/p/290970553a04</guid>
            <category><![CDATA[snowboarding]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[whistler]]></category>
            <category><![CDATA[snow]]></category>
            <dc:creator><![CDATA[Brecht Verhoeve]]></dc:creator>
            <pubDate>Mon, 18 Nov 2019 03:34:33 GMT</pubDate>
            <atom:updated>2019-11-18T03:34:33.937Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Whistler Season Tale</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*oFVyx6fZu1I6C-H4i7Kj8w.jpeg" /><figcaption>Whistler in the evening</figcaption></figure><p>A few weeks ago, I set foot on the North American continent for the first time in my life. This is all part of a long journey that started in February 2019. That was when I took the decision to put my life in Belgium on hold for six months and go experience a ski season abroad; in Whistler British Columbia, Canada. During my goodbye-drink in Belgium, I kind of got pressured into writing a blog series by my friends (thank you for that), so here goes nothing.</p><p>The preparations for this trip were actually a lot more work than what I initially expected. First, there’s the long, administrative process of applying for a Canadian work permit. Eventually, the whole process would take me up to 6 months to complete, two separate trips to Paris to provide biometrics, tons of waiting and uncertainty whether or not I would get it. After getting the work permit, you need to apply for a job at the resort. I applied for a program with a company called <a href="https://www.theworkingholidayclub.com/">The Working Holiday Club</a>, and they help you get in touch with the resort, schedule the interviews and make sure you’re ready to go once you arrive. Finally, you get to book your flights and your insurance. The insurance part can cost you quite a bit of money and it is crucial to get before you depart for Canada. If not, immigration might not provide you with a work permit or even worse, send you back home. Not to mention that insurance is quite important when you have an accident abroad (a quite likely scenario when doing a ski season). If you’re planning on doing a season like me, plan for a few months of preparation, because it’s almost like a full-time job and there are many waiting periods of undefined time.</p><p>After all these preparations, I said my goodbyes, packed my bag and set a course for Vancouver.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a95S7uOe2XcNB5b1c-9ZWg.jpeg" /><figcaption>Arriving in Vancouver</figcaption></figure><p>The trip from Belgium to Vancouver took me about 14 hours to finish, but I still arrived almost at the same time I took off in Europe (thank you time zones!). I took the sky train from the airport to the Samesun hostel in downtown Vancouver, where I’d meet many other travelers that also went for a ski season. Most of them would go to Whistler, but others traveled to Banff, Calgary, Revelstoke, etc.</p><p>I had about two and a half days in Vancouver, during which I needed to make my final preparations before heading out to Whistler. What struck me the most is the number of things I had been taking for granted in Belgium, which I had no longer access to when arriving in Canada. Things such as mobile data on my phone for Google map, a debit/credit card which didn’t charge me excessive rates for every transfer, a decent coffee (God, the coffee is terrible compared to Europe), or somebody to discuss with when I needed to make a decision. Those two and a half days in Vancouver were pretty packed but still felt like an eternity, to be honest. During those, I got a Canadian bank account, a social insurance number, a new phone number and got some necessities for the mountain.</p><p>When walking around Vancouver with the others, there was tangible stress in the air to get everything sorted out in the short amount of time we had. Everyone was rushing around to get everything, sort of like we were ending up somewhere in the middle of nowhere, without any access to basic commodities, so everything had to be done in Vancouver, or it would never get done at all. In hindsight, that rush was completely unnecessary, since Whistler Blackcomb is one of the most modern ski resorts I’ve seen since to date, but yeah we didn’t know that at that time.</p><p>Aside from the rushing around, I did find time to satisfy the tourist in me as well. I walked all over the city (which completely destroyed my feet), got used to the layout of American cities (so much easier compared to Europe!), saw some nature (seriously, Stanley Park is the most gorgeous park in a city I’ve ever seen) and some culture. What makes Vancouver such a beautiful city, is that it combines a bustling metropolis with stunning mountain views, a coastal beach, wildlife in the city center (they have all the squirrels).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G3B22UqIcfK4IjD01pOktg.jpeg" /><figcaption>Granville Island, Vancouver by night</figcaption></figure><p>On Friday the first of November, I headed out to Whistler Blackcomb, which will be my home for the coming six months. My next post is going to be about my first days there.</p><p>Brecht</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=290970553a04" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>