<?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: Ahmad Seder</title>
    <description>The latest articles on DEV Community by Ahmad Seder (@aseder).</description>
    <link>https://dev.to/aseder</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%2F69036%2Fc420db12-4ca5-4e81-afae-ae5d5297663f.jpeg</url>
      <title>DEV Community: Ahmad Seder</title>
      <link>https://dev.to/aseder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aseder"/>
    <language>en</language>
    <item>
      <title>Updating Production data; Script checklist</title>
      <dc:creator>Ahmad Seder</dc:creator>
      <pubDate>Thu, 15 Apr 2021 03:29:25 +0000</pubDate>
      <link>https://dev.to/aseder/updating-production-data-script-checklist-50jn</link>
      <guid>https://dev.to/aseder/updating-production-data-script-checklist-50jn</guid>
      <description>&lt;p&gt;Bugs are inevitable if you write code bugs will come; We can't ensure 100% bug-free software; that's why we have QA cycles and steps before deploying to production. The nastiest bugs are the ones that need data altering after fixing; For example, you have a point of sale system, and a wrong tax calculation happened and stored in your DB, then you need to update the data after fixing the bug. This tax bug might be a simple one, but imagine one with workflows, and the data object needs to go through different stages before it's done. &lt;br&gt;
In this article, we will talk about a checklist that might help when such cases happen.&lt;br&gt;
When you have such type of bugs, first of all, you need to assist it by answering the following question: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is it blocking the customer?&lt;/li&gt;
&lt;li&gt;Is it reproducible? &lt;/li&gt;
&lt;li&gt;Is the fix determined? &lt;/li&gt;
&lt;li&gt;Is the damage known? &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your primary focus should be unblocking the customer, even if that means you go and fix the data manually. Then you can reproduce the issue and stop it - this might happen before fixing it - the fix might be as simple as try-catch and log the error, now you should figure out the damage, work on a real fix and write a script to alter the data. &lt;/p&gt;

&lt;h2&gt;
  
  
  Script Checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ensure you know what you will change&lt;/strong&gt;, get the affected data, and
print some logs; Put the data and the results somewhere and
preferably a file system, then email it.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make sure it is reversible&lt;/strong&gt;; yes, your code effect must be reversible if something went south.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Take a copy of the data&lt;/strong&gt;, if possible, before altering it.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ensure that the code you wrote is working&lt;/strong&gt;, get help from some reviewers, run it in a different environment if possible.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calculate the estimated time for your script&lt;/strong&gt;, and this is crucial for all parties (Engineering, Support, and the customers )&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Have proper logs&lt;/strong&gt;, for example( &lt;code&gt;[ScriptName][PRE]I am changing the Product with ID 3, from value X, to value Y ),  [ScriptName][POST][Success]Changing the Product with ID 3, from value X, to value Y ),  [ScriptName][POST][Failure]Changing the Product with ID 3, from value X, to value Y, due to REASON and TRACE&lt;/code&gt; ).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Have a progress indicator&lt;/strong&gt;, such as  &lt;code&gt;[ScriptName][Progress] 10% 9/100 are done successfully, 1/100 failed Running for 3 minutes and 9 seconds ETA is 30 Minutes&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Have a kill switch&lt;/strong&gt;. You might add a simple boolean in your DB and read it before each iteration. In software, nothing guaranteed &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Email the results once its done&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make the code very flexible&lt;/strong&gt; so you can run it only on a small set of data as a start&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make sure the audit log is clean and clear&lt;/strong&gt;. You don't want to confuse your customers with unfamiliar names on the audit log.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure the script accessor&lt;/strong&gt;. If you run it over HTTP or other, you must secure it, avoid hacking, and, most importantly, someone running it by mistake. Use an encoder for the endpoints and simple passwords such as &lt;code&gt;"IKnowWhatIAmRunning,TheTaxUpdateScript",&lt;/code&gt; or add expiry date on the code.&lt;/li&gt;
&lt;li&gt;The script code is a code, make it reusable and leave it well documented. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At some point, you might need to make your script framework or just a nice Abstract Class and implement the logic of the script. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
The software will have bugs, and hopefully, they are the friendly type. In case you needed something to alter the data, make sure it is reversible, keep it visible to everyone in terms of updates, and make sure it is secure and not easy to run. &lt;/p&gt;

&lt;p&gt;I hope you don't ever need to do this, but if you do, I hope it helps.&lt;br&gt;
What other points can we add to this list?&lt;/p&gt;

</description>
      <category>bugs</category>
      <category>devops</category>
      <category>software</category>
      <category>qa</category>
    </item>
    <item>
      <title>[Discussion] Challenges in Frontend for SaaS Apps. </title>
      <dc:creator>Ahmad Seder</dc:creator>
      <pubDate>Wed, 10 Mar 2021 22:59:19 +0000</pubDate>
      <link>https://dev.to/aseder/discussion-challenges-in-frontend-for-saas-apps-3270</link>
      <guid>https://dev.to/aseder/discussion-challenges-in-frontend-for-saas-apps-3270</guid>
      <description>&lt;p&gt;Dealing with SaaS apps requires some specific considerations on the frontend. Some might be related to the tools, architecture, or libraries on the whole FE stack. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What challenges did you face?&lt;/li&gt;
&lt;li&gt;How you fixed those challenges?&lt;/li&gt;
&lt;li&gt;Which area do you think is underdeveloped?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I would love to share and expand my experience in this field as a series "&lt;strong&gt;Frontend for SaaS Apps Series&lt;/strong&gt;"   and your points will help me define the right scope and starting point.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>frontend</category>
      <category>javascript</category>
      <category>saas</category>
    </item>
    <item>
      <title>Keeping up with the "constant catching up" in Frontend engineering</title>
      <dc:creator>Ahmad Seder</dc:creator>
      <pubDate>Sun, 06 Sep 2020 11:38:55 +0000</pubDate>
      <link>https://dev.to/aseder/keeping-up-with-the-constant-catching-up-in-frontend-engineering-376o</link>
      <guid>https://dev.to/aseder/keeping-up-with-the-constant-catching-up-in-frontend-engineering-376o</guid>
      <description>&lt;p&gt;The frontend engineers face a challenge "&lt;strong&gt;Constant catching up&lt;/strong&gt;" there almost every day a new thing to learn or a new framework to check, and that needs a lot of energy and a long breath to do.&lt;/p&gt;

&lt;p&gt;Furthermore, frontend apps are getting more complex, and the use cases are going beyond building a website or an app. We start seeing architectures and solutions to simplify the technology we learned in a few weeks, and those solutions need a few weeks to learn.&lt;/p&gt;

&lt;p&gt;In this article, I will try to focus on &lt;strong&gt;the frontend constants&lt;/strong&gt; that each of us should know to overcome the main challenge of the frontend engineering -"&lt;strong&gt;Constant catching up&lt;/strong&gt; "- by abstracting the frontend frameworks/libraries.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the constants in frontend engineering?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Everything should run in a browser.&lt;/li&gt;
&lt;li&gt;  We have to communicate with servers to load data, save data, or load assets.&lt;/li&gt;
&lt;li&gt;  Users have to interact with our apps.&lt;/li&gt;
&lt;li&gt;  We, as engineers, have to write code to make the above happen.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The entire history of software engineering is that of the rise in&lt;br&gt;
levels of abstraction. &lt;strong&gt;Grady Booch&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Everything should run in a browser.
&lt;/h3&gt;

&lt;p&gt;This fact should be a relief for all of us, because if we understood how browsers work, then we have come a long way of establishing our career as frontend engineers based on its core.&lt;/p&gt;

&lt;p&gt;Two main things you need to focus on:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; DOM Manipulation&lt;/li&gt;
&lt;li&gt; Event Loop&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;DOM manipulation&lt;/strong&gt; is crucial, and you need to understand how it works and what it does, and what might go south. Frameworks leverage DOM in different ways, but still, they are using the same APIs.&lt;/p&gt;

&lt;p&gt;When looking at any FE Framework, please look at how they deal with DOM manipulation and how they deal with the fact that DOM operations are performance expensive.&lt;/p&gt;

&lt;p&gt;For example, React deals with that with the Virtual DOM to optimize the rendering process.&lt;/p&gt;

&lt;p&gt;Here is a &lt;a href="https://gist.github.com/paulirish/5d52fb081b3570c81e3a"&gt;gist&lt;/a&gt; from Paul Irish, listing the most expensive methods and properties that make the browser reflow - the process of synchronously calculate the style and layout, and ask the browser to repaint the affected elements -.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Event Loop,&lt;/strong&gt; it's known that each tab has a single thread, but still we write async code all the time with JS on the browser; how is that possible?&lt;/p&gt;

&lt;p&gt;Event loop is the answer. Wikipedia defines it as "In computer science, the event loop is a programming construct or design pattern that waits for and dispatches events or messages in a program. The event loop works by making a request to some internal or external "event provider", then calls the relevant event handler."&lt;/p&gt;

&lt;p&gt;The event loop interacts with web APIs such as ( DOM, XMLHttpRequest, and more ). We have a task queue, which has all the tasks to be run, including your callbacks, and we have the call stack something being processed and the event loop, which takes from the queue to the call stack when the call stack is empty. Call stack adds to the queue ( Callbacks ) and interacts with the web APIs.&lt;/p&gt;

&lt;p&gt;Check this excellent talk by Philip Roberts, &lt;a href="https://www.youtube.com/watch?v=8aGhZQkoFbQ"&gt;What the heck is the event loop anyway? | Philip Roberts | JSConf EU&lt;/a&gt; also &lt;a href="http://latentflip.com/loupe/"&gt;Loupe&lt;/a&gt; that visualizes the event loop by Philip as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  Client-server communication
&lt;/h3&gt;

&lt;p&gt;Our app runs in the browser, and it needs to load assets, load data, and save data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loading Assets&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How the browser load assets will affect the performance, and the user experience is one reason we have bundlers and different HTML attributes of prefetching and lazy loading.&lt;/p&gt;

&lt;p&gt;This topic is crucial because you will know why some tools exist, handle specific performance issues, and mostly why specific features exist in some frameworks such as React.lazy().&lt;/p&gt;

&lt;p&gt;Look at how we started with client-server communication and ended with mentioning a feature from one of the most popular frontend libraries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loading Data / Saving Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Loading &amp;amp; Saving data need a client-server communication; it might be a pulling technique or pushing such as sockets. Browsers have limits on the number of concurrent requests per domain, affecting how we show our users' data and how they interact with our application.&lt;/p&gt;

&lt;p&gt;HTTP interceptors might take place in our apps, validate data or transform it, etc. Those interceptors will use the browser fetch/XMLHttpRequest API or  and add some logic around it despite that they come with a framework or a separate library.&lt;/p&gt;

&lt;h3&gt;
  
  
  User experience
&lt;/h3&gt;

&lt;p&gt;FE Apps are interactive, so we need input from the user or wait for her action to apply logic, such as updating the DOM.&lt;/p&gt;

&lt;p&gt;Updating the DOM task can be pretty straight forward such as&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;document.getElementById("myDiv").innerHTML = "New Content";
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;or a very complex one such as managing two way data binding in VueJS&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input v-model="message" placeholder="edit me"&amp;gt;

&amp;lt;p&amp;gt;Message is: `{{ message }}`&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;At the low level, they will both use the event loop and let the browser take the right action.&lt;/p&gt;

&lt;p&gt;User experience is not only about DOM manipulation or performance, but some frameworks also provide a design system to maintain UI consistency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Developer experience
&lt;/h3&gt;

&lt;p&gt;The rise of frontend frameworks &amp;amp; libraries focuses a lot on how engineers interact with this tool, and we are grateful for that. They care about our productivity, the clarity of code we write, the amount of code we produce, how it can scale, and how easy and fast we can go.&lt;/p&gt;

&lt;p&gt;The community around a specific tool is crucial for its success, its problems, and how it resolves it is what gives it its early adopters.&lt;/p&gt;

&lt;p&gt;Developer experience, or DX, doesn't stop here but goes to cover the learning curve, productivity, tools, and much more.&lt;/p&gt;

&lt;p&gt;To keep with the constant change, you have to know what value is the tool adding to you as an engineer, and DX is directly impacting the UX, don't compromise over it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's try to abstract a feature from React and Angular.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;React&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In React, let's take the first feature, &lt;strong&gt;Composition&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;"The key feature of React is composition of components. Components written by different people should work well together. It is important to us that you can add functionality to a component without causing rippling changes throughout the codebase."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it affects?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Developer experience, reuse the code easily.&lt;/li&gt;
&lt;li&gt; User experience, consistency.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;JSX contributes the most to the composition feature, but the browser doesn't understand JSX. That's why we have transpilers to convert a component to JS code that can interact with the DOM APIs; nevertheless, it has VirtualDOM, it will use the DOM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Angular&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SPEED AND PERFORMANCE / Code splitting&lt;/p&gt;

&lt;p&gt;"Angular apps load quickly with the new Component Router, which delivers automatic code-splitting so users only load code required to render the view they request."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it affects?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; User experience, the performance of the apps will be faster.&lt;/li&gt;
&lt;li&gt; Developer experience, you don't have to worry about this. We got your back.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Code splitting will be done internally in Angular AOT compiler to decide how to split the code, and the browser has to determine when to load which chunk and how.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;We should focus on understanding the constant things or the things that are hard to change in frontend engineering. We should understand how our apps are running internally inside the browser to correctly use the right tool, framework, library, or even the line of code to achieve our goal. &lt;/p&gt;

&lt;p&gt;Becoming a sound frontend engineer implies that we have a smooth learning curve journey, our minds are open to quickly grasping new frameworks, concepts, or features. The code we write, the passion we feel while writing it, and our pride after achieving our goals are priceless. &lt;/p&gt;

&lt;p&gt;For a simple reason, we write frontend apps, deliver value for our users, and the value will not be enough if we, as engineers, haven't enjoyed the journey. &lt;/p&gt;

</description>
      <category>frontend</category>
      <category>browsers</category>
      <category>frameworks</category>
    </item>
    <item>
      <title> How ownership can make you a better software engineer</title>
      <dc:creator>Ahmad Seder</dc:creator>
      <pubDate>Sat, 18 Apr 2020 20:42:34 +0000</pubDate>
      <link>https://dev.to/aseder/how-ownership-can-make-you-a-better-software-engineer-3j36</link>
      <guid>https://dev.to/aseder/how-ownership-can-make-you-a-better-software-engineer-3j36</guid>
      <description>&lt;p&gt;First of all, I will define what ownership means from my perspective as a software engineer.&lt;br&gt;
&lt;strong&gt;Ownership&lt;/strong&gt;, the actions that the software engineers do because they know that their work is crucial to the success of the project, team, and the company they are working at; It's not only about actions, feelings and passion are important as well here. &lt;/p&gt;

&lt;h2&gt;
  
  
  Ownership will force you to learn more
&lt;/h2&gt;

&lt;p&gt;If you have ownership then you are committed to the best quality you can deliver; When you commit to quality you will start reading more about your deliverables, about the technology stack you are using, what makes it better, etc. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For example&lt;br&gt;
if you are a frontend engineer that your task is to create a contact form.&lt;br&gt;
If you just want to deliver it you can do that in no time, but if you are committed to the best quality I am sure you will start searching for other contact forms, maybe you will stumble upon some weird terms such as a11y, A/B testing, performance budget, or analytics.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So your "Ownership" leads you to learn more to deliver the best quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ownership will make you a better team player
&lt;/h2&gt;

&lt;p&gt;Teamwork is a quality attribute of any software engineer, to the point that we stopped writing it down in our CVs because you have to have it as much as having good problem-solving skills. &lt;/p&gt;

&lt;p&gt;Ownership will force you to communicate with your teammates and go far and beyond to help them get the work done because &lt;strong&gt;you are a crucial part of their success and you know it&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;Owners will not point fingers, they will jump in to help because they care about how to make it work rather than blaming someone. And as humans, we love to be helped so we have to help to earn that.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Ownership will enhance your debugging and engineering skills !!
&lt;/h2&gt;

&lt;p&gt;Debugging skills is essential for any software engineer. because we build both software and bugs, the beauty of it is that we &lt;strong&gt;KNOW&lt;/strong&gt; it. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Imagine you are at home watching Netflix at 2:00 AM, and boom slack notification in your production issues channel; without thinking you will go and check it out and you replied I am taking a look.&lt;br&gt;
After your initial investigation, you found that the bug is data returned in a wrong format from BE.&lt;br&gt;
You put a quick fix in the FE to unblock the customers - because you care - and then you went back to trace WHY it's wrong as a Frontend engineer you reached the ORM class and found the root cause.&lt;br&gt;
You went through 3 or 4 microservices, and found the root cause!! You are CHOSEN!! &lt;br&gt;
And simply sent a slack message to the engineer working on the ORM, and said hey I think the incident is related to those lines, next day at work she will buy you coffee and respect what you did&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You debug because you are committed to the success of everyone around you, and it's a brain training the more you do the better you will be.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ownership will make you take more responsibilities
&lt;/h2&gt;

&lt;p&gt;The more ownership you have the more you will know, the more you are respected among your teammates, and in your company; That will make you a go-to person in some cases even if you don't know anything about that topic you will start being curious about it, check the "&lt;strong&gt;LEARN MORE&lt;/strong&gt;"&lt;/p&gt;

&lt;p&gt;More responsibilities mean a bigger role, more challenging tasks, and maybe a raise :P.&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;For whatever reason that doesn't make you feel like an owner, I have to jump in here and tell you to do it even if it for yourself not for anyone else, you will grow no matter what. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There is a myth that says, If sharks stopped moving they will die. &lt;br&gt;
Keep moving for your own sake you will grow and make people around you grow as well, you will make &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Have the faith that if you do good you will be rewarded, in your current position or somewhere else.&lt;/strong&gt;&lt;br&gt;
Ownership will make you a better software engineer because you will: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Learn more.&lt;/li&gt;
&lt;li&gt;Become a better team player.&lt;/li&gt;
&lt;li&gt;It will enhance your debugging and engineering skills.&lt;/li&gt;
&lt;li&gt;It will open the path for more responsibilities.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ownership</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
