<?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 Faiez Hares on Medium]]></title>
        <description><![CDATA[Stories by Faiez Hares on Medium]]></description>
        <link>https://medium.com/@faiezhares?source=rss-1baa5e5e80cd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HpVZE3YAKCQKVmWxv8nAqA.png</url>
            <title>Stories by Faiez Hares on Medium</title>
            <link>https://medium.com/@faiezhares?source=rss-1baa5e5e80cd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 04:58:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@faiezhares/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[The UNIX culture: Portability]]></title>
            <link>https://medium.com/@faiezhares/the-unix-culture-portability-765541cdf0d9?source=rss-1baa5e5e80cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/765541cdf0d9</guid>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Faiez Hares]]></dc:creator>
            <pubDate>Thu, 31 Dec 2015 02:57:38 GMT</pubDate>
            <atom:updated>2016-01-01T17:00:46.004Z</atom:updated>
            <content:encoded><![CDATA[<p>We are lazy. <br>Honestly! if some tasks can be automated, we will be doing that, immediately.<br>But, sometimes, we will be doing that all the time.<br>Each platform will have its specific variant of the task.<br>And it will be upgraded with each platform update, may be just to adhere to the new interface or the new infrastructure.<br>Then that will be complicated, and we will need a specialist developer or a team to maintain each one.<br>Keeping them synchronized may have a significant cost.<br>So we may not offer the same features on different environments at the same time.<br>The user may not have the same experience across different contexts.<br>And he will blow us with some ‘pretty’ messages on the bug tracking tool.</p><blockquote>Duplication is evil.</blockquote><p>Our solutions should be easy to maintain.<br>Repeating the same solution over and over is error-prone, and boring.</p><p>The solution, then, is to work on abstractions.<br>UNIX offers that.</p><blockquote>UNIX gives us the abstraction we need through clean and easy to use text-based interfaces.</blockquote><p>So that we benefit from our solution in more than the current distribution. And we can plug in more and more solutions without an effort.</p><h4>What about performance?</h4><p>It is not unusual to spend many hours optimizing the software; making some shortcuts here and putting some hack there, or having a week of bench-marking before opting for a sort algorithm.</p><p>Often, we spend a lot of our time thinking about performances.<br>Without doing that, we may not feel clever enough.</p><p>But, often the end user won’t notice those milliseconds wasted during application startup. That will not be seen as a huge performance issue.</p><p>Nine times out of ten, the amount of performance improvement won’t matter.<br>So don’t consider performance upstream.<br>When it does matter, it is easier to just optimize the modules that need to be enhanced. We have then some vision about how much to improve, when to do that and where.<br>Some times it is a matter of some architecture-specific flags that need to be enabled at startup.</p><blockquote>When you design your software to operate on several environments. It is going to be easier to optimize. You need only to enhance it at one place.</blockquote><h4>Software interoperability</h4><p>Software interoperability is the ability of a component to be used by other pieces of software easily.<br>That enables other tools to benefit from the component’s improvements, which enables us to write more focused software.<br>Software interoperability manifests itself all around us, HTML, TCP/IP, CORBA, …</p><p>There should be an interface to be implemented, a protocol or an adapter to use to exposes the available functionality.<br>UNIX offers through the pipe-and-filter style a great context to grow our tools with such a principle.</p><blockquote>An interoperable software component can be plugged in with other components without a ceremony.</blockquote><p>Suppose we have to send emails to our team.<br>All what we need is to combine three tasks: grab the list from a file, then, for each line, extract the user email address and send him the message.<br>Using a shell script, that fits on a single line.</p><p>Pretty easy! Isn’t it?</p><p>Doing such actions in a graphic-based environment is harder. We need to find the folder where our team data are stored, open the file, copy the addresses (filter the lines manually), and open the e-mail client and paste them with the message, then send it. That will take a reasonable amount of time and mental energy.<br>Imagine doing that everyday.</p><p>The latter tools were not built with the interoperability in mind. They may be small, simple and focused. But they don’t work well together. And that makes our mission harder. And makes combining more and more tools in a same process non pleasurable.<br>That kind of software ends up trying to predict all users’ actions and integrating them in a single tool. What makes it complex, huge and some times insufficient; it cannot predict all what users wants.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=765541cdf0d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The UNIX culture — part1]]></title>
            <link>https://medium.com/@faiezhares/the-unix-culture-part1-70f473ebb12b?source=rss-1baa5e5e80cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/70f473ebb12b</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[software]]></category>
            <dc:creator><![CDATA[Faiez Hares]]></dc:creator>
            <pubDate>Thu, 03 Sep 2015 04:24:04 GMT</pubDate>
            <atom:updated>2015-09-03T04:31:08.947Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>What is a good software?</blockquote><p>A software that does everything you expect from? a one with an attractive user interface? well documented one ?<br>The definition of a good software is context-specific, and a good software for a person may not be the same for an other.<br>Everyone has its metrics and its view of a good software.</p><p>But, what about a useful software?<br>We can get the definition of a useful software:</p><blockquote>“A useful software is the software that is able to be used for a practical purpose.”</blockquote><p>It may not be the best solution, it may not be optimized, it may not look good, but it solves the problem facing us now. It accomplishes the practical purpose it is built for.<br>For a software engineer, it is generally complex to build a useful software.<br>We cannot predict many aspects of a software up-front, but, we can design our software to be adaptable and easy to change and to enhance. So, we can make further changes and improvements easily in the future to meet more specifications.<br>And we have many principles, patterns and values to guide us.</p><p>Unix and Unix-like systems have been built with some great design philosophies in mind, they are still useful nowadays, you see, and they are not that good tools — like any other software.</p><p>Through this collection of posts, I tried to help you and myself to explore some of the most known UNIX design decisions and to learn from them in order to create better software — a good-enough software.</p><h3>Small is beautiful</h3><p>“Composing programs from smaller programs to accomplish a desired task”.<br>That is the heart of the UNIX philosophy.<br>In a UNIX system; commands are simple, small, and easy to remember, so always tend to make your tool simple, small and easy to understand and to remember.</p><p>How much small a tool have to be is complex to define. It is relative to the domain and the problem the tool deals with.<br>Start always with just one tool that solves the problem and profits from available tools, the tool should be good-enough to do the job you need — don’t focus neither on perfection nor on optimization (may be five-lines shell script is enough, do it the right way, clean, documented, easy to understand…, don’t let it does more than what you need at that moment).<br>Then improve it as you use it from day to day — may be your colleague helps and the tool grows collaboratively.<br>The time you find some difficulties or you take more than then a reasonable time editing the software, split it to two or three tools easy to deal with. Try to not split to more and be careful to not re-engineer what the system and other tools offer to you.</p><p>The moral is to not over engineer, work iteratively and with small changes and keep your software maintainable.<br>Keep in mind that there are a plenty of available tools that help to achieve great performances; tools to format input, to configure hardware and to do some plumbing work at lower levels of abstraction.<br>So, focus on the purpose; it is up to the user to use it correctly.</p><p>UNIX adopt this principle through the pipes-and-filter architectural style.<br>The idea of pipes was inspired from Douglas McIlroy, who wrote a memo in 1964 suggesting the metaphor of data passing through a segmented garden hose.<br>This style is well known in the software community and it is as well adopted by many software architectures — I have explained how the Apache request processing cycle works in a previous post.<br>The idea in a nutshell is to pass the input to a cluster of small tools — together called a job, each tool manipulates the data in its way (filters it), and passes it next.</p><h3>Design for the future</h3><blockquote>“Always design a thing by considering it in its next larger<br>context — a chair in a room, a room in a house, a house in an<br>environment, an environment in a city plan.”<br>— Eliel Saarinen</blockquote><p>Choosing the right level of abstraction is task-specific, but a tool should be designed from the ground for reuse, it should offer a clear interface that communicates the provided functionalities and not the implementation details.<br>We cannot imagine what purposes users will use our piece of software for; a well designed software always satisfies needs the designer never predicted.</p><p>Make your software extensible and open to change so users can extend it and improve it easily, follow common practices from naming conventions to coding standards and documentation. That helps to understand the tool easily.<br>Avoid captive user interfaces (CUI), a captive user interface is an interface that prevents the user from using other global command for the duration of captures; CUI are hard to fit-in, complex to learn and to automate. The user is asked to learn new tools and a different syntax than that those he is actually using . These kind of software are also hard to build, to test and to maintain.<br>Meanwhile, GUI are sometimes useful. Use them when they fit well.</p><blockquote>A good tool’s interface is easy to plug into multiple presentations, possibly simultaneously.</blockquote><p>Building for the future also means accepting that changes in software is unavoidable, the software will not be the same the next year, nor even few months ahead; requirements change, technologies change and our perspective toward problems changes<em>. </em>The tool should be adaptable.</p><p>There are plenty of design decisions in a UNIX system that reflect long-lived design, “Everything is a file” is useful model (reading/writing in device files, accounts management, system configuration …) although it is a wrong model of reality, but it give us a useful abstraction to do the job well.<em><br></em>Regular expressions, file systems, and hardware improvements are making that model more useful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70f473ebb12b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>