<?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 Hafiz Hasanov on Medium]]></title>
        <description><![CDATA[Stories by Hafiz Hasanov on Medium]]></description>
        <link>https://medium.com/@hasanoviz?source=rss-25214607a2fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EEJ24s75kzcbzuZ0EjOj6Q.jpeg</url>
            <title>Stories by Hafiz Hasanov on Medium</title>
            <link>https://medium.com/@hasanoviz?source=rss-25214607a2fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 11:47:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hasanoviz/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[Behind the Mask: Navigating the Complex Role of Mobile Backend Developers]]></title>
            <link>https://hasanoviz.medium.com/behind-the-mask-navigating-the-complex-role-of-mobile-backend-developers-9cb10d3b9b26?source=rss-25214607a2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cb10d3b9b26</guid>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[soft-skills]]></category>
            <category><![CDATA[mobile-backend]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Hafiz Hasanov]]></dc:creator>
            <pubDate>Sat, 17 May 2025 16:32:49 GMT</pubDate>
            <atom:updated>2025-05-22T07:14:52.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DBBesd4QyBWgGvP1OqNEsw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@ferjeancarlo?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Ferrando Elias</a> on <a href="https://unsplash.com/photos/a-wall-covered-in-lots-of-colorful-masks-fuHJL7THFnw?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure><h4>Some of the most challenging aspects of building backends for mobile apps.</h4><p><em>Mobile Apps have become a significant traffic driver compared to websites and desktop apps while doubling retention. It’s not surprising that creating a Backend for Frontend (BFF) has become crucial for apps. Mobile Apps require tailored APIs to provide a specialized user experience. Although there are some challenges to look out for, these can be addressed with adequate effort, especially when you know what to expect.</em></p><p>The mobile backend is like a carefully crafted mask; It hides the complexity of the underlying systems while presenting a clean, expressive, and usable interface to the mobile app developers. Like a mask that helps actors perform convincingly on stage, the backend API makes the app appear seamless and responsive to users. Behind the scenes, the backend devs ensure the mask fits well, doesn’t crack under pressure, and adapts to changes while translating between the raw backstage machinery (legacy systems, microservices) and the performance front (mobile UX).</p><p>Since the mobile backend is primarily a gateway between apps and the rest of the company’s services, the backend devs are mediators between those two. Understanding, managing expectations, and fulfilling the requirements of both worlds can be both a communication challenge and a technical one. Depending on the target audience, a mobile backend developer might have to “mask” the complexities of the opposite sides while providing the necessary information, thereby keeping communication simple.</p><h3>💬 ️Communication challenges</h3><p>Mobile backend developers are involved in communication between the product, UX, app devs, and other backend teams. Suffice it to say, it can get messy.</p><p>Product requirements don’t focus on API but instead on the mobile app and UX. On one side, it leaves backend devs with some creative freedom; on the other, this gap for interpretation often leads to misunderstandings and creates a lot of unplanned rework.</p><p>More often than not, due to limited technical knowledge or lack of capacity, it is not apparent to mobile app Product Managers and UX designers that sometimes, UX design changes lead to changes in the backend as well. Often, mobile app devs can’t anticipate the magnitude of effort such design changes can lead to in the backend either. As a result, significant delays may occur and pressure the backend team to deliver underestimated or unplanned work.</p><p>Many developers, especially those focused on backend systems, may not have strong design intuition. Therefore, design changes that require a big or complicated backend implementation are difficult to reason about as a backend developer. Sometimes, a minor, acceptable tweak in design might reduce the effort significantly. However, making such judgments without the necessary design context is hard and can lead to unintentional complexity. As a developer building mobile backends (or even a web backend in this case), we must familiarize ourselves with basic design principles. It is also crucial to participate in user interviews and design sessions from time to time. A rule of thumb is to ask designers questions when decisions are unclear.</p><p>Moreover, the backend microservices are often not designed with a mobile-first mindset, especially if developed during the pre-mobile era. For example, some legacy backends rely on web-specific constructs like cookies and sessions, or work with data formats unsuitable for mobile app communication. Many colleagues who build those services are usually oblivious to mobile app requirements. Most of these problems can be addressed in the mobile backend; however, some require more fundamental changes. It falls on mobile backend developers’ shoulders to communicate such technical requirements when relevant.</p><h3>🏗 ️Organizational challenges</h3><h4>App Releases</h4><p>The respective app store review process must approve mobile Apps before a new version can be released. Usually, mobile teams organize this effort around regular (bi-weekly/monthly) “release trains.” Before a new version is submitted, it usually goes through an internal testing step involving bug fixing and adjustments requested by the app store review. It might undergo several iterations of mostly manual work, requiring significant team alignment.</p><p>On the other hand, in an ideal situation, the backend changes are released continuously. However, because of the app version release process, alignment with the backend team is beneficial. Even though “release trains” are not directly necessary for the backend service, they affect the planning of tasks on the backend. Delays on either side affect the plans on the other and require timely organization. Ideally, work on the backend should be done ahead of time. In reality, this is not always possible.</p><p>Moreover, during the app release process, the backend team may also be needed for hot fixes and other app review-driven changes.</p><h4>Multi-release features</h4><p>Not all features fit into the “release train” intervals and must be carefully split and planned, spanning multiple releases. These features require continuous development while remaining hidden from users.</p><p>On the backend, this usually means either implementing completely new endpoints or expanding the API without affecting requests from already released app versions.</p><p>Tackling these communication and organizational hurdles requires more than reactive fixes; it calls for deliberate strategies that foster alignment, predictability, and technical resilience. The following sections examine practical approaches mobile teams can adopt to reduce friction and improve collaboration across disciplines.</p><h3>Strategies for Better Collaboration</h3><p>Firstly, Product Managers and UX Designers should be educated about how their design decisions impact backend complexity. Proactively <strong>flagging backend-affecting changes</strong> in UX discussions would help in the following steps. Regular syncs or shared channels between backend, app devs, and product/UX teams, as well as <strong>shared documentation and specs</strong> to close interpretation gaps, would contribute to building this understanding.</p><p>Moreover, we should ensure that mobile backend devs are included early in the <strong>product/UX discussions</strong> and design phase. This not only helps avoid surprises, misunderstandings, and unplanned work, but also educates mobile backend developers on the design process and builds understanding behind UX/UI decisions. Equipping backend developers with <strong>foundational design knowledge</strong> to reason about trade-offs and encouraging them to participate occasionally in <strong>user interviews or design sessions</strong> for better context would further strengthen the design literacy. Encourage backend engineers to <strong>ask designers questions</strong> when things are unclear. Even minor tweaks in UX can <strong>dramatically reduce backend effort</strong>.</p><p>To top it off, it makes sense to advocate for a mobile-first mindset across the whole company. It helps mobile backend devs communicate technical limitations or mobile-specific needs to upstream teams. When this understanding exists already, it can eliminate unnecessary communication or clarification. Push for updates to legacy systems where possible, or collaborate on <strong>mobile-compatible API improvements</strong>.</p><p>Backend work should be planned with app release cycles in mind to ensure smooth coordination between backend and mobile app development. Completing backend tasks before release deadlines provides a critical buffer for responding to unexpected issues, such as last-minute feedback from app store reviews or urgent hotfixes. Establishing regular coordination between app and backend teams, supported by shared tools like calendars or project trackers, helps align deliverables and manage release dependencies more effectively.</p><p>Additionally, backend teams should anticipate that not all features can be shipped in a single release. Features spanning multiple releases should be divided into small, deployable units that can be hidden behind feature flags until fully ready. This approach not only supports incremental development but also reduces release risk. Crucially, APIs should be designed with backward compatibility in mind, ensuring that newer backend changes do not disrupt users on older app versions. This stability during transition periods helps maintain the user experience while enabling continuous delivery.</p><p>The mobile backend developer role is a uniquely challenging endeavor that stretches far beyond code. It demands strong technical skills and the ability to navigate design conversations, manage expectations, and build bridges across disciplines. Yet, when approached with the right mindset and strategies, it becomes an enriching role where you help craft the ‘mask’ that shields app developers from backend complexity, allowing them to focus on delivering great user experiences without burdening them with the intricacies of underlying systems. And while all backend developers build critical infrastructure, those working on mobile backends wear many faces, like translator, architect, collaborator, each essential to delivering a polished performance on the front stage.</p><p><em>In future posts, I will explore some techniques mentioned, like feature flags and backward compatibility, from a technical perspective.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cb10d3b9b26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[APIs through UI/UX]]></title>
            <link>https://hasanoviz.medium.com/apis-through-ui-ux-a906b6af894f?source=rss-25214607a2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/a906b6af894f</guid>
            <category><![CDATA[designer]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[rest-api-design]]></category>
            <dc:creator><![CDATA[Hafiz Hasanov]]></dc:creator>
            <pubDate>Fri, 22 May 2020 19:35:48 GMT</pubDate>
            <atom:updated>2022-11-22T13:59:02.160Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LnNm7auJO7NnCYRIHBszcQ.jpeg" /><figcaption><a href="https://www.behance.net/gallery/74045557/API-Digital-Visualization">API Digital visualization</a> by <a href="https://www.behance.net/semihkodarlak">Semih Kodarlak</a> on Behance</figcaption></figure><h3>UI/UX designer&#39;s guide to APIs</h3><p><em>The “API” is used so often in conversations lately, that it can feel daunting when you think you don’t know what it means and how it can be used. Every tech company provides APIs to access their public data. Facebook, Google Maps, Spotify, Twitter, and Instagram, all of them have APIs that can be used to build apps and websites. But what these APIs are might be a mystery to a lot of people.</em></p><p>API stands for Application Programming Interface. Similar to UI (User interface) being an interface for Users, API is an interface for developers to do the same things users do through the UI. Just like a UI, it guides users into doing things the application can handle.</p><p>It all boils down to the fact that you want to run a program that you have (web application). One of the main characteristics of web programs is that they run continuously and wait for a user to ask something (make a web request) and give a corresponding response. Ultimately, an API of a web application is a means to do that request. It limits and guides the user on what she can and cannot do using this application.</p><p>Suppose your application does one thing. It prints <em>“Hello World”</em> every time a button is clicked. Let’s look at what happens <em>under the hood</em> when a button is clicked in a side-by-side view of UI events and the corresponding API requests. In the following set of gifs, simple UI animations are shown alongside corresponding API requests and responses at the bottom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*iaM-mG-AhiO6Jo3jBUxqWw.gif" /><figcaption>The moment when users click the ‘Show’ button, our app makes a request to the API, gets back a ‘Hello World’ message, and renders it in the text view.</figcaption></figure><p>The brackets around the <em>“Hello World”</em> text and <em>“message”</em> are just part of one of the formats API can return data in. For now, let’s just leave it at that. Also, it suffices to say, that the GET keyword means that we want to get something from the web app. There can be other keywords that API might support and we will look into those later.</p><p>Now let’s say the developers added a new feature to our application. It can now take some input and change the behavior based on that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*M83vZ8uobUbvc4KBSbWKxg.gif" /><figcaption>The moment user clicks the Show button, the app takes the user&#39;s input ‘Hafiz’ and requests the API with it. It gets back a ‘Hello Hafiz!’ message and renders it.</figcaption></figure><p>Now it allows you to input your name and it would print <em>“Hello {your name}!”</em>. On UI you get a text input field along with the <em>“Show”</em> button, as shown in the gif.</p><p>The q=Hafiz is a means to send parameters to the API. In this case, we use it to send the text Hafiz</p><p>At this point our API supports the following requests:</p><pre><strong>GET /hello-world<br>GET /hello?q={name}</strong></pre><p>Now let our application do something more; instead of a simple <em>hello world, </em>we want our application to be able to create <em>greetings</em> and list them as a history. Also, it would allow doing some basic filtering. For this, we would have two views for each of these features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*nNA3LmtoHQKUCODCUReAkw.gif" /><figcaption>In this case, we again make a GET request to API. But this time we get a list of results. The square brackets in the API response denote a list.</figcaption></figure><p>First, let’s look into listing those greetings.</p><p>Next, let’s look at how our API to filter the list would look like together with the UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*iTVONvAgQNhQI5tgKhDKaQ.gif" /></figure><p>On the UI we now have an additional input text field. We will use a <strong>query </strong>parameter qto send the text we’d like the list to be filtered by. Query parameters are part of the URL and come after the ?symbol. In this case, ironically it is called q which is just short for “query”. Its value is <em>Haf</em>. The result is still a list with the items filtered out according to our query parameter value.</p><p>Next, let’s see how we would go about the creation of a new <strong>greeting</strong>. From a UI point of view, we want to have a view where we enter the name we want to greet and then view the created greeting in the next one.</p><p>Our API for this would look similar to the following snippet:</p><pre>Request:</pre><pre>POST /greetings <br>{<br> &quot;name&quot;: &quot;Kim&quot;<br>}</pre><pre>Response:<br>{ <br> &quot;greeting&quot;: &quot;Hello Kim!&quot;,<br> &quot;date_created&quot;: &quot;01.01.17&quot;<br>}</pre><p>As opposed to previous requests, <strong>creating</strong> a greeting requires us to make a POST request to /greetings. Just as GET means to get something from the app, POST represents posting something to the web app with the idea that it will be saved somewhere for later reference. A POST request would usually have a <strong><em>body</em></strong> where the parameters of the request are put. The body is usually in the same format as the response.</p><p>There are some more <em>“</em><strong><em>verbs</em></strong><em>”</em> that could be used in the design of an API. These are part of a communication protocol called <strong>Hypertext Transfer Protocol</strong> (HTTP). DELETE for example, would be used to represent the deletion of something. These are the most commonly used ones and therefore enough to know about for now.</p><p>With the addition of these features now our API consists of the following endpoints:</p><pre><strong>GET  /hello-world<br>GET  /hello/{name}<br>GET  /greetings           //get list of greetings<br>GET  /greetings?q={text}  //get greetings filtered by input text<br>POST /greetings           //create a new greeting</strong></pre><p>Suppose we decide that we want to greet our users with more sophisticated wording than just <em>“Hello”</em>. For this, we think of delegating the logic of choosing the right text to another application. Here is what this application does:</p><ul><li>Generate a greeting text according to the time of the day (e.g. <em>Good Morning</em>, <em>Good afternoon</em>, <em>Good evening</em>, <em>Good night,</em> or simply <em>Hello</em>).</li><li>A specific date and time could be sent as input and the resulting text would be generated according to that time.</li></ul><p>Here is what an API for such an app could look like:</p><pre><strong>GET /greeting-texts<br>GET /greeting-texts/{timestamp}</strong></pre><p>Some example requests and responses to this API would then look as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*4beLRIG91s20karg8YuAUA.png" /><figcaption>Assuming the time of example requests was 03 Jan 2017 13:52:50 UTC</figcaption></figure><p>So now, using this new API, we can improve the creation of new greetings in our greetings app. Whenever our API gets a POST /greetings request, it first makes aGET /greeting-texts request and uses the resulting text to create our greeting. Let’s look at our last example with POST.</p><pre>POST /greetings:</pre><pre>{<br> &quot;name&quot;: &quot;Kim&quot;<br>}</pre><p>Under the hood the greetings app requests GET /greeting-texts and gets “<em>Good afternoon</em>” and the formatted date “<em>03 Jan 2017</em>”. The result would look like this:</p><pre>{<br> &quot;greeting&quot;: &quot;Good afternoon, Kim!&quot;,<br> &quot;date&quot;: &quot;03 Jan, 2017&quot;<br>}</pre><p>These examples are a bit simplified. Real-world APIs have more details, like security parameters and status codes to know if our request was successful or wrong, etc. But the essence is quite simple.</p><p>In future articles maybe we can go through some of those real APIs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a906b6af894f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ruby, the interesting parts]]></title>
            <link>https://hasanoviz.medium.com/ruby-the-interesting-parts-228ae39c7b30?source=rss-25214607a2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/228ae39c7b30</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[programming-languages]]></category>
            <dc:creator><![CDATA[Hafiz Hasanov]]></dc:creator>
            <pubDate>Sun, 22 Nov 2015 18:07:13 GMT</pubDate>
            <atom:updated>2022-07-20T12:02:57.183Z</atom:updated>
            <content:encoded><![CDATA[<h4>A java developer&#39;s perspective</h4><p>Recently I decided to start learning Ruby just out of curiosity. I hoped it would eventually grow into doing some rails projects. For the past couple of months, I have been looking into its syntax and ways to do things, subconsciously comparing it to other languages I have already been familiar with. During the process, I came across some ways Ruby handles things that were compelling to me.</p><p>These are basic structures or otherwise just design decisions that caught my attention. I should note, though, that these are incomplete. This is rather just my thoughts on the topic while I was taking notes.</p><p><strong>Method overriding</strong></p><p>For a defined class, defining it once more or any number of times merges it with the other (earlier) definitions. The conflicting methods are overridden by the latest definition. In the following code snippet, the given method redefines the String class’s original <em>replace</em> method. The rest of String’s methods are still usable.</p><pre>class String <br>  def replace(str)<br>    self<br>  end<br>end</pre><p>This comes from the fact that ruby allows us to define the same method more than once. Only the latest definition would be the actual one. Since the time I have written this, I have had the pleasure of looking into Swift and Scala too. They also allow this kind of class extension on a global scale. By extension, I mean adding methods or overriding and NOT inheriting.</p><p><strong>Modules</strong></p><p>A module is a block of classes, constants, and methods. This reminds me of the utility classes that we write in Java. Classes that cannot be instantiated, inherited, and contain a bunch of static constants and methods. As opposed to Ruby’s modules, utility class is not part of java language or SDK, but rather is a best practice.</p><p>Modules also have some similarities with java interfaces. One aspect that contributes to this is that module can be used as a type. Moreover, modules cannot be instantiated but can be ‘inherited’ or included by a class.</p><p>Just the same as a Class can have <em>class</em> and <em>instance</em> members, a Module can have <em>module</em> and <em>instance</em> members.</p><h4>A Module as a Mixin</h4><p>In contrast to an interface, a mixin can already contain some implementation. For example, Ruby has a <em>Comparable</em> module (<em>Comparable</em> interface in java). But unlike the java interface, the Comparable module has some implementation of quick comparison methods. It requires you to implement one method <strong>&lt;=&gt;,</strong> which is the same as the <em>compareTo </em>method in java. Scala has a similar construct which is called <em>Trait</em>. Both cases enable multi-inheritance-like behavior, that java designers chose to avoid.</p><p>The case where you try to mixin two different modules with the same name methods is one of the issues with multi-inheritance. Ruby seems to choose the version of the method that is from the last <em>included</em> module.</p><p>Besides, including a keyword, there is an <em>extend </em>keyword that seems to have a slightly different purpose. This makes it more ambiguous. Look into #5 for some examples of this. Though it does not give an example of a use case where <em>extend </em>could be useful</p><p><em>Do you have some more captivating parts to share? Please do.</em></p><h4>References</h4><ol><li><a href="http://www.railstips.org/blog/archives/2009/05/15/include-vs-extend-in-ruby/">http://www.railstips.org/blog/archives/2009/05/15/include-vs-extend-in-ruby/</a></li><li><a href="http://learnrubythehardway.org/book/ex40.html">http://learnrubythehardway.org/book/ex40.html</a></li><li><a href="http://metabates.com/2011/02/07/building-interfaces-and-abstract-classes-in-ruby/">http://metabates.com/2011/02/07/building-interfaces-and-abstract-classes-in-ruby/</a></li><li><a href="http://matt.aimonetti.net/posts/2012/07/30/ruby-class-module-mixins/">http://matt.aimonetti.net/posts/2012/07/30/ruby-class-module-mixins/</a></li><li><a href="https://rubymonk.com/learning/books/1-ruby-primer/chapters/35-modules/lessons/79-getting-modular">https://rubymonk.com/learning/books/1-ruby-primer/chapters/35-modules/lessons/79-getting-modular</a></li><li><a href="http://www.rubyfleebie.com/ruby-is-dynamically-and-strongly-typed/">http://www.rubyfleebie.com/ruby-is-dynamically-and-strongly-typed/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=228ae39c7b30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visualization principles]]></title>
            <link>https://hasanoviz.medium.com/visualization-principles-a8c6e46ddc5f?source=rss-25214607a2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8c6e46ddc5f</guid>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Hafiz Hasanov]]></dc:creator>
            <pubDate>Sat, 18 Apr 2015 10:30:05 GMT</pubDate>
            <atom:updated>2022-07-20T12:04:37.759Z</atom:updated>
            <content:encoded><![CDATA[<h4>A quick intro to data visualization</h4><h3>Background story</h3><p>For my master thesis, I decided to go on with a completely new topic. I had to learn more about JavaScript and yet to discover all about data visualization. I did the thesis at Research Group Software Construction at the Faculty of Mathematics, Computer Science, and Natural Sciences of RWTH Aachen in the context of the ARAMIS project. It researched the question of how the software architecture (SA) visualization of reconstructed data can be improved. This is necessary to comprehend the running system at different abstraction levels. The thesis had an exploratory purpose. The goal was to research existing visualizations in SA as well as other domains. Moreover, I created several software architecture visualization prototypes. The following are my findings and learnings, only related to visualizations design in general.</p><blockquote>You sense far more than you are conscious of. Whether you want to or not.</blockquote><blockquote>Tor Norretranders</blockquote><h3>What is it all about?</h3><p>The conversion of human senses to computer terms is a diagram by Danish Physicist Tor Norretranders. It is called the “Bandwidth of our senses”. It compares the amount of information each of our senses perceives per second. Thereby, the diagram shows the power of vision compared to our other senses. It demonstrates why visualizations are so effective in conveying huge amounts of information in split seconds. By the way, the white spot on the right lower corner is when we become conscious of what we just sensed. As a fun fact, it is worth mentioning that our tasting sense bandwidth goes head to head with one of a calculator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*ANLGD82Qry1yzGUGkqytyw.png" /><figcaption>The bandwidth of our senses by Tor Norretranders.</figcaption></figure><p>For designing effective visual graphics it is important to understand how visual perception works. How the human brain processes the perceived information is also crucial to know. That said, memory is a function of the human brain that is in charge of storing, retrieving, and processing information. So, the brain perceives the visual representations, and processes and stores them in our memory. According to cognitive psychology, there are three types of memory, namely <em>sensory</em>, <em>short-term</em>, and <em>long-term</em> memory.</p><p>Right after we sense the information, it is automatically stored in our sensory memory. It is more of an impression of the data we sensed, imagery in the brain. It is an independent action and does not require our attention [3]. We sense the info a lot earlier before we start to process it. This process is called preattentive processing.</p><p>After preattentive processing, part of the data is transferred to short-term memory for further processing. As the name suggests, short-term memory capacity is limited. The information remains there for a short time. The information in short-term memory can be transferred to long-term memory, where it can stay for the whole life by periodic rehearsing or making meaningful associations.</p><p>The characteristics of these memory types are crucial for designing information visualization graphics. Preattentive processing is particularly important because preattentive attributes are perceived unconsciously. It is also important to remember that short-term memory is limited. Thus, it is not advisable to carry a visualization on separate screens, for example.</p><h4>Preattentive attributes</h4><p>Visual characteristics of shapes perceived during preattentive processing are called preattentive attributes. Ware C. [4] has grouped these attributes into four groups which are color, form, spacial position, and movement. The position of data points in a scatter plot carries the value of that data point and is a good example of a spacial position attribute. The image below illustrates the most commonly used ones among these attributes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*zB8Q3PY12QSQlAZv96u8UQ.png" /><figcaption>Comparison of common preattentive attributes taken from [4]</figcaption></figure><p>It is also worth mentioning that each of the attributes is more suitable for one or more quantitative or categorical data. These terms refer to statistical data types. Quantitative means that it carries some numeric values (ordered or not). Categorical indicates that it encompasses a limited number of categories. Color hue, for example, is not suitable for quantitative data. The brightness attribute should be applied in this case.</p><h4>Gestalt laws/principles</h4><p>Gestalt principles are rules that define the way we perceive certain configurations of shapes. These rules are defined as a result of studies carried out by Wertheimer M. [6], Kohler W. [7], and Koffka K. [8]. The basic principle is that humans tend to perceive similar visual entities as a whole.</p><p>The perception of a group also happens when entities are located close to each other, enclosed by a boundary, or connected. Moreover, the closure principle describes our perception of incomplete shapes as being complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*xVGXX6_KdWq1aExdcR9bBQ.png" /><figcaption>Closure principle in WWF for Nature logo.</figcaption></figure><p>A good example of this is the well-known logo of the World Wide Fund for Nature. Although the panda in the image is incomplete, it is just enough for us to recognize a panda. This is why it is enough to have only two lines for the <em>x</em> and <em>y-axis</em> in a line plot, to perceive the area of the chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*DwLEK_cg5m9Giyzuu4_LZg.png" /><figcaption>Continuity principle</figcaption></figure><p>The principle of continuity, on the other hand, describes our tendency to group a set of shapes as a whole. In the image on the left, even though the color distinction suggests grouping by color, the continuity principle fights over and wins the battle. We tend to perceive the circles as two crossing lines.</p><p>Gestalt laws are valuable means during visualization design, while they characterize our perception of groups of shapes.</p><h3>Visualization principles</h3><p>Now that we have some insight into the laws of perception and how our visual sense works, some basic guidelines are built upon this knowledge and aim to help the design process.</p><h4>Data-ink principle</h4><p>This principle concerns the amount of redundant data-ink [9]. Data ink is the ink used for data points. So, Tufte proposes that the ratio of data-ink to total ink used should be maximized. Every element of a visualization (colors, shapes, etc) drives users’ attention. Therefore it is important to leave the visualization as simple as possible and remove elements that do not represent any data. In the first pie chart below, the third dimension does not represent any properties of data. It distracts and potentially conveys the wrong information to the user. Therefore, it should be removed as shown in the second chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*obutxs4DWRESH1RcEhVrsw.png" /><figcaption>The data-ink principle violated and complied</figcaption></figure><h4>Maintain consistency</h4><p>This principle emerges from the continuity principle of Gestalt laws. If visual transitions such as color or size do not convey any information, it will confuse the user seeking some message of this difference. If a transition is the result of the data update, it should display as one. Animation in interactive visualizations is a good way to achieve a clear transition. According to experiment results conducted on the effectiveness of transition animations between statistical graphics (bar charts, scatter plots, etc.) in [10], often animations provide a clear perception of consistency. In the experiment, they also discuss the principles for animation and introduce their taxonomy of transitions. Although they focus on statistical graphics, most of the information mentioned can also be applied to other sorts of visualizations.</p><h4>Make the visualization aesthetically pleasing</h4><p>We enjoy the beauty and beautiful design. Different colors have different effects on people. By choosing the right colors, shapes, etc. we can achieve visually pleasing results. Moreover, colorblind people cannot distinguish certain colors. Brewer C. provides some guidelines for choosing the right color for different types of data (ordinal, categorical, etc.)[11]. It is the designer’s responsibility to consider all the attributes when creating the visualization. In the first bar chart below, the chosen color combinations have an offensive effect on the user. The chart also violates the data-ink principle. It has too much redundant color (or ink) usage. As we can see, the second chart visualizes the same data but in a more appealing way. In this case, I removed the unnecessary background and applied more pleasing colors. This color palette is also colorblind safe. I used a web-based tool called <a href="http://colorbrewer2.org/">ColorBrewer</a> to generate these colors. This tool is also part of the research by Brewer C.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e5XtHI7DhP_7gmU13emP1g.png" /><figcaption>Make the visualization aesthetically pleasing violated and complied</figcaption></figure><h4>Context is important</h4><p>When isolated, without any context data may not be completely true. It also may convey the wrong message. An article written by visualization journalist McCandless D. [12] gives a good example of this. It describes a visualization of the army budget of different countries. First, he shows the budget of the countries without any context information. The USA stands in first place among other countries. Then, the author argues that because the USA’s total budget is also big, the army budget is not that big, in ratio to the total budget. In the second version, the army budget is given by the percentage of the total budget. The USA is not in first place anymore. This makes more sense for the message it conveys. In this scenario, the context means the total amount of budget.</p><p>The context may also refer to the neighborhood (e.g. close located data points) of the visual element of interest. In this case, the context should also be provided when the data area is zoomed in and not all data points are visible. This is important because of the limits of short-term memory. When the user analyzes a specific data point, the surrounding elements should also be provided. It helps to determine where in the big picture the data point stands, thereby avoiding going back and forth.</p><h4>Interactive exploration</h4><p>Interactive visualizations should give the user an overview and allow zooming and filtering at the same time. It should be able to provide details on demand. Shneiderman called this principle the visual information-seeking mantra [13].</p><h4>Consider your audience</h4><p>A visualization that is going to be used by professionals daily, has different requirements than the one in a blog post. The latter is most likely to be analyzed just once and should be simpler and easier to learn. In that matter, we need to consider the target audience before the actual design process.</p><h4>Further reading material</h4><ol><li>Riccardo Mazza. <em>Introduction to Information Visualization</em>. Springer Publishing Company, Incorporated, 1 edition, 2009.</li><li>Stephen Few. <em>Information Dashboard Design: The Effective Visual Communication of Data.</em> O’Reilly Media, Inc., 2006.</li><li>Anne Treisman. <em>Preattentive processing in vision.</em> Computer Vision, Graphics, and Image Processing, 31(2):156–177, 1985.</li><li>Colin Ware. <em>Information Visualization: Perception for Design.</em> Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2004.</li><li>Christian Behrens. <em>The Form of Facts and Figures.</em> Ph.D. thesis, University of Applied Sciences Potsdam, February 2008.</li><li>Max Wertheimer. <em>Untersuchungen zur lehre von der gestalt.</em> ii. Psychologische Forschung, 4(1):301–350, 1923.</li><li>Wolfgang Kohler. <em>Gestalt Psychology.</em> H. Liveright, New York, 1929.</li><li>Kurt Koffa. <em>Principles of Gestalt Psychology.</em> Harcourt., New York, 1935.</li><li>Edward R. Tufte. <em>The Visual Display of Quantitative Information.</em> Graphics Press, Cheshire, CT, USA, 1986.</li><li>Jeffrey Heer and George Robertson. <em>Animated transitions in statistical data graphics. </em>IEEE Trans. Visualization &amp; Comp. Graphics (Proc. InfoVis), 13:1240–1247, 2007.</li><li>Cynthia A. Brewer. <em>Guidelines for use of the perceptual dimensions of color for mapping and visualization.</em> Proc. SPIE, 2171:54–63, 1994.</li><li>David McCandless. <a href="http://www.theguardian.com/news/datablog/2010/apr/01/information-is-beautiful-military-spending"><em>Information is beautiful: war games. who really spends the most on their armed forces?</em></a></li><li>B. Shneiderman. <em>The eyes have it: a task by data type taxonomy for information visualizations.</em> Proceedings 1996 IEEE Symposium on Visual Languages, pages 336–343, 1996.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8c6e46ddc5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guava collections and functional approach]]></title>
            <link>https://hasanoviz.medium.com/guava-collections-and-functional-approach-917708492956?source=rss-25214607a2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/917708492956</guid>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[guava]]></category>
            <dc:creator><![CDATA[Hafiz Hasanov]]></dc:creator>
            <pubDate>Thu, 19 Mar 2015 12:16:10 GMT</pubDate>
            <atom:updated>2022-07-20T12:03:42.020Z</atom:updated>
            <content:encoded><![CDATA[<p>By the time I had my first encounter with the guava library, I expected it to be just as similar to apache’s commons. which I extensively used before. But soon I realized it was almost nothing similar. One of the things I liked a lot was the idea of using functions as input parameters for such methods as filtering or transforming iterables. I didn’t struggle to grasp the idea, because I had the basic knowledge of functional programming with Haskell and also a tiny bit of experience with JavaScript. Yet, being a recent graduate I didn’t dot have much experience with beautiful oop design. I was curious to see how it was implemented. Turned out to be a simple idea, to define a Function object. Genius. Now I think about it and feel ashamed to realize that I could have never thought of such a simple idea.</p><p>Back to guava, the usage is pretty straightforward.</p><pre>Iterable circles = Iterables.transform(rectangles, new Function(){ <br>    <a href="http://twitter.com/Override">@Override</a> <br>    public CircularShape apply(RectangularShape input) { <br>        return new CircularShape(input.getId(), input.getHeight(), input.getWidth());<br>    } <br>});</pre><p>Apart from Function, some functions such as filters take a Predicate as an argument. Of course, the release of Java 8 and its support for lambda expressions removes the need to use these functions. This part of guava addresses users before Java 8, which is quite new and not actively used by many people. In any case, as it is also stated in guava wikis, it is not always of the best readability to use this approach over imperative code[1]. So this post is more of a result of my desire to share my curiosity about the design and implementation of the approach.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=917708492956" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>