<?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: Ricardo Sánchez 👨🏽‍💻 ☕</title>
    <description>The latest articles on DEV Community by Ricardo Sánchez 👨🏽‍💻 ☕ (@ricardodsanchez).</description>
    <link>https://dev.to/ricardodsanchez</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%2F129969%2F8bc54bc3-b1a6-47eb-a952-f943b7e53273.jpg</url>
      <title>DEV Community: Ricardo Sánchez 👨🏽‍💻 ☕</title>
      <link>https://dev.to/ricardodsanchez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ricardodsanchez"/>
    <language>en</language>
    <item>
      <title>Don't forget about character casing when comparing strings</title>
      <dc:creator>Ricardo Sánchez 👨🏽‍💻 ☕</dc:creator>
      <pubDate>Wed, 11 Aug 2021 23:27:01 +0000</pubDate>
      <link>https://dev.to/ricardodsanchez/don-t-forget-about-character-casing-when-comparing-strings-5010</link>
      <guid>https://dev.to/ricardodsanchez/don-t-forget-about-character-casing-when-comparing-strings-5010</guid>
      <description>&lt;p&gt;There are many issues I've experienced during the many, many years I've worked as a software developer. But one of the most recurring issues is, without a doubt, the mismatching of words due to character casing.&lt;/p&gt;

&lt;p&gt;There are solutions to the character casing mismatch problem. For example, you can make your strings all lower case or upper case before comparing them. There are also many programming languages that have features to help with string comparisons.&lt;/p&gt;

&lt;p&gt;The issue is no longer the lack of solutions to avoid this problem. The problem is that these solutions require that you, the developer, be proactive by being alert and aware of case sensitivity when making string comparisons. For example, in C#, you have the &lt;a href="https://docs.microsoft.com/en-us/dotnet/api/system.stringcomparer" rel="noreferrer noopener"&gt;StringComparer&lt;/a&gt; class, which includes properties like StringComparer.OrdinalIgnoreCase to help you ignore the character's casing when comparing strings.&lt;/p&gt;

&lt;p&gt;As a developer, you have to be alert and know when to ignore character casing. While there are many simple ways and tools built into programming languages, sometimes knowing when to do this might not be obvious.&lt;/p&gt;

&lt;p&gt;For example, if you call GroupBy in C# and select the value you want your list to be grouped by, it will consider values such as "&lt;em&gt;Abc&lt;/em&gt;" and "&lt;em&gt;ABC&lt;/em&gt;" as unique, which might not be what you want to do.&lt;/p&gt;

&lt;p&gt;In most cases, if you group a list of items by a specific string value, your intention is probably to treat the same values "&lt;em&gt;Abc&lt;/em&gt;" and "&lt;em&gt;ABC&lt;/em&gt;" as the same. Therefore, you'll want to ignore the casing as the values are the same in this context.&lt;/p&gt;

&lt;p&gt;Issues like the one with GroupBy in C# can go unnoticed until it causes problems. For example, I ran into this issue and didn't realize the mistake until I tried to add the values of that grouped list to a dictionary and failed. The dictionary attempted to use the values "&lt;em&gt;Abc&lt;/em&gt;" and "&lt;em&gt;ABC&lt;/em&gt;" as the dictionary key, but it failed since these aren't unique.&lt;/p&gt;

&lt;p&gt;So what can you do about this? Code defensively. Every time you compare strings, consider character casing sensitivity and avoid it easily by converting all your strings to upper case or lower case before comparing. Second, be aware of the use cases where you are calling a built-in function such as GroupBy or ToDictionary as functions like this might be case-sensitive within your programming language.&lt;/p&gt;

&lt;p&gt;With the programming language C#, you can use overloads that explicitly specify the string comparison rules for string comparisons. It works in this language by calling a method overload that has a parameter of type StringComparison.&lt;/p&gt;

&lt;p&gt;In the example below, I'll be using StringComparison.OrdinalIgnoreCase for comparisons for culture-agnostic string matching. The example shows you how not ignoring case sensitivity might give you unexpected results.&lt;/p&gt;

&lt;p&gt;Examples in C#&lt;/p&gt;

&lt;p&gt;Let's declare a list of books with author names written using different casing&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var books = new List&amp;lt;Book&amp;gt;()&lt;br&gt;
{&lt;br&gt;
new Book { Name = "Programa en donde sea", Author = "Ricardo" },&lt;br&gt;
new Book { Name = "Empieza a programar", Author = "ricardo" },&lt;br&gt;
new Book { Name = "Xyz", Author = "Joe" },&lt;br&gt;
new Book { Name = "Despues de la programacion", Author = "RICARDO" },&lt;br&gt;
new Book { Name = "Blah", Author = "Foo" }&lt;br&gt;
};&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Let's group the list of books by Author, but since we are not doing anything to ignore case sensitivity, the result is not what's expected - It returns five records instead of three as it treats all variations of the name &lt;em&gt;Ricardo&lt;/em&gt; as unique values.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var notAUniqueListOfBooks = books.GroupBy(b =&amp;gt; b.Author);&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Now let's group the same list of books by author, but this time let's add a parameter to make the string comparison case insensitive. The result is only three records, that's because it treats all the variations of the Author name &lt;em&gt;Ricardo&lt;/em&gt; as the same value.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var aUniqueListOfBooks = books.GroupBy(b =&amp;gt; b.Author, StringComparer.OrdinalIgnoreCase);&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Let's now create a dictionary from the list of books. This dictionary will use the Author value as the key, and both the book's name and author as the value. The result is five items in the dictionary, again, because it treats the each instance of the author name &lt;em&gt;Ricardo&lt;/em&gt; as a unique value due to the difference in casing.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var notAUniqueBookDictionary = books.ToDictionary(b =&amp;gt; b.Author, b =&amp;gt; b);&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Finally, we'll try to create a dictionary following the same attributes above, but this time, we'll pass the parameter StringComparer.OrdinalIgnoreCase to make sure the comparison is case insensitive.&lt;/p&gt;

&lt;p&gt;The result if this last one is an error with the following message:&lt;/p&gt;

&lt;p&gt;"An item with the same key has already been added. Key: ricardo"&lt;/p&gt;

&lt;p&gt;This is because since we are ignoring the casing in Author, we cannot create a dictionary as the key values are required to be unique and by ignoring the case of the different variations of the value &lt;em&gt;Ricardo&lt;/em&gt;, these are no longer unique. They all end up being the same exact value.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var aUniqueBookDictionary = books.ToDictionary(b =&amp;gt; b.Author, b =&amp;gt; b, StringComparer.OrdinalIgnoreCase);&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Finally, using the examples above, if you wanted to group by Author, and then create a list of all of their books including the name and author values then you could try using ToLookup, and pass the StringComparer parameter to make sure the string comparison in case insensitive.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var aUniqueLookup = books.ToLookup(b =&amp;gt; b.Author, b =&amp;gt; b, StringComparer.OrdinalIgnoreCase);&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;The above will give you a dictionary where the key is the Author name and the value is a list of books including name and author. Also, by passing the StringComparer.OrdinalIgnoreCase parameter, we are making sure that the result is a unique list of values.&lt;/p&gt;

&lt;p&gt;This the result of our book list when converted into a Lookup object in C#. There are three keys, all unique, and under each key we have a list of books that corresponds to the book's author representing the Key value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NrcnslsD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ricardodsanchezcom.files.wordpress.com/2021/08/screen-shot-2021-08-09-at-7.18.25-pm.png%3Fw%3D686" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NrcnslsD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ricardodsanchezcom.files.wordpress.com/2021/08/screen-shot-2021-08-09-at-7.18.25-pm.png%3Fw%3D686" alt="An image showing results from a Dictionary in C#"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope this is useful, the code I used to test the examples above is all &lt;a href="https://github.com/ricardodsanchez/CSharpExamples" rel="noreferrer noopener"&gt;available here&lt;/a&gt; if you want to play with it and explore changing the values, parameters, etc. &lt;/p&gt;

&lt;p&gt;Cheers and happy coding!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This post was originally published here: &lt;a href="https://rcrdo.com/2021/08/09/dont-forget-about-character-casing-when-comparing-strings/"&gt;https://rcrdo.com/2021/08/09/dont-forget-about-character-casing-when-comparing-strings/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>csharp</category>
      <category>strings</category>
      <category>casing</category>
    </item>
    <item>
      <title>Enabling software engineering teams for success.</title>
      <dc:creator>Ricardo Sánchez 👨🏽‍💻 ☕</dc:creator>
      <pubDate>Tue, 26 May 2020 15:45:05 +0000</pubDate>
      <link>https://dev.to/ricardodsanchez/enabling-software-engineering-teams-for-success-1em5</link>
      <guid>https://dev.to/ricardodsanchez/enabling-software-engineering-teams-for-success-1em5</guid>
      <description>&lt;p&gt;Software development is hard, and it isn’t always the programming language or the framework you use, it’s the people who work on it.&lt;/p&gt;

&lt;p&gt;People are an essential part of a team; everything can be easily changed and fixed, but to achieve effective communication and a great culture, you need to make sure people work well together. In my software development career of over 20 years, the critical difference between successful software projects and failed ones has been the way engineering teams are created and how they are allowed to function overtime.&lt;/p&gt;

&lt;p&gt;Successful software projects are the result of great teams, and people in these teams always have a history of working together for some time. When people know each other, they understand each other’s weaknesses and strengths. So it’s easier to balance the work, the responsibilities, and the expectations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep people together
&lt;/h2&gt;

&lt;p&gt;When people in a team know each other well, the communication flows smoothly, and it’s often more sincere and competent than when people don’t know each other well. Communication is vital, it’s what makes a difference between successful and productive teams vs. teams who are not.&lt;/p&gt;

&lt;p&gt;One of the reasons I believe people who have worked together for a while are more productive is because they are more honest about their mistakes and deficiencies. As humans, we tend to fake our abilities when we meet new people and are often afraid of showing or openly communicating with others about our shortcomings and mistakes. Time is the cure for all of this; just let people work together, allow them to reconcile their differences, and after a while, you’ll have a team capable of doing their work effectively and be very productive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Company is growing, and employee count is increasing, now what?
&lt;/h2&gt;

&lt;p&gt;Teams in large corporations often suffer from constant changes due to company growth and a steady increase in employee count. A common reaction to this is to split engineering teams and create new ones, with the idea that placing senior employees in separate teams will help support and grow new teams often filled with new hires.&lt;/p&gt;

&lt;p&gt;While this idea isn’t bad, it’s also not optimal for the software development process, productivity, and, most importantly, to employees and company culture. By doing this, you are essentially taking a well-functioning team filled with people who have spent months or years adjusting their personalities and experience to maximize their productivity and communication, to then split them up and then start from scratch. Having people work with friends is something that will keep them happy and thus be more productive and resilient. What’s better than that?&lt;/p&gt;

&lt;h2&gt;
  
  
  What about new employees? What about new teams?
&lt;/h2&gt;

&lt;p&gt;When onboarding new software engineers, they should temporarily join experienced teams to get up to speed and acquire domain knowledge. After that, these new software engineers should be placed with a new cohort of employees to be the beginning of a long-lasting software development team.&lt;/p&gt;

&lt;p&gt;Having an onboarding process like the one I described above can help minimize disruption on existing teams and increase the success rate for new employees, new teams, and, subsequently, the entire organization.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about people who want to join other teams, or be in a new position?
&lt;/h2&gt;

&lt;p&gt;Keeping people together in a team is all about keeping them happy and comfortable so they can do their best work. Keeping them together does not mean that you should force people to stay in a team against their wishes or ignore their desire to move on to a new position or team.&lt;/p&gt;

&lt;p&gt;Any employee should have the freedom to move to another team or apply for a new position.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about new projects or products? Who’s going to work on them?
&lt;/h2&gt;

&lt;p&gt;You want teams with people who work well together, people who already know each other and can take advantage of each other’s skills and experience. Teams with people who have worked together for some time can communicate better. People in these teams know how to complement each other’s skills and experience and thus can produce better work.&lt;/p&gt;

&lt;p&gt;If you try to build a new product or work on any other challenging software project, doing so with a newly formed team will cause frustration, delays, and it’ll be more costly, possibly failing.&lt;/p&gt;

&lt;p&gt;You can achieve a higher success rate by having your experienced teams with people who have worked together for a while, take on the new challenging projects, and develop new products. These experienced teams can hand over these projects to the less skilled teams created with newer cohorts.&lt;/p&gt;

&lt;p&gt;Allowing teams to grow together will increase the speed, the quality, and the success rate of their projects., it will also keep employees in both existing and new teams happy and interested due to the variety of projects and the bonding formed with the people who are part of their team.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do new software engineers acquire domain knowledge?
&lt;/h2&gt;

&lt;p&gt;You can have the same people work in the same team for as long as they desire, they can work on different projects and challenges, but it’s a good idea to keep these teams working on projects within the same business unit. Enable people in teams to gain experience and domain knowledge by working on the same type of products within the same or similar business unit, but not the same product.&lt;/p&gt;

&lt;h2&gt;
  
  
  The ultimate goal
&lt;/h2&gt;

&lt;p&gt;The ultimate goal is to have people in teams who can excel at the following skills to increase their chance of success:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open, honest, and fluid communication&lt;/li&gt;
&lt;li&gt;Common goals&lt;/li&gt;
&lt;li&gt;Clear roles and responsibilities&lt;/li&gt;
&lt;li&gt;Independence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These things can be achieved by any team, but it takes time and effort for people in a new team to get to know each other to accomplish this. People in teams who have worked together for many months or years can achieve all of the above a lot easier; these are all skills learned by working with the same people over time. Every time a team is created, especially when you split an existing team to create a new team, consider all of the above before you proceed.&lt;/p&gt;

&lt;p&gt;People are what make companies successful, and for people to accomplish this, they need to learn to work well together, and this takes time. Think of people first, assign projects to teams, and not people to teams to work on projects.&lt;/p&gt;

&lt;p&gt;Do you have any other recommendations, suggestions, or feedback? please leave it below in the comments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Book recommendations
&lt;/h2&gt;

&lt;p&gt;If you want to read detailed and useful information about the topic of software engineering teams, here are two books I recommend:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/2ZaosoL"&gt;Peopleware by Tom DeMarco and Timothy Lister&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3cJJVsE"&gt;Managing the Unmanageable by Mickey W Mantle&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheers.&lt;/p&gt;

&lt;p&gt;Originally posted &lt;a href="https://ricardodsanchez.com/2020/05/15/enable-software-engineering-teams-for-success/"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>engineering</category>
      <category>teams</category>
    </item>
    <item>
      <title>A note about impostor syndrome</title>
      <dc:creator>Ricardo Sánchez 👨🏽‍💻 ☕</dc:creator>
      <pubDate>Thu, 28 Feb 2019 22:44:43 +0000</pubDate>
      <link>https://dev.to/ricardodsanchez/a-note-about-impostor-syndrome-42a6</link>
      <guid>https://dev.to/ricardodsanchez/a-note-about-impostor-syndrome-42a6</guid>
      <description>&lt;p&gt;Impostor syndrome is when a person doubts their accomplishments, feels that they don’t deserve it, or think that their achievements (a promotion, a raise, etc.) are the result of luck. The impostor syndrome can affect anyone, especially women and minorities who fear they owe their accomplishments to affirmative action.&lt;/p&gt;

&lt;p&gt;What if we do the following when the impostor syndrome surround us?&lt;/p&gt;

&lt;p&gt;What if we pretended we didn’t feel it?&lt;/p&gt;

&lt;p&gt;What if we acted as though we were more confident and more competent?&lt;/p&gt;

&lt;p&gt;What if we showed appreciation for what we’ve accomplished and behaved as we thoroughly deserved it?&lt;/p&gt;

&lt;p&gt;What if we told our friends and family how happy we are about our accomplishments and how the result was expected due to all of our hard work and persistence?&lt;/p&gt;

&lt;p&gt;It takes a lot of work to do this; it takes a lot of effort, more so than any of us can cope with.&lt;/p&gt;

&lt;p&gt;But what if we did it every time the impostor syndrome shows up?&lt;/p&gt;

&lt;p&gt;It’s possible that after doing the above for a while and acting as if we deserve our accomplishments, perhaps we would teach ourselves to take what we deserve and see the outcome we have always hoped for.&lt;/p&gt;

&lt;p&gt;Originally posted here: &lt;a href="https://ricardodsanchez.com/2019/02/10/a-note-about-impostor-syndrome/"&gt;https://ricardodsanchez.com/2019/02/10/a-note-about-impostor-syndrome/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>impostorsyndrome</category>
      <category>impostersyndrome</category>
      <category>programminglife</category>
      <category>devlife</category>
    </item>
    <item>
      <title>Are there any rules or suggestions about posting content that has already been posted in a personal blog?</title>
      <dc:creator>Ricardo Sánchez 👨🏽‍💻 ☕</dc:creator>
      <pubDate>Fri, 18 Jan 2019 18:41:54 +0000</pubDate>
      <link>https://dev.to/ricardodsanchez/are-there-any-rules-or-suggestions-about-posting-content-that-has-already-been-posted-in-a-personal-blog-472a</link>
      <guid>https://dev.to/ricardodsanchez/are-there-any-rules-or-suggestions-about-posting-content-that-has-already-been-posted-in-a-personal-blog-472a</guid>
      <description>

</description>
      <category>discuss</category>
    </item>
  </channel>
</rss>
