Keeping clients happy as a web developer

Over my years of working as a web developer, I’ve mostly held jobs that required me to work directly with clients. Clients come in many varieties, and while there are those dream clients that are effortless to work with, you usually have to get in sync with how they work in order to collaborate effectively. That could mean anything from keeping detailed notes about what’s been done to the site, having more calls than you might be used to, how you explain problems, etc. With that said, there are a few common things between all clients that will really get you on their good side.

Continue reading “Keeping clients happy as a web developer”

Elixir: Loop through maps in a Phoenix template

There are many examples online of looping through lists in a Phoenix template, but I came across an instance where I needed to loop over a map. I wanted the same clean for items <- items do syntax. After a bit of research, I found this for loop is actually considered a comprehension.

When looping through a map, you can simply create a tuple with two arguments {key, value}.

<% collection = %{"List" => ["Item", "Item", "Item"]} %>
<%= for {key, list} <- collection do %>
<%= key %> # List
<%= for item <- list do %>
<%= item %> # Item
<% end %>
<% end %>

Magento 2: Using placeholders in form fields

While the Magento 2 adoption of KnockoutJS has opened up the possibility for modern front-end features, the level of abstraction has raised new challenges. Adding a placeholder to form fields is no longer as simple as opening the template file for the form. Here I will explain the steps for adding placeholders to Magento 2 fields.

Continue reading “Magento 2: Using placeholders in form fields”

Elixir: Using append and prepend options with inputs_for

The inputs_for method comes with two options for rendering the page with new elements as part of the collection you’re modifying (if it is a collection). For example, if you’re creating a to-do list that has a number of items, you could use the options like so:

<%= inputs_for f, :items, [append: [%App.Lists.Item{}], fn i -> %>
<%= text_input i, :description %>
<% end %>

If we already have items in the collection, inputs_for will iterate and fill the fields with the appropriate values, then append the new entry to the end, or in the case of prepend it will add the new entry to the beginning of the collection.

My Failed Side Projects

I’ve had the dream of starting my own business for a while now; not the VC funded Silicon Valley kind, but what I’ve come to learn recently is considered a “lifestyle” business. What I’m after is the same thing many developers looking for sources of passive income want, which is freedom. Some people enjoy and thrive off the stability and predictability of salaried employment, but for all the time I’ve been doing it, I’ve never felt satisfied. I thrive off risk, stress, uncertainty. I’m more than willing to throw myself into difficult situations and test my limits. That’s why the life of an entrepreneur is appealing to me.

Continue reading “My Failed Side Projects”