<?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 Oscar Nevarez on Medium]]></title>
        <description><![CDATA[Stories by Oscar Nevarez on Medium]]></description>
        <link>https://medium.com/@oscar-nevarez?source=rss-46ed7f5fffdc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*r-QghqiWr9S-9LLEvtZW8g.jpeg</url>
            <title>Stories by Oscar Nevarez on Medium</title>
            <link>https://medium.com/@oscar-nevarez?source=rss-46ed7f5fffdc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 20:09:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oscar-nevarez/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[A few things I know about LoRA]]></title>
            <link>https://oscar-nevarez.medium.com/a-few-things-i-know-about-lora-d41f26ebf781?source=rss-46ed7f5fffdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d41f26ebf781</guid>
            <category><![CDATA[lora]]></category>
            <category><![CDATA[stable-diffusion]]></category>
            <dc:creator><![CDATA[Oscar Nevarez]]></dc:creator>
            <pubDate>Sun, 12 Mar 2023 23:18:17 GMT</pubDate>
            <atom:updated>2023-03-13T03:19:43.447Z</atom:updated>
            <content:encoded><![CDATA[<p>I wanted to write my thoughts and very basic understanding about LoRA and some related concepts I have more clarity of compared say when I started studying, just a few months ago. If you feel confident with most of the terminology you can skip the background part and jump directly into the chapter interest you the most.</p><blockquote><strong>Disclaimer</strong>: this is not a comprehensive guide about training nor the use of LoRA files, nor it is a scientific/academic article. I do however believe, that it could help to shade some light to the topic using lay terms and code approach.</blockquote><blockquote>I’lll try to lay down the terms as simple as I would’ve like to be presented to me, a regular somehow knowledgeable person with technical understanding of things.</blockquote><blockquote>Finally, although LoRA can be implemented in any neural network, this post will focus in is use with <strong>stable diffusion.</strong></blockquote><h3>Background</h3><p>To understand LoRA first we need to have some vague understanding of what’s a neural networks, LLMs and how they work.</p><p>The easiest way to put it I found is this:</p><blockquote>A neural network is composed of multiple layers. Each layer performs a mathematical operation called matrix multiplication, which takes two separate matrices and combines them into one. Both of these matrices are then multiplied by the same input, with the output vectors combining them coordinate-wise.</blockquote><p>Another introductory course I like is <a href="https://www.youtube.com/watch?v=jmmW0F0biz0">Neural Networks Explained in 5 minutes by IBM</a></p><h4><strong>What is LoRA?</strong></h4><p>LoRA stands for <em>Low-Rank Adaptation of Large Language Models</em>, the original paper is available <a href="https://arxiv.org/abs/2106.09685"><strong>here</strong></a>.</p><h4><strong>How does LoRA works?</strong></h4><p>LoRA works by freezing the pre-trained model <strong>weights</strong> and <strong>injecting trainable rank decomposition matrices into each layer of the Transformer architecture, </strong>being those but not limited to attention layers. This greatly reduces the number of trainable parameters for downstream tasks, while still performing on-par or better than fine-tuning in terms of model quality.</p><h4>What’s in a LoRA file?</h4><p>a LoRA file contain <strong>weights</strong>, every one of these weights is saved into node layers which are named using an specific naming convention. These weights <em>play </em>and <em>interact </em>with the model during the inference.</p><p>Some training methods reorganize the layers in a way that’s easier to access, might change the prefix and suffix or could also include complementary information on the file aka metadata.</p><h3>Training</h3><h4>What are the available libraries to fine-tune a model an get LoRA files from it?</h4><ul><li><a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui/tree/master/extensions-builtin/Lora">Automatic1111 built in support</a></li><li><a href="https://github.com/kohya-ss/sd-webui-additional-networks/blob/main/scripts/lora_compvis.py">Additional networks</a></li><li><a href="https://github.com/cloneofsimo/lora">Cloneofsimo</a></li><li><a href="https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora.py#enroll-beta">Diffusers official implementation</a></li><li><a href="https://replicate.com/blog/lora-faster-fine-tuning-of-stable-diffusion">Replicate LoRA implementation</a></li><li><a href="https://github.com/kohya-ss/sd-scripts">Kohya scripts</a></li><li><a href="https://github.com/microsoft/LoRA">Microsoft implementation</a></li></ul><h4>Why some LoRA files doesn’t work?</h4><p>It’s very rare that a LoRA file is inherently broken as rather that it’s has a different structure from the expected by the consumer.</p><p>If you leave this thing with only a few takeaways let the following be one of them:</p><blockquote>There is no such thing as a LoRA format</blockquote><p>There is a LoRA algorithm or training method but, the mode, configuration and hence the output structure depends of the given input and the training implementation.</p><p>Some of the reasons for your file doesn’t work or produce no difference when used are the following:</p><ul><li>The model used for the training is different than the once used during the inference.</li><li>The layers contain a different naming convention from the expected or are just different in its structure.</li></ul><h3>Understanding key differences</h3><p>Let’s discover the structure of a <a href="https://civitai.com/models/6526/studio-ghibli-style-lora">random LoRA file</a> taken from civitAI, I’ll use <a href="https://github.com/huggingface/safetensors">safetensors</a> library for this, guided by the file extension (.safetensors)</p><pre>from safetensors import safe_open<br># Download your favorite LoRA fila from civitai<br># Using : https://civitai.com/models/6526/studio-ghibli-style-lora<br>with safe_open(&quot;lora.safetensors&quot;, framework=&quot;pt&quot;, device=0) as f:<br>    for k in f.keys():<br>        print(f&quot;key={k}&quot;)</pre><p>The output of the above code can be found <a href="https://gist.github.com/oscarnevarezleal/00290928cf56b32574281b566f38aee9"><strong>here</strong></a>, and, <a href="https://colab.research.google.com/drive/1IiTAxiBAlWL3KbAUOGSZQ08XJ1M8qJ1O?usp=sharing">a colab notebook here</a>.</p><p>Most if not all of the keys found follow a prefix pattern of the following nature:</p><ul><li><em>lora_te_text_model_encoder_layers_N_mlp_fcN</em></li><li><em>lora_unet_down_blocks_N_attentions_N_proj_in</em></li><li><em>lora_unet_up_blocks_N_attentions_N_proj_in</em></li></ul><p>While the suffixes match any of :</p><ul><li><em>lora_down.weight</em></li><li><em>lora_up.weight</em></li><li><em>alpha</em></li></ul><p>Although this kind of structure is the most often used it’s not a default. Prepare to find multiple different formats out there.</p><p>Take another example, a <a href="https://huggingface.co/sayakpaul/sd-model-finetuned-lora-t4/blob/main/pytorch_lora_weights.bin">pokemon LoRA file</a> trained using <a href="https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora.py#enroll-beta">Diffusers official implementation</a>. The generated file is not a safetensor but a pytorch binary file, its structure as we might expect, looks <a href="https://gist.github.com/oscarnevarezleal/a0ce5834b0d52915095f005ca9f73a80">different</a>, more aligned to the transformers architecture. Read more about this, <a href="https://vaclavkosar.com/ml/cross-attention-in-transformer-architecture">here</a> and <a href="https://arxiv.org/pdf/1706.03762.pdf">here</a>.</p><h3>Inference</h3><h4>Where to find LoRA files</h4><ul><li><a href="https://huggingface.co/lora-library">Hugging face LoRA library</a></li><li><a href="https://civitai.com/">CivitAI</a></li></ul><h4>How Automatic1111 uses LoRA files?</h4><p>This is a tricky question and the source of <a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues?q=lora">many open issues</a> in a111 repositories. There is no one answer here, a1111 dropped its own LoRA training support, but this is a mix of existing techniques used together.</p><p>A111 will try a few things before you can activate your LoRA file:</p><ul><li>Read metadata if available to detect the LoRA origin and training settings.</li><li>Detect naming convention by reading file keys</li><li>Convert between old naming convention to new one</li><li>Convert any weight mismatch</li><li>Ignore unmatched layers</li><li>Inject the LoRA network into the current model for its usage</li></ul><p>If the above succeeds then A111 will handle the proper calculations needed to use your LoRA file during the inference, including prompt weight and loRA ranks.</p><h3>Conclusion</h3><p>In this post we cover the basic functionality of the LoRA algorithm, how can we use it in stable diffusion and what are the key implementation differences. Hopefully 🤞 this helps someone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d41f26ebf781" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Laravel modeling using a low-code approach and cloud-native technology]]></title>
            <link>https://oscar-nevarez.medium.com/laravel-modeling-using-a-low-code-approach-and-cloud-native-technology-63ad3b2bd593?source=rss-46ed7f5fffdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/63ad3b2bd593</guid>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[laraboot]]></category>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[no-code]]></category>
            <dc:creator><![CDATA[Oscar Nevarez]]></dc:creator>
            <pubDate>Wed, 27 Oct 2021 17:47:18 GMT</pubDate>
            <atom:updated>2021-10-27T17:47:18.688Z</atom:updated>
            <content:encoded><![CDATA[<h3>Diving into the Laraboot Model buildpack</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ipecrwHT6OZDVcXIuDOYUg.png" /></figure><p>In the first draft of what eventually would be <a href="https://www.npmjs.com/package/@laraboot-io/cli">Laraboot</a> I envisioned the idea of these code blocks acting just like lego blocks, interchangeable pieces that read, create or mutate the state of an application. A lot has changed in the codebase to support this idea but the fundamental idea remains the same. I went from shell scripts to high-level language tools back and forth until I eventually adopt cloud-native technology, and particularly <a href="https://paketo.io/">Paketo buildpacks</a> as the common ground for the <a href="https://laraboot.io/">Laraboot</a> platform.</p><p>The <a href="https://laraboot.io/">Laraboot</a> <a href="https://laraboot.io/buildtask/core/laravel-model">model buildpack</a> is a fully configurable buildpack that scaffold PHP code for the <a href="https://laravel.com/">Laravel framework</a> using community packages and the <a href="https://laraboot.io/">Laraboot</a> platform. In a nutshell, this <em>block</em> will read the model definition from a laraboot specification file laraboot.json and execute the necessary commands for a parametrized code generation.</p><h3>Providers</h3><blockquote>I never thought I’d need to support more than one package aka provider for a specific buildpack. But now I realize it makes the most sense in the world.</blockquote><h3>Blueprint</h3><p>In the beginning, I fell in love with the simplicity of the code generator <a href="https://github.com/laravel-shift/blueprint">Shift Blueprint</a> so much that even created some GO helper tools to generate draft definitions.</p><p>Some of the features <a href="https://github.com/laravel-shift/blueprint">Shift Blueprint</a> brings to the table are</p><ul><li>Data model versioning using YML files?</li><li>CRUD routes and tests included?</li></ul><p>Sign me in, right? Eventually, I noticed that although powerful this was a very much opinionated library and the coupling was increasing for the model buildpack codebase. If there were no changes it would have decided the course of the model buildpack as a whole. I decided to abstract my implementation and welcome others on board.</p><h3>Larawiz</h3><p>I don’t know exactly how I missed it during my initial research, maybe I wasn’t even looking. But when it came to me again I was completely fascinated. <a href="https://github.com/Larawiz/Larawiz">Larawiz</a> is an easy project scaffolder for Laravel. It also uses the YAML file definition for the data model so the integration was as smooth as it could be.</p><h3>Differences</h3><p>Simplicity</p><ul><li><a href="https://github.com/Larawiz/Larawiz">Larawiz</a> uses braindead easy syntax (<a href="https://github.com/Larawiz/Larawiz">quoting</a>). No kidding! you can read the YAML file and completely understand what’s going on there.</li><li>The same is true for <a href="https://github.com/laravel-shift/blueprint">Shift Blueprint</a> but as I mentioned before, <a href="https://github.com/laravel-shift/blueprint">Shift Blueprint</a> not only generates <em>Models</em> but <em>routes</em> and <em>controllers</em> so the file can get a little bunky.</li></ul><pre>#blueprint<br>models:<br>  Post:<br>    title: string:400<br>    content: longtext<br>    published_at: nullable timestamp<br>    author_id: id:user</pre><pre>#larawiz<br>models:<br>  Author:<br>    name: string<br>    email: string<br>    password: string<br>    publications: hasMany</pre><pre>  Publication:<br>    title: string<br>    body: longText<br>    author: belongsTo</pre><h3>Usage</h3><p>Using the buildpack couldn’t be easier. <br><a href="https://laraboot.io/buildtask/core/laravel-model">Read more</a> about it <a href="https://laraboot.io/buildtask/core/laravel-model">here</a>.</p><h3>1 — Install laraboot</h3><pre>npm i -g @laraboot-io/cli</pre><h3>2 — Create a laraboot application</h3><pre>laraboot new app --php-version=8.0.*<br>cd app</pre><h3>3 — Add buildpacks</h3><pre>laraboot task add @core/laravel-foundation-provider --format=file -vvv<br>laraboot task add @core/laravel-model-buildpack --format=file -vvv<br>laraboot build --pack-params default-process=task</pre><h3>4 — Define your data model</h3><pre>laraboot model add Record<br>√ Would you like to define your model now? (y/N) · true<br>√ Field name? · content<br>√ Field type? · varchar<br>√ Is this field unique? (y/N) · false<br>√ Is this field primary key? (y/N) · false<br>√ Would you like to add a new field? (y/N) · false<br>Model Record was added<br>laraboot model add Comment<br>√ Would you like to define your model now? (y/N) · true<br>√ Field name? · content<br>√ Field type? · varchar<br>√ Is this field unique? (y/N) · false<br>√ Is this field primary key? (y/N) · false<br>√ Would you like to add a new field? (y/N) · false<br>Model Comment was added</pre><p>At this time the file laraboot.json was modified to include your data model. It will be something like this:</p><pre>&quot;models&quot;: [<br>      {<br>        &quot;name&quot;: &quot;Record&quot;,<br>        &quot;columns&quot;: [<br>          {<br>            &quot;name&quot;: &quot;log&quot;,<br>            &quot;type&quot;: &quot;string&quot;<br>          }<br>        ]<br>      },<br>      {<br>        &quot;name&quot;: &quot;Comment&quot;,<br>        &quot;columns&quot;: [<br>          {<br>            &quot;name&quot;: &quot;comment&quot;,<br>            &quot;type&quot;: &quot;string&quot;<br>          }<br>        ]<br>      }<br>    ]</pre><blockquote>You can modify the file directly if you forgot to add columns or want to make some modifications.</blockquote><h3>5 — Configure the buildpack</h3><p>Now we need to tell the <a href="https://github.com/paketo-buildpacks/php-dist">PHP buildpack</a> how our app is configured. And also tell the <a href="https://laraboot.io/buildtask/core/laravel-model">model buildpack</a> what provider we want to use during the build process.</p><p>Below is a minimal configuration.</p><pre>#buildpack.yml<br>php:<br>  # this allows you to specify a version constraint for the `php` dependency<br>  # any valid semver constraint (e.g. 7.* and 7.4.*) are also acceptable<br>  version: 8.0.x</pre><pre>  # text user can specify to use PHP&#39;s built-in Web Server<br>  # default: php-server<br>  webserver: php-server</pre><pre>  # directory where web app code is stored<br>  # default: htdocs<br>  webdirectory: public</pre><pre>  # directory where library code is stored<br>  # default: lib<br>  libdirectory: lib</pre><pre>  # Use default php script<br>  script: index.php</pre><pre>  # default: admin@localhost<br>  serveradmin: admin@localhost</pre><pre>  # default: redis-sessions<br>  redis:<br>    session_store_service_name: redis-sessions</pre><pre>  # default: memcached-sessions<br>  memcached:<br>    session_store_service_name: memcached-sessions</pre><pre>### add the following <br>laravel-model:<br>  # larawiz or blueprint<br>  # provider: ~ <br>  directory: app<br>  cleanup: true<br>  git:<br>    enabled: true<br>    commit: true</pre><h3>Build and run</h3><pre># It takes a while the first time, be patient<br>laraboot build &amp;&amp; laraboot run --port=8080</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OAbQrwkZEwg4lnZy" /></figure><p>Congratulations! You have bootstrapped a Laravel application, and it’s already containerized.</p><h3>Conclusion</h3><p>In this article, we saw how to generate PHP code for the Laravel framework using a low-code approach and cloud-native technology allowing us two choose from two different code-generator libraries. This opens the gates for future providers and makes the <a href="https://laraboot.io/">Laraboot platform</a> the way to go to scaffold and maintain Laravel applications easily.</p><h3>References</h3><ul><li><a href="https://laraboot.io/">Laraboot platform</a></li><li><a href="https://laraboot.io/buildtask/core/laravel-model">Model buildpack</a></li><li><a href="https://github.com/oscarnevarezleal/laraboot-model-demo">Demo source</a></li><li><a href="https://www.gitpod.io/#https://github.com/oscarnevarezleal/laraboot-model-demo/tree/main">Gitpod Demo</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63ad3b2bd593" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create cloud-native buildpacks using Github Actions]]></title>
            <link>https://faun.pub/create-cloud-native-buildpacks-using-github-actions-f15656fdf5f4?source=rss-46ed7f5fffdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/f15656fdf5f4</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[buildpack]]></category>
            <dc:creator><![CDATA[Oscar Nevarez]]></dc:creator>
            <pubDate>Sun, 24 Oct 2021 19:12:27 GMT</pubDate>
            <atom:updated>2021-11-03T22:39:46.764Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*nmwz9PKF9jFaXDnQ5PdybQ.png" /></figure><p>I’ve been working with <a href="https://buildpacks.io/">CNB technology</a> a lot during the last few months, particularly with <a href="https://buildpacks.io/docs/tools/pack/">pack</a> and <a href="https://github.com/paketo-buildpacks/packit">PackIt library</a>. Overall it’s been a lot of fun and learning along the way, I’m not going to lie here, the learning curve seemed propelled by a rocket but turned out to be quite simple once you grab your head around the new terminology and <a href="https://buildpacks.io/docs/concepts/#:~:text=What%20are%20buildpacks%3F,to%20run%20on%20any%20cloud.">concepts</a>. Just like anything in tech.</p><p>Once I understood the hows and whys then I was <em>buildpacking</em> this and <em>buildpacking</em> that, pretty soon I found myself doing repetitive jobs that were begging to be automized. I’m talking about simple script bundled into buildpacks for better distribution, organization, and versioning plus all the benefits CNB brings to the table.</p><p>I decided to invest some time in the making of a more generic tool to help me with this problem.</p><p>I needed a little <em>something</em> that took a list of commands and turn them into a valid build pack. In my mind, I could see and almost touch the form and shapes of this new toy, how the sequence of events was executed to coordinate the creation of this _on the fly <em>buildpack</em>.</p><h3>Idea</h3><p>The easiest way to explain the process is with the diagram below.</p><pre># From a working PackIt project, parametrize and map input commands <br># taken from a YML file<br>┌───────────────────────┐<br>│      Base file        │ <br>└───────────────────────┘<br>          ▼<br># Compile the modified project so once the build process kicks <br># https://buildpacks.io/docs/concepts/components/lifecycle/build/<br># our buildpack executes one by one the **commands**<br>┌────────────────────────┐<br>│      Build.go          │ <br>└────────────────────────┘<br>          ▼<br># Pack it for distribution and release at will<br>┌────────────────────────┐<br>│    buildpack.cnb       │<br>└────────────────────────┘</pre><h3>Whiteboard time</h3><p>What I first did was draft a very simple definition that allowed me to see how a regular user such as me, in this case, would like to define a list of commands. I decided to use YAML for this. Here’s how a <em>command</em> file looks like.</p><blockquote>This isn’t a Github Action file although I borrowed some of the key names (name and run)</blockquote><pre>laraboot-commander:<br>  commands:<br>    - name: Init<br>      run: |<br>        echo &quot;Init 🔥&quot;<br>        pwd<br>    - name: NoOps<br>      run: |<br>        echo &quot;Hello 🗺️&quot;<br>        ls -ltah<br>    - name: Install deps<br>      run: |<br>        echo &quot;installing 🤖&quot;</pre><blockquote>This list could as well be defined as a list of “strings” but I foresee probably as a next step eventually I’d like to be able to pass extra parameters, environment variables, etc. Just like Github allows it. So the final definition looks something like the one below.</blockquote><pre>// type Commander struct {<br>//     WorkingDir string `yaml:&quot;directory&quot;`<br>//     Commands   []struct {<br>//         Name string `yaml:&quot;name&quot;`<br>//         Run  string `yaml:&quot;run&quot;`<br>//     } `yaml:&quot;commands&quot;`<br>// }</pre><p>Then I thought, what would be the inputs I’d like to accept for the creation of buildpacks from Gh pov? That was a question easy to answer. Being familiar with pack cli I decided to ask just for name and version.</p><h3>Detect</h3><p>For the scope of the project, let’s agree the detection will always occur and the buildpack will always participate in the build plan.</p><h3>Build</h3><p>The build part was quick because honestly executing a bash command or script in GO might be the easiest thing to do. Nevertheless, I found some blocks along the road that I didn’t foresee in my planning.</p><p>Such as this one:</p><p>ERROR: failed to build: the launch, cache and build flags should be in the types table of /layers/xxx. Basically, if we&#39;re authoring a buildpack from a template then allowing the user to provide a name for it, the name provided has to be considered during the build process. We need to <a href="https://gist.github.com/oscarnevarezleal/532f0614228f13c3c472661b263ea1c4">grab the name of a buildpack</a> directly from the buildpack.toml file.</p><p>Also, the constant unknown of where I am stood (what context or path) and why it fails while running:</p><ul><li>Locally</li><li>Locally with WSDL &amp; ubuntu</li><li>Same repo remotely with Github actions</li><li>Another repository (consumer) using the Github action</li></ul><p>In the end, I can say that for this being a quick prototype it actually works really good and might even be a more robust thing down the road.</p><h3>Usage</h3><p>Ok, how do we use this Github Action that creates buildpack for us? I’m glad you ask, couldn’t be simpler.</p><p>First, create your <em>commander</em> file. It can contain several or just one command.</p><pre>#commander.yml<br>laraboot-commander:<br>  commands:<br>    - name: Init<br>      run: |<br>        echo &quot;Hello World&quot;</pre><p>As a part of my workflow I will use 3 actions:</p><ul><li>The setup-pack action. This will set up pack cli and other util tools. Check out the <a href="https://github.com/buildpacks/github-actions">repo</a> if you feel interested.</li><li>Our <em>commander</em> action</li><li>actions/upload-artifact@v2</li></ul><pre># .github/workflows/worklfow.yml<br>      - uses: buildpacks/github-actions/setup-pack@v4.1.0<br>        with:<br>          pack-version: 0.20.0</pre><pre>      - name: Gh action<br>        uses: laraboot-io/laraboot-commander/actions/commander@master<br>        with:<br>          name: my-buildpack<br>          version: 0.0.2<br>          file: commander.yml</pre><pre>      - name: Upload dist<br>        uses: actions/upload-artifact@v2<br>        with:<br>          name: dist<br>          path: dist</pre><p>And if everything works fine it will look like this:</p><pre>&#39;create&#39;  buildpack.toml<br>    &#39;create&#39;  bin/build<br>    &#39;create&#39;  bin/detect<br>Successfully created &#39;my-buildpack&#39;<br>Successfully created package &#39;dist/my-buildpack.cnb&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/0*7o0yXYAsap4Z9Gy8" /></figure><p>Then as a part of your workflow or in another project, you might use this buildpack as follows:</p><pre>mkdir -p app<br>pack build sample-app --path app --buildpack my-buildpack.cnb --builder cnbs/sample-builder:bionic</pre><h3>Conclusion</h3><p>We’ve seen how to create a buildpack from a YML file using a custom GitHub action but the same can be replicated for any other CI runner easily.</p><p>We’re going to hear more and more about buildpacks in the years to come. It’s a game-changer for developers and operators in an era of automation and continuous integration. The source code of this post is available <a href="https://github.com/oscarnevarezleal/my-custom-buildpack">here</a></p><p>Where to go from here?</p><ul><li><a href="https://docs.github.com/en/actions/creating-actions/developing-a-third-party-cli-action">Developing a third party CLI action</a></li><li><a href="https://aws.amazon.com/blogs/containers/creating-container-images-with-cloud-native-buildpacks-using-aws-codebuild-and-aws-codepipeline/">Creating container images with Cloud Native Buildpacks using AWS CodeBuild and AWS CodePipeline</a></li></ul><figure><a href="https://faun.to/bP1m5"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BCiLLad3dvZLwBa-B5cAVQ.png" /></a></figure><p>Join FAUN: <a href="https://faun.to/i9Pt9"><strong>Website</strong></a><strong> </strong>💻<strong>|</strong><a href="https://faun.dev/podcast"><strong>Podcast</strong></a><strong> </strong>🎙️<strong>|</strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong>|</strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong>|</strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷|<a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook Group</strong></a><strong> </strong>🗣️<strong>|</strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin Group</strong></a><strong> </strong>💬<strong>|</strong> <a href="https://faun.dev/chat"><strong>Slack</strong></a> 📱<strong>|</strong><a href="https://thechief.io/"><strong>Cloud Native</strong> <strong>News</strong></a><strong> </strong>📰<strong>|</strong><a href="https://linktr.ee/faun.dev/"><strong>More</strong></a><strong>.</strong></p><p><strong>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author 👇</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f15656fdf5f4" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/create-cloud-native-buildpacks-using-github-actions-f15656fdf5f4">Create cloud-native buildpacks using Github Actions</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Minute Tutorial]]></title>
            <link>https://oscar-nevarez.medium.com/10-minute-tutorial-fe1b74bff211?source=rss-46ed7f5fffdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe1b74bff211</guid>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Oscar Nevarez]]></dc:creator>
            <pubDate>Wed, 13 Oct 2021 16:49:53 GMT</pubDate>
            <atom:updated>2021-10-13T16:51:59.478Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fv3cJ8NDWjaNxhjGkcGaKw.png" /></figure><h3>Create and deploy a Laravel application using a low-code approach</h3><h3>Getting started</h3><p>In this post, I want to show how quickly and easily <a href="https://laraboot.io/">Laraboot</a> can help you create a solid start point for your next Laravel application including models, CRUD routes, and Jetstream integration. Best of all, we won’t have to write any code.</p><p>Once we got the application ready we will use AWS ECR to deploy it.</p><h3>Initialize and configure</h3><h3>Prerequisites</h3><p>Make sure your system has the following requirements beforehand.</p><ul><li><a href="https://www.docker.com/products/docker-desktop">Docker desktop</a></li><li><a href="https://nodejs.org/es/">NodeJs</a></li><li><a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html">AWS cli</a> (for deployment only)</li></ul><h3>Install laraboot</h3><p>Laraboot is installed through NPM. Check out the project <a href="https://www.npmjs.com/package/@laraboot-io/cli">here</a>.</p><pre>npm i -g @laraboot-io/cli</pre><h3>Create new project</h3><pre>laraboot new laraboot-demo-app --php-version=8 &amp;&amp; cd laraboot-demo-app</pre><h3>Buildtasks</h3><blockquote>Build tasks are just custom <a href="https://buildpacks.io/docs/concepts/components/buildpack/#:~:text=A%20buildpack%20is%20a%20set,buildpack.">buildpacks</a> that create or modify a Laraboot project.</blockquote><p>In this post, we’re going to use several build tasks. If you feel adventurous, you can dive into the <a href="https://laraboot.io/buildtasks/">build task directory</a></p><p>The ones we require are:</p><ul><li><a href="https://laraboot.io/buildtask/core/laravel-foundation-provider">@core/laravel-foundation-provider</a></li><li><a href="https://laraboot.io/buildtask/core/laravel-config">@core/laravel-config</a></li><li><a href="https://laraboot.io/buildtask/core/laravel-model">@core/laravel-model</a></li><li><a href="https://laraboot.io/buildtask/core/laravel-foundation-provider">@core/laravel-starterkit-buildpack</a></li></ul><p>We add them using laraboot cli like this</p><pre>laraboot task add @core/laravel-foundation-provider --format=file<br>laraboot task add @core/laravel-config --format=file<br>laraboot task add @core/laravel-model --format=file<br>laraboot task add @core/laravel-starterkit-buildpack --format=file</pre><h3>Configure</h3><p>Let’s first create our data model. For the purpose of this post let’s imagine we have 2 models. Post and Comment. We’ll create them using the model command like this:</p><pre>laraboot model add Post<br>√ Would you like to define your model now? (y/N) · true<br>√ Field name? · content<br>√ Field type? · varchar<br>√ Is this field unique? (y/N) · false<br>√ Is this field primary key? (y/N) · false<br>√ Would you like to add a new field? (y/N) · false<br>Model Post was added<br>laraboot model add Comment<br>√ Would you like to define your model now? (y/N) · true<br>√ Field name? · content<br>√ Field type? · varchar<br>√ Is this field unique? (y/N) · false<br>√ Is this field primary key? (y/N) · false<br>√ Would you like to add a new field? (y/N) · false<br>Model Comment was added</pre><p>Then configure Jetstream. Add the following piece of content to the end of your buildpack.yml file</p><pre># buildpack.yml<br>laravel-starterkit:<br>  # Jetstream configuration<br>  jetstream:<br>    enabled: true<br>    teams: true<br>    stack: livewire<br>  # Breeze configuration<br>  breeze:<br>    enabled: false<br>    stack: inertia</pre><h3>Build</h3><p>Once configured, kick the build process. Mind that the build time depends on your system capabilities and whether if this is the first time you build a laraboot project. Subsequent builds are significantly faster.</p><pre>laraboot build</pre><p>If everything goes as planned you should end up with an OCI-compliant image named laraboot-demo-app.</p><h3>Preview</h3><p>Let’s see how everything looks like by running our application locally</p><pre>laraboot run --port=9000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0eMsDC59ZJu5rnmO" /></figure><blockquote>Awesomeness.</blockquote><h3>Deploy to AWS</h3><p>Next, we’re going to use AWS as a cloud provider and AWS ECR as the service registry but you can as well deploy to the CR of your preference.</p><h3>Create an ECR repository using AWS CLI</h3><blockquote>You can skip this part if you already have an AWS ECR repository.</blockquote><p>There are two ways ( maybe more ) to create an ECR repository, in this post we’ll use aws-cli.</p><pre># create an ecr repository<br>aws ecr create-repository \<br>    --repository-name laraboot-demo-app \<br>    --image-scanning-configuration scanOnPush=true</pre><p>This will output something like this</p><pre>{<br>    &quot;repository&quot;: {<br>        &quot;repositoryArn&quot;: &quot;arn:aws:ecr:us-east-1:xxxxxxxxxxxx:repository/laraboot-demo-app&quot;,<br>        &quot;registryId&quot;: &quot;xxxxxxxxxxxx&quot;,<br>        &quot;repositoryName&quot;: &quot;laraboot-demo-app&quot;,<br>        &quot;repositoryUri&quot;: &quot;xxxxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/laraboot-demo-app&quot;,<br>        &quot;createdAt&quot;: &quot;2021-10-13T10:45:53-05:00&quot;,<br>        &quot;imageTagMutability&quot;: &quot;MUTABLE&quot;,<br>        &quot;imageScanningConfiguration&quot;: {<br>            &quot;scanOnPush&quot;: true<br>        },<br>        &quot;encryptionConfiguration&quot;: {<br>            &quot;encryptionType&quot;: &quot;AES256&quot;<br>        }<br>    }<br>}</pre><h3>Create an ECR repository through the AWS ECR console</h3><p>You can achieve the same by signing into the AWS console and heading to the <a href="https://us-east-1.console.aws.amazon.com/ecr/repositories?region=us-east-1">ECR service console management</a>.</p><ul><li>Click on Create repository</li><li>Fill out the blanks in the <em>General settings</em> panel</li><li>Click on Create repository</li></ul><h3>Deploy</h3><p>The steps to deploy our image are the following</p><ul><li>Sign in to the AWS ECR</li><li>Tag our image</li><li>Deploy</li></ul><pre># replace xxxxxxxxxxxx with your AWS account id<br># replace region if it&#39;s not us-east-1</pre><pre># sign in to the ECR<br>aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin xxxxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com</pre><pre>## tag our image<br>docker tag laraboot-demo-app:latest xxxxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/laraboot-demo-app:latest</pre><pre>## push<br>docker push xxxxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/laraboot-demo-app:latest</pre><h3>Conclusion</h3><p>On this occasion, we use <a href="https://laraboot.io/">Laraboot</a> to set up a new Laravel application without having to write any line of code. This application has been containerized and deployed to AWS ECR in a matter of minutes.</p><p>This article was originally posted on <a href="https://hashnode.com/@onevarez">Hashnode</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe1b74bff211" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bootstrap a cloud-native Laravel application with Jetstream support]]></title>
            <link>https://oscar-nevarez.medium.com/bootstrap-a-cloud-native-laravel-application-with-jetstream-support-28c3ad6ba5e?source=rss-46ed7f5fffdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/28c3ad6ba5e</guid>
            <category><![CDATA[laravel-development]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[laravel-framework]]></category>
            <dc:creator><![CDATA[Oscar Nevarez]]></dc:creator>
            <pubDate>Tue, 12 Oct 2021 16:10:14 GMT</pubDate>
            <atom:updated>2021-10-12T16:11:53.493Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C8HLg5OKKUci5P8ASKIYTQ.png" /></figure><h3>Preface</h3><p>Laravel Jetstream is a starter kit for Laravel and provides a starting point for a Laravel application. Jetstream provides the implementation for the application’s login, registration, email verification, two-factor authentication, session management, API via Laravel Sanctum, and optional team management features.</p><p>Although Laravel Jetstream requires NodeJS and PHP &gt;= 8.0. On this occasion, we will bootstrap a Laravel application with Jetstream support using only <a href="https://laraboot.io/">laraboot</a> CLI.</p><h3>Install</h3><p>We’re going to need <a href="https://www.npmjs.com/package/@laraboot-io/cli">laraboot</a> . Being an NPM CLI tool we’re going to have to install it globally by running the npm install command.</p><pre>npm i -g <a href="http://twitter.com/laraboot">@laraboot</a>-io/cli</pre><h3>Create a project</h3><pre>laraboot new app --php-version=8.0.* &amp;&amp; cd app</pre><h3>Include required build tasks</h3><p>Jetstream support is provided by the task @core/laravel-starterkit-buildpack. Let&#39;s add it to the mix and also add Paketo&#39;s NodeJs buildpack which take care of running all the npm command for us during the buildtime.</p><pre>laraboot task add <a href="http://twitter.com/core/laravel-starterkit-buildp">@core/laravel-starterkit-buildp</a>ack \<br>--format=file -vvv</pre><pre>laraboot task add nodejs \ <br>--imageUri=gcr.io/paketo-buildpacks/nodejs \<br>--format=external \<br>--prepend \<br>-vvv</pre><h3>Configure</h3><p>Buildtask configurations occur through the buildpack.yml file, should be already there in your project&#39;s root if the project was bootstrapped by <a href="https://laraboot.io/">laraboot</a>. In case the file is not there we have to create it manually.</p><p>The following is the configuration we will use. We had disabled Breeze and enabled Jetstream.</p><pre># buildpack.yml<br># Enable Jetstream teams with livewire<br>laravel-starterkit:<br>  # Jetstream configuration<br>  jetstream:<br>    enabled: true<br>    teams: true<br>    stack: livewire<br>  # Breeze configuration<br>  breeze:<br>    enabled: false<br>    stack: inertia</pre><p>More information about the configuration of this task can be found <a href="https://laraboot.io/buildtask/core/laravel-starterkit-buildpack">here</a></p><h3>Build</h3><p>Build our custom Laravel application couldn’t be easier than run the following command.</p><pre>laraboot build -vvv</pre><h3>Run</h3><p>After the build process is complete we end up with an OCI image called app which you can either run locally or deploy to the cloud using your favorite cloud provider.</p><pre>laraboot run --port=9000</pre><h3>Source code</h3><p>Absolutely? check it out at this <a href="https://github.com/oscarnevarezleal/laraboot-jetstream-demo/tree/main">repo</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28c3ad6ba5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a Laravel application using a low-code approach]]></title>
            <link>https://oscar-nevarez.medium.com/create-a-laravel-application-using-a-low-code-approach-39347f62fba2?source=rss-46ed7f5fffdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/39347f62fba2</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[laravel-framework]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[cloud-native-buildpacks]]></category>
            <dc:creator><![CDATA[Oscar Nevarez]]></dc:creator>
            <pubDate>Wed, 29 Sep 2021 23:36:57 GMT</pubDate>
            <atom:updated>2021-10-04T19:55:34.522Z</atom:updated>
            <content:encoded><![CDATA[<h4>Using Laraboot CLI</h4><h3>What is Laraboot?</h3><p><a href="https://laraboot.io/">Laraboot</a> is a CLI tool that allows Laravel developers to bootstrap and configure a Laravel application using cloud-native technologies which make your developer experience a lot more enjoyable.</p><h3>Install Laraboot CLI</h3><pre>npm i -g @laraboot-io/cli</pre><h3>Setup our project</h3><h4>Create a new project</h4><p>Similar to the <a href="https://laravel.com/docs/master/installation#the-laravel-installer">Laravel installer</a> you can run laraboot new to initialize a Laravel application.</p><pre>laraboot new app --php-version=8.0</pre><h4>Build</h4><p>We’re ready to build the application. In this step, <a href="https://laraboot.io/">Laraboot</a> will use the source code and will transform it using <strong>build tasks</strong> to finally create an OCI image. Please mind <strong>the process might take a while</strong> especially if this is the <strong>first time</strong> you run the build command.</p><pre>laraboot build</pre><h4>Run</h4><p>Once built, the project is ready to be used.</p><pre>laraboot run --port=900</pre><p>Boom! we have our application running. Head to <a href="http://localhost:9000/">http://localhost:9000</a> and you’ll see a familiar welcome page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LKMXyMd48a7N2Jw006TmvA.png" /></figure><p>That’s really interesting, right? Well, quiet but it’s not very different from a traditional setup. <a href="https://laraboot.io/">Laraboot</a> shine because of its extensibility.</p><h3>Configure</h3><h4>Add core tasks</h4><p>Core tasks allow Laraboot to configure your Laravel application without writing any code.</p><blockquote>Tip: you can run <em>laraboot task search * --core-only</em> to discover all the available core tasks.</blockquote><p>We are going to use two of those tasks for this occasion modeland foundation</p><pre>laraboot task add @core/laravel-model --format=file<br>laraboot task add @core/laravel-foundation-provider --format=file</pre><p>What’s with @core/laravel-foundation-provideryou say? Currently is required as a base for any other core tasks, it is expected to be included by default in future versions but, for now, we need to add it manually.</p><p>See the — formatflag? We’re indicating the desired format for our task. A <strong>build task</strong> can be consumed as an OCI image or Zipped file. This comes in handy now that Docker limits the pull rate on authenticated requests.</p><h4>Setting up our data model</h4><p>Let’s create some entities aka models to flesh this app out.</p><pre>laraboot model add Post<br>√ Would you like to define your model now? (y/N) · true<br>√ Field name? · content<br>√ Field type? · varchar<br>√ Is this field unique? (y/N) · false<br>√ Is this field primary key? (y/N) · false<br>√ Would you like to add a new field? (y/N) · false<br><strong>Model Post was added</strong></pre><pre>laraboot model add Comment<br>√ Would you like to define your model now? (y/N) · true<br>√ Field name? · content<br>√ Field type? · varchar<br>√ Is this field unique? (y/N) · false<br>√ Is this field primary key? (y/N) · false<br>√ Would you like to add a new field? (y/N) · false<br><strong>Model Comment was added</strong></pre><h4>Build again</h4><p>Previously we had built this application but there wasn’t much in it. Now with our data model defined and model task added to our project things will be different.</p><pre>laraboot build</pre><p>And just like that, we had created all the models, routes, and controllers to support our application based on the data model.</p><h3>Conclusion</h3><p>On this occasion, we use <a href="https://laraboot.io/">Laraboot</a> cli to set up a new Laravel application without having to write any line of code. This application has been <em>containerized</em> and it’s ready to be used on your favorite cloud provider.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39347f62fba2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Putting paketo images on a diet]]></title>
            <link>https://oscar-nevarez.medium.com/putting-paketo-images-on-a-diet-76d1d5858278?source=rss-46ed7f5fffdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/76d1d5858278</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Oscar Nevarez]]></dc:creator>
            <pubDate>Tue, 14 Sep 2021 13:27:48 GMT</pubDate>
            <atom:updated>2021-09-14T13:27:48.795Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CKf6bUWDy0gZTh2a" /><figcaption>Photo by <a href="https://unsplash.com/@guibolduc?utm_source=medium&amp;utm_medium=referral">Guillaume Bolduc</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you haven’t heard about <a href="https://paketo.io/">paketo buildpacks</a> by now I recommend you to take a look at it before continuing. TL:DR; Paketo buildpacks are the next generation of cloud-native technology with full support for the majority of programming languages. At the time of writing this post, you can create a cloud-ready image of a Laravel project using <a href="https://github.com/buildpacks/pack"><em>pack</em></a>, a command-line utility used to create cloud-native buildpacks.</p><h3><strong>The problem</strong></h3><p>Not really a problem but rather an undesired situation that needs to be addressed is that the images generated for PHP projects are pretty chunky. The size is due to the fact the builder used for PHP projects contains many other libraries needed to support not only PHP but other programming languages, you could say the builder has some extra weight on it.</p><p><strong>Possible solutions</strong></p><ul><li>You could roll up your own builder</li><li>You could, (once you build the image) extract the source code and put it on a new image using <a href="https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md">crane</a></li><li>Or you could minify the image using <a href="https://github.com/docker-slim/docker-slim">docker-slim</a></li></ul><p>I’m going to choose the third option because personally, I don’t have the time to create my own builder, and using <a href="https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md">crane</a> seems like an extra step compared with <a href="https://github.com/docker-slim/docker-slim">docker-slim</a>.</p><h3><strong>Minification</strong></h3><p>Let’s first create a base scenario. In this case a fresh new Laravel application.</p><p>1) Make sure you have installed the pack CLI</p><pre># There are multiple ways to install it depending on your OS. Check this link for reference <a href="https://buildpacks.io/docs/tools/pack/">https://buildpacks.io/docs/tools/pack/</a></pre><pre>brew install buildpacks/tap/pack</pre><p>2) Create a Laravel application using composer, then <em>pack it. </em>Hold on, it might take a while especially if this is the first time.</p><pre>composer create-project laravel/installer paketo-php &amp;&amp; \<br>cd paketo-php &amp;&amp; \<br>pack build paketo-php --buildpack gcr.io/paketo-buildpacks/php --builder paketobuildpacks/builder:full</pre><p>Take a look at the generated image, a Laravel application weighing 874MB.</p><pre>REPOSITORY   TAG       IMAGE ID       CREATED        SIZE<br>paketo-php   latest    48ba4a5c7531   41 years ago   874MB</pre><p>If we apply docker slim to it by running:</p><p>docker-slim build -http-probe --env PORT=8080 --publish-port 8080 --expose 8080 api</p><p>we obtain the same fully functional image prefixed with .slim being <strong>9x</strong> lighter than the original.</p><pre>REPOSITORY        TAG        IMAGE ID       CREATED          SIZE<br>paketo-php        latest     95f17a312750   16 seconds ago   103MB</pre><h3>Final Words</h3><p>The image size has always been a consideration in the release and usage of containerized products. Knowing the tools and better when to apply them will put your work at its prime. In this post, we see how to minify an OCI image generated by <a href="https://github.com/buildpacks/pack"><em>pack</em></a> but you could apply the same process for traditional Dockerfile-based images.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76d1d5858278" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On Mastery and skills]]></title>
            <link>https://oscar-nevarez.medium.com/on-mastery-and-skills-dfd2d95bfb0f?source=rss-46ed7f5fffdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfd2d95bfb0f</guid>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[developer-tools]]></category>
            <dc:creator><![CDATA[Oscar Nevarez]]></dc:creator>
            <pubDate>Mon, 13 Sep 2021 15:49:17 GMT</pubDate>
            <atom:updated>2021-09-13T15:51:17.379Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the years, the software industry has witnessed unprecedented growth that unavoidably led to the birth of new technologies. Some programing languages were born, some others vanished or got delegated to a specific domain on which they shine the best. On the other hand, just a handful of these technologies survived the constants waves of innovation.</p><p>The internet as we know it keeps evolving. So do the gears that propel its evolution, these gears are millions of lines of code, developed and maintained by organizations and individuals all over the world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*MdIRq0ZoJmSKlycif_Y1jA.png" /></figure><p>Just a few years ago a <em>backend</em> developer had limited options to choose from with the development of new applications, the stack was — with slight differences — a mix between a programming language, the weapon-of-choice database, and some caching layer. Then once again the software industry boomed with a bast pool of possibilities including SaaS, PaaS, IaaS, and IaC just to mention a few.</p><p>The mindset and skills of previous developers are not enough to survive today’s world demands, it makes me wonder if we should keep pursuing mastery on a language/tool, rather than the knowledge related to how things are built. At your own leisure take a look at this <a href="https://www.youtube.com/watch?v=xFFs9UgOAlE">video</a> of Mark Zukerberg describing web-server optimization, everything described there it’s not only expected but taken for granted today.</p><blockquote>Should we keep pursuing mastery on a language/tool, rather than the knowledge related to how things are built?</blockquote><p>Nowadays developers can choose from a <a href="https://insights.stackoverflow.com/survey/2020#most-loved-dreaded-and-wanted">pool of languages and tools</a>, and <a href="https://www.producthunt.com/topics/saas">services</a> to speed up the development of new applications.</p><p>Think about it, you don’t have to roll up your own:</p><ul><li>Payment system</li><li>Newsletter</li><li>Web/Cache server?</li></ul><p>Right now and no different from the past we stand over the giants’ shoulders to do more, reach further and do it faster. Only these giants were born just a couple of years ago. It’s on us to push something new into the world, so more people can <em>learn from it</em>, <em>use it</em>, and probably be someone else shoulders.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfd2d95bfb0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 logical fallacies exemplified in a developer world and The Simpsons]]></title>
            <link>https://oscar-nevarez.medium.com/5-logical-fallacies-exemplified-in-a-developer-world-and-the-simpsons-8c4fe27516e9?source=rss-46ed7f5fffdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c4fe27516e9</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[developer-stories]]></category>
            <dc:creator><![CDATA[Oscar Nevarez]]></dc:creator>
            <pubDate>Fri, 28 May 2021 16:08:44 GMT</pubDate>
            <atom:updated>2021-05-28T16:08:44.445Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cETuyHBeFZl-TUuEauGq2A.jpeg" /></figure><p>Encounter logical fallacies go with the consultant Job, some of these fallacies, however, can compromise the stability of the team and in other cases make its product foundation trembles like Jello. It’s important you’re familiar with those so you can spot them when they occur.</p><p>This time I’ll use some real-world examples I’ve heard on my job and I’ll also borrow the satirical lens of one of my favorite animated series to show how some of these fallacies might look like.</p><h4>Ad hominem</h4><p>Ad hominem is Latin for “against the man”. Ad hominem occurs when someone rejects, criticizes, or disqualifies a person’s argument or opinion on the basis of personal characteristics, beliefs, background, or any other personal aspect irrelevant to the argument. This logical fallacy is not only logical but may also be perceived as an aggressive and disrespectful move.</p><p><strong>Example 1</strong>: “Of course you don’t know what distributed architecture means, you’re a Jr.”</p><p><strong>Example 2:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRnMmXTVOjBY&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DRnMmXTVOjBY&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FRnMmXTVOjBY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/64e215f2386a40672a9e8ccd3598d964/href">https://medium.com/media/64e215f2386a40672a9e8ccd3598d964/href</a></iframe><h4>Appeal to Authority</h4><p>One of my favorites fallacies to spot is “<em>appeal to authority”</em>, this happens when someone bases his/her arguments upon another person’s opinion just because this person possesses authority or some kind of recognition. Most of the time this recognition is given in a field or situation different from the scenario where the argument lies.</p><p><strong>Example 1</strong>: “This is the design we should follow for the system because I saw a video of this known expert who happens to work on Spotify and she says this is the way to go nowadays”</p><p><strong>Example 2:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRp0mp-VO5DU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DRp0mp-VO5DU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FRp0mp-VO5DU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c604caa48b291cdce7bb6630c179eec/href">https://medium.com/media/2c604caa48b291cdce7bb6630c179eec/href</a></iframe><p><strong>Example 3</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKojYatpLPSE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKojYatpLPSE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKojYatpLPSE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa3aa4de7a7bfb1e589b39fb4a827f68/href">https://medium.com/media/fa3aa4de7a7bfb1e589b39fb4a827f68/href</a></iframe><h4>Appeal to Ignorance</h4><p>This kind of argument assumes a proposition to be true because there is no proof that it is false. Lack of evidence is taken to be evidence of absence.</p><p>Take one of the best examples I could find, in the video below Lisa Simpson, is trying to pursue her father about the fault in his logic, as she points out he’s having a ‘Specious reasoning’ ( a seemingly well-<strong>reasoned</strong> argument but fallacious at the end) by assuming the bear patrol is working like a charm keeping the bears away. Here the absence of bears is taken as proof of evidence.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FxSVqLHghLpw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DxSVqLHghLpw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FxSVqLHghLpw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d305b3e66892ffe629deecdefce7d7e1/href">https://medium.com/media/d305b3e66892ffe629deecdefce7d7e1/href</a></iframe><p>Have you ever happened to you? you encounter a problem and there’s not enough evidence of what could the reason be behind it? Maybe something worked just fine yesterday and, today is no longer the case. What follows is a set of theories and suppositions, one more compelling than the other but on average they all lack the same amount of evidence to sustain themselves. Knowing this kind of argument will put your perspective in a sharper state and probably save you a couple of otherwise wasted time wandering towards a not-viable path.</p><h4>False Dilemma</h4><p>This fallacy is also known as the “black-and-white fallacy”, “Either/Or”. The scenario where the dilemma occurs has apparently a limited set of only two options, most of the time contradictory, mutually inclusive, mutually exclusive, all together, etc. When there are actually many other options to choose from.</p><p><strong>Example 1</strong>: Picture a classic discussion between the development team and the product management team.</p><p>— PM: We promised to deliver feature X by the end of the 2Q</p><p>— DT: Product management changed the priorities at the beginning of the 1Q some of the new ones added to the list proved to be more time-consuming than anticipated.</p><p>— PM: Delaying feature X once again will only jeopardize the trust of our investors.</p><p>— DT: Delaying the release of other features will also cause the same effect.</p><p><strong>Example 2:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F8Q25fApNZI0&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D8Q25fApNZI0&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2F8Q25fApNZI0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/879e936bc9674d2ce1ad1bc68a584107/href">https://medium.com/media/879e936bc9674d2ce1ad1bc68a584107/href</a></iframe><h4>Straw man</h4><p>Occurs when a weak argument is presented so that another argument looks better.</p><p><strong>Example 1</strong>: “Framework X popularity has fallen dramatically since last years mainly due to the all unnecessary heavy lifting needed to use, Y in the other hand is not only easy to use but simply newer.”</p><p><strong>Example 2</strong>:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FcJA2uGUjimk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcJA2uGUjimk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FcJA2uGUjimk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0229f415c8873f38a7ddc66dbbf79979/href">https://medium.com/media/0229f415c8873f38a7ddc66dbbf79979/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c4fe27516e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The perils and benefits of specialization in the software industry]]></title>
            <link>https://oscar-nevarez.medium.com/the-perils-and-benefits-of-specialization-in-the-software-industry-673635fd8546?source=rss-46ed7f5fffdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/673635fd8546</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[specialization]]></category>
            <category><![CDATA[programming-languages]]></category>
            <dc:creator><![CDATA[Oscar Nevarez]]></dc:creator>
            <pubDate>Fri, 21 May 2021 13:45:18 GMT</pubDate>
            <atom:updated>2021-05-24T23:41:53.484Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bwq2DZgDEedqDGAxZM8I1Q.jpeg" /></figure><p>I remember the first time I compiled something. It was the late 90’s when my dad helped me to code my first <em>hello world</em> program written in <a href="https://en.wikipedia.org/wiki/Visual_FoxPro">Visual Fox Pro</a>. Ever since I’ve been fascinated with technology and programming languages in general. You’ll see, I find the same joy in programming languages just like a polyglot find joy learning <em>spoken</em> languages.</p><p>As of today, there are over <a href="https://en.wikipedia.org/wiki/List_of_programming_languages">700 programming languages</a> in the world. Amazing, right?. Having so of them one could not help but to ask itself where to start and which one to choose, especially but not limited to young folks that look to dabble into the software industry hungry for knowledge, recognition, and moreover a good income to support themselves and their dearest. I wish I’ve had some sort of guide when I started on this journey many years ago</p><p><strong>Explore the options</strong></p><p>Picture this: you’re a fresh colleague student analyzing your career options. You have some sort of idea of what you want or at least what you don’t want to be. E.g probably you’re lean more towards social areas rather than analytic ones or probably you prefer to work with animals rather than people. As obvious as these simplifications might appear it’s often uncommon to see the same distinctions happening in the software industry.</p><p>The line between IT and any other area of specialization is often blurred. This is because IT has ceased to be an area by itself to become a pillar of other areas ( or a very big smudge in a Venn diagram covering it all ). Every specialization you can think of has a significant percent of IT involved in it which translates into more ramifications and more areas of specialization.</p><p>Proficient professionals specialized in the latest technologies trailblaze the path to innovation, but there’s a price to be paid.</p><p><strong>Specialization</strong></p><p>Specialists vs Generalists. This is a well-known topic that has already been covered multiple times, who win the trade-off?. David Epstein author of <a href="https://www.goodreads.com/book/show/41795733-range?from_search=true&amp;from_srp=true&amp;qid=DWVqH3QItH&amp;rank=1">Range: Why Generalists Triumph in a Specialized World</a> <a href="https://www.youtube.com/watch?v=BQ2_BwqcFsc">mentions</a> a natural experiment conducted by an economist on the high-end system of England and Scotland over the same period of time. In England, the students frequently had to specialize earlier than their Scottish counterparts who could keep trying things on the university if they want to. The summary of the experiment could be reduced to the following:</p><ul><li>England: early specializers jump into an income lead because they have more domain-specific skills</li><li>Scotland: late specializers get to try different things and when they finally pick they have match quality (diving into things in a way that gives you maximum signal about yourself)</li><li>Scotland: late specializers erase the income gap in a period of 6 years.</li><li>England: because they were made to choose early often made poor choices and start quitting their careers tracks at a much higher rate than their counterparts.</li><li>The specialized lose the short term but win the long run.</li></ul><p>One could use the aforementioned experiment to extrapolate into the software domain and detect many similarities.</p><p>When we talk about specialization in the software industry there’s an always-growing set of options you can pick from. None of those options is preferable over the others if you don’t know exactly where you’re going. in the software industry as in life, there’s always satisfaction and regrets for the choices we made but, I believe we have less probability of regret the first programming language we learn just by measuring what it brings to the table such as logical thinking, structure and, foundation.</p><p>The peril however is often ignored. If you learn and later specialize in one language only, chances are that you’ll ride the hype of that language for as long as it lasts just before a new one comes in. This is not to say that’s inherently bad, of course not but one could feel especially tempted to the novelty of new technologies just as mosquitos to a glowing bulb, both completely oblivious of what’s coming. And who can blame us?</p><p>The sweet point seems to be, to dabble into enough territories, explore and detect patterns that serve you in the future just like it did for <a href="https://www.lesswrong.com/posts/w9kwayt5SWqBQe8Nx/rational-me-or-we#bTX6dcSEMyk3wE3Cv">many generalists</a> in the past.</p><p><strong>Ninjas</strong></p><p>Have you ever heard of those code bootcamps that promise you that you’ll get sufficient real-world experience, enterprise-level skills, and a job by the end of the Bootcamp, which commonly span for about 3 to 6 months?. Some of these bootcamps go a little further and guarantee that by the end you’ll become a <em>ninja in X </em>language/framework.</p><p>A new mirage in the software industry which is older than the industry itself is this misleading and popular idea that states that if jump directly into the specialization you’ll cut your way through the line of others learning the fundamentals on which the specialization sits on, hence you’ll not only obtain the benefits sooner but the room to grow will be also bigger. In other words, learn enough of Y and Z because X is unnecessary.</p><p>There’s no such a thing as useless knowledge, it’s contradictory because every piece of knowledge serves a purpose, if not now someday, if not for you maybe could spark curiosity when shared with others. The question here is to what extent can Y and Z be extrapolated into different domains where X is not only necessary but taken for granted.</p><p>I fond the idea of ninjas in the software industry because more often than not have this bad connotation just like rock stars. I have a vivid imagination, whenever I heard someone is a ninja in Y/Z I can not help but imagine a regular person who has mastered a nunchucks&#39; flashy routine and is ready to fight the final boss.</p><p><strong>Conclusion</strong></p><p>Delay specialization, do not rush into a specific area without exploring the alternatives and if it’s the case you’ve already specialized there’s always room for extra knowledge. Who knows? maybe you might end up <a href="https://www.youtube.com/watch?v=wz0j7z38LIg">connecting the dots</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=673635fd8546" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>