Screwing up badly at work

I changed some configuration on a site that triggered thousands of emails to different customers. Shit happens, and people make mistakes. I did on that occasion, I probably will again in the future or somebody else will, but I will be happy if we as a team don't make the exact same mess I did.
3 min read
Screwing up badly at work

Recently I changed some configuration on a client's site that triggered thousands of emails to different customers, forcing our client's Customer Service to handle the same amounts of customers calls on a day that they would have on a normal week, and finally having our client writing an apology email for all affected users saying that there was no data breach in the site.

It was a long day.

Admit it

Shit happens, and people make mistakes. I did on that occasion, I probably will again in the future or somebody else will, but I will be happy if we as a team don't make the exact same mess I did.

The first thing to do when you screw up is to admit it: tell somebody that you screwed up and tell that person how you screwed up exactly.

If there's a big problem, and you alone caused that problem, chances are people will be chasing ghosts to fix something they won't understand completely how it started (if you don't come forward and tell them exactly what happened).

You are the only one that knows, basically (until everybody finds out).

The idea is to change everybody's mind from panicking about a mystery error to focus on how to put down the fire and doing some damage control. Back to my example, everybody was wondering how the emails went out but when I told them it was me changing a setting then everybody move towards finding a solution (emails were still going out at that point).

Really, trying to cover up something is really a stupid idea because, again, shit happens and it shouldn't be the end of the world, and people will find out rather sooner than later.

Say sorry as you should be

Being on the defense on this type of situations is pretty common, but you shouldn't be. You made a mistake, you admitted it, now apologise without making excuses or blaming something (or somebody) else.

As individuals and as a team we should learn some stuff starting with the fact that human error is an actual thing. Saying sorry is as important as learning to accept someone's apology.

Keep in mind that if you didn't screw up this time you could be the one causing the mess next time, so don't believe you are so perfect. At the same time, if you were the cause of all the problems today, relax, somebody else will take the leading role next time.

Not the same mistake twice

When the adrenaline is over and the problem is solved do everything within your reach to avoid the same mess to repeat itself.

Let's try to have new problems, not always the same ones (it's boring that way).

While all human errors can't be eliminated (unless there's no human in the equation) we can always reduce the chances for them to happen by identifying what mechanism we (the team) can put in place to prevent them.

Back to my emails, the setting I changed wasn't on the Live site but on a testing environment, that happens to contain real customer data. In this case the problem was on how we create those testing environments (a fault on the process we have in place for doing that).

The problems could be prevented by improving the processes, adding any necessary documentation, and most important by spreading the information across the team.

Learn from a mistake is not a cliche phrase but instead it's something "tangible".

If you really learned from a mistake you will ended up with more documentation available to the team, a better process in place, and everybody informed of what happened and what can be done to avoid it happening again.


Always keep in mind that La La Land was announced the winner of the Best Movie category in the The Oscars ceremony because somebody handed the wrong envelope. And they improved the process for the following events.

Configure the Terminal to use MAMP's PHP

The idea of changing the Command-line to start using the PHP coming with MAMP is to be able to switch rapidly between PHP versions and to have the configuration for PHP in only one place. This is easy to implement and it covers how to configure the Terminal to use the same php.ini MAMP uses.
3 min read
Configure the Terminal to use MAMP's PHP

By default, after installation, MAMP will make its PHP binaries "available on the browser" while the Terminal will keep on using the system's PHP with its own configuration.

The idea behind changing the Command-line to start using the PHP coming with MAMP and its configuration is to be able to switch rapidly between PHP versions and to have the configuration for PHP in only one place.

Out there you can find enough guides that helps you archive this because, frankly, there are plenty of methods to get this done. This next one is how I personally do it because it's easy to implement and it also covers something most of other guides won't which is configure the Terminal to also use the same php.ini MAMP uses.

Configuring the Command-line to use MAMP's PHP

You need to edit your Terminal's Profile in order to add the following to the end:

#export PATH=/Applications/MAMP/bin/php/php7.1.33/bin:$PATH
#export PATH=/Applications/MAMP/bin/php/php7.2.33/bin:$PATH
export PATH=/Applications/MAMP/bin/php/php7.3.21/bin:$PATH
#export PATH=/Applications/MAMP/bin/php/php7.4.9/bin:$PATH

As you can see I'm adding a different line per PHP version I want to potentially have available on the Command-line (PHP 7.1.33, PHP 7.2.33, etcetera) but having them all but one (PHP 7.3.21) commented with the # at the beginning.

Every time you switch the PHP version in MAMP you should come back to the Profile and leave uncomment the same version so the Terminal and MAMP match.

Your Command-line's Profile file depends on your shell. If you are using the default Terminal coming with macOS chances are the Profile will either be ~/.bash_profile or ~/.bashrc. Mines it's ~/.zshrc because I use Oh My Zsh.

Remember that everytime you change your Profile you need to "reload" it by doing source ~/.bash_profile (or whatever file you are using).

You can check if everything was applied as expected by executing php --ini and seeing the paths are pointing to MAMP.

Configuring the Command-line to use MAMP's php.ini

Here's something interesting about MAMP Pro: it generates, each time it starts, the final php.ini file it will be using during the execution as its content depends on the settings configured on the software’s UI.

For example, if you enable/disable Xdebug on MAMP by ticking/unticking the checkbox on the app, MAMP will regenerate the php.ini file with your configuration (this is basically how MAMP applies any setting change that you perform from the UI).

The final generated php.ini file is located at /Library/Application Support/appsolute/MAMP PRO/conf/php.ini.

We already configured the Terminal to use MAMP's PHP binaries but we also need to configure it to use the generated php.ini by going to /Applications/MAMP/bin/php/php7.3.21/conf (where the not auto generate php.ini file is located) and delete it (after a back up).

Then we need to create a symlink called php.ini for /Library/Application Support/appsolute/MAMP PRO/conf/php.ini (which is the auto generated one by MAMP) by doing:

ln -sf /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini php.ini

The conf folder should ended up looking like this:

Of course the example is for PHP 7.3.21 but you will need to repeat this for the folder of each PHP version you will be using on the Command-line.

This only applies to MAMP Pro as the non-Pro version doesn't generates any php.ini and if you want to change something you need to edit the original file yourself.

Create and apply a patch in Magento

Magento usually has bugs after the release of a version, that are later corrected on subsequent releases. Using patches to change core files is not a bad practice when the goal behind it is to bring core fixes existing on newer versions to the one we have running, avoiding so a full upgrade.
4 min read
Create and apply a patch in Magento

Magento usually has bugs (thank you, Captain Obvious) after the release of a version, that are later corrected on subsequent releases (known issues).

Using patches to change core files in Magento is not a bad practice when the goal behind it is to bring core fixes existing on newer versions to the one we have running, avoiding so a full upgrade.

How to apply a patch

I'm starting the other way around as applying a patch might be more common than actually creating one, specially because Magento itself releases patches for its own platform, third-party vendors release patches for their extensions, and the community also makes patches for others to use.

There's a well known Composer package named cweagans/composer-patches that handles the patches and applies them to the original Magento modules every time you run composer install and/or composer update.

Technically speaking, this tool installs all Composer packages required, then removes the Magento modules affected by the patches we are including, and re-install those modules with the code changes applied.

➜  ~ composer install
Gathering patches from patch file.
Removing package magento/module-customer so that it can be re-installed and re-patched.
  - Removing magento/module-customer (102.0.5)
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 1 install, 0 updates, 0 removals
Gathering patches from patch file.
Gathering patches for dependencies. This might take a minute.
  - Installing magento/module-customer (102.0.5): Loading from cache
  - Applying patches for magento/module-customer
    patches/composer/magento/module-customer/22952.patch (#22952 - Delegated account creation fails with custom attributes present in customer address)

For making this happen, first you need to add your .patch file in the patches/composer/magento/[module-name]/ folder (relative to the Magento root, at the same level your composer.json file lives).

The name of the .patch file doesn't really matter, but I personally like to use the number of the GitHub issue where the known issue was discussed, if that even exists. Otherwise, any descriptive name would do.

For the [module-name] folder name use the Composer package name containing the files you are patching.

As an example, the Composer package name for the Magento_Customer module is module-customer. This information is on the composer.json file of each package, inside the vendor folder.

Finally, on the root composer.json file, inside the extra node create the patches node and define the patch to apply as the following example.

"extra": {
    "composer-exit-on-patch-failure": true,
    "patches": {
        "magento/module-customer": {
            "#22952 - Delegated account creation fails with custom attributes present in customer address": "patches/composer/magento/module-customer/22952.patch"
        }
    }
}

See that I'm adding a description to what the patch does, and the GitHub issue number, followed by the relative path to the .patch file itself.

How to create a patch

Identify the core file you would like to change using a patch.

For the sake of an example, I'm going to patch the vendor/magento/module-customer/Model/Address.php file to apply a fix for the "Delegated account creation fails with custom attributes present in customer address" issue reported in the magento/magento2 repo itself.

Create an exact copy of the file, and make all the necessary changes.

If you are using PhpStorm, you can create a "scratch file" to hold any code temporary, like a draft, by pressing CMD + Shift + N.

Comparison between the original file and the one with the changes

Output the changes into a .patch file using the diff command on the Terminal while standing in the root of your Magento.

➜  ~ diff -Naur path/to/old/file.php path/to/new/file.php > example.patch

Following my example, I need to execute the following...

~ diff -Naur vendor/magento/module-customer/Model/Address.php /Users/nahuelsanchez/Library/Application\ Support/JetBrains/PhpStorm2021.1/scratches/scratch_113.php > example.patch

...in order to get my example.patch file.

My example.patch file generated before any manual intervention

Unfortunately, here's when we need to perform some manual intervention on the generated example.patch file.

First, remove the date and time appearing the end of the first two lines.

Second, you can see that the first path is the real path to the original file living in the vendor folder. Add a a/ prefix to it.

Third, replace the second path with the first path, but using the b/ prefix instead.

Fourth, and finally, add a new line on top of everything with diff --git a/vendor/core/file.php b/vendor/core/file.php.

Before and after the manual intervention on my example.patch file

Do not touch anything else there, not even the empty lines at the end (if any).

The resulting file ready to be used as a patch should look as the following example:

diff --git a/vendor/magento/module-customer/Model/Address.php b/vendor/magento/module-customer/Model/Address.php
--- a/vendor/magento/module-customer/Model/Address.php
+++ b/vendor/magento/module-customer/Model/Address.php
@@ -159,7 +159,9 @@
         $customAttributes = $address->getCustomAttributes();
         if ($customAttributes !== null) {
             foreach ($customAttributes as $attribute) {
-                $this->setData($attribute->getAttributeCode(), $attribute->getValue());
+                if (isset($attribute)) {
+                    $this->setData($attribute->getAttributeCode(), $attribute->getValue());
+                }
             }
         }

Lazyload post Feature Image from Unsplash in Ghost

The image from Unsplash is big and impacts on the page speed of the site since the browser will download the image first then continue with the rest of the page. There's no much we can do about the image size but with a little bit of HTML and JS we can lazy load them to prioritize the content.
2 min read
Lazyload post Feature Image from Unsplash in Ghost

Unsplash is a great Ghost built-in integration that allows you to quickly add an image to your posts, and I personally use it every time to add the Feature Image to all my articles (the big one below the title, before the content).

Unfortunately, out of the box the image from Unsplash is really big (2000px wide) and impacts on the page speed of the site since the browser will download the image first then continue with the rest of the page.

There's no much we can do about the image size as we can't follow the "How to use responsive images in Ghost themes" official guide because that only applies to images you manually upload and not those coming from third-parties...

Dynamic image sizes are not compatible with externally hosted images. If you insert images from Unsplash or you store your image files on a third party storage adapter then the image url returned will be determined by the external source.

...but with a little bit of HTML and JavaScript we can lazy load them to prioritize the content over the image download.

Usually, the Feature Image in the Ghost theme will look something like:

<img src="{{feature_image}}" />

This is a classic img tag with the src containing the URL of the image. But we need to do some changes here first before moving to the JS side of this technique.

In the src we are going to put a placeholder image to avoid having a broken image while the rest of the page loads, we are going to move the actual image to the data-src attribute, and finally we'll add a new class to the element.

<img src="{{asset "images/placeholder.png"}}" data-src="{{feature_image}}" class="lazyload" />

The placeholder image should be a small image in terms of weight. I'm using an image with a solid colour of 183 bytes so I can "reserve" the space of the final Feature Image to avoid "jumps" in the browser while everything loads.

Finally, the JS is quite simple. We need to wait for the window to be loaded, get all the img elements with the lazyload class, and replace the src with what's on the data-src so we trigger the actual image download.

window.addEventListener('load', (event) => {
    let images = document.getElementsByClassName('lazyload');

    for (let i = 0; i < images.length; i++) {
        images[i].src = images[i].dataset.src;
    }
});

With this in place we should see that the content is prioritized over the Unsplash image, and if we are using a placeholder we should see that first in the "Network" tab of our browser's DevTools, with the actual image loading later.

Having a successfully work from home lifestyle

Working from home is the new normal, get used to it and get ready, because what's now a benefit will be a requirement in the not too distant future.
6 min read
Having a successfully work from home lifestyle

This is the new normal, get used to it and get ready, because what's now (somehow still) a benefit from a company will be a requirement in the not too distant future. I wouldn't be surprised if working from home becomes a skill on a job offer rather than a perk.

Imagine listing on your resume not only your English level but also your work from home seniority.

All the lockdowns imposed around the globe due to the Covid-19 situation forced companies into a WFH scheme where everybody went remote from day to night.

I think this is here to stay in a combination of remote working and office space, resulting on a true flexible work from home scheme, because this is not only better for the employee but also cheaper for a company (no more rent?).

No more bs against working from home thanks to a pandemic
Companies were forced to reorganize quickly to continue working with their employees from home: the bs around this was cut immediately, the scepticism towards having people working from their homes disappeared. It had too, there was no other option.

I had the luxury of a WFH benefit on my last job and now, for the past two years, I became a full time remote employee to a London-based eCommerce agency so I sort of know how to work from home, and I don't see myself ever again going to an office Monday to Friday, so here's my take with three aspects on how to nail working from home.

Your space in the house

My first ever mistake (and probably everybody's first ever mistake) when I started to work from home everyday was to use the same table where I ate as my desk too.

The problem is not the table itself and the fact that the Mac shares it with a slice of pizza, but the inner feeling of being always on the same place, always, all the time, when working and when not doing it.

So even if you disconnect from Slack or close the lid, you are always at your working station, which is not good (mentally speaking).

Having a room in your house as the office is the main recommendation somebody could give you when diving into the work from home culture because it will easily allow you to "call it a day" when you have to, the same way you picked up your things from your desk at the company building and returned home.

Sometimes you'll need to isolate from the rest of the house when living with somebody else, on situations like having to concentrate on a task or having a Zoom meeting so here's where a door will come at handy, or some noise-cancelling headphones.

This leads us to having a set of house rules for all the house members for when work is happening, because not everybody is used to this work from home scheme and there was no reason at all until now to be aware of this new normal and having somebody in the house that now works from it.

For example, I tend to announce that I'm going to start a meeting, and that's enough for me. But you can set other rules too, like "Headphones means no interruptions", or guidelines for when the office door is closed.

Surely, I understand that having a spare room to be used as an office is usually a luxury, I'm no idiot.

For example, I rented my current place with this objective in mind, and I'm sure this will be something that's going to be considered, in the future, for when renting and/or moving.

But, still, there's always something you can do to mentally disconnect from work when you are done with it.

If you can't have a separate room, you maybe can have a specific place in the house to work, which is not the table where you eat. Like a small desk on the dinner or living room, that you know you use only for working.

Even if there's no physical space to do so, and you are forced no matter what to use the dinner table for working, then you can rely on environment settings to differentiate working hours from free time (like lighting).

Finally, something that works when there's no office room in the house is to close the computer and save it on a drawer, as a big gesture to call it a day.

A routine to avoid burnouts

One of the main problems of working from one, that we already mentioned as partially solvable by having a dedicated physical space to work, is the feeling of being on a constant work mode, on a state where work and life get mixed together and there's no clear differentiation between one and the other.

Having to go to an office imposed, at some capacity, a routine that you had to follow like waking up at a specific hour, having to take a shower for the sake of respecting your coworkers, having breakfast, etcetera.

Now you have to set your own routine, which is easy, and follow it, which is not.

This starts with having to follow regular hours every day, a routine. For example, I have set on my smartwatch reminders to have breakfast and lunch, which is a way to avoid losing track of time when I'm working.

Even if I do not actually follow them on a day because "I'm too busy" or because "I need to finish this first", it's a way to take awareness of "when are we".

You don't need to actually get up hours before work to take a shower, that clearly can be done later, but you shouldn't get up a minute before checking in at work. Allow you at least 15 minutes of being up and running before sitting on your desk.

I know that stay in bed for as much as we can is temping, and it's a clear benefit of working from home. But that's the benefit of not commuting, that's from where we gain sleeping hours.

So, 15 minutes of sleep won't make you any difference, but having 15 minutes for you before starting to work results on being more awake, therefore rested, through the entire day.

For a better working day, work on having a better wake up routine.

You don't have to have breakfast before work, that doesn't have to necessarily be part of your wake up routine, but instead you can have it later, during work, as a break.

Pause work during working hours to have breakfast? Isn't that against the rules? Please! When you were at the office you had some water cooler moments, or stop by the desk of a coworker to have some chat about whatever, or you made yourself five cups of coffee.

You had your breaks at the office and it's fine to have them now at home.

Call it a day

Avoid falling into an eternal working state of mind, or workaholism, is what you will be constantly fighting while working for home if you don't train yourself to be better at remote working.

Stop working is part of being good at it.

If the company you work for doesn't care for time tracking, you should track your time anyway, for yourself, to be aware of how much are you spending at work. And, as if you were going to an office, you should call it a day at some point, and don't work until the next day.

At the company I work for we have a Slack reminder with some stuff before we go, which also works as a reminder of what time is it (the same as the use of an alarm or the reminders I already mentioned I have on my smartwatch).

And when it's time to go. Go. No, really, go. Whatever it is, with the exception of an emergency, can be continued tomorrow... or next week.

If you can go out after calling it a day, even better. Leaving home is very good to clear your mind, even if it's for a short walk or for having a moment at a coffee store (which is my thing).


Working from home was always a luxury I can see becoming the new normal after this big social experiment we all suffered due to the pandemic.

Internet is full of tips and tricks on how to succeed at working from home. You just need to find those that suit you and get on with it.

How to write a resume

I happen to be on the other side of the table as I screen candidates based on their resumes. Those interviews happens only if the resume appeals me, and that's why it matters: a resume can give you your first shot at a job or kill your opportunity.
6 min read
How to write a resume

I know this one probably isn't the first article you ended up reading about how to write a resume. I understand, you are looking for a job change or your first opportunity and this matters so much that you are looking for many suggestions.

I happen to be on the other side of the table as I screen candidates based on their resumes and I get to conduct interviews. Those interviews, by the way, happens only if the resume appeals me, and that's why it matters: a resume can give you your first shot at a job position or totally kill your opportunity.

Since I get to see some resumes every now and then, I'm already expecting something from them when I grab one, and I'll try to tell you what's that so you can write a good one.

Look, I know this is a long article, but it's your resume we are talking about.

It is worth the time.

Anatomy of a resume

Introduction

Say something before diving into the hard data of your work experience and studies. That's how you prove to be human.

This is not exactly a cover letter but something shorter and more general (not aiming directly at the company you are applying to). Imagine only having 20 seconds to introduce yourself at a date and that's about it.

Paint an overall picture of who you are, what are you looking at and what are you capable of.

For example, I'm a developer and this is my introduction:

Hi there, I'm a Full Stack Developer, more inclined to the Front End part of it, who has been working with eCommerce platforms like Magento since 2013.

I usually work with xHTML, CSS, SASS, Compass, LESS, JavaScript, VUE, jQuery, a little bit of Grunt, PHP, Laravel, another little bit of MySQL, Git as a revision control system, Agile methodology with Scrum as an agile development method, and of course Magento.

I really like English, which is my secondary language, that's why I'm very happy with my IELTS Life Skills B1 (IELTS UKVI) certification.

A good introduction will give the company you are applying to an idea of where you might fit.

Experience

This is the most important bit, where job hunters focus when reading a resume, and it's surprising how many people got it wrong.

Experience is about listing your entire career in a way that becomes easy to read and to understand, so it needs to be perfect.

There are two ways I would recommend this to be done: one is by listing roles and the company where that role happened (that's the classic approach), and another way is to list companies and roles performed while working for each company (which is the recommended option if you had multiple roles in the same place, or to show career progress inside the company).

LinkedIn uses these two approaches combined depending on how many roles you add to the same company.

The main issue I always encounter within this section is that people usually list the title of the role, the company, the dates when that happened, and nothing more, but that's not even close to be enough.

List the actual tasks you take care of while performing on a specific position. When people read your resume they need to know what you have actually done, the real stuff you have actually done.

For example, a common job title is the "Technical Leader" for a web development agency. What that means to you?, because certainly it doesn't mean the same on every company. Did you code review stuff or that wasn't your job? Did you manage deployments or that didn't fall into your job description? Did you coach people? What else?

I'm a Full Stack Developer at my company... and I do code reviews, deployments, I interview people, take care of the onboarding of new employees, etcetera. The tasks I perform are not usually associated with the title of the role I have so that's why it's also important to be specific.

Depending on the job and/or role it might be worthy to also specify the projects you worked on, which could be a good idea if you operated as a freelance for some period of time.

Certifications

This is how you validate your previous listed experience.

Everybody know that a certification on its own is no evidence at all that you dominate the platform/software/field that certification is about, but they are used as a filter during the screening of several resumes.

So, if you have them, add them. It's more for like "Oh, look, she has this certification, so she dedicated personal time to get it, that tells something of her".

If you happen to have a certification on a different language, besides any study that proves you speak it, this is the place to add them.

Language certifications are pretty important, specially if you are looking for a job in a foreign company.

Additional projects

A lot of people do freelance stuff at the same time that works at a company as a full-time employee, collaborates on an Open Source project, or maintains a personal one.

Whatever is your case, or if you have something similar, you should list that too as it's part of your experience. And, the fact that you did that in parallel of having your regular job it's a plus the interviewer will consider.

For technical positions such as web developers this is also the moment when you introduce your personal repositories (such as GitHub), or any other social network account with focus on showing your work as a portfolio (for example, Behance).

As an interviewer, and as a resume screener (assuming that's a thing), I'm mainly focus on the technical aspects of the candidate, so a GitHub account (or similar) is for me a glimpse of the actual coding skills of the person applying for the job.

Education

Your experience (and the additional stuff you did), on top of your certifications, leaves your common education on a secondary position.

What you have done during your career, your career itself, it's your education, so at one point your attendance to college or Uni doesn't really matter. But, that's only true if you actually have a career to show.

There's still something worth highlighting here which are courses taken that are related to your professional career, either directly or complementing it.

Bonus track

Social networks?

Only if they add something to your professional profile, otherwise I wouldn't bother mentioning them.

A good examples of social networks worth mention are Twitter (if your use it professionally), GitHub (or similar version control system), and of course LinkedIn.

If you have a personal site, such as a blog, and specially if it's related to what you do professionally, mention it as well.

Hobbies?

Yes, of course. There are humans reading resumes made by other humans, so prove to be one.

A list of hobbies gives people a glimpse of your personality, and it's always good to know what you appreciate in life besides working.

Of course, this is pretty much optional, and you should share this personal side of you at the capacity you are comfortable at.

Additional personal data?

We are talking contact information here, which is important because, well, you want to be contacted back.

But also your country of residence, which is pretty much key information for time zone reasons, specially if you are applying at a foreign company.

Designs matters?

Depends on what you do for a living. If you work on something related to design, then yes, it does, and pretty much.

But, for example, if you are a developer, I personally don't care much about design and my main focus is on the content of the resume rather than how pretty that is.

Having LinkedIn

This is a double-edged sword.

LinkedIn is great, it's the perfect way to show your entire professional career. It gives you the ability to add everything we just discussed before and more.

From my personal point of view, I think having LinkedIn is enough, and that it could be your final resume. You don't need anything else.

For example, I don't have another resume but my LinkedIn profile, and when I applied to the current job I have I remember saying...

You can check my experience in my LinkedIn profile at https://www.linkedin.com/in/nahuelsanchez, let me know if you want a PDF version of my CV or something else.

...but that PDF version wasn't necessary because my LinkedIn profile had everything, it's complete.

And that's my point. If you are going to have a LinkedIn profile, have it up to date, have everything there. Make it your final and only one resume that's always available for whoever wants to read it.

Otherwise, what happens if I see a profile with content midway is that I assume that's all of your career. I can't tell if you were lazy and didn't update what I consider to be your resume.


If you are a web developer you can find me on LinkedIn and check my profile which I consider to be a good example to follow (not a perfect one, I said "good").

Also, again, if you are a web developer (which is my "area of expertise"), find me again on LinkedIn and tell me if you would like me to review your profile (after you applied to it everything that was presented here, of course).

Install Elasticsearch for Magento 2 on macOS

Depending on the Magento version you have, or the Elasticsearch version you want, the process of getting this work locally can be easy or a nightmare I'll try to simplify here in this post.
5 min read
Install Elasticsearch for Magento 2 on macOS

Depending on the Magento version you have, or the Elasticsearch version you want, the process of getting this work locally can be easy or a nightmare I'll try to simplify here in this post.

If you already know what version to install, skip the following and jump straight to the installation instructions.

What Elasticsearch version do you need?

If we dive into the official Magento documentation and take a quick look at the different changes made to it across time, we can learn a few things.

Magento 2.3.4 documentation

Available at the magento/devdocs' GitHub repo, tag 2.3.4.

Magento 2.3.1 adds support for Elasticsearch 6.x and it is enabled by default. Magento still provides connectivity for Elasticsearch 2.x and 5.x but these must be enabled in order to use these versions.

Magento 2.3.5 documentation

Available at the magento/devdocs' GitHub repo, tag 2.3.5.

Magento 2.3.5 adds support for Elasticsearch 7.x.x (default) and 6.8.x. Both ES 2.x and 5.x are End of Life and are no longer supported in Magento.

Magento 2.4 documentation

Available at the magento/devdocs' GitHub repo, branch 2.4.1-develop.

You must install and configure Elasticsearch 7.6.x before upgrading to Magento 2.4.0.
Magento does not support Elasticsearch 2.x, 5.x, and 6.x.

Or, to summarize:

  • For Magento 2.3.1 to Magento 2.3.4 you need to install Elasticsearch 6.x.
  • For Magento 2.3.5 to Magento 2.3.n (anything before 2.4.0) you'll need to install Elasticsearch 7.x.x. It works also with 6.8.x, but version 7.x.x is easy to install.
  • For Magento 2.4.0 and up you need to install Elasticsearch 7.6.x. No support for previous versions.

If you are working with multiple Magento projects on different versions, I would suggest you to install Elasticsearch 6.x to support from Magento 2.3.1 to Magento 2.3.5, and everything before Magento 2.4.

If you have all projects on Magento 2.3.5 and up then install Elasticsearch 7.6.x.

Install Elasticsearch 6.x on macOS

You need Homebrew first, so please install it by doing the following:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

You can check the official Homebrew page for more information about it and alternative installations options.

Then, we need to add a third-party repo to Homebrew and a few packages, including Elasticsearch itself.

brew tap elastic/tap; brew cask install homebrew/cask-versions/adoptopenjdk8; brew install elasticsearch@6.8;

When you do that you'll get a lot of output on your terminal, but you need to only care for the installation path of the last elasticsearch@6.8 package.

➜  brew install elasticsearch@6.8;
==> Downloading https://homebrew.bintray.com/bottles/elasticsearch%406.8-6.8.8.catalina.bottle.tar.gz
Already downloaded: /Users/nahuelsanchez/Library/Caches/Homebrew/downloads/01d0782011cbecdb3b1125469ee2ed60ef07926a8f36752c64d1b8c2b763736d--elasticsearch@6.8-6.8.8.catalina.bottle.tar.gz
==> Pouring elasticsearch@6.8-6.8.8.catalina.bottle.tar.gz
==> /usr/local/Cellar/elasticsearch@6.8/6.8.8/bin/elasticsearch-keystore create
==> Caveats
Data: /usr/local/var/lib/elasticsearch/
Logs: /usr/local/var/log/elasticsearch/elasticsearch_nahuelsanchez.log
Plugins: /usr/local/var/elasticsearch/plugins/
Config: /usr/local/etc/elasticsearch/

elasticsearch@6.8 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have elasticsearch@6.8 first in your PATH run:
  echo 'export PATH="/usr/local/opt/elasticsearch@6.8/bin:$PATH"' >> ~/.zshrc
  
To have launchd start elasticsearch@6.8 now and restart at login:
  brew services start elasticsearch@6.8
Or, if you don't want/need a background service you can just run:
  elasticsearch
==> Summary
🍺  /usr/local/Cellar/elasticsearch@6.8/6.8.8: 136 files, 103.4MB

The path below "Summary" is the one we need to mind, where mine is /usr/local/Cellar/elasticsearch@6.8/6.8.8.

Go to that folder and install a few Elasticsearch plugins.

bin/elasticsearch-plugin install analysis-phonetic bin/elasticsearch-plugin install analysis-icu; bin/elasticsearch-plugin install analysis-smartcn;

Now, because only God knows why, we need to fix something on this freshly installed Elasticsearch package, otherwise it won't start.

Standing again into that installation path, cd into the libexec/config folders, and edit the jvm.options file.

Comment the line it says 8:-Xloggc:logs/gc.log by adding a # at the beginning of it, and below add 8:-Xloggc:/tmp/logs_gc.log.

This is how the file might ended up looking

You are basically done now.

Start Elasticsearch by doing brew services start elasticsearch@6.8.

➜  brew services start elasticsearch@6.8
==> Successfully started `elasticsearch@6.8` (label: homebrew.mxcl.elasticsearch@6.8)

To check if everything is good, you can do a cURL to the Elasticsearch instance running.

➜  curl "http://localhost:9200/_nodes/settings?pretty=true"
{
  "_nodes" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "cluster_name" : "elasticsearch_brew",
  "nodes" : {
    "ArBWW_c3QRunhfQn460sxQ" : {
      "name" : "ArBWW_c",
      "transport_address" : "127.0.0.1:9300",
      "host" : "127.0.0.1",
      "ip" : "127.0.0.1",
      "version" : "6.8.8",
      "build_flavor" : "oss",
      "build_type" : "tar",
      "build_hash" : "2f4c224",
      "roles" : [
        "master",
        "data",
        "ingest"
      ],
      "settings" : {
        "client" : {
          "type" : "node"
        },
        "cluster" : {
          "name" : "elasticsearch_brew"
        },
        "http" : {
          "type" : {
            "default" : "netty4"
          }
        },
        "node" : {
          "name" : "ArBWW_c"
        },
        "path" : {
          "data" : [
            "/usr/local/var/lib/elasticsearch"
          ],
          "logs" : "/usr/local/var/log/elasticsearch",
          "home" : "/usr/local/Cellar/elasticsearch@6.8/6.8.8/libexec"
        },
        "transport" : {
          "type" : {
            "default" : "netty4"
          }
        }
      }
    }
  }
}

That host and port on that cURL command (which by default is localhost:9200) is the host and port you need to use for configuring Elasticsearch in Magento. If it doesn't work, try the same cURL call but with 127.0.0.1:9200.

Remember to brew services stop elasticsearch@6.8 when you are done working so it's not running forever in your computer.

Install Elasticsearch 7.x on macOS

You need Homebrew first, so please install it by doing the following:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

You can check the official Homebrew page for more information about it and alternative installations options.

Then, we need to add a third-party repo to Homebrew and the Elasticsearch package itself.

brew tap elastic/tap; brew install elastic/tap/elasticsearch-full;

When you do that you'll get a lot of output on your terminal, but you need to only care for the installation path of the elastic/tap/elasticsearch-full package, which is located just at the end below "Summary".

For example, mine says /usr/local/Cellar/elasticsearch-full/7.8.0.

Go to that folder and install a few Elasticsearch plugins.

bin/elasticsearch-plugin install analysis-phonetic bin/elasticsearch-plugin install analysis-icu; bin/elasticsearch-plugin install analysis-smartcn;

That's all, basically.

Start Elasticsearch by doing brew services start elastic/tap/elasticsearch-full.

To check if everything is good, you can do a cURL to the Elasticsearch instance by running curl "http://localhost:9200/_nodes/settings?pretty=true" which will output a big JSON.

That host and port on that cURL command (which by default is localhost:9200) is the host and port you need to use for configuring Elasticsearch in Magento. If it doesn't work, try the same cURL call but with 127.0.0.1:9200.

Remember to brew services stop elastic/tap/elasticsearch-full when you are done working so it's not running forever in your computer.

Can I have both installed at the same time?

No... well, I didn't try it but I think you can't. I would avoid such experiment.

What you can do for sure is uninstall one and install the other on demand.

If you do that you need to uninstall the Elasticsearch plugins you install it and install them again so you ended up with the right plugins version compatible with the Elasticsearch version currently installed.

Anything else?

Reindex Magento before trying to load the store.

No more bs against working from home thanks to a pandemic

Companies were forced to reorganize quickly to continue working with their employees from home: the bs around this was cut immediately, the scepticism towards having people working from their homes disappeared. It had too, there was no other option.
4 min read
No more bs against working from home thanks to a pandemic

It's still amaze me, you know, and hit me by time to time when going to sleep or taking a shower, a "...wow" moment, like a slap from reality: the world pressed pause a few months ago.

Not a bunch of countries, not a far far away continent. The whole world stopped because, well, you know what happened: Coronavirus.

Companies reorganized quickly to continue working with their employees from home... Well, they were forced to act quickly to be honest, not like they went through a deep analysis about the pros and cons of a remote scheme for their staff, no meeting between HR and the business management branch happened at all.

The bs was cut immediately, the scepticism towards having people working from their homes disappeared. It had too, because Plan B was to close until further notice, so the discussion about it became pointless, and frankly nobody has nothing to lose. Wasn't that beautiful?

Month ago this was considered only a benefit a company would offer, or a sometimes exception for particular circumstances. Internal company processes would decide how and when somebody could work from home like, for example, one day a week after three months in the company, and two days a week after a year.

It sounds crazy now but we all, at every level, agreed to that scheme.

Work from home forced itself and nothing bad happened, nothing catastrophic at all. Objectives are still being reached, and, most important, employees don't sleep the whole morning pretending to be online on Slack, which I believe was the biggest fear of them all.

I found it interesting that even on very objective-based companies, when thinking about offering the possibility to work from home, the mindset changes to a time-based one. In an office we thought about what to accomplish when (objectives), but then when talking about remote working we thought about how the time was going be consumed without direct supervision.

We trust developer with Live server side credentials, but oh no home will make them Facebook too much.

And even today, with a lockdown in place and a forced work from home scheme, even if an objective is not reached you know that's not because the employee is working to close to the bed. It's always something else.

You are quarantining yourself now, and everybody in your company is doing it too. Work from home is happening whatever you planned it or not, so it might be time to fully embrace it. Take the (forced) opportunity and make it a permanent thing.

It is a chance for us all to recognize that working from home is as possible as working from an office. And, sorry, my experience is always based on my role as a web developer so my focus is pointed in tech-related companies, but you can decide if this whole concept applies to you as well.

I worked, until now, as the only one remote developer of the company I'm part of, and the rest of the team was based in UK, working from a beautiful office in London. Now everybody is remote, everybody now works from their homes, and the office is entirely for a fridge they already planned to set on fire because God only knows what have been left inside months ago.

Again, nothing changed from the day to day operation of the company, there's no trough at all in the productivity graph. If anything, I think people is working more because nobody is used to work from home, yet, but that's a problem for a different post.

Having a successfully work from home lifestyle
Working from home is the new normal, get used to it and get ready, because what’s now a benefit will be a requirement in the not too distant future.

It was discussed internally, basically, the feelings towards this new forced normality, and while everybody misses the office and the social side of it, all of us are considering working from home a positive thing. Even one admitted that during lunch time takes a nap, which is fine because who cares if you are delivering at the end.

It was also raised that we might not seen us working from home, without going to an office, for ever, so I'm sure flexibility is what's coming after everything that's happening comes to an end.

Let me be clear that flexibility doesn't mean an extra work from home day to your now old internal company process. Flexibility means having an office, and go there if you want. Nothing less than that, which is perfect, which is good, fine, there's nothing wrong with that. We should have learn that already.

Imagine a hot seat scheme, with a few desks for those wanting to leave the house some day, or a more co-working spaces-based normality.

I don't know, I'm brainstorming, this is my first pandemic, but I'm sure that those, somehow still appearing, job offers from LinkedIn offering something like "2 work from home days a week" as a benefit are hilarious now and they should have gone already.

Building a positive company culture with a remote team

Do not think for a second that a classic culture, rules, or way to go for when you were on an office will accommodate everybody now working in pajamas. That process of yours needs to be dust off and made again.
5 min read
Building a positive company culture with a remote team

You should already know that having a remote team and moving away, at some capacity, from having an office and mandating everybody to attend it in favour of working from home, have plenty of advantages... but it also requires companies to re-think their culture and adapt it for including remote members.

This is something to be face for either companies having all of their employees remote (no office whatsoever) or for those companies with a mix.

Since we are in the middle of a pandemic (#covid19), this work from home thing stopped from being optional for some companies and everybody was forced into it.

Nevertheless, I personally think that work from home, or at least a flexible scheme that combines office time and home time, is the new way to go, so preparing for that reality can't be pushed forward.

Working for home has a lot of benefits for both the employees and the employers, but it's not about only having Wi-Fi at home.

No more bs against working from home thanks to a pandemic
Companies were forced to reorganize quickly to continue working with their employees from home: the bs around this was cut immediately, the scepticism towards having people working from their homes disappeared. It had too, there was no other option.

People not used to work from home will struggle with their new situation, specially because separating work from life is not easy when both happens in the same physical environment. Anyway, that's a different problem.

But what companies can do is to work on a culture to makes every remote team member welcome.

You want to have a great team culture because you want people to stay with you, and you want those who stay to like showing up to do the work, which will result in better stuff being done, in progress being made.

Do not think for a second that a classic culture, rules, or way to go for when you were on an office will accommodate everybody now working in pajamas. That process of yours needs to be dust off and made again.

Bake a culture that brings down the feeling of being away

This should be the main objective of your new culture: the idea of making everybody as welcome as possible, part of something, a team, removing the sensation of just having people logging time and solving tickets with an interaction boiled down to only asking questions after a technical brief.

That's not a team member, that's a contractor or freelance you got there. Which is fine, if that's what you are after, but the approach in this post is to adapt your previous "going to the office" to "walking from bed to desk".

The culture needs to integrate people by bringing down the barriers imposed by everything being digital and virtual now.

There are a lot of thing we are no even aware we are missing by not being in the same place, like, for example, there's no more "I'm making coffee, anybody wants some?". There's an element of... human touch?... we need to re-incorporate.

Videos are now part of your meetings

There's an incredible change on people's behaviour when having a call with and without the camera turned ON.

When you are talking to somebody and you can see them, and you also know you can be seen, you are both in presence of a more honest conversation taking place. Your call becomes more real because the camera forces everybody to have accountability on what's being said.

For example, it's not the same to provide an estimation or deadline for a task by saying it "face to face" than by only using the microphone. The camera is a constant reminder that you are talking to an human being, and that what you say and how you say it matter.

This is particularly important when the meeting is about something else than actual classic work tasks, like on performance reviews.

Fun is allowed and encouraged

Cameras turned ON during a call also relaxes the conversation, and helps to emulate what happens on a meeting taking place in real physical conference rooms.

Nobody walks into a meeting, on a physical room, and sits down straight to business. There's some water cooler moments before and after work actually happens, and that's okay, that should be somehow, at some level, encouraged.

The same should be allowed to happen on any other conversation tool you have, specially on the one you are using to chat, a.k.a. Slack.

Don't expect people to be robots, to talk either verbally or in writing as if their were always wearing a suit and saying something to the President of the United States.

On a real office there's music sometimes, chit-chat happening on a corner, or jokes appearing during shop talk, but on Slacks that's down to memes, gifs, and emojis, which bring something else for the entire team, easing the working day and removing pressure. A small venting crack perhaps, on complicated days.

Having fun is a way of team building, and there's plenty of activities that a company can promote to achieve this (besides just using emojis on Slack).

I know it was typical for assembled office teams to get pizza on a Friday, going for some after office time at a pub, and came up with team activities. Now, you just need to think of stuff that can be done remotely.

Team building becomes now more important than ever, as "having a team" doesn't happen as easy as maybe before.

Again, in these particular times were people are in a lockdown due to the Coronavirus, a meeting to just laugh is more than welcome, specially on companies suddenly forced to be remote with no employee ready for it.

For example, the company I work for promoted a few Fridays for games over Zoom where we separated into two teams and played charades... while wearing costumes, fancy dresses, and props.

Meet to improve the remote work

Of course, having a remote team doesn't mean nobody meets each other in person ever again. On the contrary, if you have the possibility to assemble the entire team on a physical space every now and then, great, take it.

For remote employees, meeting each other in person, or meeting the "team from the office", has a real impact on how they perceive the company and what they think of it.

You will witness a change on how people communicate online after a meet up takes place, because people will have had a chance to know other people voices, tone, and expressions.

Sending people stuff will also do the work, and I'm talking delivery packages with beer or whatever gift you can think of. Employees must be rewarded, specially those hard workers that were key on a specific date or task.

Ask what people need

Finally, at the end, and as usual, everything is down to just asking what people need or want. But as obvious as this seems to be, it happens to be the thing we do the lesser.

Take time to ask and listen. Sit down and have a conversation with your remote employees to understand what they need and what their feelings are towards working remote.

Again, specially for those companies that hadn't other option but to make everybody work from home.

If budget is not a problem, help employees to set up their working environment at home, where the priority is the chair.

Buy them a comfy chair... that's what I was trying to say all this time.

Prepare for a job interview

Looking for a new job is a job itself. It's not just about scheduling interviews and going to them, you need to prepare, otherwise your chances are pretty low (trust me, I conduct interviews, so I'm on the other side of the table).
7 min read
Prepare for a job interview

If you are my boss and you are reading this... no, I'm not looking for another job!

About two years ago I decided to quit the job I had back then after around 6 years on the same company, and I had to prepare for the incoming interviews I was planning to have (fun fact, I only had one) because for that period of time I had none (yep, I'm that loyal) so I considered myself a little bit rusty on that area.

Looking for a new job is a job itself. It's not just about scheduling interviews and going to them, you need to prepare, otherwise your chances are pretty low (trust me, I conduct interviews, so I'm on the other side of the table).

No politician in America will tell you this, but every boss will: You can’t just show up. You need a plan to succeed.

"Thank You for Being Late" by Thomas L. Friedman

Once I wrote a post about how being average at work is over and how it won't take you anywhere, and that concept applies now again for your job hunting.

Average is officially over, so don’t be that at work
Average is officially over because it won’t take you, your company, your team, anywhere. There was a time when you would learn a skill and that would be enough to succeed at work, but nowadays what you learn has an expire date as much as the milk in your refrigerator.

Update your resume and experience information

Sounds basic but you will be surprised if I tell you how many candidates don't do it and how they end up saying things such as "Oh, no, after that job I have another position for a few years but I sent you the outdated resume".

The resume is your opening, it speaks for you before you even utter a word, and it's what gives you your interview (or the reason why you don't get one).

It doesn't need to be long, nor fancy. It just needs to be up to date, including your current and past experiences (all of them relevant to the job you are looking for, at least), with not only the job titles and dates, but with a short list of the actual tasks you performed.

Don't tell me you were a "Front end developer", but tell me what you actually did on that role, with what technologies did you work, of what other "soft" tasks you were part of (did you interview people? did you conduct workshops?).

Say "Hi" with a cover letter

You can't just attach a PDF of your resume and send it to a thousand emails... well, yes, you can, won't be ideal... or do it, that's fine, but include a cover letter.

The cover letter is how you say "Hi". In the real world you don't walk into a company's office and throw a printed resume at the HR employee working at that moment: you say "Hi" before.

In a few lines, in a short text, you can introduce yourself by telling a little bit about who you are, what's your current situation and what are you looking for.

You can have a template, but I would suggest you to personalize it for each application. Remember to talk like an human.

Take a look at what I sent when applying for my current job, in 2018:

Hello,

I’m a front end developer focused on eCommerce, specifically in Magento and VTEX, and I have been working with these two platforms since 2013 starting with Magento 1 even before the RWD theme and now dealing with Magento 2 while getting to know what’s coming in PWA related to this platform.

Right now I work at Current Company (https://www.linkedin.com/company/current-company) but I’m looking for a change. I guess by the “Career openings” section in your website that you probably aren’t looking to fill any position with a person working remote, but a friend that went through your recruiting process told me about you and I thought it wouldn't be much of an inconvenience to apply.

If by any chance you’re looking for a remote developer I also completed the developer test available at GitHub, and here’s the link with the requested functionalities: https://github.com/link-to-tes

You can check my experience in my LinkedIn profile at https://www.linkedin.com/in/nahuelsanchez, let me know if you want a PDF version of my CV or something else.

Thank you very much.

Nahuel

The subject of that email was "I'm a Magento front-end developer".

Prepare to be Googled

The very least thing that will happen on the process of reviewing your application is that your LinkedIn profile will be checked, your GitHub account will be tracked down... you will be searched on Google.

If you are going to have a LinkedIn profile, then have it up to date, otherwise is counterproductive. If you have this polished then you will be already covering the previous section about having a good resume (check mine).

Something really good to have in order to highlight yourself among other candidates is to own a blog, related, even if vaguely, to the job you are looking for.

Clearly, owning a blog is not easy at all as it requires time to build an archive of data worth showing, but it is also a good example of how looking for a new job is not something that should (must? will?) happen quickly.

You need to build an online presence, specially on the IT sector: participate in forums, Twitter, engage in LinkedIn conversations, attend conferences, be a "member of the community" at some capacity.

Have a reason for changing jobs

Money is a reason, and it's a valid one, just have that clear before the interview and be able to explain it.

When I changed jobs years ago I remember the reason was that I was feeling always on a run on my previous position, not enjoying it, and I mainly though that the way we were doing things could be different.

I didn't know exactly how different, but I knew the processes could be better in a way, and me looking for a job change was mostly focused on looking for a different way to work on web development related projects.

Whatever is driving you into looking for a new job is personal, and only you know it.

My two cents here is that don't let any anger to your current job or current company be the main reason why you are thinking of quitting and moving on.

Decide how much money you are after

Be serious. We all want a million dollars, and maybe you think you are worth that much, that's fine, just as long as you are being realistic.

Deciding how much money we would like to be pay on our next job starts with knowing how much we are doing right now in our current position, and how that is translated into the different payment forms existing out there.

For example, maybe you are getting a monthly salary right now, but that's not exactly how all companies pay its employees. Some pays every 15 days, some talks salary while expressing it on a year-time period, a lot of companies on the IT sector have a price per hour scheme, and not all companies use the same currency.

Take your current salary on its current form, and understand how to express it in all its variations, so you know how much you are currently worth when asked.

Having this all clear makes it easy to not only decide how much to ask for then, but it will come at handy when reviewing a counter proposal or comparing different offers in case you are lucky enough to find yourself on that position.

Know the company you are applying at

I can understand that you will be applying for multiple positions at the same time looking to win one, but that's no excuse to come unprepared for those interview opportunities you nailed.

Between the moment the interview is scheduled and when it actually happens there's plenty of time to investigate the company that is giving you a shot.

Looking at the company's website is the very least you must do, but there's clearly more. For example, since I applied to an eCommerce agency, I reviewed the sites they have launched to check the designs they were doing and how their code looked like.

If you have ever been on a first date with somebody you didn't really know much, you might as well have stalked him/her on plenty of social media sites... well, this is kind of the same situation.

It is possible that you will be asked, by the company itself, why you have chosen them, and even if you are not you still need to know the company you are applying at to actually discover if you think you'll fit or not.

Have a script at hand

Everything you had prepared before, and more, needs to be with you during the interview, which is extremely easy if the interview happens online.

  • Have in detail what a normal work day looks like for you.
  • Have your experienced detailed, with the actual tasks you performed, in case you need to go deep into them while talking.
  • Have a list of projects you worked on, with a short explanation for them and the technologies you used.
  • Have the reasons you are having that interview in writing, in case you were asked for.
  • Have your current salary, and what you will be requesting now, at hand in case the discussion reaches that point.

The interview itself should be human friendly, and it's a bidirectional conversation, which means that you can (and certainly must) ask questions too, specifically focused in knowing the company beyond what you discovered while stalking it.

Be prepare to share something personal too, as again this is a conversation between humans. Do you have any hobby you would like to share? Any activities besides working that will be worth mention? Something about your family?

Finally, learn from past interviews. If you don't land the first one, try to understand what could you have done different, what you missed, and be even more prepare in the next one.

Good luck!