<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sepehr Sobhani on Medium]]></title>
        <description><![CDATA[Stories by Sepehr Sobhani on Medium]]></description>
        <link>https://medium.com/@sepehr411?source=rss-787f140df324------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NbG7xCcLpCovODcKcEXcDg.jpeg</url>
            <title>Stories by Sepehr Sobhani on Medium</title>
            <link>https://medium.com/@sepehr411?source=rss-787f140df324------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 18:23:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sepehr411/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[On Medicine and Web Teams]]></title>
            <link>https://medium.com/@sepehr411/on-medicine-and-web-teams-3eeec277c865?source=rss-787f140df324------2</link>
            <guid isPermaLink="false">https://medium.com/p/3eeec277c865</guid>
            <category><![CDATA[scrum]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Sepehr Sobhani]]></dc:creator>
            <pubDate>Mon, 15 Oct 2018 14:01:02 GMT</pubDate>
            <atom:updated>2018-10-15T22:50:03.906Z</atom:updated>
            <content:encoded><![CDATA[<p>What medicine can teach us about staffing our web teams</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/0*05tdBY7NwqyOwtdT.jpg" /></figure><p>Adam Smith <a href="https://en.wikipedia.org/wiki/Division_of_labour#Adam_Smith">opened</a><em> The Wealth of Nations</em> by explaining how a pin factory would be more efficient if each worker performed a single function in the manufacturing process. By giving workers focused tasks, workers would more rapidly develop a focused expertise, leading to faster and less error-prone production.</p><p>In software engineering, specialization is at the root of concepts like the <a href="https://en.wikipedia.org/wiki/Single_responsibility_principle">Single Responsibility Principle</a>, <a href="https://en.wikipedia.org/wiki/Encapsulation_(computer_programming)">encapsulation</a> and <a href="https://en.wikipedia.org/wiki/Abstraction_(computer_science)">abstraction</a>. The value of these concepts is largely accepted by the profession. They lead to faster development not only by making code more flexible, but by reducing mental overhead and allowing a developer to only focus on one part of the system at a time. Yet when it comes to their own team roles, web developers in scrum teams have difficulty knowing how or if to apply this concept.</p><p>In web development, specialist roles do exist, with ops, front-end and back-end being some common examples. However, full-stack developers currently make up a majority of the industry. A <a href="https://insights.stackoverflow.com/survey/2017#developer-profile-specific-developer-types">recent poll</a> from Stack Overflow reports that a whopping 63% of all developers consider themselves “full-stack.” Meanwhile, as the “stack” itself continues to grow in complexity, with trends like CI/CD and PWAs often having their own mini stacks to learn, never before have the responsibilities of a full-stack engineer been so numerous. Given that web development as a profession has been around for a mere 30 years and scrum is even younger, we should look to an older profession that solves complex problems using cross-functional teams to determine if the heavy reliance on full-stack developers is the right approach: medicine.</p><p>Specialization is a relatively recent phenomenon in medicine. For most of history, doctors worked alone or in small practices that served a single community and thus needed to be able to address a large variety of medical problems on a regular basis. They were “full stack” by necessity. But the establishment of larger hospitals meant that doctors had the freedom to deepen their medical knowledge in a particular field, and the expansion of transportation infrastructure enabled patients to seek out experts in their conditions.</p><p><a href="https://www.mcgill.ca/ssom/files/ssom/MedicalSpecialization.pdf"><em>Mediocre physicians would, by specializing in a limited number of diseases, improve their practical skills. But in the hands of more gifted individuals, specialization could produce real progress in medicine… one who specialized in certain maladies could master the entire literature in his field, and generalize the views of his predecessors in order to develop canons of practice.</em></a></p><p>In other words, specialists get to see the same problems over and over again allowing them to determine best practices and advance the field of study. There is also the obvious advantage that a specialist can do a specialized task far faster and more cleanly that a generalist can.</p><p>Generalists exist in both medicine and agile teams, but the range of work they perform is fundamentally different. Primary care physicians are expected to do work that is <a href="https://www.bcbsm.com/index/health-insurance-help/faqs/topics/getting-care/what-to-know-about-primary-care-physicians-specialists.html">“routine”</a> but offload any other work to a specialist. If you go to you primary care physician with cancer, he will not hit the books to learn the exact details and implementation of your chemotherapy. He will be expected to have a general knowledge of the treatment options and then refer you to an oncologist. On the contrary, the typical full-stack developer is expected to solve any problem she is handed. She could be doing simple CSS — a high-level front-end task — one minute, and optimizing Webpack bundle size — a low-level front-end task — the next. Then she’ll switch to creating a new route for the API, then try to decrease lead time on the CI/CD pipeline. If the developer does not know how to do one of these tasks, she needs to learn it, even if she will not apply this knowledge again for months down the line (by which point she has forgotten how to do the task).</p><p>To gain perspective into some of the problems that arise from large teams with only full stack engineers, I interviewed some developers regarding this topic and found the following problems to be common:</p><ol><li>Morale tends to be low for individuals who are prevented from working on the problem areas they enjoy. You will often see a developer who enjoys working on the front-end doing back-end work sitting next to a back-end focused developer writing CSS — all in an attempt to keep skills even.</li><li>Best practices are slow to develop, mistakes are often repeated, and decisions are made with little experience in the focus area. Since no developer is working in the same problem space for too long, no developer can easily “<a href="https://www.mcgill.ca/ssom/files/ssom/MedicalSpecialization.pdf">reflect, judge, make connections, and generalize</a>” meaning lessons are learned slowly.</li><li>Development velocity is inconsistent and often random. Sometimes the stars would align and the all developers will get a task they are familiar with, allowing for a smooth sprint. More often than not, this will not be the case.</li><li>Any technical decision had to be communicated to all developers as opposed to a subset of developers, regardless of background. Try explaining the value of Redux and soliciting feedback from developers who have only done erb templating.</li><li>Ramping up new developers can be painful. New developers are expected to quickly develop an intimate knowledge of every part of the stack.</li></ol><p>Specialization could solve all the problems above by encouraging developers to work on what they are passionate about, allowing them to gain focused experience faster, keeping development velocity consistent, reducing the number of people who need to be involved in a decision, and decreasing ramp up time by shortening the stack that new developers need to learn.</p><p>So how should specialists and generalists be staffed and work in an agile team to prevent the problems above? Ideally, the typical web team would have one or two front-end developers, one or two back-end developers, and one full-stack developer. The full-stack developer would augment either specialty by doing general tasks when one is overloaded, as well as provide technical communication and coordination between specialists, similar to the role of a primary care physician. Having a variety of roles on your development team also gives developers the chance to spend more time on what they are passionate about, and less time on the topics they are not. We have all seen what happens when you have a full stack developer who despises CSS take on a styling story. It’s bad for morale and an inefficient use of time.</p><p>Full-stack developers may be the right choice when a project is small, simple and on a tight budget, but as a project grows larger and the bar for an acceptable application is raised, projects will need to strongly consider hiring or training specialists, or risk slow releases and inadequate products.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3eeec277c865" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mobx + React: Quick start guide]]></title>
            <link>https://medium.com/@sepehr411/mobx-react-quick-start-guide-6c2b56891deb?source=rss-787f140df324------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c2b56891deb</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[mobx]]></category>
            <category><![CDATA[es6]]></category>
            <dc:creator><![CDATA[Sepehr Sobhani]]></dc:creator>
            <pubDate>Sun, 22 Apr 2018 13:01:01 GMT</pubDate>
            <atom:updated>2018-04-22T13:16:36.357Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*W5blmYqG1SNbuS01yFwHQg.png" /></figure><p>Mobx is a global state store often used as a replacement to Redux because of its less steep learning curve. This is because it takes an Object Oriented approach to state management(vs functional for Redux) and has less boilerplate. This guide is meant to show the absolute minimum for getting up and running with Mobx. More detail can be found in the <a href="https://mobx.js.org/index.html">Mobx documentation</a>.</p><h3>Install Mobx and mobx-react</h3><p>First we need to install Mobx and mobx-react</p><pre>npm install mobx --save<br>npm install mobx-react --save</pre><h3>Add Decorator Support</h3><p>Mobx uses many higher-order functions to decorate class functions and properties. As a result, Mobx is easier when used with the new ES2016 <a href="https://babeljs.io/docs/plugins/transform-decorators/">decorator syntax</a>. Unfortunately, Babel will not transpile decorators by default, so a <a href="https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy">plug-in</a> is needed.</p><p>Install the plugin</p><pre>npm install --save-dev babel-plugin-transform-decorators-legacy</pre><p>Then add it to your .babelrc</p><pre>{<br>    &quot;plugins&quot;: [&quot;transform-decorators-legacy&quot;]<br>}</pre><h3>Creating the state store</h3><p>In Mobx state is stored in a regular class with properties that store state and functions that manipulate or expose that state. For example, a Mobx state store for a Todo app might look like this</p><pre>import { observable, computed, action } from &quot;mobx&quot;;</pre><pre>class TaskStore {<br>   @observable tasks = [];</pre><pre>   @action.bound <br>   addTask(item) {<br>     this.tasks.push(item)<br>   }</pre><pre>   @computed get totalTasks() {<br>     return this.tasks.length;<br>   }<br>}</pre><p>The decorators make the Mobx store reactive when state changes.</p><p>As shown above there are 3 main decorators for a Mobx store</p><h4>@observable</h4><p>Decorates properties and allows the property to be watched for state changes.</p><h4>@action</h4><p>Should be used on any function that changes state or has side effects, and allows the store to optimize for state changes as well as helps organize code.</p><h4>@computed</h4><p>Decorates functions that return values calculated from internal state.</p><h3>Connect to the store</h3><p>First we need to make our store available to all components</p><pre>import { Provider } from &quot;mobx-react&quot;;<br>import {TableStore} from &#39;./TableStore&#39;</pre><pre>const App = () =&gt; (<br>    &lt;Provider todoStore={new TodoStore()}&gt;<br>        &lt;TodoDisplay /&gt;<br>    &lt;/Provider&gt;<br>)</pre><p>Now any component can connect to the store like this</p><pre>import {observer, inject} from &#39;mobx-react&#39;;</pre><pre>@inject(&#39;todoStore&#39;) @observer<br>const TodoDisplay = (props) =&gt; {</pre><pre>    const onClick = () =&gt; {props.todoStore.addTask(&#39;Do chores&#39;)}</pre><pre>    return(<br>      &lt;div&gt;<br>        &lt;div&gt;Number of tasks {props.todoStore.totalTasks}&lt;/div&gt;<br>        {  props.todoStore.tasks.map((item) =&gt; <br>            (&lt;div&gt;{item}&lt;/div&gt;)<br>          )<br>        }<br>      ...      <br>     &lt;/div&gt; <br>   );<br>}</pre><p>That’s it! You should now be able to use Mobx.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c2b56891deb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>