<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Cesar Mostacero</title>
    <description>The latest articles on Forem by Cesar Mostacero (@cesar_mostacero).</description>
    <link>https://forem.com/cesar_mostacero</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%2F141855%2F3c0360e7-abe9-43b3-9f48-b0b44189c927.png</url>
      <title>Forem: Cesar Mostacero</title>
      <link>https://forem.com/cesar_mostacero</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/cesar_mostacero"/>
    <language>en</language>
    <item>
      <title>In BIG Data, SMALL Things Matter</title>
      <dc:creator>Cesar Mostacero</dc:creator>
      <pubDate>Tue, 02 Jan 2024 23:40:52 +0000</pubDate>
      <link>https://forem.com/cesar_mostacero/in-big-data-small-things-matter-gi7</link>
      <guid>https://forem.com/cesar_mostacero/in-big-data-small-things-matter-gi7</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the ever-accelerating world of big data, where technological advancements unfold at an unprecedented pace, it's easy to become enamored with cutting-edge solutions. However, amidst the excitement, the critical significance of meticulous planning, the dangers of over-engineering, and the enduring principles of core programming often take a back seat. This article aims to shed light on the often-overlooked aspects that can make or break a big data project — the small things.&lt;/p&gt;

&lt;h2&gt;
  
  
  Good Planning and The Imperative of Automated processes
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dw_kCGgC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ohuyni4v2y0ovexvl678.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dw_kCGgC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ohuyni4v2y0ovexvl678.jpg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the realm of big data, where processes tend to move at a slower pace compared to other development fields, quality planning is non-negotiable. The sheer volume of data not only impacts processing capabilities but also involves a complex web of cross-dependent teams, resources, and systems. Every change must undergo meticulous analysis, considering not only the happy path but all possible scenarios, including edge cases. Automation has become the backbone of this process, extending from the development lifecycle to observability and, where feasible, even to support and maintenance layers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;

&lt;p&gt;Consider a data engineering project aiming to build a robust ETL (Extract, Transform, Load) pipeline to handle large volumes of diverse data sources. In the era of big data, meticulous quality planning is paramount to ensure the reliability and efficiency of such pipelines.&lt;/p&gt;

&lt;p&gt;Now, imagine a scenario where the team relies on manual processes for data validation and testing. Each change in the pipeline triggers a manual review, involving multiple teams and extensive coordination. This process is not only time-consuming but also prone to human error, especially when dealing with intricate data transformations and dependencies.&lt;/p&gt;

&lt;p&gt;The true power of quality planning shines through when automation becomes the cornerstone of the process. By implementing automated testing at every stage of the ETL pipeline, from data ingestion to transformation and loading, the team can catch potential issues early in the development lifecycle. Automated tests simulate real-world scenarios, ensuring that the pipeline not only performs efficiently but also maintains data integrity across diverse datasets.&lt;/p&gt;

&lt;p&gt;In contrast to the manual approach, automation accelerates the development cycle, reduces the risk of errors, and enhances the overall quality of the data engineering project. The mantra becomes clear: in the realm of data engineering, where precision is paramount, automation is not just a convenience; it's a necessity for ensuring the success of complex and dynamic pipelines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Over Engineering: Technology Alignment with Business Needs
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Bbu0w5h7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yplo746dzek1fyr80zsh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Bbu0w5h7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yplo746dzek1fyr80zsh.jpg" alt="Image description" width="800" height="524"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The plethora of technologies available to solve similar big data problems presents both opportunities and challenges. The ideal scenario involves selecting a technology that aligns seamlessly with the specific business problem at hand. Technology should be a flexible tool that adapts to the business, not a constraint that dictates how the business operates. Choosing a technology based solely on trends can lead to complex implementations, turning what should be a smooth process into a development nightmare.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;

&lt;p&gt;In the labyrinth of big data technologies, choosing the right tool for the job is crucial. Let's delve into the world of data engineering, where the choice of technology can significantly impact project success. Consider a scenario where a team, enticed by the latest and most complex data processing framework, opts for a solution that promises unparalleled performance and scalability. However, the catch is that this technology comes with a steep learning curve and demands extensive customization.&lt;/p&gt;

&lt;p&gt;Despite its technical prowess, the chosen technology does not align seamlessly with the specific business problem at hand. In this case, the business requirements were relatively straightforward: process and analyze incoming data streams for real-time insights. The chosen complex framework, while technically impressive, introduced unnecessary complexities and increased the project's time-to-market.&lt;/p&gt;

&lt;p&gt;Opting for a technology solely based on trends and technical capabilities can lead to over-engineering, turning what should be a streamlined data engineering process into a cumbersome development nightmare. A more pragmatic approach would have involved selecting a technology that aligns closely with the business needs, offering the necessary features without introducing unnecessary complexities. This way, the team could have delivered a robust solution more efficiently, meeting both technical and business objectives.&lt;/p&gt;

&lt;h2&gt;
  
  
  Logic Is the Core: The Power of Unit Testing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2ethOW4w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7q1ebjbzsad1nd88lmyg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2ethOW4w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7q1ebjbzsad1nd88lmyg.jpg" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the realm of development, especially for those new to object-oriented programming (OOP), the value of unit testing is often underestimated. A fundamental principle every engineer should remember is that logic issues need to be addressed within unit tests, not in higher or shared environments. Robust unit testing not only ensures the reliability of the code but also significantly reduces the time spent on support tasks, a crucial advantage in a field where processes tend to move at a slower pace.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;

&lt;p&gt;Imagine a scenario where a critical data pipeline was not thoroughly tested before deployment. In the rush to meet tight deadlines, the team skipped comprehensive unit testing, relying solely on the assumption that the code worked as intended. The oversight went unnoticed until the system was in production, and a seemingly minor logic error caused a cascading failure. The beauty of unit testing lies in catching such errors before they reach the production environment. In this case, had the team tested the pipeline thoroughly on a local environment, they could have replicated and rectified the issue, avoiding the costly consequences of a failure in a live system.&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8Aa0cIpr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/odchaej7s4ueeumg5j23.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8Aa0cIpr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/odchaej7s4ueeumg5j23.jpg" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the vast landscape of big data projects, it's imperative not to underestimate the impact of seemingly "small" things. Quality planning, steering clear of over-engineering, and adhering to core programming principles are not mere niceties but the pillars supporting successful and sustainable big data endeavors. As we navigate the complexities of big data, let's not forget that sometimes, the smallest details make the biggest difference.&lt;/p&gt;

</description>
      <category>bigdata</category>
      <category>development</category>
      <category>community</category>
      <category>data</category>
    </item>
    <item>
      <title>Certified !== qualified?</title>
      <dc:creator>Cesar Mostacero</dc:creator>
      <pubDate>Wed, 19 Oct 2022 00:57:28 +0000</pubDate>
      <link>https://forem.com/cesar_mostacero/certified-qualified-4ipm</link>
      <guid>https://forem.com/cesar_mostacero/certified-qualified-4ipm</guid>
      <description>&lt;p&gt;Recently I had the chance to got some certifications on different technologies according the plan I designed at the beginning of the year... and combined with a discussion a saw in LinkedIn regarding if does they worth, I wanted to share my opinion about this topic.&lt;/p&gt;

&lt;p&gt;While I completely agree on &lt;code&gt;certified !== qualified&lt;/code&gt;, I personally think certification still worth but we need to have clear the real benefits we can get from there to avoid, eventually, disappointments.&lt;/p&gt;

&lt;p&gt;Below are the main items I think we should consider regarding these processes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Certifications might open a door, but they're not the complete solution
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z3GLxe4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ynxtld2n9w5v5klc074m.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z3GLxe4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ynxtld2n9w5v5klc074m.jpeg" alt="Certifications as differentiators" width="640" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are always different motives behind to make the people want to take a certification, one of the most common is while someone is looking to apply for a new job/position. &lt;/p&gt;

&lt;p&gt;Depending on the position, it might list some “nice to have” items, and certifications are usually listed on this section. However, it’s just part of the expected profile. This should be implicit and obvious, however for beginners it would be helpful to clarify this point and we can not expect that once you get certified will reduce the recruitment process. &lt;/p&gt;

&lt;p&gt;Something similar would apply for those cases that in the company is expecting to be promoted for the next role by getting a certification. There are guidelines in each company (or they should be), expected skills and level to claim for a promotion, but similarly, it’s just one feature/skill of the complete profile, so we need to have it clear.&lt;/p&gt;

&lt;p&gt;They’re a nice differentiators in this competitive world, because not all the people have them. But they are not the only bullet in the list, keep in mind that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Knowledge is the core
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jz3f0Z3X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wvh3hic5vrfc3n7v2sok.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jz3f0Z3X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wvh3hic5vrfc3n7v2sok.jpeg" alt="Rubik cube" width="639" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How many times you saw someone from the school cheating on an exam and get approved anyways? That’s one of reasons why the proctored exams exist. But even with that, we can not consider that, after getting certified someone is enough qualified for certain position.&lt;/p&gt;

&lt;p&gt;The badge you can display on LinkedIn is nice, however it just that: an institution that verifies you passed an exam.&lt;/p&gt;

&lt;p&gt;The real value behind a certification, and this is some of the times ignored or under-estimated, but it is the knowledge from the process, since the institute/company verifies the approaches, concepts and understanding about a technology, and from there either confirm your experience or learn new and valid concepts during the preparation for the exam.&lt;/p&gt;

&lt;p&gt;Again, once you get the certification, you can share that fancy badge in social media and it’s great! However, the day when you face a problem to solve regarding X technology, the badge won’t help and the time you used for the complete preparation will be considered as an investment in case you got the knowledge or a waste of time if you only studied to pass the exam.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimize your time
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WVcC4VPb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gbb8tst5caipi3zic7bb.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WVcC4VPb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gbb8tst5caipi3zic7bb.jpeg" alt="Time" width="640" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Connecting with the above point, there is something we need to consider almost in every step of our career: time.&lt;/p&gt;

&lt;p&gt;Who doesn’t want to know everything? Or in this case, get “all” (or many) certifications…&lt;/p&gt;

&lt;p&gt;The most valuable asset is always the time, and we need to use it smartly&lt;/p&gt;

&lt;p&gt;As a recommendation, plan as much as you can and take decisions based on that plan. Yeah, it can be modified during the way, new technologies, methodologies, etc. However, It’s quite important, at least, to define a career path and from there it’s going to be easier to decide if you need or not a certification (or any other process, asset, etc).&lt;/p&gt;

&lt;p&gt;You will work with different technologies through all the projects on your career, some of them will be aligned on what you want and some other doesn't.&lt;/p&gt;

&lt;p&gt;Let’s put an example: &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Suppose that you’re a mid-level software engineer and currently working in a temporary project that demands Java as main programming language and AWS as cloud provider, your plan is to become a software architect.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So, taking the current assignation and trying to take advantage of that experience that you’re currently getting, it would be better if you apply for some entry-level certifications on a given cloud, in this case AWS, rather than choose for Java-programmer certification, right?&lt;/p&gt;

&lt;p&gt;With this, I’m not saying that Java-programmer certification does not worth, but for the example context, we need to prioritize short, mid and long term impact for the invested time. It would be different if the person from the example would like to specialize in a short/mid term on Java solution and/or framework, on that case I would think the option would be the opposite.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some additional recommendations:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Take what you need and will apply in a short term - at the end if you don't apply you'll forget&lt;/li&gt;
&lt;li&gt;Consider expiration dates - not all, but some recommendations (AWS, GCP, etc) have expiration date&lt;/li&gt;
&lt;li&gt;Define a preparation plan: time and costs. At the end, evaluate if in your current context (project and personal time) will allow you to prepare well for the test&lt;/li&gt;
&lt;li&gt;Take certifications based on a career plan&lt;/li&gt;
&lt;li&gt;Play smart. Some of the certifications will list other ones as pre-requisite to take it, but some other just list them as recommended, but not blocking you to take it. GCP is one example. If you feel ready to attempt directly for a Professional level, go for it. But, if you’re just starting with GCP, choose entry-level one. Avoid unnecessary frustration.&lt;/li&gt;
&lt;li&gt;Decide by yourself. Everything is relative to the context, so listen and read all opinions, but analyze based on what you want.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These were the main items I considered regarding that discussion about if the certifications still worth… but, &lt;strong&gt;what do you think?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>career</category>
      <category>certifications</category>
    </item>
    <item>
      <title>Apache-Spark introduction for SQL developers</title>
      <dc:creator>Cesar Mostacero</dc:creator>
      <pubDate>Thu, 29 Sep 2022 00:30:32 +0000</pubDate>
      <link>https://forem.com/cesar_mostacero/apache-spark-introduction-for-sql-developers-3j9i</link>
      <guid>https://forem.com/cesar_mostacero/apache-spark-introduction-for-sql-developers-3j9i</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When I started to work in data engineering projects, my first assignation was developing ETL’s with Scala and Apache-Spark. At that point, my background was as a software engineer in roles like web developer with Javascript and a little bit of native android development using Java. &lt;/p&gt;

&lt;p&gt;Talking about the learning curve for Apache-Spark, the reality is that it was not complex due to the background: Java as strong-typed language helped with the first steps on Scala, Javascript for functional programming and SQL background for Spark transformations.&lt;/p&gt;

&lt;p&gt;I mentioned above context due to during these years, I had the chance to work as a mentor for people that wants/needs to learn Apache-Spark.&lt;/p&gt;

&lt;p&gt;From this experience I saw there are 2 common “profiles” depending on the background: people that has software engineering as a background and people working as SQL-developers (for ETL).&lt;/p&gt;

&lt;p&gt;For the people with software development experience, the learning curve is usually shorter compared with only-SQL people. This because the profile is implicitly familiar with programming languages like Python, Scala, Java (which are the ones to work with Spark), terms like immutability and paradigms like functional programming. &lt;/p&gt;

&lt;p&gt;SQL developers (not all) usually do not have above context or practical experience, therefore the learning curve is not only because of Apache Spark at all, it’s from programming languages, terms, paradigms, etc. &lt;/p&gt;

&lt;p&gt;One key on the learning process is a constant progress and avoid frustration, the last section of this article lists some recommendations to help having a smooth learning process.&lt;/p&gt;

&lt;p&gt;Let’s try to illustrate some core concepts of how Apache-Spark works, not matter the programming language and focused on SQL developers that want to start with this technology.&lt;/p&gt;

&lt;h2&gt;
  
  
  RDDs and dataframes
&lt;/h2&gt;

&lt;p&gt;These are the basic data structures that Spark uses. While the RDD is the basic (and first) data structure, the data frame is an optimized one. &lt;/p&gt;

&lt;p&gt;Let’s talk about data frames. &lt;/p&gt;

&lt;p&gt;It is an object with a tabular structure, defined by a schema that can be provided by the developer or inferred by Spark. An easy comparison for better understanding is a SQL-table, that is a collection of rows with a defined schema. &lt;/p&gt;

&lt;p&gt;So, how the data frame is “populated” with data? Well, there are multiple ways to do it, but the a real example would be if you want to read a SQL table or some files on a cloud storage using Spark. Let’s take a look into the below illustration:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UuEajdUo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kmus0cmeox9e2ixje6np.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UuEajdUo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kmus0cmeox9e2ixje6np.png" alt="Image description" width="880" height="601"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Above illustration is a representation of how this object can be created. The data is going to be read and living into the dataframe objects on the Spark session which is in memory of your cluster. &lt;/p&gt;

&lt;p&gt;The data that’s in a data frame after read, it’s just a copy of the original source, meaning that if we perform some operations in the spark-dataframe it won’t affect the real source data. Example, if we make a string-column as uppercase, they will apply only for the data frame values, but not for the SQL table that was used on the read statement.&lt;/p&gt;

&lt;h2&gt;
  
  
   Immutability
&lt;/h2&gt;

&lt;p&gt;On the previous example we mentioned a scenario to convert a string-column values into uppercase characters, let’s use same scenario to illustrate a programming concept used on objects like Dataframes and RDD’s.&lt;/p&gt;

&lt;p&gt;There are multiple ways to do it, but for this example, let’s consider below example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EZkfAuUH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ua6uemmsxml52yq1qnc0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EZkfAuUH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ua6uemmsxml52yq1qnc0.png" alt="Image description" width="880" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, there is a transformation (select statement) which is applied to the initial dataframe (df1). This function (select statement) will take 3 columns and for one of them (column 1) will generate an uppercase value for that column for each row, additional to that, the corresponding output column has an alias and for the other 2 column values there is not going to be a change applied neither on the value nor on the column name. So, the result (return value) will be a new dataframe: df2. &lt;/p&gt;

&lt;p&gt;This example represents how dataframe transformations work. &lt;/p&gt;

&lt;p&gt;This kind of functions where we manipulate the data, are not going to be executed at specific time, instead, Spark will perform some optimizations by set of transformations that can be executed together. &lt;/p&gt;

&lt;p&gt;This groups of transformations are known as Stages (also keno as set of spark-tasks). &lt;/p&gt;

&lt;p&gt;For now, what we need to keep in mind is, we can not manipulate directly the data of a dataframe, it can not be updated like a database table. But, we can create new data frames from a different one. &lt;/p&gt;

&lt;p&gt;There is no restriction to create as many data frames as we want, at the end, the restriction won’t be the number, but the memory that we consume.&lt;/p&gt;

&lt;h2&gt;
  
  
  Transformations and actions
&lt;/h2&gt;

&lt;p&gt;The previous section we talked about transformations. Now, let’s talk about actions and what are the differences between them.&lt;/p&gt;

&lt;p&gt;In spark there are 2 categories for the data frames functions: transformations and actions.&lt;/p&gt;

&lt;p&gt;While transformations are related business logic (ie. select, filter, groupBy, etc), actions are those functions which will trigger an execution for it and the previous stages (ie: show, collect, etc)&lt;/p&gt;

&lt;p&gt;There is a concept in spark known as “lazy evaluation”, that basically refers that, spark won’t execute at that time the functions (transformations) only until there is a trigger (action). With that, Spark has a pre-execution and execution steps where it can optimize the logic internally (see more of Optimizer: &lt;a href="https://data-flair.training/blogs/spark-sql-optimization/"&gt;https://data-flair.training/blogs/spark-sql-optimization/&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
   Shuffling
&lt;/h2&gt;

&lt;p&gt;One thing to remember is that Spark is intended to be executed in a cluster (it also has the option to run in your local for development purposes), so the data is going to be distributed among the nodes to take advantage of distributed processing, making the process faster.&lt;/p&gt;

&lt;p&gt;While optimization would be an advanced topic, we need to know at least, the principle of how the data is moved within the cluster: shuffling.&lt;/p&gt;

&lt;p&gt;This means, when a dataframe is created, data is going to be distributed on the workers (cluster nodes), for operations like filter or map, every worker will have the enough data to process the data to the next stage (row level). &lt;/p&gt;

&lt;p&gt;However, for operations like groupBy, the whole data should be compared to group according the stablished conditions. These data movement is known as shuffling, since we have data transferred over the network in our cluster. For a better understanding, let’s see below image&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Gd1uyJRI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jhm53ate3zqiqfmthyk1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Gd1uyJRI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jhm53ate3zqiqfmthyk1.png" alt="Image description" width="699" height="663"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From above illustration we can see that both workers have a partition of the df1, it means portion of data is living on those workers. Therefore, if we want to apply a groupBy, workers should transfer data among the cluster nodes to group the rows.&lt;/p&gt;

&lt;p&gt;Another common scenario when shuffle is applied is on the join statement. Records from both data frames needs to be compared in order to join the records. &lt;/p&gt;

&lt;p&gt;One advanced topic and common interview question is regarding a best practice to join a large data frame with a tiny one. &lt;/p&gt;

&lt;p&gt;This question has the main purpose to know how to manage shuffling in order to optimize performance. There is a feature in Spark that allows you to “send” the tiny dataframe to each of the nodes in the cluster: broadcasting. This will replace the previous action of comparing all the records among the cluster reducing the network traffic load and increasing performance. &lt;/p&gt;

&lt;p&gt;Obviously, this has the condition of the tiny dataframe fits into the worker memory (remember Spark works in memory). While this can be done manually (explicit by the programmer), the version 3 of Spark has already integrated an optimization feature (enabled/activated by default) that internally performs the broadcast-join even when it’s not explicit declared in the code.&lt;/p&gt;

&lt;h2&gt;
  
  
   Data Persistance
&lt;/h2&gt;

&lt;p&gt;All data that is load into a spark session, either dataframe or RDD, is loaded in memory and has the end of the lifecycle once the application is done. Meaning that if it’s not persisted explicitly, it won’t be available on future applications.&lt;/p&gt;

&lt;h2&gt;
  
  
   Recommendations
&lt;/h2&gt;

&lt;p&gt;If you’re beginner on Apache-spark this list is a set of recommendations that might help you on your first steps with this technology:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Learning by doing:&lt;/strong&gt; Courses, tutorials and documentation are great resources for the learning process. However, you can not be a professional soccer player by just reading the regalement or watching matches everyday, right? Same thing for programming. Practice is the key! If something is not clear enough, don’t ignore it, get more examples and practice until you get it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If possible, start with strong-typed language (preferable: Scala):&lt;/strong&gt; This might be special helpful if you don’t have much experience with programming (rather than SQL), because a strong-typed language will help you with debugging for initial errors while practicing with data transformations, plugging on IDE’s for code-snippets, code auto-complement, etc. At the end, once learned Spark core concepts, same can be applied on the rest of the languages (adapting the API restrictions for specific language).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;At the beginning, use notebooks:&lt;/strong&gt; It’s important to remove frustration from the initial learning curve, so as much as we can we need to avoid extra steps and keep focus on the goal, in this case: learn Apache Spark. By using notebooks it will allow you to go directly to the practice step, without any additional configuration and/or setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unit testing:&lt;/strong&gt; Take advantage of Spark and the possible programming languages and add unit testing for your code, try to keep it clean, follow principles like single-responsibility to ensure the quality of you pipeline.&lt;/li&gt;
&lt;li&gt;Databricks community edition: Related to the above point, Databricks community edition will provide you a pre-configured spark environment, including notebooks, storage (to create tables by loading files), etc. With few clicks you can create a Spark cluster, create tables and notebooks for practice without worry about installations, configurations, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid re-invent the wheel and keep it simple:&lt;/strong&gt; Spark, at the end, is for data processing, similar than you might have done with SQL (but cleaner and easier, ja!). Try to map the knowledge into the new technology. Example: Apache functions like filters and where are the same as SQL-where. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progressive learning:&lt;/strong&gt; Avoid go deeper than needed, at least in the beginning. Try to understand the general basics first, before dealing with advanced topics of some specific topic. Example: at some time you’ll need to configure a spark-session with integrations, advanced configs for optimization, etc. However, at the beginning it’s not relevant. It will be more important if you domain data manipulation before go to the configuration stage.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>apachespark</category>
      <category>dataengineering</category>
      <category>beginners</category>
      <category>bigdata</category>
    </item>
    <item>
      <title>Developing data-pipelines: Quality is not negotiable</title>
      <dc:creator>Cesar Mostacero</dc:creator>
      <pubDate>Wed, 21 Sep 2022 01:02:36 +0000</pubDate>
      <link>https://forem.com/cesar_mostacero/developing-data-pipelines-quality-is-not-negotiable-31a0</link>
      <guid>https://forem.com/cesar_mostacero/developing-data-pipelines-quality-is-not-negotiable-31a0</guid>
      <description>&lt;p&gt;I know, I know… this is not only applicable for data pipelines, but I wanted to elaborate this with a set specific points, some of them might be shared among different development areas, but other will be directly related to data engineering.&lt;/p&gt;

&lt;p&gt;The final delivery of a data engineering project resides not only in processing and storing some data, but also on the quality it has. At the end, data is nothing if it’s not meaningful, why should we pay for storage of something that does not generate a relevant insight?&lt;/p&gt;

&lt;p&gt;The size of data in these kind of projects represents an associated cost (more specifically if we’re working on cloud), mainly: storage and computing. So, every execution of a pipeline will cost. That’s one of the reasons we should use the resources properly, avoid unexpected charges by executing low quality code or not optimized processes. &lt;/p&gt;

&lt;p&gt;Some weeks ago I was in a conversation from where there was a great sentence: “quality is not negotiable” - And it’s totally true!&lt;/p&gt;

&lt;p&gt;And now you might think: that's obvious, no? That should be! However, there are some practice that impact it in an indirect way: planning and estimation steps.&lt;/p&gt;

&lt;p&gt;Currently, with agile methodologies, we need to give the importance to phases like design/plan and testing that some times are underestimated and are actually key parts for future processes: support and maintenance.&lt;/p&gt;

&lt;p&gt;Estimations and then, negotiation are fundamental stages for every project. You’ll need to have the soft skills to justify the estimated development time and this must cover tasks to ensure our solution has the enough quality before deploy it to production.&lt;/p&gt;

&lt;p&gt;There are two possible points in the time where you can ensure (or fix) the quality in your data: during development: the happy time…. Or during a prod fix, where, if before there was not enough time, at this point it’s even worse.&lt;/p&gt;

&lt;p&gt;While data engineering is usually referred to develop data pipelines, that’s just one part of the job and the solution is much more than just the ETL source code and we can integrate elements like orchestration services, monitoring tools and other services or componentes to handle quality in our solution, so that the final output data keeps the desired standards and expectations.&lt;/p&gt;

&lt;p&gt;Here is a list of recommendations that can help you while designing a data pipeline solution keeping the quality as priority and with the intention to reduce the post-deployment time on tasks like hot fixes, maintenance, adjustments, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explicit instead of implicit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Suppose we need to extract data from a table composed of 3 columns, but this table is not owned by our team. Then we need to load this data into a target table, with the same number and order of columns. If the initial development has read statements like “select *” it would work on the initial configuration, however your solution will depend on the source and target do not change over the time, due to it would broke the solution. In this example, if the source is not owned by your team, the chances of a change happen will increase.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--McWFsaee--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2bl6bwpc81rf6lm2qvun.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--McWFsaee--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2bl6bwpc81rf6lm2qvun.png" alt="Image description" width="880" height="652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identify dependencies and ownerships&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We use to work with different teams and stakeholders. All projects will have dependencies not only for downstream, but also upstream. Ideally, we shouldn't start coding to consume source or destination entity/service, without known the relevant information for our process. &lt;/p&gt;

&lt;p&gt;So, identify all the dependencies that the pipeline will have, internal and external. This will help you to know point-of-contact or communication/information channels to get accurate information of those entities. &lt;/p&gt;

&lt;p&gt;Example, if we’re going to consume an external API, we’ll need to consider as an external input dependency, from where we can get information like: authentication requirements, rates, limits, etc. &lt;/p&gt;

&lt;p&gt;So, you will know what are the expectations from the source to be consumed and how much data you can extract, the format and all the information around it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Avoid assumptions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Related to above example, we can not think just on an ideal scenario or happy path, consequently we need to know all the specifications from input to output in our dependencies to define and plan a solution. &lt;/p&gt;

&lt;p&gt;Illustrating this in a use case:&lt;br&gt;
We need to create an ETL to consume an API everyday based on a timestamp field (example: get all data for the previous datetime related to its execution). This ETL will be scheduled, but also, we want a backfill for the last year of data. Once this ETL was scheduled for some days we didn’t see any error, but once we ran it for the backfill, the job suddenly failed. Reason? The API has an api-call limit, and since we ran it for a considerable number of days, it reached the maximum limit and started to return error messages.&lt;/p&gt;

&lt;p&gt;Above scenario is something we can predict, right?&lt;/p&gt;

&lt;p&gt;If we have listed all conditions from our source, we can design a flow depending on what we want to achieve. There are multiple possible solutions for this use case, from an automated retry once the limit is reached based on some conditions, or performing the backfill on batches, etc. But to design it, relevant information must be documented and taken into consideration while design phase.&lt;/p&gt;

&lt;p&gt;Make sure that everything its coded is based on a real fact, instead of assumptions. This might sound an implicit point, however it’s quite often to see it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identify edge cases and define action items&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Considering the amount of data that the pipeline will process the possibilities that we faced not-expected data will increase. Errors in the data format, changes on the source names, etc.&lt;/p&gt;

&lt;p&gt;However, this is not just related to the data and catch malformed information, let’s list some of the possibles scenarios we’ll need to think:&lt;br&gt;
    - source code: nulls, data format, schemas, etc.&lt;br&gt;
    - sources: timeouts, heavy data loads, network issues, etc.&lt;br&gt;
    - transformations/logic: Empty inputs, large inputs, etc.&lt;br&gt;
    - execution: empty outputs, etc&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make the possible errors part of the solution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From scenarios like a timeout-error while reading the source or an unauthorized-access error due to temporal sessions lock, and some  of the above points as well will mean a runtime exception, and we don’t want that, right?&lt;/p&gt;

&lt;p&gt;We need to keep in mind all of those edge cases to identify all possible alternatives that our pipeline should handle. Hence, anticipate to the errors and design a flow according them will help us to ensure quality in the output data. Enabling an auto-retry, working with alerts, etc will enhance the solution to make it smart enough to take actions depending on the type of error.&lt;/p&gt;

&lt;p&gt;Start from the basics, it’s really helpful to draw to visualize and understand the problem better, before coding. Create a flow diagram will also help, do not underestimate all these resources, at the end, the code is just the final process of the development it’s kind of translating into the language the solution you already designed it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitor as much as you can&lt;/strong&gt;&lt;br&gt;
This is one of my favorite parts of the data pipelines development, where you can add integrations to get a real and accurate status of your project. &lt;/p&gt;

&lt;p&gt;Usually, data engineering projects are composed of a set of data pipelines. So, it’s not just complicated, but almost impossible to manually check and identify the status of every single item in our solution. So, it’s required to identify information that help us to know relevant insights from our project.&lt;/p&gt;

&lt;p&gt;Example, suppose we have a simple ETL, that reads from table A and writes into table B. For some reason, our team was not informed that table A is not longer updated and instead, now we should point to table C as our source. If we don’t monitor application metrics, like output rows or similar, we won’t never know that our ETL is not working as expected, I mean, it will continue read something that is not being updated, therefore it will generate empty output. This is definitely not good.&lt;/p&gt;

&lt;p&gt;While working with orchestrations services like GCP-composer or GCP-GKE, we can schedule and eventually know the final status of our pipeline. However the previous example wouldn’t be identified, producing a false positive error.&lt;/p&gt;

&lt;p&gt;By introducing monitors on meaningful metrics (like output rows, etc), we can integrate alerts that can be triggered if we produce empty outputs. Even better, we can integrate a monitor service (ie: datadog) for this data visualization, adding thresholds, warnings, alerts, etc. This is really powerful, being alerted in slack for a warning threshold limit or create a ticket on Jira in case an error, all posibles scenarios matched with the corresponding action.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9-SlsGR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbqitun7q2q7z3oprg3t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9-SlsGR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbqitun7q2q7z3oprg3t.png" alt="Image description" width="880" height="652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Be ready for a change&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Requirements might change during development, but also even after our solution is running on prod. So, developing a flexible and scalable solution will reduce a lot of time on those kind of changes. Some helpful actions for this would be:&lt;br&gt;
    - Avoid hardcoding - yeah, this is for everything!&lt;br&gt;
    - Parametrized inputs and configurations&lt;br&gt;
    - Try to abstract the logic to work in different possible ways (scheduled, adhoc, etc)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Avoid manual processes&lt;/strong&gt;&lt;br&gt;
Automation is a key, depending on the team structure you might have or not tasks like CICD or similar. If it’s part of your role activities, try as much as you can to reduce manual tasks, replace  repetitive and ad-hoc tasks by automated processes.&lt;/p&gt;

&lt;p&gt;If for some reason, you need to perform some SQL statements over an entity (table, schema, etc) in a regular basis, try to automate these processes even if they are not going to be scheduled. A parametrized script that handles the logic will reduce the chances of a human error on those kind of actions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Testing&lt;/strong&gt;&lt;br&gt;
Yes, it’s part of development scope. The time of a fix will directly depend on the time that took to identify the bug first (then other points like complexity, impact, etc). Well, we can reduce the time by adding different layers of testing: unit testing, integration testing, etc. &lt;/p&gt;

&lt;p&gt;And yes, this is one of the shared points among the different development areas. And its relevant since these layers will help us to identify the errors faster. All the logic, syntax and static issues must be handled by unit test, dependencies errors by integrations tests, etc. All of these quality filters before our code reach production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Documentation&lt;/strong&gt;&lt;br&gt;
And again, yes. This is part and a very significant one of the development process. The code is not the unique deliverable, think the deliverable as a solution. If you buy a TV, laptop, cellphone, it will have an instructive. &lt;/p&gt;

&lt;p&gt;Similarly, our solution must have a proper documentation from the design, development, change log, points of contacts, etc. All relevant information so that new team members can even have a good KT by just reading it. How this is applicable for data quality? Well, eventually we will have more people working together, so there should be a single source of truth: documentation. And even if we work alone in the project, will you remember how and why did your developed that ETL 2 years back? Sometimes we don’t even remember why we did yesterday, so better to have it documented somewhere, right? &lt;/p&gt;

&lt;p&gt;And that’s all! &lt;/p&gt;

&lt;p&gt;While there are a lot of different circumstances and cases in each and every project, these are some of the common tasks that I think can be applied to try to keep the quality in your data &lt;/p&gt;

&lt;p&gt;Hope this helps!&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>data</category>
      <category>bigdata</category>
    </item>
    <item>
      <title>Resilience: a hidden skill that makes the difference</title>
      <dc:creator>Cesar Mostacero</dc:creator>
      <pubDate>Tue, 28 Sep 2021 03:08:21 +0000</pubDate>
      <link>https://forem.com/cesar_mostacero/resilience-a-hidden-skill-that-makes-the-difference-35n</link>
      <guid>https://forem.com/cesar_mostacero/resilience-a-hidden-skill-that-makes-the-difference-35n</guid>
      <description>&lt;p&gt;&lt;code&gt;The only constant in life is the change&lt;/code&gt; - a famous quote that’s really true, more in a software development career, every day there are a ton of new things and we’re not going to have enough time to learn all of them.&lt;/p&gt;

&lt;p&gt;This is a simple post where I would like to share, why I think resilience is a key skill for most of the people, but specifically in your career.&lt;/p&gt;

&lt;p&gt;Currently, Software development is one of the careers with best compensation, but there are a lot of things behind this. One of them is the constant need to keep updated and that’s not an easy task.&lt;/p&gt;

&lt;p&gt;Every project ends, even a certification has expiration date (either explicit or implicit) and we need to turn the page and continue. We can not think in all the scenarios will be the same like the previous one or think that the same key will open all the doors.&lt;/p&gt;

&lt;p&gt;Yes, experience matter and every new learn will help us to growth. But it does not mean we'll reach the point when learn new things is not longer needed (or not at least to keep competitive).&lt;/p&gt;

&lt;p&gt;We can not control each and every item around of us, in our career is the same. Not only in huge scale (technology trends, new programming languages, etc), but mainly in our short scope: our projects, clients, change requirements, etc.&lt;/p&gt;

&lt;p&gt;Even when we’re experts on some specific technology we're not exempted of a struggle situation.&lt;/p&gt;

&lt;p&gt;We don’t know exactly what we’re going to face in our next project or in the next company and additionally the fact we can't know everything technically.&lt;/p&gt;

&lt;p&gt;But we can “train” ourselves for those situations: learn and adapt.&lt;/p&gt;

&lt;p&gt;One of the best activities, at least from my point of view, is: problem solving. &lt;/p&gt;

&lt;p&gt;The importance of problem solving or competitive programming is not only the fact of send a code and see a green button with the title of “resolved”.The real important is to understand and learn about the process of solving it. &lt;/p&gt;

&lt;p&gt;Most of the times will be new challenges and that’s the exact situation we need to face. How to deal with new things and how to solve it. How to manage the time, find alternatives or possible solutions, face the anxiety of a hard challenge and handle the pressure.&lt;/p&gt;

&lt;p&gt;It’s not only about learn algorithms, it's to train ourselves to experience (at a minor scale) unknown challenges.&lt;/p&gt;

&lt;p&gt;Another good practice is learn a new language, not with the target to be an expert, but with the goal to improve our learning process to make it faster.&lt;/p&gt;

&lt;p&gt;Yes, there are a lot of unknowns on the future where we don’t know which technology, programming language or tool we’re going to use, but what we can “control” is how easy will be for us learn those new things and it's always better to be ready.&lt;/p&gt;

</description>
      <category>career</category>
      <category>growth</category>
    </item>
    <item>
      <title>Why problem solving must be the strongest skill for developers?</title>
      <dc:creator>Cesar Mostacero</dc:creator>
      <pubDate>Mon, 04 Mar 2019 01:50:51 +0000</pubDate>
      <link>https://forem.com/cesar_mostacero/why-problem-solving-must-be-the-strongest-skill-for-developers-582a</link>
      <guid>https://forem.com/cesar_mostacero/why-problem-solving-must-be-the-strongest-skill-for-developers-582a</guid>
      <description>&lt;p&gt;Problem solving is in my opinion, the best asset in a developer, the ability to not only code, but also design solutions gives a differentiating element among the developer population.&lt;/p&gt;

&lt;p&gt;Be proficient in a framework, an specific programming language or technology, matters, that is really important. But problem solving should be the complement of this knowledge.&lt;/p&gt;

&lt;p&gt;Solutions should be independent of the language. Depending on the programming language you might need to re-write an algorithm or instead use an already built function with the same behavior. But the main knowledge should be in how we can design an optimal solution for every problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E-D5cPnk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ae3ccsmmfrmnj2bycr5u.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E-D5cPnk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ae3ccsmmfrmnj2bycr5u.jpeg" alt="Problem Solving... the best skill of a developer."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The brain is a muscle and a muscle should be train&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If a soccer player pretend to have a good performance during the weekend match, he should train during the week in order to be physically and mentally ready for the match. Same case for developers.&lt;/p&gt;

&lt;p&gt;We can not always only search on internet to find the solution of a given problem. Developers should be able to: identify, design a solution and solve those kind of problems, then technically you can have resources online or even with your team, but the ability to create a solution should be in every developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is it really needed?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Well, from my experience, I have been only in one technical interview where I was asked to code and solve 3 problems during the session. So we can say that, to be hired, it will depend on the interviewers; but in the real work, in daily basis developers face logical problems, so that is better to be ready. Then, my opinion and answer to the question is: yes, definitely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A well defined process&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not all the problems are similar, but for all of them we can split the process in 3 basic steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Identify the problem: We can not fix/solve something that we don't know. First step must be always understand the problem, be able to describe it by yourself. A good exercise is draw it on paper, try to visualize by your own, how the code will look, identify the inputs/outputs/rules/etc. that the problem involves. Then, try to describe it, if you are working with someone else, try to explain the problem, if he/she is able to understand it, you might have the enough knowledge and understanding regarding the problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Design multiple solutions: Not regarding code itself, more about pseudo code, algorithms. Design only one solution and try to make it work for the issue could be dangerous if the nature of the algorithm/approach that we implement is not the ideal for that specific problem. Here is the importance of before to code, think... and think well.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose and implement the optimal solution: Well, this is the last step (ideally) where we have few options of solutions and we need "only" choose one and implement. What is the importance to choose the ideal solution? Two words: code once. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Code should be always the last step of problem solving, after identify the issue, think and design solutions, finally we came to code. &lt;/p&gt;

&lt;p&gt;Then, if code is the final step, testing is not needed? In my opinion, the very first "testing stage" is during the second step, where we design the solution, but every stage must be tested, avoiding assumptions. &lt;/p&gt;

&lt;p&gt;Let's say that we want to fix a ranking function for students based on scores and some other rules. While we start to design the solution (mostly on paper), all the possibles scenarios should be considered, scores, rules, exceptions to the rules, data types, error handling, data size, etc. And not only sorting funtions.&lt;/p&gt;

&lt;p&gt;Sometimes we find temporal solutions where we know that for some specific (valid) scenario, our code will fail, but if we try to cover it too, the code could be more complex. That's the real importance of this final step, be consent that all scenarios might happen on production (even the ones that you don't imagine), then, if you already know that something could break your code, don't choose that solution, invest more time in second step, design an optimal solution and only after that, code it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time is the most valuable resource for a developer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3QAuXGhU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/f3ilehcoxrp6rz0pueab.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3QAuXGhU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/f3ilehcoxrp6rz0pueab.jpeg" alt="Thinks twice (or more), code once."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Usually, as developers we don't have enough time and we try to code it faster. The truth also is that, if you code something that is not good enough you will need to invest (more) time when the "fix" come back after sometime with a new bug.&lt;br&gt;
As one of the best programming quotes mentions: Think twice (or even more), code once.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practice as much as you can&lt;/strong&gt;&lt;br&gt;
Maybe in the resume wont be as valuable as the master in some framework, but believe me, during working it is really helpful. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How can I getting started?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In order to improve this skill, there are many sites (Online Programming Judges) that provide a set of problems for all the levels, depending on the site you will have the chance to work with different programming language to focus only on solve the problems and not about learn a new specific language.&lt;br&gt;
These are the ones that I used to visit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.hackerrank.com/"&gt;https://www.hackerrank.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coj.uci.cu/index.xhtml"&gt;http://coj.uci.cu/index.xhtml&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Start with the basics, all of us started with A+B before to come with data structures, string process, encryption, etc, avoid frustration and do strong progress, no matter if it is slow when it was learned well.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is my first post in dev.to, I hope you had liked it...&lt;br&gt;
Happy coding!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>problemsolving</category>
      <category>career</category>
      <category>learning</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
