<?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 Martin Vandersteen on Medium]]></title>
        <description><![CDATA[Stories by Martin Vandersteen on Medium]]></description>
        <link>https://medium.com/@vdsmartin?source=rss-e6a8396293b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nRqrAYgLGR3JREhimL3mLg.jpeg</url>
            <title>Stories by Martin Vandersteen on Medium</title>
            <link>https://medium.com/@vdsmartin?source=rss-e6a8396293b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 10:33:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vdsmartin/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[Why I use Laravel as a Rails aficionado]]></title>
            <link>https://vdsmartin.medium.com/why-i-use-laravel-as-a-rails-aficionado-ec454fabdfa?source=rss-e6a8396293b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec454fabdfa</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Martin Vandersteen]]></dc:creator>
            <pubDate>Thu, 05 Aug 2021 19:28:32 GMT</pubDate>
            <atom:updated>2021-08-05T19:28:32.067Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been building web products professionnally and for fun for more than 7 years now. Despite being a complete Ruby on Rails fan (my first love) and having first experienced Laravel in the worst ways possible (taking over a legacy SaaS that was a complete mess), I still decided to use Laravel for my next major projects.</p><p>Both present similar MVC structures and similar functionalities, but they have quite different ecosystems. To me, being a good developer means choosing the right tool for the job, here are some reasons why I chose Laravel over Rails for those applications.</p><h3>The ecosystem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*7IGZ_YT0AJ5qnq7A.png" /></figure><p>Thanks to Tailor Otwell and others, there are a lot of VERY powerful satellite packages and tools that’ll make you win precious time when building web products. Here are some of the ones that drove my decision :</p><h4>Laravel Sail</h4><p>Super easy development environment : $ sail up and you&#39;re good to go ! It spins up a web server, database, redis server and even mailhog to monitor your emails. All through Docker🐋 so you don&#39;t pollute your computer with useless servers that will clash with your other development projects.</p><h4>Laravel Breeze &amp; Jetstream</h4><p>Thanks to those, you can start your application with all the boring authentication part pre-made for you. This includes signup, login, profile settings, dashboard, email verification &amp; forgot password, password change, 2FA, .. Such a huge timesaver !</p><h4>Laravel Nova</h4><p>Powerful, beautiful &amp; customizable admin ! Quite easy to install and to extend, with a lot of very useful plugins that’ll make your life way easier. Building admins for web apps is a big part of the development time and any time saved is a big money saver, as long as the quality remains.</p><h4>Laravel Vapor</h4><p>Vapor turns your app into a Serverless app that autoscales in a hearthbeat. It manages your AWS ressources for you and allows you to change things in your Cloud with simple commands. It will save you weeks of handling your servers, I really think it has a crazy good Return On Investment for small to mid-sized applications. Focus on building your app and not on fiddling in AWS !</p><h4>Statamic</h4><p>Statamic is a pretty powerful and modern CMS that’ll get you out of your Wordpress nightmares. Simple and efficient ! It recently saved me when I needed to build a BIG application that was a mix of a Website, CMS, CRM and E-commerce. Statamic made it possible for my client to edit pages &amp; products in an efficient way while giving me the whole power of Laravel to meet requirements for the CRM aspect of things.</p><h4>Laravel Spark</h4><p>I personally never used it but it seems to be the Laravel Jetstream of SaaS products ! (It actually plays along well with Jetstream &amp; Breeze) It handles subscriptions, payment providers &amp; invoices for you so you can focus on the actual value your app brings.</p><h3>The community</h3><p>Pretty simple and straightforward but as there are more people using Laravel, it’s easier to find answers to your problem on the web as well as finding help !</p><p>But that was not the deciding factor for me as, in my opinion, Rails is often easier to understand and more logical than Laravel. The main reason why the community is so important to me is that I’m making it easy for my clients to find new developers later on, as they will need someone to maintain and improve on the application that I built someday. There are a lot more people that use PHP in the world than Ruby and it’s important to keep that in mind when you build an application that will be the epicenter of someone’s business.</p><h3>Conclusion</h3><p>I’m still in love with Rails ! And I love that it keeps growing so well and evolving (can’t wait to try Hotwire and compare it with Livewire), and it still is one of my favourite tools.</p><p>I just think it’s important to be flexible and to be able to avoid getting stuck with one framework the becomes a Bible you franctically shake in front of everybody that uses something else!</p><p>Be curious and open to new things, give it a look and objectively assess if it’s for you, or not, and if it actually brings new value to the programming world. There are tons of frameworks popping up everyday and while a lot are probably good, only a few will really fit you and make your work more efficient.</p><p>What’s your take on this ? How do you position yourself in this world of frameworks ? 😜</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec454fabdfa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple i18n for StimulusJS !]]></title>
            <link>https://vdsmartin.medium.com/simple-i18n-for-stimulusjs-d869ab7cb7eb?source=rss-e6a8396293b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d869ab7cb7eb</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[i18n]]></category>
            <category><![CDATA[stimulusjs]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Martin Vandersteen]]></dc:creator>
            <pubDate>Wed, 21 Apr 2021 15:52:20 GMT</pubDate>
            <atom:updated>2021-04-21T15:52:20.109Z</atom:updated>
            <content:encoded><![CDATA[<h3>Simple i18n for StimulusJS !</h3><p>I recently had to setup internationalization on my website <a href="https://www.feeka.studio/">Feeka.studio</a> which is only built with HTML/SCSS/StimulusJS and a few JS libraries.</p><p>Surprisingly enough, I didn’t find much material on how to easily implement it with a Stimulus controller and I spent some time researching in order to make it work. I hope this short walkthrough will help other people in the same situation !</p><p>Bear in mind you can also find this article on <a href="https://dev.to/vdsmartin/simple-i18n-for-stimulusjs-1lc">Dev.to</a> with correct syntax highlighting !</p><h3>The HTML</h3><p>For this example, I created a very simple layout with a banner containing a language switcher and a catchline, along with a section holding some random content. I also sprinkled a bit of CSS on it to make it a bit more organized, everything is in the Codepen at the end of the article.</p><p>Here is what it looks like :</p><pre>&lt;section class=&quot;banner&quot;&gt;<br>  &lt;div class=&quot;switcher&quot; data-controller=&quot;locale&quot;&gt;&lt;/div&gt;<br>  &lt;div class=&quot;catchphrase&quot; data-i18n=&quot;[html]catchphrase&quot;&gt;&lt;/div&gt;<br>&lt;/section&gt;<br>&lt;section class=&quot;content&quot; data-i18n=&quot;content&quot;&gt;<br>&lt;/section&gt;</pre><h3>Setting up our Stimulus controller</h3><p>For this example, I will be creating a single “LocaleController”. Keep in mind that I will be putting all of my Javascript in the same file here since I’m using Codepen, but it’s always good to split the different parts of the application, for example the controller should be declared in its own file, and the i18n configuration we’ll be writing later on should be in another one. Being organized and maintaining the separation of concerns makes our lives easier in the long run !</p><p>Here is the basis of my controller :</p><pre>class LocaleController extends Controller {<br>  static targets = [&#39;language&#39;];</pre><pre>  get languages() { <br>    return [<br>      { title: &#39;FR&#39;, code: &#39;fr&#39; },<br>      { title: &#39;EN&#39;, code: &#39;en&#39; }<br>    ];<br>  }</pre><pre>  initialize() {<br>    this.element.innerHTML = this.languages.map((locale) =&gt; {<br>      return `&lt;span data-action=&quot;click-&gt;locale#changeLocale&quot;<br>      data-locale=&quot;${locale.code}&quot; data-target=&quot;locale.language&quot;&gt;${locale.title}&lt;/span&gt;`<br>    }).join(&#39;&#39;);<br>    this.setLocale(&#39;fr&#39;);<br>  }</pre><pre>  changeLocale(e) {<br>    this.setLocale(e.target.getAttribute(&quot;data-locale&quot;));<br>  }</pre><pre>  setLocale(locale) {<br>    this.highlightCurrentLocale(locale);<br>  }</pre><pre>  highlightCurrentLocale(locale) {<br>    this.languageTargets.forEach((el, i) =&gt; {<br>      el.classList.toggle(&quot;active&quot;, locale !== el.getAttribute(&quot;data-locale&quot;))<br>    });<br>  }<br>}</pre><p>First of all, I’m defining a getter for our list of languages which for this example will be French and English. The title represents the text that should appear in the language switcher and the code is what we&#39;ll use to manage our translations with i18next later on, it could also be written using the standard &#39;fr-FR&#39; notation.</p><p>In the initialize() function, I&#39;m setting up my dynamic language switcher by iterating over the available languages and inserting a span for each of them, along with a data-action attribute that will call our changeLocale() function on click and a data-locale attribute that will make it easy to retrieve the language code when the element is clicked. I&#39;m also manually setting the locale to French at the moment but that will be handled by i18next once we implement it.</p><p>Right now the changeLocale(e) function only makes sure we hide the current language in the switcher and show the other one. Using CSS, I made sure only the with the &#39;active&#39; class is shown.</p><p>Here is the current state of things : <a href="https://codepen.io/martinvandersteen/pen/vYgEEMN">https://codepen.io/martinvandersteen/pen/vYgEEMN</a></p><p>We just have a language switcher that switches when you click it, nothing crazy, but that’ll change quickly !</p><h3>Adding i18next in the mix</h3><p>For this, I’m using some additional packages : ‘i18next’ that manages the bulk of the i18n job, ‘loc-i18next’ that will insert the translations in our HTML to make it a bit easier for us and ‘i18next-browser-languagedetector’ that does exactly what the name suggests ;)</p><h3>Initializing our packages</h3><p>At the top of my file, I’ll be creating simple objects like these to make it easy to see on CodePen :</p><pre>const frTranslations = {<br>  catchphrase: &quot;Bienvenue sur &lt;strong&gt;DEV.TO&lt;/strong&gt;&quot;,<br>  content: &quot;Contenu statique de mon site internet&quot;<br>};</pre><pre>const enTranslations = {<br>  catchphrase: &quot;Welcome to &lt;strong&gt;DEV.TO&lt;/strong&gt;&quot;,<br>  content: &quot;Static content of my website&quot;<br>};</pre><p>In the production environment I’m putting all of my translations in two /locales/fr/global.json and /locales/en/global.json files, then I&#39;m simply importing them when I&#39;m initializing i18next, that makes it all a bit cleaner. But that&#39;ll do just fine for the sake of the example !</p><p>You can see that the “catchphrase” and “content” keys are actually the ones used in the [data-i18n] attributes in our HTML, that&#39;s what enables our &#39;loc-i18next&#39; package to know where to insert the various translations in our file.</p><p>After writing down those translation objects, let’s initialize i18next like so :</p><pre>// We&#39;re telling i18next to use(LngDetector) which is the name I used to import our &#39;i18next-browser-languagedetector&#39; package<br>const i18n = i18next.use(LngDetector).init({ <br>  supportedLngs: [&#39;fr&#39;, &#39;en&#39;], // The list of languages we use<br>  fallbackLng: &#39;en&#39;, // The default language to use when no translations are found in the current locale<br>  detection: {<br>    order: [&#39;navigator&#39;] // What to infer the initial locale from, this is given by our LngDetector<br>  },<br>  resources: {<br>    fr: { translation: frTranslations }, // Specifying our translations<br>    en: { translation: enTranslations }<br>  }<br>}, function (err, t) {<br>  if (err) return console.error(err) // Writing down errors in the console if need be<br>});</pre><p>We can then initialize ‘loc-i18next’ which will insert our translations in the DOM by specifying the HTML attribute we used to mark the places used for the content :</p><pre>// We attach localize to our i18next instance and tell him to look for &#39;data-i18n&#39; attributes<br>const localize = locI18next.init(i18next, {<br>  selectorAttr: &#39;data-i18n&#39;<br>});</pre><p>With everything setup, it’s time to insert our i18next logic into our controller and make it all work together !</p><h3>Updating the Controller</h3><p>In our Initialize method, we’ll simply wrap everything with our i18n.then(() =&gt; {}); call, that will make sure we only run that code after i18n has been fully initialized with the translations and current browser language, like so :</p><pre>initialize() {<br>    i18n.then(() =&gt; {<br>      this.element.innerHTML = this.languages.map((locale) =&gt; {<br>        return `&lt;span data-action=&quot;click-&gt;locale#changeLocale&quot;<br>        data-locale=&quot;${locale.code}&quot; data-target=&quot;locale.language&quot;&gt;${locale.title}&lt;/span&gt;`<br>      }).join(&#39;&#39;);<br>      this.setLocale(i18next.language);<br>    });<br>  }</pre><p>Notice we’re also setting the locale at the end of the function with setLocale(i18next.language), using the language automatically detected by our i18next LngDetector as argument.</p><p>Inside setLocale(locale), we&#39;ll make sure that we change the locale directly at the i18next level now, and we&#39;ll call the localize(selector) method from &#39;loc-i18next&#39; in order to update the content according to the new language.</p><pre>setLocale(locale) {<br>  i18next.changeLanguage(locale).then(() =&gt; {<br>    localize(&#39;[data-i18n]&#39;); // localize() takes as argument a selector, by passing &#39;[data-i18n]&#39; we update all DOM elements that have a data-i18n attribute set<br>    this.highlightCurrentLocale();<br>  });<br>}</pre><p>And we also have to update the “highlightCurrentLocale()” function so that it uses “i18next.language” to define the current locale used.</p><h3>Conclusion</h3><p>And voilà ! It is a pretty simple setup, so don’t hesitate to build a bit on that basis, by changing part of the URL when the local changes and infering the locale from the URL/Browser cache/… You will find quite some documentation regarding the i18next package, even though a lot of it is about react-i18next, it still applies.</p><p>Here is the final codepen link : <a href="https://codepen.io/martinvandersteen/pen/abpbvgK">https://codepen.io/martinvandersteen/pen/abpbvgK</a></p><p>I hope it will help you setting up i18n on your own websites, cheers !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d869ab7cb7eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I finally started working on my own personal projects]]></title>
            <link>https://vdsmartin.medium.com/how-i-finally-started-working-on-my-own-personal-projects-ade30450b0a9?source=rss-e6a8396293b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ade30450b0a9</guid>
            <category><![CDATA[inspiration]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Martin Vandersteen]]></dc:creator>
            <pubDate>Mon, 03 Aug 2020 18:20:07 GMT</pubDate>
            <atom:updated>2020-08-03T18:38:34.467Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I finally started working on my personal projects</h3><p>After years of over-planning projects, starting them with true enthusiasm but invariably leaving them aside with shame as life got back to me and the excitement died out, I made it. I started climbing that wall and the sight from up here is beautiful!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5nXQOZSoWLxy4lG6MKAnZw.jpeg" /><figcaption>Do you dream of something like this once in a while? Doing what you like, wherever you like? I know I do.</figcaption></figure><p>If you’re reading this, you’re probably like me, at least a little bit. You have projects, you have ideas, you have dreams. Maybe you want to start your own company, create your own e-shop, learn how to speak Japanese or just be financially free. Maybe you also have a Google drive filled with project ideas, very deep analysis and reflections about how to make it work, how you will build feature X or attract user Z. I know I do! I also have todo-lists, Trello boards, Git repositories, even domain names for some of them. And yet <strong>none</strong> of them even came close to being halfway done !</p><p>That’s something I would beat myself up over, a lot. I <strong>knew</strong> I could do it, I had great ideas and the skills or learning ability to pull it off, yet I never seemed to keep the motivation going beyond a few weeks. The energy would die out, I would find something “better” to spend my time on or I would just give up. Seeing other people succeed didn’t always help either. I was pressuring myself a lot and putting big hopes on the fact that someday I would get something through, and that it would make my life better. Now, I’m starting to understand that this mindset was part of my problem.</p><h3>Don’t start a project as a remedy for your problems</h3><p>I wish I could make that title even bigger.</p><p>At some point I had a job which had quite a big load of pressure associated with it. It would completely drain me mentally and emotionally, even though I was really passionate about some of the things I got to work on over there. But, sadly, there were just too many things going wrong in my eyes and all my energy went into desperately trying to fix them. It had a huge impact on my life and social relations, so much so that at some point after talking with a doctor and my girlfriend, I just resigned without any backup plan.</p><p>During those years working at that job and feeling worst by the day, I kept thinking of new projects that could make me financially independent and not have to deal with any of this anymore, ever. I would put unrealistic hopes in all of these, imagine projects with crazy scopes, already dreaming of the good life I would live once they were successful. I also convinced that was the best/only path to getting better.</p><blockquote>My brain was making up projects to try and free me from that crippling pressure I was experiencing. But, in itself, it was just an additional burden of demands for my already overwhelmed self, along with even more work to do. All of this to follow a supposedly ideal scenario coming from the imagination of that self-destructing mind.</blockquote><p>I had not even started doing anything that I was already putting big hopes into these. And you know what comes with big hopes? Pressure. My brain was making up projects to try and free me from that crippling pressure I was experiencing. But, in itself, it was just an additional burden of demands for my already overwhelmed self, along with even more work to do. All of this to follow a supposedly ideal scenario coming from the imagination of that self-destructing mind. I don’t think that mind deserves to be trusted.</p><p>That vicious circle got me nowhere, and it would probably be the same for you if you are experiencing big loads of stress and pressure in your daily life. You don’t need to stress yourself even more: change your job, leave your abusive partner, change country, do anything you need to do to make your daily situation just <em>a little bit</em> better. It took me years to not just <em>think</em> about leaving that company but actually <em>do it.</em> Now I’m doing better though, and I have the mental space to work on the things I want to work on, and so will you!</p><p>One step at a time. Dedicating yourself to a project is a big thing: fix the hurdles that make your life harder everyday first, the mental space you will free by doing so will naturally be replaced by the motivation to work on what you really want to do.</p><h3>One at a time, don’t mix everything together</h3><p>I’m a programmer and I’m very curious about most things related to technology. I am also quite the avid learner in general, I <strong>very</strong> easily fall down YouTube and Wikipedia rabbit holes and end up signing up for a Neuroscience class on Coursera at 2am because my mind was just cracked open after hours of researching some random facts about neuroplasticity.</p><p>Everytime I wanted to start a new software development application, I would think to myself “yeah that’s a great opportunity to learn that shiny new programming language! I can just learn it while coding the application I wanted to do for so long!”. I was adding even more workload than there already was and I was just making it harder for myself.</p><p>Be gentle to yourself, try to start with the simplest version of your project you can think of. Enjoy every single step you take ! You will have time to learn something new once you’re done with the previous project, but don’t pressure yourself, there is no urgency. You <strong>will</strong> achieve those goals and <strong>will</strong> become that person you want to be, but you have to accept that you cannot do it all at once and just let go. Focussing will make you progress faster and motivation will stay high.</p><h3><strong>Have trust and accept the things you cannot change</strong></h3><p>Some things are out of your control sometimes, and you need to accept that, no matter how frustrating it is. Maybe you cannot leave that job that is sucking the life out of you right now because the market is bad and you have kids, maybe you’re currently stuck living with toxic people for legal reasons, maybe you don’t deem yourself good enough right now to pursue your dreams, .. But that’s ok. Dreams don’t disappear. Maybe now is just not the time. What you need is to trust that things change and that nothing lasts forever. One step at a time. Always forward, forward always.</p><p>Work on those problems that directly affect your daily life, start looking for that job that will free up just enough mental space for you to be able to come home and work just a little bit for yourself, keep being strong through those tough times and I promise you those clouds will end up going away.</p><p>And once those clouds finally go away, you won’t even need to think about what it would be like to do X or Y. You will just find yourself doing it a little bit everyday with true passion, smiling all the way through and celebrating every step you take.</p><p>You <strong>will</strong> succeed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ade30450b0a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>