<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Technical Blog by Maciej Chałapuk | SoftwarePhilosophy.Ninja</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Maciej Chałapuk shares his thoughts on software architecture, code modeling, programming paradigms and best development practices. A programming tech blog.">

    <meta name="keywords" content="software philosophy, development practices, software design, code design, software architecture, quality attributes, non-functional requirements, design patterns, ">
    <meta name="author" content="Maciej Chałapuk">
    <link rel="canonical" href="http://softwarephilosophy.ninja/">

    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

<link href='/assets/stylesheets/application-c2b73b14ad2eb1d52e23c8125eee4c0c.css' type='text/css' rel='stylesheet' media='all'>
  <!-- Update these with your own images
    <link rel="shortcut icon" href="images/favicon.ico">
    <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
  -->

  <link href="https://fonts.googleapis.com/css?family=Roboto+Slab:700,400,300,100|Prociono|Iconsolata" rel="stylesheet">
  </head>

  <body class="container-wide">

    <header class="navbar">
      <div class="container-narrow">
        <a class="logo" href="/">
          <img src="http://spcdn.chalapuk.pl/assets/media/phi-logo.svg">
          <span class="type">SoftwarePhilosophy<span class="caption">.Ninja</span></span>
        </a>
        <ul class="nav without-phone">
          <li><a href="/about"><span>Huh?</span></a></li>
        </ul>
        <ul class="nav phone-only">
          <li><a href="/about"><span>?</span></a></li>
        </ul>
      </div>
    </header>

    <div class="content">
      <div class="container-wide absolute jumbotron require-filters desktop-only">
 <div class="bg" style="background-image: url(/assets/media/literate-tutorial.png);">
  <div class="container-narrow">
   <img src="/assets/media/literate-tutorial.png" alt="Software Philosophy">
  </div>
 </div>
</div>

<div class="container-narrow never-padding">
 <div class="top-image">
  <div class="shadow-left require-filters desktop-only"></div>
  <div class="shadow-right require-filters desktop-only"></div>
  <a href="/literate-programming-really-works-for-tutorials">
   <img src="/assets/media/literate-tutorial.png" alt="A paper and&nbsp;a&nbsp;feather inside an&nbsp;inkwell lie&nbsp;on&nbsp;a&nbsp;wooden table. Text on&nbsp;the&nbsp;paper: &amp;ldquo;Tutorial, torn apart by&nbsp;Gulp, was&nbsp;re-built into a&nbsp;nice looking website.&amp;rdquo;. On&nbsp;the&nbsp;wall hangs a&nbsp;monitor which displays test: &amp;ldquo;compiling...&amp;rdquo;." >
  </a>
 </div>
</div>

<div class="container-narrow">
 <div class="post post-summary latest-post hoverable">
  <h1><a href="/literate-programming-really-works-for-tutorials">Literate programming really works for&nbsp;tutorials</a></h1>
  <p class="tags">
    <span class="tag">&nbsp;#literate programming&nbsp;</span> <span class="tag">&nbsp;#tutorial&nbsp;</span> <span class="tag">&nbsp;#example project&nbsp;</span> <span class="tag">&nbsp;#markdown&nbsp;</span> <span class="tag">&nbsp;#generated&nbsp;</span> <span class="tag">&nbsp;#html&nbsp;</span> <span class="tag">&nbsp;#css&nbsp;</span> <span class="tag">&nbsp;#javascript&nbsp;</span> <span class="tag">&nbsp;#node&nbsp;</span> <span class="tag">&nbsp;#writ&nbsp;</span> <span class="tag">&nbsp;#gulp&nbsp;</span> <span class="tag">&nbsp;#jshint&nbsp;</span> <span class="tag">&nbsp;#github&nbsp;</span> <span class="tag">&nbsp;#github pages&nbsp;</span> 
  </p>
  <p class="by">
    <a href="#Maciej Chałapuk">Maciej Chałapuk</a>
  </p>
  <p class="date">
    2016-09-19
  </p>
  <div class="summary ellipsis"><p>Have you heard about literate programming? It's a technique that lets you write a computer program
the same way as if you were writing a piece of literature. And while it may seem exotic
and unnecessary, there are some cases when it's quite useful. I believe I have found
one of them. In this post, I will describe a solution for writing a tutorial in the spirit
of literate programming by using nodejs-based, language-agnostic, literate programming tool.</p></div>
  <p class="more arrow">
    <a href="/literate-programming-really-works-for-tutorials">Read full article</a>.
  </p>
 </div>
</div>

<div class="more-posts">
 <div class="container-narrow">

  <div class="post post-summary hoverable">
   <p class="date-small">
     2016-04-04
   </p>
   <h1><a href="/compile-time-unit-testing">Compile-Time Unit Testing</a></h1>
   <p class="tags">
     <span class="tag">#cpp</span> <span class="tag">#unit testing</span> <span class="tag">#debugging</span> <span class="tag">#static typing</span> <span class="tag">#static binding</span> <span class="tag">#static assert</span> <span class="tag">#constant expression</span> <span class="tag">#partial specialization</span> <span class="tag">#compile-time</span> 
   </p>
   <p class="date">
     2016-04-04
   </p>
   <div class="summary ellipsis"><p>These days, <a href="https://en.wikipedia.org/wiki/Unit_testing">unit testing</a> became a major part of software engineer's work.
We familiarized ourselves with unit testing frameworks based on <a href="https://en.wikipedia.org/wiki/XUnit">xUnit</a> architecture
(e.g. <a href="https://en.wikipedia.org/wiki/JUnit">JUnit</a>, <a href="https://en.wikipedia.org/wiki/SUnit">SUnit</a>) where tests are executed during <a href="https://en.wikipedia.org/wiki/Run_time_%28program_lifecycle_phase%29">run time</a> of the test program.
As of time of this writing, it's the most popular way of testing in an <a href="https://en.wikipedia.org/wiki/Object-oriented_programming">object-oriented</a>
environment.
Few years ago, I started using <a href="https://en.wikipedia.org/wiki/Compile_time">compile-time</a> unit testing in my <a href="https://en.wikipedia.org/wiki/C%2B%2B">C++</a> experiments.
As it turned out quite well, I will try to share my experience in here. This article describes
reasons for using compile-time unit testing, provides examples of code that can be tested this way,
and shows how to debug such tests.</p></div>
   <p class="more arrow-small">
     <a href="/compile-time-unit-testing">Read full article</a>.
   </p>
  </div>
  <div class="post post-summary hoverable">
   <p class="date-small">
     2016-02-19
   </p>
   <h1><a href="/why-do-we-learn-next-programming-languages">Why&nbsp;do&nbsp;we&nbsp;learn next programming languages?</a></h1>
   <p class="tags">
     <span class="tag">#polyglot programming</span> <span class="tag">#programming language</span> <span class="tag">#programing paradigm</span> <span class="tag">#learning</span> <span class="tag">#language design</span> <span class="tag">#community</span> <span class="tag">#mindset</span> <span class="tag">#skillset</span> <span class="tag">#career</span> 
   </p>
   <p class="date">
     2016-02-19
   </p>
   <div class="summary ellipsis"><p>Self-education can be as painful as it can be gratifying. The trick is to know when to expect what.
Contents of this article are aimed at establishing a correct (IMHO) <a href="https://en.wikipedia.org/wiki/Mindset">mindset</a> in the topic
of learning programming languages. I will try to convince you that knowing multiple languages
well is the way to excell as a software developer. You'll get to know the benefits
of polyglot programming, reasons for not liking it, what programming gurus have to say in this matter, and how to choose the next language to learn.</p></div>
   <p class="more arrow-small">
     <a href="/why-do-we-learn-next-programming-languages">Read full article</a>.
   </p>
  </div>
  <div class="post post-summary hoverable">
   <p class="date-small">
     2015-11-24
   </p>
   <h1><a href="/distributed-transactions">Distributed Transactions</a></h1>
   <p class="tags">
     <span class="tag">#transactions</span> <span class="tag">#distributed transactions</span> <span class="tag">#two-phase commit</span> <span class="tag">#transactionless</span> <span class="tag">#protocol design</span> <span class="tag">#contracts design</span> <span class="tag">#tradeoffs</span> <span class="tag">#architecture</span> 
   </p>
   <p class="date">
     2015-11-24
   </p>
   <div class="summary ellipsis"><p>Recently, I had few email conversations with past job coleague of mine. The most challenging one was on the topic of <a href="https://en.wikipedia.org/wiki/Distributed_transaction">distributed transactions</a>. It turns out we both had some experience with them,
but our opinions were rather different. As this topic is pretty hot these days, I decided
to write down our insights in this article. The goal is to list disadvantages of distributed
transactions, show how they are overused, provide an alternative approach, and specify conditions
under which each technique may be applied.</p></div>
   <p class="more arrow-small">
     <a href="/distributed-transactions">Read full article</a>.
   </p>
  </div>
  <div class="post post-summary hoverable">
   <p class="date-small">
     2015-11-08
   </p>
   <h1><a href="/go-to-spa-or-just-rest">Go&nbsp;to&nbsp;SPA&nbsp;or&nbsp;Just REST?</a></h1>
   <p class="tags">
     <span class="tag">#spa</span> <span class="tag">#rest</span> <span class="tag">#client-server</span> <span class="tag">#javascript</span> <span class="tag">#client-side</span> <span class="tag">#html5</span> <span class="tag">#webapp</span> <span class="tag">#offline</span> <span class="tag">#fault-tolerant</span> <span class="tag">#responsiveness</span> <span class="tag">#maintainability</span> <span class="tag">#simplicity</span> <span class="tag">#architecture</span> <span class="tag">#DRY</span> <span class="tag">#entropy</span> <span class="tag">#cost</span> <span class="tag">#pros-and-cons</span> <span class="tag">#software philosophy</span> 
   </p>
   <p class="date">
     2015-11-08
   </p>
   <div class="summary ellipsis"><p>Single Page Application (<a href="https://en.wikipedia.org/wiki/Single-page_application">SPA</a>) is an old, yet only lately popular way of creating programs
for the web. The idea is to fetch most of the resources from the server when user loads
a website and then, as the user interacts with the site, fetch and store data via calls to an <abbr title="Application Programming Interface">API</abbr> endpoint
(typically <a href="https://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a>).
In effect, page is never reloaded, wich makes the expecience more smooth than with traditional
webpage. This article highlights main characteristics of SPA and specifies conditions under
which the concept is preferably applicable.</p></div>
   <p class="more arrow-small">
     <a href="/go-to-spa-or-just-rest">Read full article</a>.
   </p>
  </div>

 </div>
</div>



    </div>

    <footer class="footer dark">
      <section class="container-narrow">
        <header class="author row">
          <a href="https://github.com/mchalapuk"><img src="http://spcdn.chalapuk.pl/assets/media/cocky.png" alt="A portrait photo of Maciej."></a>
          <div class="desc">
            <h1 id="Maciej Chałapuk"><a href="https://github.com/mchalapuk">Maciej Chałapuk</a></h1>
            <p>
              Polyglot programmer, technical leader, software architect, devops engineer, web developer, technical writer, music production nerd, <abbr title="Science Fiction">Sci-Fi</abbr> fan, author of this blog.
          </div>
        </header>
        <div class="links row justify">
          <section class="follow cell">
            <h3 id="follow-ups">Follow Ups</h3>
            <ul>
              <li><a href="https://github.com/mchalapuk">Github Profile</a>
              <li><a href="http://programmers.stackexchange.com/users/100148/maciej-cha%C5%82apuk?tab=profile">Random Forum Profile</a>
              <li><a href="https://pl.linkedin.com/in/maciejchalapuk">LinkedIn Profile</a>
              <li><a href="https://github.com/mchalapuk/curriculum-vitae">My Resume</a>
              <li><a href="/about">About This Blog</a>
            </ul>
          </section>
          <section class="blogs cell">
            <h3>Blogs Worth Reading</h3>
            <ul>
              <li><a href="http://wiki.c2.com/">Ward Cunningham's Wiki</a>
              <li><a href="http://www.joelonsoftware.com/">Joel On Software</a>
              <li><a href="http://martinfowler.com/bliki/">Martin Fowler's Bliki</a>
              <li><a href="https://swizec.com/blog/">A Geek With a Hat</a>
              <li><a href="http://stackoverflow.blog/">StackOverflow Official</a>
            </ul>
          </section>
          <section class="badges cell">
            <h3>Badges</h3>
            <ul>
              <li><a href="http://ruhoh.com/"><img src="http://spcdn.chalapuk.pl/assets/media/ruhoh-powered-badge.svg" alt="Powered by Ruhoh,"></a>
              <li><a href="http://sassline.com/"><img src="http://spcdn.chalapuk.pl/assets/media/sassline-powered-badge.svg" alt="Powered by Sassline,"></a>
              <li><a href="https://github.com/mchalapuk/softwarephilosophy.ninja"><img src="http://spcdn.chalapuk.pl/assets/media/github-hosted-badge.svg" alt="Hosted on Github,"></a>
              <li><a href="http://feeds.feedburner.com/softwarephilosophyninja"><img src="http://spcdn.chalapuk.pl/assets/media/feedburner-badge.svg" alt="Feed by FeedBurner,"></a>
              <li><a href="http://creativecommons.org/licenses/by/4.0/"><img src="http://spcdn.chalapuk.pl/assets/media/license-CC40-badge.svg" alt="Licensed with CC4.0"></a>
            </ul>
          </section>
        </div>
        <footer class="row copyright">
          <p>
            <span class="nowrap">Copyright &copy; 2016 - 2019 Maciej Chałapuk</span>
            <span class="vr"></span>
            <a href="/">SoftwarePhilosophy.Ninja</a>
            <span class="vr"></span>
            <span class="nowrap"><a href="/sitemap">Site Map</a></span>
          </p>
        </footer>
      </section>
    </footer> <!-- /footer -->

    <!-- Google Prettify -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/prettify/188.0.0/prettify.js"></script>
<script>
  var pres = document.getElementsByTagName("pre");
  for (var i=0; i < pres.length; ++i) {
    pres[i].className = "prettyprint linenums";
  }
  prettyPrint();
</script>
<!-- end Google Prettify -->
    <script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-52632708-1']);
  _gaq.push(['_trackPageview']);
  

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>



<script type="text/javascript">

document.addEventListener('DOMContentLoaded', function() {
  if (browserSupportsFilters()) {
    document.body.classList.add('filters-enabled');
  }
  [].slice.apply(document.querySelectorAll('blockquote'))
    .filter(onlyStartingWithHeader)
    .forEach(addClass('note'));

  function browserSupportsFilters() {
    var el = document.createElement('div');
    el.style.cssText = 'filter: blur(2px); -webkit-filter: blur(2px);';
    return el.style.length !== 0 && (!document.documentMode || documentMode > 9);
  }

  function onlyStartingWithHeader(elem) {
    switch (elem.children[0].nodeName) {
      case 'H1':
      case 'H2':
      case 'H3':
      case 'H4':
      case 'H5':
      case 'H6':
        return true;
      default:
        return false;
    }
  }
  function addClass(className) {
    return function(elem) {
      elem.classList.add(className);
    };
  }
});

</script>

  </body>
</html>

