<?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>Forem: Adam</title>
    <description>The latest articles on Forem by Adam (@adamalicki).</description>
    <link>https://forem.com/adamalicki</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%2F385770%2Ff24a3fe8-a9a7-4faf-befc-b7dfe6b9acde.jpg</url>
      <title>Forem: Adam</title>
      <link>https://forem.com/adamalicki</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/adamalicki"/>
    <language>en</language>
    <item>
      <title>Leveraging ChatGPT to be more efficient</title>
      <dc:creator>Adam</dc:creator>
      <pubDate>Thu, 15 Dec 2022 19:13:56 +0000</pubDate>
      <link>https://forem.com/adamalicki/leveraging-chatgpt-to-be-more-efficient-45jo</link>
      <guid>https://forem.com/adamalicki/leveraging-chatgpt-to-be-more-efficient-45jo</guid>
      <description>&lt;p&gt;We’ve all been either introduced to or have heard about OpenAI’s platform ChatGPT; the seemingly powerful and really fun (or scary) AI system that can do anything. From generating a short novel based on any prompt you give it, or whipping up never before seen photos created from the most imaginative descriptions possible. But did you know it could also help you write code and find solutions to programming problems?&lt;/p&gt;

&lt;p&gt;It’s true! You can ask ChatGPT to “write me a ‘Hello World’ script, in PHP, and capitalize ‘world’” and it will simply generate code to do that! Of course, you can feed it more difficult questions and scenarios, but with a careful eye and great attention to detail, you CAN utilize the platform to handle the mundane tasks and boilerplate code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The most efficient developers aren’t remembering everything from memory, they are using the tools around them to be resourceful.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Simple ChatGPT Example
&lt;/h2&gt;

&lt;p&gt;Let’s generate a simple block of code in my favorite language, PHP. We’ll keep the controls simple and use the default:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Model = text-davinci-003 (the best quality model for text generation)&lt;/li&gt;
&lt;li&gt;Temperature = 0.7 (the lower, the more verbose and predictable the output should be)
*Maximum Length = 246 (reasonable for this simple task)&lt;/li&gt;
&lt;li&gt;The rest of the controls don’t necessarily affect the output of a simple task like this.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffsg6ti49pn4rxs48yqfl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffsg6ti49pn4rxs48yqfl.png" alt="Simple ChatGPT request to generate some basic PHP Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The prompt source is the following:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Coding Langauge: PHP

Generate me a script that can take an array of items and remove any duplicates. The array should contain the following items
- Apple
- Car
- Coffe
- Horse
- Car
- Desk
- Laptop
- A rubber duck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;And then we have the script it generated:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php 

$items = array("Apple", "Car", "Coffee", "Horse", "Car", "Desk", "Laptop", "A rubber duck"); 

$unique_items = array_unique($items); 

print_r($unique_items); 

?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks pretty good to me! As someone competent and very knowledgeable with PHP, I can quickly tell it what I want, and then do a code review to ensure the output is both safe and does what I want.&lt;/p&gt;

&lt;p&gt;Of course in this simple example, it’s easy to catch mistakes or issues. But the idea is to promote the usefulness of ChatGPT quickly, and nearly instantly generating the block of code we need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set it &amp;amp; Forget it?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;No.&lt;/strong&gt; This isn’t a tool that will magically handle all of your tasks, code writing, or day planning. It can and does fall short in plenty of areas. In the context of code generation, you have to ensure the output is reasonable and actually performs the task being input. This is the part that is extremely important to using it effectively, and to improve your efficiency; it DOES require oversight and reviews. &lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s get complex
&lt;/h2&gt;

&lt;p&gt;Sure, the above simple example is easy to dismiss as “duh,” of course it can do it, and output a working set of code instructions. What if we ask it to do something beyond generating code? What if we present a real world problem, ask for a breakdown of the code, and then make some personal adjustments?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt source:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Coding Langauge: PHP

I need to sort a one column CSV file with 100 records full of IP Address. I need to see which IP address shows up the most and have the code explained to me, please.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg5nrykhwry4w3onijplg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg5nrykhwry4w3onijplg.png" alt="ChatGPT generating more complex PHP code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The source from the output:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The following code can be used to sort a one-column CSV file with 100 records full of IP addresses. 

&amp;lt;?php

//open the CSV file
$file = fopen("file.csv","r");

//initialize an array to store the IP addresses
$ips = array();

//read each line of the file
while(!feof($file)){

    //read the line
    $line = fgets($file);

    //if the line is not blank
    if($line !== ""){

        //add the IP address to the array
        $ips[] = $line;
    }
}

//close the file
fclose($file);

//sort the IP addresses by frequency
$ips_by_frequency = array_count_values($ips);

//sort the IP addresses by frequency in descending order
arsort($ips_by_frequency);

//output the most frequent IP address
echo "The most frequent IP address is: " . key($ips_by_frequency);

?&amp;gt;

The code first opens the CSV file. Then, it initializes an array to store the IP addresses. It then reads each line of the file and adds the IP address to the array. Finally, it sorts the IP addresses by frequency, in descending order, and outputs the most frequent IP address.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pretty impressive right? It seems like all of the code is there, just copy and paste and… wait…&lt;/p&gt;

&lt;p&gt;If you actually pasted the above into a file, it’s going to look odd or error out. The text outside of the PHP opening/closing tags doesn’t feel right. At best, include those comments inside of the opening/closing tags in comment form.&lt;/p&gt;

&lt;p&gt;A personal choice, is the usage of snake-case variables. I prefer camel-case. So how could we adjust? While we didn’t initially tell it to utilize camel-case, we can simply inject the following into the prompt source:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I need camel-case variables.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And of course, it adjusted the naming conventions to use camel-case:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Here is some code to sort a one column CSV file with 100 records that contain IP Addresses and count how many times each IP Address appears:

&amp;lt;?php

//Set path to CSV file
$csvFilePath = 'example.csv';

//Open CSV file
$csvFile = fopen($csvFilePath, 'r');

//Initialize a variable to hold counts of IP Addresses
$ipAddressCounts = array();

//Loop through CSV file
while (($line = fgetcsv($csvFile)) !== FALSE)
{
    //Get IP Address from each line of CSV file
    $ipAddress = $line[0];

    //Check if IP Address exists in array
    if(array_key_exists($ipAddress, $ipAddressCounts))
    {
        //Increment count for existing IP Address
        $ipAddressCounts[$ipAddress] += 1;
    }
    else
    {
        //Set count for new IP Address
        $ipAddressCounts[$ipAddress] = 1;
    }
}

//Close CSV file
fclose($csvFile);

//Print out IP Addresses and counts
foreach($ipAddressCounts as $ipAddress =&amp;gt; $count)
{
    echo "$ipAddress: $count\n";
}

?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can see it is fairly different code than before, just based off of a simple additional sentence. The code above is a bit lazier, and simply outputs all of the IP Addresses with a count; it doesn’t just output the most repeated IP Address like I asked. While an additional personal choice, it also places open and closing logic brackets on new lines, something I’m not a fan of for basic logic exercises.&lt;/p&gt;

&lt;p&gt;This is a great example of our instructions seeming to be okay, but we’ll now need to make some adjustments. Regardless, this got us pretty close and saved us quite some time. Especially true for the slower coders among us.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Why did I ask it please? For when the inevitable happens and the machines take over our jobs and world. All jokes aside, these tools aren’t taking away our jobs anytime soon. We should learn to work alongside them in bettering ourselves, our productivity, and lean on them to empower our skills and abilities whenever possible!&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>ai</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Local Development with Laravel</title>
      <dc:creator>Adam</dc:creator>
      <pubDate>Mon, 29 Nov 2021 00:25:13 +0000</pubDate>
      <link>https://forem.com/adamalicki/local-development-with-laravel-4nci</link>
      <guid>https://forem.com/adamalicki/local-development-with-laravel-4nci</guid>
      <description>&lt;p&gt;These days, containerization and virtual machines are more than a buzzword, it's a way of systematically organizing various structures that power a website or app. We can better allocate resources such as memory and disk space when we utilize containers, and the benefit of that, is that we waste no unused RAM (for example).&lt;/p&gt;

&lt;p&gt;Containers allow us to operate within our own "realm" so to speak, so when something fails, crashes, or is otherwise unavailable, the other things still work. If you have 5 apps running in their own container, they'll utilize their own libraries and packages. App A may need PHP version 8, the newest MySQL and some heavy PDF library. App B can use PHP 7, doesn't need the newest MySQL server, and has no special requirements. In the standard setup you'd need to configure a way for two versions of PHP to run without causing issues. In the container environment, you can simply have this setup without much or any consideration of other code bases.&lt;/p&gt;

&lt;p&gt;With that bit out of the way, it's time to take a dive into your options for developing Laravel based projects on your local machine!&lt;/p&gt;

&lt;h3&gt;
  
  
  Options
&lt;/h3&gt;

&lt;p&gt;We certainly have many options when it comes to developing locally. From a range of VM's, to native PHP servers, to the lovely container ecosystem. Luckily for Laravel devs, there are many specific options directed at Laravel and it's ecosystem which is a nice perk.&lt;/p&gt;

&lt;h4&gt;
  
  
  XAMPP / MAMP
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jPwm7f_J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1637980041666/g-PPjpsf4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jPwm7f_J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1637980041666/g-PPjpsf4.jpeg" alt="MAMP or XAMP, keeping it old school and simple!" width="880" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As someone who used to &lt;strong&gt;upload files manually via FTP&lt;/strong&gt; and develop using Notepad++ with zero syntax highlighting, using a system like this is somewhat familiar and nice. It requires nearly zero configuration from you, and it simply just works. They handle the installation and setup of PHP (and it's dependencies), MySQL, PhpMyAdmin, and Apache/Nginx. You're responsible for the basic task of telling the software where to look for the files on your machine. Hit up localhost and you've got yourself a basic LA/EMP stack. &lt;/p&gt;

&lt;p&gt;I actually use MAMP for local small projects that require a DB. Especially for when running &lt;code&gt;php artisan serve&lt;/code&gt; doesn't provide me with everything.&lt;/p&gt;

&lt;h5&gt;
  
  
  Pros &amp;amp; Cons
&lt;/h5&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple and easy setup.&lt;/li&gt;
&lt;li&gt;It's free (MAMP does offer a Pro version which is &lt;em&gt;really&lt;/em&gt; nice).&lt;/li&gt;
&lt;li&gt;Each software is designed to work with your OS.&lt;/li&gt;
&lt;li&gt;They handle the 'server' aspect for you, no need to build out your server stack.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic features.&lt;/li&gt;
&lt;li&gt;Doesn't teach you CLI skills for interfacing with a server.&lt;/li&gt;
&lt;li&gt;May not much your server / production-level setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2xXAJoUC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1637980215797/gp23zGq2V.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2xXAJoUC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1637980215797/gp23zGq2V.jpeg" alt="Containerize with Docker!" width="880" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Development with Docker is very different from relying on a software to handle your setup. With Docker, you are in charge and control over every fine detail. Server OS, PHP version, RAM usage, library dependencies and more! Docker is something you'll find common amongst teams these days since its documentation and community is so mature and provides plenty of resources for problems, new approaches, and fixes for bugs.&lt;/p&gt;

&lt;h5&gt;
  
  
  Pros &amp;amp; Cons
&lt;/h5&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's the modern way of doing things.&lt;/li&gt;
&lt;li&gt;You have absolute control over the 'server'.&lt;/li&gt;
&lt;li&gt;Gains you CLI skills with interfacing with a server.&lt;/li&gt;
&lt;li&gt;Can control the OS of your server.&lt;/li&gt;
&lt;li&gt;Can ensure your server matches your production environment (and other developers).&lt;/li&gt;
&lt;li&gt;Can spin up entire databases and infrastructure and trash them when you're done; less system resource usage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The learning curve can be semi-steep.&lt;/li&gt;
&lt;li&gt;Getting a functioning 'server' will take longer at first.&lt;/li&gt;
&lt;li&gt;Many OS's report sluggish speeds (it's known to be resource intense)&lt;/li&gt;
&lt;li&gt;May be too complex for basic or simple projects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Note: some of these suggestions rely on docker&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="http://laradock.io/"&gt;Laradock&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wj2zCFK3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1637980365784/vtBzZbs8C.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wj2zCFK3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1637980365784/vtBzZbs8C.jpeg" alt="Laradock, powered by Docker" width="880" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is an absolute mammoth of a setup built to cover a large range of situations. It's a Docker image, so you literally turn on Docker, clone the Laradock repo, and wait. It installs so many dependencies and utilities aimed at covering nearly any type of project setup you could imagine. Afterwards, you simple set up your projects in it's directory structure and carry on with development. Laradock, if configure properly to reduce the number of dependencies, can be an amazing asset. Any system that sets up PhpMyAdmin, GitLab, Redis, Grafana, or Confluence definitely earns it's position as a very useful tool to have.&lt;/p&gt;

&lt;h5&gt;
  
  
  Pros &amp;amp; Cons
&lt;/h5&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatically sets up tons of development related needs.&lt;/li&gt;
&lt;li&gt;A simple &lt;code&gt;git clone&lt;/code&gt; command and you're on your way.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The codebase powering it is MASSIVE.&lt;/li&gt;
&lt;li&gt;The configuration file is large and editing it may break things.&lt;/li&gt;
&lt;li&gt;May install things you do not need.&lt;/li&gt;
&lt;li&gt;Requires optimization for iOS machines to run efficiently.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://laravel.com/docs/8.x/sail"&gt;Laravel Sail&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wmtez3k7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1637980498279/j70-grgzk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wmtez3k7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1637980498279/j70-grgzk.jpeg" alt="Combine the power of Laravel and Docker" width="880" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We like official things, right? Laravel Sail is Laravel's native way of handling a Docker image. It takes care of your expected server setup with a few simple commands and does all the heavy lifting for you. It's a great middle for those looking to avoid complex setups or basic/featureless offerings. It can be expanded on, so you're able to grow your project as the needs increase.&lt;/p&gt;

&lt;h5&gt;
  
  
  Pros &amp;amp; Cons
&lt;/h5&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's an official Laravel tooling asset.&lt;/li&gt;
&lt;li&gt;It's fairly simple in it's configuration approach.&lt;/li&gt;
&lt;li&gt;It's designed specifical for Laravel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Needs special setup for Windows OS.&lt;/li&gt;
&lt;li&gt;Abstracts Docker concepts, the knowledge may not carry over.&lt;/li&gt;
&lt;li&gt;Artisan commands will be different when working inside the Sail container.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://laravel.com/docs/8.x/homestead"&gt;Laravel Homestead&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ad2E5Hak--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1637980613584/MtpP1UhwN.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ad2E5Hak--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1637980613584/MtpP1UhwN.jpeg" alt="Laravel and Vagrant, a unique VM setup" width="880" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was one of the original ways to utilize a virtual machine when developing with Laravel. It's another offering within the Laravel ecosystem, so you know it's geared towards the framework. However, what sets Homestead apart from the other options is that it utilizes Vagrant; a virtual machine platform that arrived well before Docker was a thing. I actually was introduced to Vagrant some years ago as something different than using the old school local LAMP stacks.&lt;/p&gt;

&lt;h5&gt;
  
  
  Pros &amp;amp; Cons
&lt;/h5&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's Laravel specific.&lt;/li&gt;
&lt;li&gt;It's a little easier to understand and setup than Docker based environments.&lt;/li&gt;
&lt;li&gt;Allows you to configure your VM any way you want.&lt;/li&gt;
&lt;li&gt;Allows you to easily dispose of the virtual resources created (files, cache, database, etc...) when you shut down the VM.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It requires two additional softwares: Virtual Box/Parallels  and Vagrant.&lt;/li&gt;
&lt;li&gt;May require more configuration that a typical Docker image.&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  Is that it?!?
&lt;/h4&gt;

&lt;p&gt;But. aren't there other options? Yes, absolutely! This article only covers the top / mainstream approaches. But that doesn't mean there aren't other options to handle your needs, or that they are less effective or bad. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; &lt;a href="https://lando.dev/"&gt;Lando&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a href="https://vessel.shippingdocker.com/"&gt;Vessel&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a href="https://github.com/tighten/takeout"&gt;Takeout&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Get my E-Book
&lt;/h4&gt;

&lt;p&gt;Pay what you want, $0 or $100 -  &lt;a href="https://alicki.gumroad.com/l/freelancing-guide-book"&gt;Freelancer's Guide Book&lt;/a&gt; &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Coding Challenges - Are they helpful?</title>
      <dc:creator>Adam</dc:creator>
      <pubDate>Mon, 10 Aug 2020 17:31:41 +0000</pubDate>
      <link>https://forem.com/adamalicki/coding-challenges-are-they-helpful-4ol5</link>
      <guid>https://forem.com/adamalicki/coding-challenges-are-they-helpful-4ol5</guid>
      <description>&lt;p&gt;Originally posted on my personal blog: &lt;a href="http://alicki.me/blog/coding-challenges-in-interviews/"&gt;Coding Challenges in Interviews&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The pandemic has changed life in many ways for millions of people. For some, these changes include loss of jobs, inability to find work, and now going through the interview process. Hiring managers are increasingly pressured to find amazing talent, sometimes replacing a previous employee, and other times filing gaps the team naturally lacks due to skill differences. That statement, while not a new concept, is also followed by the fact interviews are being done differently these days for most companies, and there is a problem.&lt;/p&gt;

&lt;p&gt;The problem? &lt;strong&gt;Coding Challenges&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Premise of a Coding Challenge
&lt;/h2&gt;

&lt;p&gt;Coding challenges, at the heart of their design, are to test the specific knowledge a candidate has in a particular language, solving a particular problem, or worse, a set of problems. You see the issue yet? Let's go further.&lt;/p&gt;

&lt;p&gt;Coding challenges are to gauge your ability to think in a short amount of time, solving problem(s) that exist in a vacuum. And for the most part, your solutions should fit the ideals of the team you're working with. You'll be assessed on things like how the problem is solved, how long it took you, how well structured things are - but with manufactured problems that rarely completely apply in your day to day when building a real-world project. Let's face it, MVP's exist for a reason; businesses operate on budgets and time crunches. That deadline your project manager gave you leaves little room to design your absolute best code.&lt;/p&gt;

&lt;p&gt;Your documentation / code comments, your method names and implementations will be judged. Should this method be static, what about private or public, does it even matter? Are they judging me on how well it's polished and designed or how quickly I was able to throw something together to solve the issue?&lt;/p&gt;

&lt;p&gt;The above problem can be solved by reaching out and getting clarity, but be cautious. Asking such a question may lead to the company doubting your ability to be a self-starter, or if you can get things done without much hand holding.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is your time worth?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ai-0flWo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q2l6ehakhsa99sniyr5e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ai-0flWo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q2l6ehakhsa99sniyr5e.jpg" alt="What is your time worth?"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most of the time, the person sending you the coding challenge will claim "this shouldn't take more than x amount of time". This is where you begin making the decision of if it's even worth it. Is a one hour challenge acceptable? How confident do you feel about getting things done? Since the person sending the challenge said this should only take one hour, what if you reach the one hour mark and realize it's closer to a three or four hour challenge? Or worse, you need to take a step back and plan things out.&lt;/p&gt;

&lt;p&gt;The "take home" challenges give you a little bit of wiggle room to obviously go over the time limit and go at your own pace, but the timed challenges? Not so much.&lt;/p&gt;

&lt;p&gt;The timed coding challenges usually require you to log into some new system, create an account, read over the example test, and then proceed to the real test where you'll be given a workplace to do your work (or for the good sites, a git repo to push to). Once time is up, it's up, and whatever work you did will be submitted regardless of accuracy or completeness. These are harsh and can be great stressors on anyone.&lt;/p&gt;

&lt;p&gt;So what is your time worth? Are you willing to invest four to five hours of your day going through a coding challenge with the possibility you won't even get the position? Keep in mind the phone / video interview time investment as well.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can't ask your plumber to put together a sample of the fix, and certainly not without payment. Why should companies be allowed to ask the same of you?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Are coding challenges helpful?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GbzXAmfK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ra2iwmm36tscmifl0h2a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GbzXAmfK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ra2iwmm36tscmifl0h2a.jpg" alt="Are they helpful?"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To fairly answer this question, we have to understand a few things&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They are designed to measure at least a basic understanding of the technology stack the company uses.&lt;/li&gt;
&lt;li&gt;They require problem solving of some arbitrary situation, thus giving insight to your problem solving skills.&lt;/li&gt;
&lt;li&gt;The solution you implement is to be reviewed by the people you work for; they get to see your thought process and if you'll fit with the team.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Given the above, a company can move forward on a candidate that bests matches their vision on how the challenge should be completed, and easily pass on others. It's a great win for the company, less so for the candidates. In this way, the answers is YES! It's helpful, but only for the company.&lt;/p&gt;

&lt;p&gt;One must keep in mind the interview process is actually a two-way street. You're seeing if the company is a good fit for you; benefits, pay, culture, work ethic, and so on. They are seeing if you're competent enough and fit the culture as well. The coding challenge often cuts the interview process short and doesn't give candidates the chance to really prove their worth if they perform "poorly".&lt;/p&gt;

&lt;h2&gt;
  
  
  What's the solution?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qUEczwQp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v7bcu8fstxaf3r6oq0f4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qUEczwQp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v7bcu8fstxaf3r6oq0f4.jpg" alt="How do we fix this?"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The thing is, companies have to have some sort of way to verify you actually know what you claim to know, beyond presenting your resume. Many have turned to coding challenges as a way to measure and validate this, and for them, it makes sense and is (inaccurately) viewed as efficient. So is there a solution that benefits both the company AND the candidate?&lt;/p&gt;

&lt;p&gt;Yes. References and prior projects. Utilizing the people you've worked with in the past helps provide honest feedback that speaks to your abilities to do the job. Looking at your prior work and your specific involvement helps set the tone for what you are capable of. But this requires having lengthy discussions and explanations, something some companies lack the time for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Github and prior experience are your tools
&lt;/h2&gt;

&lt;p&gt;But what do we do when we don't have prior experience, all of the projects are under an NDA, or we don't have any Github links to show? You reassess the position you're applying for and ask yourself if you're a good fit, or you work towards fixing the holes. Take time to throw up some projects on Github (admittedly, after 15 years, I only publicized my repos in the past two months), work on projects that include technologies the companies in your area are seeking.&lt;/p&gt;

&lt;p&gt;There are companies that are willing to forego the coding challenges if the candidate can prove in other ways they are competent. Plain and simple, you'll need to invest time and energy into making sure your tools are up to date and ready to be presented.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope this article will serve both of my target audiences; the candidates and the companies. Maybe it's time we step back and reevaluate how we apply to jobs, and how we vet candidates in a fair, honest, and balanced way. Let's all work towards a better future for those of us web and software developers. I'm of the opinion no one should work for free and with coding challenges seeming to require a chunk of our time, companies should offer compensation at the desired hourly rate or take a different approach.&lt;/p&gt;

</description>
      <category>interview</category>
      <category>career</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
