<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Filip Iulian Pacurar</title>
    <description>The latest articles on DEV Community by Filip Iulian Pacurar (@filipac).</description>
    <link>https://dev.to/filipac</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F255385%2F92d17170-1276-4ccc-bb90-a151287b2d32.jpeg</url>
      <title>DEV Community: Filip Iulian Pacurar</title>
      <link>https://dev.to/filipac</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/filipac"/>
    <language>en</language>
    <item>
      <title>Automating the Git commit message prefix</title>
      <dc:creator>Filip Iulian Pacurar</dc:creator>
      <pubDate>Wed, 06 Apr 2022 19:24:07 +0000</pubDate>
      <link>https://dev.to/filipac/automating-the-git-commit-message-prefix-4m13</link>
      <guid>https://dev.to/filipac/automating-the-git-commit-message-prefix-4m13</guid>
      <description>&lt;p&gt;If you’re a programmer you probably &lt;strong&gt;love automating&lt;/strong&gt; the daily tasks you do daily, don’t you? Well, if you don’t you probably should.&lt;/p&gt;

&lt;p&gt;The current project I work on has a specific Git Branching model that follows the Jira tasks number. In a nutshell, here are the requirements: when I tackle a story/feature task, it has a number, let’s say TASK-1. You move the ticket into in-progress and you also create a first sub-task called “Implement” or “Fix” or something similar.&lt;/p&gt;

&lt;p&gt;If you’re like me and like to see the process visually, here’s how it looks:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zuzYupuI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gjucqsdr77uj3ubn429v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zuzYupuI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gjucqsdr77uj3ubn429v.png" alt="Image description" width="856" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In addition to the branching model above, the commit messages must follow the following rule for the prefix: MainTask/SubTask: [commit message]. For example for the task in the flow above, the commit message can be TASK-1/TASK-2: Write the first draft.&lt;/p&gt;

&lt;p&gt;For me, this was the most cumbersome thing, mainly because I want to commit often, not have a single commit with all the finished code, so whenever I did a commit I had to look up the story number and the sub-task I am working on.&lt;/p&gt;

&lt;p&gt;Let’s see how we can automate this prefix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 1 – Git Hooks and config
&lt;/h2&gt;

&lt;p&gt;Git is very extendible: you can have various custom Key-Value configurations for each local repository or for the global Git system itself. We’re gonna be using some custom Git configurations to suit our automation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pacurar.dev/automating-the-git-commit-message-prefix/"&gt;Read the rest of the tutorial here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>git</category>
      <category>bash</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>PHP, CodeIgniter, Laravel, Vue, React, front-end… or how I changed my stack over the course of time</title>
      <dc:creator>Filip Iulian Pacurar</dc:creator>
      <pubDate>Sat, 05 Mar 2022 12:39:18 +0000</pubDate>
      <link>https://dev.to/filipac/php-codeigniter-laravel-vue-react-front-end-or-how-i-changed-my-stack-over-the-course-of-time-2kd6</link>
      <guid>https://dev.to/filipac/php-codeigniter-laravel-vue-react-front-end-or-how-i-changed-my-stack-over-the-course-of-time-2kd6</guid>
      <description>&lt;p&gt;_&lt;br&gt;
Also: Keep up to date with the fast-paced changing scenery of the tech world._&lt;/p&gt;

&lt;p&gt;Back in 2012 when I got my first programming job right after I graduated high school, I did not have any experience with PHP frameworks, I’ve mainly used plain old PHP for my freelance websites and the only thing closer to a framework back then was WordPress. I was quite good with WordPress but it was far behind what a framework means.&lt;/p&gt;

&lt;p&gt;So when I started the job, I had a few months of paid time to actually start learning CodeIgniter. It was the hot thing in the PHP world back then. CI was ok, introduced me to a couple of OOP things but it was all over the place, not really well structured, and did not follow the best practices.&lt;/p&gt;

&lt;p&gt;In the same period, I discovered Laravel 4, around 2013 in the autumn. My initial thought about it was “eww, I don’t like it, it is trying to rewrite how PHP works, what’s up with all those View::make and Route::get calls, why is everything different than standard PHP. So I did not spend any time learning it right away. I even thought I need to install a separate PHP extension to run it, which was not the case.&lt;/p&gt;

&lt;p&gt;Anyway so, we had an internal project at the company I was back then called Tag Economy, an online app written in CodeIgniter over the course of 2012-2013. It was mainly an app for tracking personal spending habits, grouping payments by tags and you could see a lot of graphs based on the entries. The app was working but it was mainly used just by us working at the company and a few friends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pacurar.dev/php-codeigniter-laravel-vue-react-front-end-or-how-i-changed-my-stack-over-the-course-of-time/"&gt;Read the rest of the article on my personal blog :)&lt;/a&gt; &lt;/p&gt;

</description>
      <category>programming</category>
      <category>javascript</category>
      <category>php</category>
      <category>career</category>
    </item>
    <item>
      <title>Solving problem: just one of my WPML site is indexed in Google</title>
      <dc:creator>Filip Iulian Pacurar</dc:creator>
      <pubDate>Thu, 11 Mar 2021 07:47:57 +0000</pubDate>
      <link>https://dev.to/filipac/solving-problem-just-one-of-my-wpml-site-is-indexed-in-google-1d8c</link>
      <guid>https://dev.to/filipac/solving-problem-just-one-of-my-wpml-site-is-indexed-in-google-1d8c</guid>
      <description>&lt;p&gt;Ever since I’ve created my English website and blog, I’ve noticed that whenever I search for my name on Google, I can see only my Romanian website, not the newly created English one.&lt;/p&gt;

&lt;p&gt;Initially, I thought it is a time problem and eventually it will appear since I’ve set it up on Search Console and everything looked ok. But yesterday it has been over a month since I’ve indexed and still won’t work.&lt;/p&gt;

&lt;p&gt;I checked the canonical tag to be sure it is not set to the Romanian site and it wasn’t. But then I also noticed a strange behavior: searching my name in incognito showed the English website, searching in a normal browser showed my Romanian one. So it was clear to me that something was telling Google “Hey, this is in Romanian and only index it in Romania, this is English, can be indexed internationally”.&lt;/p&gt;

&lt;p&gt;And indeed I’ve missed the &lt;strong&gt;alternate&lt;/strong&gt; tag in the source.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RRHxTlvP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/khasagczc0srdz4acbvy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RRHxTlvP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/khasagczc0srdz4acbvy.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since I am using WPML to have multiple languages using the same WordPress installation, that is what is writing those tags there and tells search engines that for the same website there is an alternative version in another language.&lt;/p&gt;

&lt;p&gt;Thankfully though, it can easily be turned off if you do not want this behavior: go to WPML &amp;gt; Languages and turn off/untick &lt;strong&gt;“Display alternative languages in the HEAD section.“&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--peRCykxE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hf7o5kb8lmqod99x66mh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--peRCykxE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hf7o5kb8lmqod99x66mh.png" alt="Screen-Shot-2021-03-11-at-09.21.56"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After one day of turning this off, my international website appeared for Romanian users too and vice-versa.&lt;/p&gt;

&lt;p&gt;For me, this is the behavior I want, for you though you might want to index the way WPML does it by default: each language on its own search engine country. &lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>tips</category>
      <category>wpml</category>
    </item>
    <item>
      <title>The problem with perpetual licensing</title>
      <dc:creator>Filip Iulian Pacurar</dc:creator>
      <pubDate>Tue, 02 Mar 2021 08:16:56 +0000</pubDate>
      <link>https://dev.to/filipac/the-problem-with-perpetual-licensing-3kfj</link>
      <guid>https://dev.to/filipac/the-problem-with-perpetual-licensing-3kfj</guid>
      <description>&lt;p&gt;Unless you’ve been living under a rock, you know should know by now the perpetual licensing pattern: you buy a license to certain software, you receive updates for a year or two, depending on the license, then you stop receiving updates for the app and you can use that version forever.&lt;/p&gt;

&lt;p&gt;The main problem with this type of license, from a user’s perspective, is consistency. I use quite a few software with this type of license BUT the main difference is that some are updated daily/weekly or at least monthly and some are less frequently updated.&lt;/p&gt;

&lt;p&gt;Most applications receive tons of updates after the initial release and then they magically stop receiving updates or new features for a while. My question is: why buy another year of your software if in the past 5-6 months I received only a minor update? What will I miss if you do not update it? Well, for most applications, you won’t miss anything… except some euros in your pocket.&lt;/p&gt;

&lt;p&gt;On the other hand, there’s software like TablePlus that is fully worth paying for it year by year because it is updated a lot and you would miss a lot of features if you are stuck on an old version.&lt;/p&gt;

&lt;p&gt;Nevertheless, I have a problem with all subscriptions lately. You pay a subscription for everything, and now you are required to pay monthly for software too. It all piles up, and sure, developers make more money and they can afford 5$ here and 5$ there, but again, it all piles up and at the end of the month you end up giving a lot of money on licenses.&lt;/p&gt;

&lt;p&gt;So… maybe a perpetual license is ok though and it all depends on the developer itself if clients would renew their license: keeping an updated app and adding new features would make a higher percentage of the clients renew their license for another year.&lt;/p&gt;

&lt;p&gt;What do you say, what is the best license for you and your needs? How many perpetual licenses do you pay yearly?&lt;/p&gt;

</description>
      <category>licensing</category>
      <category>programming</category>
      <category>software</category>
    </item>
    <item>
      <title>Pro Tip: Don’t overcomplicate content storage / the database from the start</title>
      <dc:creator>Filip Iulian Pacurar</dc:creator>
      <pubDate>Fri, 26 Feb 2021 15:46:19 +0000</pubDate>
      <link>https://dev.to/filipac/pro-tip-don-t-overcomplicate-content-storage-the-database-from-the-start-17og</link>
      <guid>https://dev.to/filipac/pro-tip-don-t-overcomplicate-content-storage-the-database-from-the-start-17og</guid>
      <description>&lt;h1&gt;
  
  
  Part A – The problem
&lt;/h1&gt;

&lt;p&gt;I’m currently working on a fairly complicated project that basically is a single-page app having just a quiz. Based on the answers you give, you receive a special report and solution at the end. Something regarding loans and financial stuff.&lt;/p&gt;

&lt;p&gt;The problem is that those questions must be editable from an admin interface within a Laravel app and as I was building the actual form and logic, I found myself writing a lot of migrations and changing database structure a lot. Run &lt;code&gt;php artisan migrate:fresh --seed&lt;/code&gt; over and over again until you reach the perfect shape of the database, right?&lt;/p&gt;

&lt;p&gt;Well… not necessarily. In my current project, even this was overkill because I found myself changing the structure from a refresh to a refresh of the page.&lt;/p&gt;

&lt;h1&gt;
  
  
  Part B – The alternative solution
&lt;/h1&gt;

&lt;p&gt;In the project I am talking about I have a small GraphQL API that returns to the React frontend the set of questions to present to the user. What I’ve done is a “hack”: I thought myself, does the data actually need to come from the database right from the start? Couldn’t I somehow “mock” the set of questions? Well, GraphQL or the actual API endpoint can return the data from any source, the important thing is that the front-end needs the right structure.&lt;/p&gt;

&lt;p&gt;What I’ve done is this: I created a YAML file with an array of questions and in that file, I could structure the object however I wanted – remove keys, add keys, change the shape of objects, anything… any change would just need adjusting in the YAML file and then CMD+S and boom, the API endpoint returned the new format.&lt;/p&gt;

&lt;p&gt;Basically, you can load a JSON, Yaml, or any format you want and when you’re done and have the content in the final structure you want, you just create the database table in that format and you’re done with it. No more 100 migrations per minute, just a final migration that just works.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P8RaOeOz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n6dgzo36gd092kv161qk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P8RaOeOz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n6dgzo36gd092kv161qk.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Closing thoughts
&lt;/h1&gt;

&lt;p&gt;We tend to over-complicate everything in development, when in fact we should choose the more simple path for us to keep our sanity. What’s the point of going through a lot of database changes when you can freely explore ideas using a mocked set of data?&lt;/p&gt;

&lt;p&gt;Remember: keep going back to the basics. It’s simpler for you. Don’t just blindly follow conventions unless you want to reach the burnout phase quicker than the other programmer fellows.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally posted on my blog only&lt;/em&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>tips</category>
      <category>database</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
