<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: David Hermoso</title>
    <description>The latest articles on DEV Community by David Hermoso (@jdavidhermoso).</description>
    <link>https://dev.to/jdavidhermoso</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%2F19685%2F7f4fcfa4-dd61-4fda-b1d1-9d4251ed0aaa.png</url>
      <title>DEV Community: David Hermoso</title>
      <link>https://dev.to/jdavidhermoso</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jdavidhermoso"/>
    <language>en</language>
    <item>
      <title>Remote working: team and company culture</title>
      <dc:creator>David Hermoso</dc:creator>
      <pubDate>Thu, 03 Dec 2020 00:02:01 +0000</pubDate>
      <link>https://dev.to/jdavidhermoso/remote-working-team-and-company-culture-51ce</link>
      <guid>https://dev.to/jdavidhermoso/remote-working-team-and-company-culture-51ce</guid>
      <description>&lt;p&gt;Many companies had to move remote this year 2020 due to the COVID pandemic.&lt;br&gt;
But remote working is not just picking up your computer and going somewhere other than the office.&lt;br&gt;
In my humble opinion, and after years of remote working, it's not as easy as that.&lt;/p&gt;

&lt;p&gt;I'm not talking about work from home, but about the concept of remote working: &lt;br&gt;
Distributed teams across the world, different languages, cultures, timezones, work schedules, etc.&lt;/p&gt;

&lt;p&gt;Remote working should imply a communication skills learning process.&lt;/p&gt;

&lt;p&gt;The following are some of the things anyone working remotely should take into account:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Communication is asynchronous, especially when team members work at a different timezone than yours. It implies the team should be organized to reduce dependencies or to tackle these time gaps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Meetings should be scheduled if the topic to discuss is not urgent:&lt;br&gt;
Attendants will be able to prepare the meetings, reading the topics to talk about, investigate, find out if someone else should attend, etc. in advance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Meetings, especially daily updates, should have a fixed duration and shouldn't be exceeded. Otherwise, it's difficult to focus on the topic of the meeting.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reading and learning about the culture and the country of your teammates is a good idea: You will be able to understand better your teammates. And it always leads to a better, more inclusive, and diverse team.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Physical meetings, team buildings, etc. are important to create a great company culture and to keep the teams joint.&lt;br&gt;
(I know We are in a global pandemic, so this one cannot be applied now)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A quick call is a much better idea than writing 15 comments in a pull request or a chat conversation.&lt;br&gt;
And by the way, the tone of a written message is easier to be misunderstood.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Again, that's just my opinion and my experience.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to show (Angular) components in specific order according to a backend configuration</title>
      <dc:creator>David Hermoso</dc:creator>
      <pubDate>Mon, 08 Jun 2020 15:23:36 +0000</pubDate>
      <link>https://dev.to/jdavidhermoso/how-to-show-angular-components-in-specific-order-according-to-a-backend-configuration-498m</link>
      <guid>https://dev.to/jdavidhermoso/how-to-show-angular-components-in-specific-order-according-to-a-backend-configuration-498m</guid>
      <description>&lt;h2&gt;
  
  
  UPDATE: ⚠️ This is an awful idea for accessibility.⚠️ 🤭
&lt;/h2&gt;

&lt;h3&gt;
  
  
  It's a terrible solution for accessibility because things are being rendered in the screen in an absolutely different order as they're written in the HTML code.
&lt;/h3&gt;

&lt;h3&gt;
  
  
  So screen readers, tab navigation, etc. is different to what users may be seeing in the screen.
&lt;/h3&gt;

&lt;p&gt;So it's wrong.&lt;/p&gt;

&lt;p&gt;In any CMS you can configure your content to appear in a specific order, &lt;br&gt;
so you don't need to code in order to change how it's rendered.&lt;br&gt;
Last week, I faced that issue in an app I'm working on: I had some Angular components and I wanted to be able to sort them in a different way, according to a BE configuration.&lt;/p&gt;
&lt;h3&gt;
  
  
  Why you would do that?
&lt;/h3&gt;

&lt;p&gt;Let's guess you are building a &lt;strong&gt;Learning platform&lt;/strong&gt;. You have a results page with some filters.&lt;br&gt;&lt;br&gt;
So users can filter the courses to find the ones more interesting to them.&lt;/p&gt;

&lt;p&gt;Basically, making the filters sortable is a business need:&lt;br&gt;
Some specific reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A/B testing&lt;/li&gt;
&lt;li&gt;Same code, different brands, different kind of customers, and different configuration &lt;/li&gt;
&lt;li&gt;Different sorting configuration according to courses search result&lt;/li&gt;
&lt;li&gt;Highlight new filters at the top&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  The requirements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Configuration needs to be easy to understand just taking a look at it&lt;/li&gt;
&lt;li&gt;If there's no configuration in the BE, components must appear how they currently are (written in the HTML).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  The solution
&lt;/h3&gt;

&lt;p&gt;If you want to avoid reading the whole post, that's the solution:&lt;br&gt;
I used Flexbox &lt;code&gt;order&lt;/code&gt; property.&lt;br&gt;
The parent containing all the filters must be a flexbox element and flexbox direction must be column.&lt;br&gt;
You can do that using the CSS properties:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;display: flexbox;
flex-direction: column;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I get a configuration object from the backend side, containing the order of every component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sortableFilters: {
  price: 0,
  language: 2
  rating: 1,
  duration: 3,
  difficultLevel: 4
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I apply a &lt;code&gt;style.order&lt;/code&gt; in the template to every component:&lt;br&gt;
&lt;code&gt;[style.order]="sortableElements.OrderId"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And that's it. But there's a bit more to tell, if you want to keep reading.&lt;br&gt;
You can read more about Flexbox: &lt;a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/"&gt;https://css-tricks.com/snippets/css/a-guide-to-flexbox/&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  The configuration: It needs to be easy to understand
&lt;/h3&gt;

&lt;p&gt;The configuration needs to be easy to understand for a content manager that does not need to know how the frontend is done (that by the way, can be changing).&lt;br&gt;
And the configuration needs to work for a web client, but it needs to do so for any other client (Android, iOs, etc).&lt;/p&gt;

&lt;p&gt;In Flexbox order property, the bigger the number, the lower the element appears.&lt;br&gt;
Guess We have the following configuration in the backend (coming from a CMS or whatever) side:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  price: 0,
  language: 1
  rating: 2,
  duration: 3,
  difficultLevel: 4
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Price filter would appear in first place, Language filter in second place, and so on.&lt;br&gt;
I don't think it's an intuitive configuration. &lt;br&gt;
If you don't know how the front-end side is built, it seems to say: &lt;br&gt;
"More number, more priority. So it will appear closer to the top".&lt;br&gt;
So... Why the person setting up it needs to know how the Frontend is built? &lt;br&gt;
I don't think it's the way it should work.&lt;/p&gt;
&lt;h4&gt;
  
  
  I reversed the data, not the content.
&lt;/h4&gt;

&lt;p&gt;So my solution was to reverse every configuration number to its negative if it's greater than 0.&lt;br&gt;
I reversed them in the frontend side because it's done because of the style. It's not something to be done in the backend.&lt;br&gt;
In Angular, I'm doing it in the service, before the component gets the data. &lt;br&gt;
The observable of the filter order configuration will emit with the numbers already in negative.&lt;br&gt;
&lt;strong&gt;Note: In Angular, you should not manage data in components, but in services&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;public getFiltersOrderConfiguration(): Observable&amp;lt;FiltersOrderConfiguration&amp;gt; {
    // In the real world this would be a HTTP call.
    return this.demoService.filtersOrderConfigurationBehaviorSubject
      .pipe(map(this.turnFiltersOrderConfigurationIntoNegative));
  }

private turnFiltersOrderConfigurationIntoNegative(filtersOrderConfiguration: FiltersOrderConfiguration): FiltersOrderConfiguration {
    for (const filterID in filtersOrderConfiguration) {
      if (filtersOrderConfiguration[filterID] &amp;gt; DemoService.DEFAULT_FILTER_ORDER_CONFIGURATION) {
        filtersOrderConfiguration[filterID] = filtersOrderConfiguration[filterID] * -1;
      }
    }

    return filtersOrderConfiguration;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, this way, the configuration in the backend can be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  price: 4, // More important / Closer to the top
  language: 3
  rating: 2,
  duration: 1,
  difficultLevel: 0 // Not configured, indeed.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the frontend will have&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  price: -4, // More important / Closer to the top
  language: -3
  rating: -2,
  duration: -1,
  difficultLevel: 0 // Not configured.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way, the filter components will be displayed in the following order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Price&lt;/li&gt;
&lt;li&gt;Language&lt;/li&gt;
&lt;li&gt;Rating&lt;/li&gt;
&lt;li&gt;Duration&lt;/li&gt;
&lt;li&gt;Difficult&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why you turn into negative?
&lt;/h4&gt;

&lt;p&gt;So every order number will be negative if it's been set up in the backend side.&lt;br&gt;
I could avoid it to be turn into negative using &lt;code&gt;flex-direction: reverse-column;&lt;/code&gt; instead of &lt;code&gt;flex-direction: column&lt;/code&gt;.&lt;br&gt;
It would show the filters reverse to how they are written in the HTML template.&lt;br&gt;
Adding a component to the bottom of the template, would lead in a new component at the top.&lt;br&gt;
And I think that's quite weird and not intuitive for the developers maintaining the code after me.&lt;br&gt;
So that's basically why &lt;strong&gt;I turn every configuration number into negative&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I wasn't sure about this solution, but I did not find any other working for my context.&lt;br&gt;
I was trying with Angular &lt;em&gt;dynamic components&lt;/em&gt;.&lt;br&gt;
And they could have work, but they're not there for this use case.&lt;br&gt;
And every filter emits its own &lt;em&gt;output event&lt;/em&gt; , and gets its own &lt;em&gt;input properties&lt;/em&gt;, of different types.&lt;br&gt;
So using &lt;em&gt;dynamic components&lt;/em&gt; led in a mess of code impossible to maintain and close to modifications.&lt;br&gt;
Read more about Angular dynamic components here: &lt;a href="https://angular.io/guide/dynamic-component-loader"&gt;https://angular.io/guide/dynamic-component-loader&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I built a simplified example:&lt;br&gt;
Demo: &lt;a href="http://demo-angular-sort-components.s3-website.eu-west-3.amazonaws.com"&gt;http://demo-angular-sort-components.s3-website.eu-west-3.amazonaws.com&lt;/a&gt;&lt;br&gt;
GitHub repo: &lt;a href="https://github.com/jdavidhermoso/show-angular-components-sort-configuration"&gt;https://github.com/jdavidhermoso/show-angular-components-sort-configuration&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NOTE: That was my solution. If you think there's a better solution and you want to discuss it, you can ping me at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/jdavidhermoso"&gt;https://twitter.com/jdavidhermoso&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.linkedin.com/in/juan-david-hermoso-17746062/?locale=en_US"&gt;https://www.linkedin.com/in/juan-david-hermoso-17746062/?locale=en_US&lt;/a&gt;
It'd help me.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>angular</category>
      <category>sort</category>
      <category>components</category>
      <category>cms</category>
    </item>
    <item>
      <title>5 ideas to encourage/help your team to collaborate, innovate, keep learning, have fun and solve real world issues.</title>
      <dc:creator>David Hermoso</dc:creator>
      <pubDate>Sat, 06 Jun 2020 10:22:58 +0000</pubDate>
      <link>https://dev.to/jdavidhermoso/5-ideas-to-encourage-help-your-team-to-collaborate-innovate-keep-learning-have-fun-and-solve-real-world-issues-fi8</link>
      <guid>https://dev.to/jdavidhermoso/5-ideas-to-encourage-help-your-team-to-collaborate-innovate-keep-learning-have-fun-and-solve-real-world-issues-fi8</guid>
      <description>&lt;p&gt;These days I thought how can We encourage the team to collaborate more, share knowledge, improve processes &lt;br&gt;
and make your team mates make the work more &lt;strong&gt;enjoyable&lt;/strong&gt; etc.&lt;br&gt;
The culture of a company is built by the people working on it. &lt;br&gt;
Whether the teams are inclusive and diversity friendly depends on the company policies, of course, &lt;br&gt;
but at the end of the day, it depends on the people working on it.&lt;br&gt;
So Prior to the 5 ideas I'm gonna share, there are a lot you can do &lt;br&gt;
to make the team inclusive and diverse.&lt;br&gt;
And that's fair more important than any of the tips I'm gonna just share.&lt;br&gt;
Among other things, because diverse and inclusive teams build better products, are more innovative, &lt;br&gt;
and have happier members.&lt;br&gt;
So please, focus on inclusion and diversity first.&lt;/p&gt;

&lt;p&gt;There are tons of ways to &lt;strong&gt;help your team to collaborate, innovate, keep learning, and enjoy the work&lt;/strong&gt;, but I think it's important to come up with specific actions in order to make them happen.&lt;br&gt;
So these are just some ideas for you to try, improve them or adapt it to your own company and check if they work for your own specific context.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Make a demo of your PR's:
&lt;/h3&gt;

&lt;p&gt;PR's (Pull Requests) are absolutely &lt;br&gt;
 essential. There's a lot said about them, so there's no need to &lt;br&gt;
 tell more.&lt;br&gt;
 But behind the code, there are &lt;strong&gt;business needs (that is, by the &lt;br&gt;
 way, at the end of the day, why We are building software &lt;br&gt;
 solutions)&lt;/strong&gt;: New feature, bug fixes or a feature change. &lt;br&gt;
 Building a demo, deploying to a dev environment and making a &lt;br&gt;
 quick call to show how the change works to the team can help a &lt;br&gt;
 lot.&lt;br&gt;
 Benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Team members keep up to date to latests changes.&lt;/li&gt;
&lt;li&gt;Find edge cases or bugs. (Prior to send it to QA)&lt;/li&gt;
&lt;li&gt;Ensure you didn't miss something you didn't know about the 
business. Specially for big or multi-brand apps.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Present something once per week / month to the rest of the team:
&lt;/h3&gt;

&lt;p&gt;Basically, knowledge sharing. Present something to the rest of &lt;br&gt;
 the team.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Not mandatory, but scheduled in the team's calendar. 
Otherwise, it won't happen.&lt;/li&gt;
&lt;li&gt; Some ideas: A new technology, refactor ideas for the 
project, new features of the framework(s) / technology(ies) / 
language(s) your company / project is using. Or just showing a
&lt;/li&gt;
&lt;li&gt;45 min. as much to avoid making it boring&lt;/li&gt;
&lt;li&gt;Content is what really matters. Not the beauty of the slides. 
So invest preparation time in rich and clear content, not in 
fancy slides.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Ask (other) teams members which manual tasks can be automated:
&lt;/h3&gt;

&lt;p&gt;You could ask to your user support, sales, copy-writing, QA or &lt;br&gt;
 design teams members what manual (annoying) process they do &lt;br&gt;
 every day.&lt;br&gt;
 Or maybe you can find for them a tool.&lt;/p&gt;

&lt;p&gt;Benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Increase innovation in certain areas of the company&lt;/li&gt;
&lt;li&gt;Make your team members in other areas happier and more 
productive&lt;/li&gt;
&lt;li&gt;Reduce chances of errors. Manual tasks can lead to errors.&lt;/li&gt;
&lt;li&gt;The development team can learn more about how the company works and the business needs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⚠️  ⚠️  ⚠️ &lt;br&gt;
    However, be careful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maybe it's not worth to automate a 2 min task.&lt;/li&gt;
&lt;li&gt;If you build a software solution / script / whatever, some team will have to maintain it. &lt;/li&gt;
&lt;li&gt;You have to write clear and accessible documentation and 
  let the rest of the team know about it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Have a (your communication app) channel for articles/courses/talks sharing and have channels for different technologies:
&lt;/h3&gt;

&lt;p&gt;Have channel in (your team communication app) will help sharing knowledge. &lt;br&gt;
Also, having channels for different technologies can help to make it easy to find and read information.&lt;br&gt;
Like frontend and backend channels, or Java and Javascript channels, or Angular and React channels, etc.&lt;br&gt;
It depends on your company.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Encourage your team members to attend (tech) conferences, meetups, talks, etc.
&lt;/h3&gt;

&lt;p&gt;It clearly depends on everyone. Rest on weekends or after work, and take care of your family and friends it's so important. &lt;br&gt;
So respect your team members if they don't want to attend tech conferences.&lt;br&gt;
But you can encourage yout team to attend (tech/comic/ some other fun thing) conferences, meetups, events, talks in your city or even outside it. It can be a great experience. You all can learn, networking with other developers or communities, or just have fun together for one or two days.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I just tried to share some ideas based on my experience as web developer. I hope they help you in your own team and company.&lt;/p&gt;

</description>
      <category>development</category>
      <category>teams</category>
      <category>techie</category>
      <category>inclusion</category>
    </item>
  </channel>
</rss>
