Browse Source

Added the compiled blog, to be used in DigitalOcean App Platform

master
Julio Biason 2 years ago
parent
commit
b16cae6321
  1. 2
      .gitignore
  2. 0
      public/.gitkeep
  3. 66
      public/404.html
  4. 92
      public/announcements/about-me/index.html
  5. 43
      public/announcements/index.html
  6. 88
      public/announcements/juliobiasonnet-40/index.html
  7. 43
      public/books/index.html
  8. 115
      public/books/things-i-learnt/add-then-remove/index.html
  9. 115
      public/books/things-i-learnt/always-vcs/index.html
  10. 112
      public/books/things-i-learnt/app-composition-stupid/index.html
  11. 124
      public/books/things-i-learnt/application-composition/index.html
  12. 108
      public/books/things-i-learnt/bad-code-defense/index.html
  13. 112
      public/books/things-i-learnt/blogging/index.html
  14. 114
      public/books/things-i-learnt/boolean-parameters/index.html
  15. 119
      public/books/things-i-learnt/cargo-cult/index.html
  16. 109
      public/books/things-i-learnt/coc/index.html
  17. 128
      public/books/things-i-learnt/code-formatters/index.html
  18. 112
      public/books/things-i-learnt/code-reviews-style/index.html
  19. 112
      public/books/things-i-learnt/code-style/index.html
  20. 133
      public/books/things-i-learnt/cognitive-cost/index.html
  21. 114
      public/books/things-i-learnt/command-line-options/index.html
  22. 135
      public/books/things-i-learnt/config-file/index.html
  23. 129
      public/books/things-i-learnt/crash-it/index.html
  24. 115
      public/books/things-i-learnt/data-flow/index.html
  25. 117
      public/books/things-i-learnt/data-types/index.html
  26. 120
      public/books/things-i-learnt/debuggers/index.html
  27. 120
      public/books/things-i-learnt/disclaimer/index.html
  28. 115
      public/books/things-i-learnt/document-and/index.html
  29. 118
      public/books/things-i-learnt/document-is-contract/index.html
  30. 126
      public/books/things-i-learnt/document-it/index.html
  31. 114
      public/books/things-i-learnt/fixable/index.html
  32. 142
      public/books/things-i-learnt/functional-programming/index.html
  33. 111
      public/books/things-i-learnt/future-trashing/index.html
  34. 117
      public/books/things-i-learnt/gerrit/index.html
  35. 133
      public/books/things-i-learnt/gherkin/index.html
  36. 112
      public/books/things-i-learnt/git-flow/index.html
  37. 103
      public/books/things-i-learnt/google-code-style/index.html
  38. 117
      public/books/things-i-learnt/handle-it/index.html
  39. 113
      public/books/things-i-learnt/hero-projects/index.html
  40. 111
      public/books/things-i-learnt/hero-syndrome/index.html
  41. 43
      public/books/things-i-learnt/index.html
  42. 155
      public/books/things-i-learnt/integration-tests/index.html
  43. 115
      public/books/things-i-learnt/interface-changes/index.html
  44. 130
      public/books/things-i-learnt/intro/index.html
  45. 139
      public/books/things-i-learnt/languages-are-more/index.html
  46. 119
      public/books/things-i-learnt/languages-docs/index.html
  47. 108
      public/books/things-i-learnt/languages-tests/index.html
  48. 116
      public/books/things-i-learnt/learn-about-yourself/index.html
  49. 126
      public/books/things-i-learnt/libraries/index.html
  50. 126
      public/books/things-i-learnt/log-events/index.html
  51. 172
      public/books/things-i-learnt/magical-number-seven/index.html
  52. 135
      public/books/things-i-learnt/microaggressions/index.html
  53. 108
      public/books/things-i-learnt/monitoring/index.html
  54. 114
      public/books/things-i-learnt/not-done/index.html
  55. 121
      public/books/things-i-learnt/one-change-commit/index.html
  56. 117
      public/books/things-i-learnt/optimization/index.html
  57. 121
      public/books/things-i-learnt/outside-project/index.html
  58. 124
      public/books/things-i-learnt/own-your-shit/index.html
  59. 109
      public/books/things-i-learnt/paper-notes/index.html
  60. 117
      public/books/things-i-learnt/patterns-not-solutions/index.html
  61. 105
      public/books/things-i-learnt/people-care/index.html
  62. 124
      public/books/things-i-learnt/permanent-solution/index.html
  63. 116
      public/books/things-i-learnt/post-solution/index.html
  64. 159
      public/books/things-i-learnt/project-organization/index.html
  65. 110
      public/books/things-i-learnt/quit/index.html
  66. 111
      public/books/things-i-learnt/resist-easy/index.html
  67. 128
      public/books/things-i-learnt/responsible-code/index.html
  68. 107
      public/books/things-i-learnt/right-tool-agenda/index.html
  69. 108
      public/books/things-i-learnt/right-tool-obvious/index.html
  70. 122
      public/books/things-i-learnt/run-locally/index.html
  71. 110
      public/books/things-i-learnt/say-no/index.html
  72. 116
      public/books/things-i-learnt/small-world/index.html
  73. 130
      public/books/things-i-learnt/spec-first/index.html
  74. 126
      public/books/things-i-learnt/specialists/index.html
  75. 112
      public/books/things-i-learnt/start-stupid/index.html
  76. 141
      public/books/things-i-learnt/steps-as-comments/index.html
  77. 107
      public/books/things-i-learnt/stupid-bugs-list/index.html
  78. 123
      public/books/things-i-learnt/team-discussion/index.html
  79. 129
      public/books/things-i-learnt/tests-apis/index.html
  80. 138
      public/books/things-i-learnt/tests-dead-code/index.html
  81. 117
      public/books/things-i-learnt/tests-in-the-command-line/index.html
  82. 93
      public/books/things-i-learnt/things-i-dont-know/index.html
  83. 120
      public/books/things-i-learnt/throw-away/index.html
  84. 108
      public/books/things-i-learnt/time-to-stop/index.html
  85. 116
      public/books/things-i-learnt/time/index.html
  86. 115
      public/books/things-i-learnt/toxic-people/index.html
  87. 112
      public/books/things-i-learnt/transparent/index.html
  88. 118
      public/books/things-i-learnt/understand-shortcuts/index.html
  89. 109
      public/books/things-i-learnt/units/index.html
  90. 141
      public/books/things-i-learnt/use-structures/index.html
  91. 121
      public/books/things-i-learnt/use-timezones/index.html
  92. 133
      public/books/things-i-learnt/use-utf8/index.html
  93. 114
      public/books/things-i-learnt/users/index.html
  94. 113
      public/books/things-i-learnt/watch-reactions/index.html
  95. 105
      public/books/uma-licao-de-vim/00-intro/index.html
  96. BIN
      public/books/uma-licao-de-vim/00-intro/vim-zero.png
  97. BIN
      public/books/uma-licao-de-vim/01-01-modo-normal/Mind-Blown.jpg
  98. 142
      public/books/uma-licao-de-vim/01-01-modo-normal/index.html
  99. BIN
      public/books/uma-licao-de-vim/01-02-entendendo-o-cursor/areyoufuckingkiddingme.jpg
  100. 112
      public/books/uma-licao-de-vim/01-02-entendendo-o-cursor/index.html
  101. Some files were not shown because too many files have changed in this diff Show More

2
.gitignore vendored

@ -1,3 +1,3 @@
*.sw?
public/*
# public/*
tags

0
public/.gitkeep

66
public/404.html

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">404: Page not found</h1>
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href=https:&#x2F;&#x2F;blog.juliobiason.me>Head back home</a> to try finding it again.</p>
</div>
</div>
</body>
</html>

92
public/announcements/about-me/index.html

@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">About Me</h1>
<span class="post-date">
2018-11-28
<a href="https://blog.juliobiason.me/tags/meta/">#meta</a>
<a href="https://blog.juliobiason.me/tags/myself/">#myself</a>
<a href="https://blog.juliobiason.me/tags/about-me/">#about me</a>
</span>
<p>In case it wasn't clear by the URL, this is the blog of <strong>Julio Biason</strong>.</p>
<p>I'm a software developer/engineer/architect for about 30 years -- which
doesn't mean I know everything about software
development/engineering/architecture, but I do try.</p>
<p>You can contact me over <code>julio &quot;dot&quot; biason &quot;at&quot; pm &quot;dot&quot; me</code>, just convert
the things in quotes to their symbol and remove the spaces -- and all that
just because I want to make the life of spammers harder, and sorry about
making <em>your</em> life harder, but still...</p>
<p>You can see my random thoughts on <a href="https://functional.cafe/@juliobiason">Functional
Cafe</a>.</p>
<p>I do have a Twitter account, but I'm not updating it as often as I do on
Functional Cafe.</p>
<p>I do not have a Facebook account -- not anymore.</p>
</div>
</div>
</body>
</html>

43
public/announcements/index.html

@ -0,0 +1,43 @@
<html>
<head>
<title>Zola</title>
</head>
<body>
<div class="container">
<h1>Welcome to Zola!</h1>
<p>
You're seeing this page because we couldn't find a template to render.
</p>
<p>
To modify this page, create a <b>section.html</b> file in the templates directory or
<a href="https://www.getzola.org/documentation/themes/installing-and-using-themes/" target="_blank">install a theme</a>.
<br>
You can find what variables are available in this template in the <a href="https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;templates&#x2F;pages-sections&#x2F;#section-variables" target="_blank">documentation</a>.
</p>
</div>
<footer>
<a href="https://www.getzola.org/documentation/getting-started/cli-usage/" target="_blank">Get started with Zola</a>
</footer>
<style>
html {
line-height: 1.5;
}
h1 {
margin-bottom: 2rem;
}
.container {
font-family: "sans-serif";
text-align: center;
margin-top: 20vh;
padding: 2rem;
background: #e9e9e9;
}
footer {
position: fixed;
width: 100%;
bottom: 1rem;
text-align: center;
}
</style>
</body>
</html>

88
public/announcements/juliobiasonnet-40/index.html

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Announcing JulioBiason.Net 4.0</h1>
<span class="post-date">
2018-11-28
<a href="https://blog.juliobiason.me/tags/meta/">#meta</a>
<a href="https://blog.juliobiason.me/tags/blog/">#blog</a>
<a href="https://blog.juliobiason.me/tags/zola/">#zola</a>
</span>
<p>Short version: New new blog engine and layout.</p>
<span id="continue-reading"></span>
<p>Long version: Just to change things a bit, I moved my blog from
<a href="http://blog.getpelican.com/">Pelican</a> to <a href="https://www.getzola.org/">Zola</a>, for
absolutely no good reason. Actually, there is one good reason: Zola is a single
binary that I can carry around with my blog content, so I don't need to worry
about Python and VirtualEnv and download packages (although those things are a
breeze with Python).</p>
<p>But, for the sake of contantly changing and breaking stuff.... new engine!</p>
</div>
</div>
</body>
</html>

43
public/books/index.html

@ -0,0 +1,43 @@
<html>
<head>
<title>Zola</title>
</head>
<body>
<div class="container">
<h1>Welcome to Zola!</h1>
<p>
You're seeing this page because we couldn't find a template to render.
</p>
<p>
To modify this page, create a <b>section.html</b> file in the templates directory or
<a href="https://www.getzola.org/documentation/themes/installing-and-using-themes/" target="_blank">install a theme</a>.
<br>
You can find what variables are available in this template in the <a href="https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;templates&#x2F;pages-sections&#x2F;#section-variables" target="_blank">documentation</a>.
</p>
</div>
<footer>
<a href="https://www.getzola.org/documentation/getting-started/cli-usage/" target="_blank">Get started with Zola</a>
</footer>
<style>
html {
line-height: 1.5;
}
h1 {
margin-bottom: 2rem;
}
.container {
font-family: "sans-serif";
text-align: center;
margin-top: 20vh;
padding: 2rem;
background: #e9e9e9;
}
footer {
position: fixed;
width: 100%;
bottom: 1rem;
text-align: center;
}
</style>
</body>
</html>

115
public/books/things-i-learnt/add-then-remove/index.html

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - One Version To Add, One Version To Remove</h1>
<span class="post-date">
2019-07-30
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/versions/">#versions</a>
<a href="https://blog.juliobiason.me/tags/upgrades/">#upgrades</a>
</span>
<p>A lot of things change during development. One day you need a field, another
day that field may be completely different. For those cases, use one version
to add the new field and another to remove.</p>
<span id="continue-reading"></span>
<p>You have a database with a lot of customers and their ID is numerical. But for
some reason, they now need to be strings. Instead of changing the field type
and doing a whole migration, make a deploy with a new field, in which you'll
keep the old <em>and</em> the new format going on and, in the next release, remove
the old field. No downtime. You can even run the migration while the system is
up, since the new field won't be used.</p>
<p>(I'm simplifying the problem a lot here, 'cause the customer would have
references all around your system, but you get the point, right?)</p>
<p>I had a problem in which we store the link for an object directly in the
backend (we shouldn't, that's a frontend problem, but that's a discussion for
another time); our interface is changing and so should the link. If we did a
change in the link directly, that would mean the backend would have to be
deployed <em>at the same time</em> as the new interface; by adding the new link
format in another field, we can deploy the backend easily without breaking the
current system.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;transparent">Be Transparent With The User</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;monitoring">Learn To Monitor</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

115
public/books/things-i-learnt/always-vcs/index.html

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Always Use A Version Control System</h1>
<span class="post-date">
2019-07-08
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/source-control/">#source control</a>
<a href="https://blog.juliobiason.me/tags/vcs/">#vcs</a>
<a href="https://blog.juliobiason.me/tags/git/">#git</a>
</span>
<p>&quot;This is my stupid application that I just want to learn something&quot; is not
even a good excuse to not use a version control system.</p>
<span id="continue-reading"></span>
<p>A very long time ago, using a source control system (or Version Control
System) required installing a server, configuring it properly, installing the
client and <em>then</em> you could keep track of the changes you were doing on your
code.</p>
<p>Today there are lots of options that can work in a standalone fashion: Just
install the client and you're done (well, mostly done, you still need to
initialize the environment, but that is mostly straightforward these days).</p>
<p>And, again, there is no good reason to not start a project, as simple as it
will be, without a version control.</p>
<p>The VCS will allow you to explore new changes without breaking the main code.
It will allow you to save a half-way change to make a complete different
change.</p>
<p>And, in the long, since you'll end up with working in team and will be
required to use a VCS, you'll be used to using one.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;languages-docs">Good Languages Come With Integrated Documentation</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;one-change-commit">One Commit Per Change</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

112
public/books/things-i-learnt/app-composition-stupid/index.html

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Even for Application Composition, Start Stupid</h1>
<span class="post-date">
2019-07-15
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/composition/">#composition</a>
<a href="https://blog.juliobiason.me/tags/microservices/">#microservices</a>
</span>
<p>Application composition may lead to microservices -- which is good -- but
microservices require some ideas about how applications &quot;talk&quot; between them
over the wire (protocols and such) which you don't need to start with.</p>
<span id="continue-reading"></span>
<p>Again, because you just want to simplify your work, you can make the
applications use files directly: Have your first application generate two
files and the second application receive the file names from <a href="/books/things-i-learnt/command-line-options">the command
line</a>. There, simple and stupid,
and works.</p>
<p>You can even make the first application, instead of generating a file, just
send its result on the standard output, and have the second application
receive the data from the standard input -- both of which are managed as
files, anyway. Then, with a bit of magic, you can put everything together
without wasting space.</p>
<p>Worry about talking over the wire later, when you understand how networks
work.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;application-composition">Not Just Function Composition, But Application Composition</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;log-events">Logs Are For Events, Not User Interface</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

124
public/books/things-i-learnt/application-composition/index.html

@ -0,0 +1,124 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Not Just Function Composition, But Application Composition</h1>
<span class="post-date">
2019-07-15
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/composition/">#composition</a>
<a href="https://blog.juliobiason.me/tags/applications/">#applications</a>
</span>
<p>When we were discussing <a href="/books/things-i-learnt/magical-number-seven">the magical number
seven</a>, I mentioned that it made
more sense to actually call the functions in sequence instead of each calling
the next. That's basically a &quot;function composition&quot;, one thing you can also do
with your applications.</p>
<span id="continue-reading"></span>
<p>Unix came with the idea of &quot;applications that do one thing and do it well&quot;.
And then you could just pick the output of one application and plug it as
input of another (and then plug the output of the second into a third, and so
on).</p>
<p>Also, I mentioned that you could use <a href="/books/things-i-learnt/config-file">configuration
files</a> to do the same processing over
different source elements (based on a configuration, that is) instead of
writing an application that would process both in a single shot.</p>
<p>One problem with that approach is that you may need <em>both</em> results to actually
produce a usable result (for example, how would you build a list of common
followings of two Twitter users if you don't have both lists?).</p>
<p>That problem can easily be solved if you write a different application that
just receives both lists and compare them. That would greatly simplify your
general codebase 'cause instead of one massive codebase with lots of moving
pieces, you'd have two small codebases, with less moving pieces. One could
still break the other -- say, if you or someone else changes the result of the
first function -- but you will still get the results of the first without
missing the whole 'cause the second is breaking.</p>
<p>PS: I reckon it's really hard to create application composition with graphical
applications (why would you ask your user to have <em>two</em> applications open at
the same time to make something work?) but you can extrapolate this for almost
everything else.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;command-line-options">Command Line Options Are Weird, But Helpful</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;app-composition-stupid">Even for Application Composition, Start Stupid</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

108
public/books/things-i-learnt/bad-code-defense/index.html

@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Don&#x27;t Defend Bad Code</h1>
<span class="post-date">
2019-07-31
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/bad-code/">#bad code</a>
<a href="https://blog.juliobiason.me/tags/defend/">#defend</a>
</span>
<p>Bad code exists everywhere. You shouldn't defend it, even if it is your own
code.</p>
<span id="continue-reading"></span>
<p>Bad code isn't bad on purpose. It sadly happens. But because it is bad, you
shouldn't defend it.</p>
<p>For example, an application does whatever you need. But it crashes from time
to time. Software shouldn't crash and you shouldn't defend it just because it
does whatever you need.</p>
<p>Your internal application works on a single browser. That's bad. &quot;But maybe
the other devs thought it wouldn't be worth working on all browsers&quot;. No. It
is <em>bad</em>. You shouldn't defend the other devs because they decided to focus on
a single browser due whatever problems they were facing. Sure it wasn't nice
that they had to do this trade-off, but it is still <em>bad</em> software.</p>
<p>If we keep defending this kind of software, we will still get bad software.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;own-your-shit">Own Your Shit</a>
</div>
&nbsp;
</div>
</div>
</div>
</body>
</html>

112
public/books/things-i-learnt/blogging/index.html

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Blogging About Your Stupid Solution Is Still Better Than Being Quiet</h1>
<span class="post-date">
2019-07-25
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/blogging/">#blogging</a>
</span>
<p>You may feel &quot;I'm not start enough to talk about this&quot; or &quot;This must be so
stupid I shouldn't talk about it&quot;. Don't.</p>
<span id="continue-reading"></span>
<p>Create a blog. Post about your stupid solutions. They are still smarter than
someone else's solution.</p>
<p>Also, come back later and fight your own solutions with better ones.</p>
<p>Show your growth.</p>
<p>But do yourself a favour and turn off comments. Unfortunately, the internet is
a toxic place and the fears you may have are created by a small portion of it
that doesn't care about people learning.</p>
<p>Focus on your work. Focus on whatever you are thinking. Post about your
speculations if something would work. Revisit them later. Answer yourself. All
that will show that you're interested in the field and will count points
towards you.</p>
<p>There are several options on where to blog; even Github/Gitlab can be used to
blogging, using their Pages features.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;small-world">I.T. World Is Really Small</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;post-solution">Don&#x27;t Hide Your Stupid Solution</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

114
public/books/things-i-learnt/boolean-parameters/index.html

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Don&#x27;t Use Booleans As Parameters</h1>
<span class="post-date">
2019-06-23
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/booleans/">#booleans</a>
<a href="https://blog.juliobiason.me/tags/functions/">#functions</a>
<a href="https://blog.juliobiason.me/tags/parameters/">#parameters</a>
</span>
<p>When you're designing a function, you may be tempted to add a flag (a
parameter in a function that it is a boolean). Don't do this.</p>
<span id="continue-reading"></span>
<p>Here, let me show you an example: Suppose you have a messaging system and you
have a function that returns all the messages to an user, called
<code>getUserMessages</code>. But there is a case where you need to return a summary of
each message (say, the first paragraph) or the full message. So you add a
flag/Boolean parameter called <code>retrieveFullMessage</code>.</p>
<p>Again, don't do that.</p>
<p>'Cause anyone reading your code will see <code>getUserMessage(userId, true)</code> and
wonder what the heck that <code>true</code> means.</p>
<p>You can either rename the function to <code>getUserMessageSummaries</code> and have
another <code>getUserMessagesFull</code> or something around those lines, but each
function just call the original <code>getUserMessage</code> with true or false -- but the
interface to the outside of your class/module will still be clear.</p>
<p>But <em>don't</em> add flags/Boolean parameters to your API.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;future-trashing">Future Thinking is Future Trashing</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;interface-changes">Beware of Interface Changes</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

119
public/books/things-i-learnt/cargo-cult/index.html

@ -0,0 +1,119 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Understand And Stay Away From Cargo Cult</h1>
<span class="post-date">
2019-06-25
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/cargo-cult/">#cargo cult</a>
</span>
<p>&quot;<a href="https://en.wikipedia.org/wiki/Cargo_cult">Cargo cult</a>&quot; is a type of cult
which appeared in the Melanesia, in which the natives would build their copy
of an airplane (no motor, 'cause they didn't have the knowledge to build one
-- or even knew what went inside the airplane) in the hopes they would get the
same results as a real airplane.</p>
<span id="continue-reading"></span>
<p>In IT, a &quot;cargo cult&quot; is the expectation that if you use the same tools as
some big players, you'd end up getting the same results.</p>
<p>One example: Netflix runs a large fleet of microservices daily; they use
Spring Cloud; if we use Spring Cloud, we can also run a large fleet of
microservices.</p>
<p>Although it may sound correct in a first glance, things are not like that.
There is much more to the Netflix fleet than just Spring Cloud.</p>
<p>Sometimes, cargo cult can appear in a form of &quot;fanaticism&quot; about celebrities:
<a href="https://en.wikipedia.org/wiki/Martin_Fowler_(software_engineer)">Fowler</a> said
such and such pattern works this way and that's exactly what we should do.
Just because Fowler is well know software engineer and architect and do have
some very clever ideas, picking them and running exactly the way he described
may do more harm than good -- basically, 'cause you'd end up applying a
design pattern without worrying about solving your problem in the first place.</p>
<p>Another example: &quot;ProductX is sponsored by BigCompany, so it's good&quot;. It may
be, but the fact that BigCompany is being ProductX doesn't immediately makes
ProductX good, or even if it fits your solution. And there is much more
<a href="/books/things-i-learnt/languages-are-more">behind a product</a> than just its
development.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;languages-are-more">A Language Is Much More Than A Language</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;right-tool-agenda">Right Tool For The Job Is Just To Push An Agenda</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

109
public/books/things-i-learnt/coc/index.html

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Code of Conduct Protect YOU, Not THEM</h1>
<span class="post-date">
2019-07-18
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/coc/">#coc</a>
</span>
<p>When you're beginning with any language/library/framework, check their CoC;
they will protect <em>you</em> from being harassed for not immediately getting what
is going on instead of blocking you from telling them what you think.</p>
<span id="continue-reading"></span>
<p>I'm mentioning this 'cause a lot of people complain about CoC, but they
forget that they allow them to join in any project without being called
&quot;freaking noob&quot; or &quot;just go read the docs before annoying us&quot;.</p>
<p>And don't be afraid to ask moderators if someone that seems be in the
community for longer than you isn't break the CoC. Just because you just got
into the community, it doesn't mean you can't be part of it or that someone
can abuse their position of &quot;veteran&quot; to not respect you.</p>
<p>Also, remember that most people that are against CoCs are the ones that want
to be able to call names on everyone.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;time-to-stop">When It&#x27;s Time to Stop, It&#x27;s Time To Stop</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;say-no">Learn To Say No</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

128
public/books/things-i-learnt/code-formatters/index.html

@ -0,0 +1,128 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Code Formatting Tools Are Ok, But No Silver Bullet</h1>
<span class="post-date">
2019-07-16
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/code-formatting/">#code formatting</a>
<a href="https://blog.juliobiason.me/tags/code-style/">#code style</a>
</span>
<p>One thing a team may decide to fix the continuous flux of code style comments
in a code review is to use a code formatting tool to auto-format the code.
That's ok, but they should never rely on it.</p>
<span id="continue-reading"></span>
<p>Now yeah, that kinda solves the problem, but there is one small problem:
we, humans, are not as flexible to read code as computers are; what is
readable by a computer may not be readable by a human. Surely they try to
create some heuristics on what is good for human reading, but that doesn't mean
it gets right.</p>
<p>Also, unless you start from scratch to use the auto-formatting tool or do a
change in all files in one single go, you should never assume it will do a
good job.</p>
<p>I've seen tools like this implemented in a commit hook, in a way that the tool
would reformat the code just before adding it to the repository. The biggest
problem is that, in that team, we didn't run the auto-formatting tool in the
whole project before hand, and we also added a coverage tool (that checked the
coverage on the changed parts of the file) without every running the coverage
tool on everything. The result is that, suddenly, a lot of commits got refused
because the auto-formatting tool was changing lines that the developer didn't
change (it changed old code) and suddenly the coverage tool noted the missed
tests and decided it was no good.</p>
<p>So good, punctual changes were suddenly being blocked 'cause instead of doing
the whole thing in a single shot, people decided it was a good idea to let the
code evolve till everything fixed itself.</p>
<p>On top of that, some people who were neither in the mood to actually add the
tests or worried about style found a way to do the commits <em>without running
the hook</em>, so they basically skipped the whole &quot;let's improve our code&quot; and
let fuck all.</p>
<p>So, it's ok if you run the auto-formatting tool for yourself, but you need to
have the maturity and responsibility to watch yourself and be willing to fix
and take responsibility for other people's code when the formatter changes
their code.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;code-review-styles">Code Reviews Are Not For Style</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;code-style">Code Style: Follow It</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

112
public/books/things-i-learnt/code-reviews-style/index.html

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Code Reviews Are Not For Style</h1>
<span class="post-date">
2019-07-16
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/code-reviews/">#code reviews</a>
<a href="https://blog.juliobiason.me/tags/code-style/">#code style</a>
</span>
<p>When doing code reviews, do not focus on style; focus on design things that
look a bit weird.</p>
<span id="continue-reading"></span>
<p>Code reviews are designed to spread knowledge around the team, with focus on
construction and problem description. Does the sequence of code gives you an
understanding on what it is trying to do? Does it contains something you know
it will make things harder to read in the future? Does it miss the point?</p>
<p>That's the things you should focus.</p>
<p>If the author of the code missed a space here, left a blank line there...
that's of no consequence in a code review. This is not the thing to discuss in
the code review.</p>
<p>And people <em>hate</em> people who go through code reviews just to point
missing/extra spaces and lines.</p>
<p>On the other hand, if you find something weird in the code which is something
you want the author to recheck, <em>then</em> you're free to comment that &quot;it would
be good&quot; if they fix the style. But that's it.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;right-tool-obvious">The Right Tool Is More Obvious Than You Think</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;right-tool-obvious">The Right Tool Is More Obvious Than You Think</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

112
public/books/things-i-learnt/code-style/index.html

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Code Style: Follow It</h1>
<span class="post-date">
2019-07-16
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/code-style/">#code style</a>
</span>
<p>If your project have a defined code style, you must follow it. Sometimes it
may not be clear (&quot;this struct/class should be singular or plural&quot;?), but do
your best to follow it.</p>
<span id="continue-reading"></span>
<p>If your project doesn't have a style, maybe it's time to pick one. There are
well established styles for almost every language today, so you can start with
that. You can even make your changes, but you need to realize that since it's
been established for a while, a lot of other people are using that style and,
thus, if you keep as is, your code will mesh better with the rest of the
ecosystem.</p>
<p>And remember that even your stupid code is <a href="/books/things-i-learnt/languages-are-more">part of the ecosystem of the
language</a> and the better you
interact with the ecosystem, the better citizen in the ecosystem you are.</p>
<p><strong>TIP</strong>: If you don't have a code style yet, and you're using a language
that's derived from C or C++, use <a href="https://en.wikipedia.org/wiki/Indentation_style#K&amp;R_style">K&amp;R
Style</a>; if you're
working with Python, there is only one style:
<a href="https://www.python.org/dev/peps/pep-0008/">PEP8</a>.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;code-formatters">Code Formatting Tools Are Ok, But No Silver Bullet</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;google-code-style">... Unless That Code Style Is The Google Code Style</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

133
public/books/things-i-learnt/cognitive-cost/index.html

@ -0,0 +1,133 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Cognitive Cost Is The Readability Killer</h1>
<span class="post-date">
2019-06-26
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/cognitive-dissonance/">#cognitive dissonance</a>
<a href="https://blog.juliobiason.me/tags/cognitive-cost/">#cognitive cost</a>
</span>
<p>&quot;<a href="https://en.wikipedia.org/wiki/Cognitive_dissonance">Cognitive dissonance</a>&quot;
is a fancy way of saying &quot;I need to remember two (or more) different and
contradicting things at the same time to understand this.&quot; Keeping those
different things in your head creates a cost and it keeps accumulating the
more indirect the things are ('cause you'll have to keep all those in your
head).</p>
<span id="continue-reading"></span>
<p>(Disclaimer: I like to use the expression &quot;cognitive dissonance&quot; to make me
sound smarter. I usually explain what it means, though.)</p>
<p>To give you an example of a (very mild) cognitive cost, I'll show you this:</p>
<ul>
<li>You have a function called <code>sum()</code>. It does the sum of the numbers of a
list.</li>
<li>You have another function, called <code>is_pred()</code>. It gets a value and, if it
fits the predicate -- a test, basically -- returns True; otherwise,
returns False.</li>
</ul>
<p>So, pretty simple, right? One function sums numbers and another returns a
boolean.</p>
<p>Now, what would you say if I shown you this, in Python:</p>
<pre data-lang="python" style="background-color:#2b303b;color:#c0c5ce;" class="language-python "><code class="language-python" data-lang="python"><span style="color:#96b5b4;">sum</span><span>(</span><span style="color:#bf616a;">is_pred</span><span>(x) </span><span style="color:#b48ead;">for </span><span>x </span><span style="color:#b48ead;">in </span><span>my_list)
</span></code></pre>
<p>Wait, didn't I say that <code>sum()</code> sums numbers? And that <code>is_pred()</code> returns a
boolean. How can I sum booleans? What's the expected result of True + True +
False?</p>
<p>Sadly, this works. Because someone, long time ago, didn't think booleans were
worth a thing and used an integer instead. And everyone else since then did
the same stupid mistake.</p>
<p>But, for you, you'll now read a line that says &quot;summing a boolean list returns
a number&quot;. And that's two different, disparate things that you suddenly have
to keep in mind when reading that line.</p>
<p>That's why <a href="/books/things-i-learnt/data-types">types are important</a>. Also,
this may sound a bit like <a href="/books/things-i-learnt/magical-number-seven">the magical number
seven</a>, 'cause you have to keep
two things at your mind at the same thing but, although that's not near seven,
they are not the same, with opposite (for weird meanings of &quot;opposite&quot;, in
this case) meanings.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;magical-number-seven">The Magic Number Seven, Plus Or Minus Two</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;functional-programming">Learn The Basics of Functional Programming</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

114
public/books/things-i-learnt/command-line-options/index.html

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Command Line Options Are Weird, But Helpful</h1>
<span class="post-date">
2019-07-15
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/configuration/">#configuration</a>
<a href="https://blog.juliobiason.me/tags/command-line-options/">#command line options</a>
<a href="https://blog.juliobiason.me/tags/cli/">#cli</a>
</span>
<p>In this day and age, when everything has a graphical interface, does it still
makes sense to add command line options to your application? In fact, it does.</p>
<span id="continue-reading"></span>
<p>When I mentioned the configuration file, you may have thought about using
adding a default path for it and using the same file over and over.</p>
<p>Well, that's not wrong, but what if you want to use a different configuration?
Would you keep moving the original configuration file to another place, moving
your configuration back and keep this back and forth? Keep both versions and
just use a <a href="https://en.wikipedia.org/wiki/Symbolic_link">symbolic link</a> with
the configuration filename pointing to the one you want?</p>
<p>Why not add a command line option in which the user can select which
configuration file should be loaded?</p>
<p>This would make their life <em>and yours</em> easy.</p>
<p>Also, be aware that, today, there may be libraries to handle command line in
every language, which will help you build a good command line interface, along
with standardizing it to have the same interface as other applications.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;config-file">The Config File Is Friend</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;application-composition">Not Just Function Composition, But Application Composition</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

135
public/books/things-i-learnt/config-file/index.html

@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - The Config File Is Friend</h1>
<span class="post-date">
2019-07-15
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/configuration/">#configuration</a>
<a href="https://blog.juliobiason.me/tags/config-file/">#config file</a>
</span>
<p>Do not ignore the power of configuration files.</p>
<span id="continue-reading"></span>
<p>Imagine you wrote a function that you have to pass a value for it to start
processing (say, a twitter user account id). But then you have to do that with
two values and you just call the function again with the other value.</p>
<p>It makes more sense to use a config file and just run the application twice
with two different config files 'cause, this way, you have a single, small,
testable application instead of two, or a very complex application that does a
lot of stuff.</p>
<p>We can even jump into the idea of <a href="/books/things-i-learnt/libraries">creating
libraries</a> and say that, instead of
splitting your e-commerce application into smaller parts and making a big one
by grouping these smaller parts, you could simply have one e-commerce
application and, for each of your clients, you would have a different
configuration file, pointing to different assets. This way, even the assets
may reside in the same repository in the same branch, 'cause all that
identifies which assets should be used are defined in the configuration file.</p>
<p>&quot;But which one should I use?&quot; you may ask. Well, &quot;it depends&quot;. It may make
sense to have one single application with different configuration files if
most of its can be used all the time. If the intersection of used things is
very small, it may make more sense to split into different libraries and just
&quot;pick and chose&quot; what to use.</p>
<p>But besides the replacement of libraries, you can also think things like: &quot;Ok,
I have to remove elements after a while<sup class="footnote-reference"><a href="#1">1</a></sup>; but which would be a good time
that they can exist before I can remove them?&quot; Well, if you're not quite sure
(and, sometimes, even when you're sure), you can use a configuration file to
define how long those elements will stay in the system before being expunged.
Maybe you're not even thinking about how long each element will stay in the
system, but how many of those elements you'll keep in the system before
removing the old ones -- which is, again, a good candidate to be moved to a
configuration file.</p>
<p>Configuration files allow you to change properties of the system without
recompiling everything. And, if in the future you decide to follow the <a href="https://en.wikipedia.org/wiki/Twelve-Factor_App_methodology">12
Factor app</a>,
you'll find that you're half-way through it.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>In other words, they have a <a href="https://en.wikipedia.org/wiki/Time_to_live">time to
live</a>.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;permanent-solution">Nothing More Permanent Than A Temporary Solution</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;command-line-options">Command Line Options Are Weird, But Helpful</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

129
public/books/things-i-learnt/crash-it/index.html

@ -0,0 +1,129 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - It&#x27;s Better To Let The Application Crash Than Do Nothing</h1>
<span class="post-date">
2019-06-24
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/exceptions/">#exceptions</a>
<a href="https://blog.juliobiason.me/tags/error-handling/">#error handling</a>
</span>
<p>Although that sounds weird, it's better to not add any error handling than
silently capturing errors and doing nothing.</p>
<span id="continue-reading"></span>
<p>For example, a (sadly common) example of Java code:</p>
<pre data-lang="java" style="background-color:#2b303b;color:#c0c5ce;" class="language-java "><code class="language-java" data-lang="java"><span style="color:#b48ead;">try </span><span>{
</span><span> </span><span style="color:#bf616a;">something_that_can_raise_exception</span><span>()
</span><span>} </span><span style="color:#b48ead;">catch </span><span>(</span><span style="color:#ebcb8b;">Exception </span><span style="color:#bf616a;">ex</span><span>) {
</span><span> </span><span style="color:#ebcb8b;">System</span><span>.out.</span><span style="color:#bf616a;">println</span><span>(ex);
</span><span>}
</span></code></pre>
<p>This does nothing to deal with the exception -- besides printing it, that is.</p>
<p>The example may be a bit bad, 'cause Java forces capturing exceptions on
functions that throw exceptions and it forces functions to mark themselves as
throwing exceptions if there a <code>throw</code> in them.</p>
<p>But Python doesn't have this restriction and people <em>still</em> try to capture
exceptions for doing absolutely nothing -- and, worse, just keep the execution
going.</p>
<p>If the language allows it, you should let the application crash due the lack
of error handling -- as long as you don't have any idea on how to handle it.
Then, when they crash, you can think of a way to deal with it, instead of
silently capturing it and doing nothing.</p>
<p>Also, keep in mind to not go forth and capture <em>every</em> exception/error in a
single take -- like the example above, which will capture every exception, or
like <code>except Exception</code> in Python. This last example actually happened to me
when another developer added this &quot;broad except&quot;<sup class="footnote-reference"><a href="#1">1</a></sup> in a network code and, at
some point, the code would get into the capture all the time. We checked every
cable, every connection, every interface, till I noticed there was a syntax
error in the code. In Python, syntax errors raise exceptions and, because we
had a &quot;capture all exceptions&quot;, we lost some pretty good time looking for the
problem in the wrong place.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>As called by Pylint.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;interface-changes">Beware of Interface Changes</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;handle-it">If You Know How To Handle It, Handle It</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

115
public/books/things-i-learnt/data-flow/index.html

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Thinking Data Flow Beats Patterns</h1>
<span class="post-date">
2019-06-26
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/data-flow/">#data flow</a>
<a href="https://blog.juliobiason.me/tags/design-patterns/">#design patterns</a>
</span>
<p>When you're trying to find a solution to your problem, think on the way the
data will flow through your code.</p>
<span id="continue-reading"></span>
<p>Instead of focusing on design patterns, a better way is to think the way the
data will flow -- and be transformed -- on your code.</p>
<p>For example, the user will input a number. You'll get this number and find the
respective record on the database. This is a transformation -- no, it's not
&quot;I'll get the number and receive a complete different thing based upon it&quot;,
you're actually transforming the number into a record, using the database as a
transformation.</p>
<p>(Yes, I know, it's not that clear at the first glance, but you have to think
that they are the same data with different representations.)</p>
<p>Most of the time I did that, I managed to come with more clear design for my
applications. I didn't even think about how many functions/classes it would be
needed to do these kind of transformations, that was something I came up
<em>after</em> I could see the data flow.</p>
<p>In a way, this way of thinking gets things more clear 'cause you have a list
of steps of transformations you need to do, so you can write them one after
another, which prevents a lot of bad code in the future.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;patterns-not-solutions">Design Patters Are Used to Name Solution, Not Find Them</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;magical-number-seven">The Magic Number Seven, Plus Or Minus Two</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

117
public/books/things-i-learnt/data-types/index.html

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Types Say What You Data Is</h1>
<span class="post-date">
2019-06-24
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/types/">#types</a>
</span>
<p>Memory is just a sequence of bytes; bytes are just numbers from 0 to 255; what
those numbers mean is described on the language type system.</p>
<span id="continue-reading"></span>
<p>For example, in C, a <code>char</code> type of value 65 is most probably the letter &quot;A&quot;,
which an <code>int</code> of value is 65 is the number 65.</p>
<p>Remember this when dealing with your data.</p>
<p>And it doesn't matter of your language of choice uses dynamic typing or static
typing. The same still applies.</p>
<p>One classic example of misusing types is adding booleans. Booleans are either
<code>true</code> or <code>false</code>, but because most languages follow C, which doesn't have a
boolean type and uses compiler pre-processors to define <code>TRUE</code> as an integer
with the value <code>1</code> and <code>FALSE</code> with another integer with the value <code>0</code>. Newer
languages were build on top of what older developers knew, and so, a bunch of
those languages also assumed using an integer under booleans was a good idea.
And even today, with modern languages, people rely on those old methods.</p>
<p>Let me repeat that: You're adding booleans and expecting a number -- only
because in the old times there wasn't boolean types.</p>
<p>No, you're counting the number of elements in the list 'cause that would see
the whole list. You're not even filtering the false values over and counting
the resulting list size. You're jumping the underlying type to get a bit of
performance out.</p>
<p>Fortunately, some new languages are using booleans as a complete different
type and wouldn't allow this kind of stuff.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;handle-it">If You Know How To Handle It, Handle It</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;use-structures">If Your Data Has a Schema, Use a Structure</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

120
public/books/things-i-learnt/debuggers/index.html

@ -0,0 +1,120 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Debuggers Are Overrated</h1>
<span class="post-date">
2019-07-08
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/debuggers/">#debuggers</a>
<a href="https://blog.juliobiason.me/tags/debugging/">#debugging</a>
</span>
<p>I heard a lot of people complaining that code editors are bad 'cause it's hard
to attach a debugger. I'd claim that this vision is wrong.</p>
<span id="continue-reading"></span>
<p>But let's take a thing out of the way beforehand: I'm not saying debuggers are
<em>bad</em> you should never use them. Debuggers have their use, but every time I
had to use one, it was because there was something missing.</p>
<p>Most recently, using a framework in Java, I had problems with my code. I'd
expect it <a href="/books/things-i-learnt/crash-it">to crash</a> 'cause I didn't handle
things. What actually happened is that the framework silently hid the error
and restarted the processing. To find out what was happening, I had to attach
a debugger and see what was wrong with the data; otherwise, I'd have no idea
about what's wrong.</p>
<p>Was a debugger necessary there? I don't think so. If the framework actually
displayed the error (crashed, put a wall of text on the logs, whatever), I
wouldn't need to use a debugger. But, because something was missing, I did,
in fact, was <em>forced</em> to use a debugger.</p>
<p>Besides this, in the long run, you'd end up with problems in locations that
you can't attach a debugger -- for example, your production environment. You
<em>could</em> but you <em>shouldn't</em> do this. On the other hand, if you <a href="/books/things-i-learnt/log-events">log
events</a>, then you can see what was going
on, without a debugger.</p>
<p>Again, I'm not taking the merits of debuggers, but in the long run, they are
mostly useless and actually point missing surrounding support to actually
understand what's going on.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;understand-shortcuts">Shortcuts Are Nice, But Only In The Short Run</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;users">Think About The Users</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

120
public/books/things-i-learnt/disclaimer/index.html

@ -0,0 +1,120 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Disclaimer</h1>
<span class="post-date">
2019-06-19
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/disclaimer/">#disclaimer</a>
</span>
<p>There is one magical thing you need to know when reading this book: It's all
personal opinion</p>
<span id="continue-reading"></span>
<p>A lot of stuff I'm going to discuss throughout this book will come directly
from my personal experience in several projects -- system applications, web
backend, embedded, mobile, stream processing -- in several different languages
-- C, C++, Python, Java, Clojure, Rust. And, because it comes from personal
experience, everything reflects my own personal opinion on several subjects.</p>
<p>Obviously, you don't need to agree with every single point. But I hope at
least it will make you rethink a few subjects.</p>
<p>Also, sometimes I may mention some examples that people who know me -- either
worked with me, heard me complain about some project, inherit one of my
projects, <em>I</em> inherit one of the <em>their</em> projects -- may recognized and think
I'm attacking the author.</p>
<p>I am not.</p>
<p>We do mistakes. Sometimes we don't know the topic with are attacking,
sometimes we don't have full specs, sometimes we don't have the time to write
things properly in a crunchtime. And that's why some things don't look as
pretty as they should. Heck, if you think I'm attacking the original author of
some example, look back the stuff I wrote and you'll see things a lot worse.</p>
<p>But I need the example. I have this hope that showing people a few mistakes
can make things better. I want to show people how my opinion built over
some subject. And, again, I'm in no way attacking the original author of the
code. I may even call the code &quot;stupid&quot;, but I'm not calling the author
<em>stupid</em>.</p>
<p>With that in mind...</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;intro">Intro</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;spec-first">Spec First, The Code</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

115
public/books/things-i-learnt/document-and/index.html

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - If A Function Description Includes An &quot;And&quot;, It&#x27;s Wrong</h1>
<span class="post-date">
2019-06-23
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/documentation/">#documentation</a>
<a href="https://blog.juliobiason.me/tags/single-responsibility/">#single responsibility</a>
</span>
<p>Functions should do one thing and one thing only. I clear indication that
you're breaking this principle is the need to add an &quot;and&quot; in its
documentation.</p>
<span id="continue-reading"></span>
<p>This is kind like &quot;sometimes rule&quot;, but most of the time, when you feel you
need to add an &quot;and&quot; to the function documentation (its
<a href="/books/things-i-learnt/document-is-contract">contract</a>), then you're telling
that that function is doing two (or more) things.</p>
<p>One of guiding principles of good code is the <a href="https://en.wikipedia.org/wiki/Single_responsibility_principle">Single responsibility
principle</a>, in
which each module/class/function should do one thing and one thing only. And,
again, if you're saying that a function is doing &quot;this&quot; <em>and</em> &quot;that&quot;, you can
be sure it's not doing just <em>one</em> thing.</p>
<p>Ok, but what now? Well, you have two functions, with two distinct contracts.
Ok, but you <em>had</em> those two being called, what happens now? Well, where you
called one, you now will need to call two. If your preferred language have
support for function composition, you can use that to group both functions
again. This is the kind of stuff that you'll get when you <a href="/books/things-i-learnt/functional-programming">learn to use
functional programming</a>.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;document-is-contract">The Function Documentation Is Its Contract</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;languages-docs">Good Languages Come With Integrated Documentation</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

118
public/books/things-i-learnt/document-is-contract/index.html

@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - The Function Documentation Is Its Contract</h1>
<span class="post-date">
2019-06-21
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/documentation/">#documentation</a>
<a href="https://blog.juliobiason.me/tags/contracts/">#contracts</a>
</span>
<p>When you start the code by <a href="/books/things-i-learnt/steps-as-comments">writing the general flow as
steps</a> and making each step a
function, you're actually making a contract (probably with your future self):
I'm saying this function does <em>this</em> and <em>this</em> is what it does.</p>
<span id="continue-reading"></span>
<p>Remember that the documentation must be a clear explanation of what your code
<em>is</em> doing and <em>why</em> it exists; remember that good messages will make <a href="/books/things-i-learnt/document-id">reading
the code only by the function documentation</a>
should be clear.</p>
<p>A function called <code>mult</code>, documented as &quot;Get the value and multiply by 2&quot; but,
when you look at the code, it does multiply by 2, but also sends the result
through the network or even just asks a remote service to multiply the
incoming result by 2, is clearly breaking its contract. It's not just
multiplying by 2, it's doing more than just that, or it's asking someone else
to manipulate the value.</p>
<p>Now, what happens when this kind of thing happens?</p>
<p>The easy solution is to change the documentation. But do you know if people
who called the function expecting it to be &quot;multiply value by 2&quot; will be happy
for it to call an external service? There is a clear breach of &quot;contract&quot; --
whatever you initially said your function would do -- so the correct solution
would be to add a new function with a proper contract -- and probably a better
name.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;document-it">Documentation Is a Love Letter To Your Future Self</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;document-and">If A Function Description Includes An And, It&#x27;s Wrong</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

126
public/books/things-i-learnt/document-it/index.html

@ -0,0 +1,126 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Documentation Is a Love Letter To Your Future Self</h1>
<span class="post-date">
2019-06-21
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/documentation/">#documentation</a>
</span>
<p>We all know writing the damn docs for functions and classes and modules is a
pain in the backside. But realizing what you were thinking when you wrote the
function will save your butt in the future.</p>
<span id="continue-reading"></span>
<p>When I say that it will save your butt, I don't mean the documentation will
tell you something like &quot;Here are the lotto numbers in 2027&quot;<sup class="footnote-reference"><a href="#1">1</a></sup> or &quot;If John
complains about your future code review, here is some shit he did in the
past&quot;.</p>
<p>I mean, it will explain how the <em>flow</em> of your code is expected to do. Imaging
this: pick your code and replace every function call to its documentation. Can
you understand what it is expected by reading that? If you can,
congratulations, you won't have a problem in the future; if you can't... well,
I have some bad news for you...</p>
<p>One point that may come here is &quot;Code is its own documentation&quot; or
&quot;self-documenting code&quot;. I do understand, and yes, simpler functions may make
the documentation redundant (for example, if you notice that you need a
function that multiplies two numbers -- and only do that -- giving it a
description of &quot;Multiples two numbers&quot; may look redundant), but you have to
ask yourself <em>why</em> you needed such simple function. <em>Why</em> it exists? <em>Where</em>
it sits in the general data flow?</p>
<p>Another thing you can document: rarely used functions. One example is Java
Collectors: In Java, you can create a stream of data, which you can apply
transformations and such and, in the end, you may put the resulting collection
of data into another structure -- a list, for example. The thing is,
collecting to a list is pretty common, but collecting into a map, with a
function as key and another value as value, splitting the result into two
different data blocks, is not that common. Because it is uncommon to see such
collector, it is a good idea to add tips on what each option is.</p>
<p>That's the things you need to document.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>Please, don't make me revise this in 2027... :(</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;languages-tests">Good Languages Come With Tests</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;document-is-contract">The Function Documentation Is Its Contract</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

114
public/books/things-i-learnt/fixable/index.html

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Toxic&#x2F;Aggressive People Are Not Fixable</h1>
<span class="post-date">
2019-07-23
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/microaggressions/">#microaggressions</a>
<a href="https://blog.juliobiason.me/tags/toxic-people/">#toxic people</a>
</span>
<p>You may think &quot;But I could go to those people and say 'Why are you being
toxic?' or 'Why are you attacking me?' or even just tell them it's not nice to
say such things. It would help.&quot;</p>
<p>I don't believe that's the case.</p>
<span id="continue-reading"></span>
<p>In the case of toxic people, they just want to see the place burn so they can
be the hero that saves the day. Microaggressors just want to make your feel
down 'cause so they could feel superior to you.</p>
<p>And I don't think they can be easily fixable. That's their modus operandi and
they will keep doing it so 'cause that's the only way they can see to
&quot;improve&quot; themselves -- even if there is no real improvement, they are just
letting everything down so they seem better than the others.</p>
<p>On the other hand, if you keep <a href="/books/things-i-learnt/watch-reactions">paying attention to the way people react to
you</a>, you may notice that you may be
doing this to others. And now the ball is in your park: Do you want to be a
better person or not?</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;microaggressions">Beware of Microaggressions</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;quit">Realize When It&#x27;s Time To Quit</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

142
public/books/things-i-learnt/functional-programming/index.html

@ -0,0 +1,142 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Learn The Basics of Functional Programming</h1>
<span class="post-date">
2019-06-26
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/functional-programming/">#functional programming</a>
</span>
<p>At this point, you should at least have heard about how cool functional
programming is. There are a lot of concepts here, but at least the very basic
ones you should keep in mind.</p>
<span id="continue-reading"></span>
<p>A lot of talks about functional programming come with weird words like
&quot;functors&quot; and &quot;monads&quot;. It doesn't hurt to know what they really mean
(disclaimer: I still don't). But some other stuff coming from functional
programming is actually easy to understand and grasp.</p>
<p>For example, immutability. This means that all your data can't change once
it's created. Do you have a record with user information and the user changed
their password? No, do not change the password field, create a new user record
with the updated password and discard the old one. Sure, it does a lot of
&quot;create and destroy&quot; sequences which makes absolutely no sense (why would you
allocate memory for a new user, copy everything from the old one to the new
one, update one field, and &quot;deallocate&quot; the memory from the old one? It makes
no sense!) but, in the long run, it would prevent weird results, specially
when you understand and start use threads.</p>
<p>(Basically, you're avoiding a shared state -- the memory -- between parts of
your code.)</p>
<p>Another useful concept is pure functions. Pure functions are functions that,
called with the same parameters, always return the same result, no matter how
many times you call them. One example of a <em>non</em> pure function is <code>random()</code>:
each time you call <code>random()</code>, you get a different number<sup class="footnote-reference"><a href="#1">1</a></sup>. An example of a
pure function would be something like this in Python:</p>
<pre data-lang="python" style="background-color:#2b303b;color:#c0c5ce;" class="language-python "><code class="language-python" data-lang="python"><span style="color:#b48ead;">def </span><span style="color:#8fa1b3;">mult</span><span>(</span><span style="color:#bf616a;">x</span><span>):
</span><span> </span><span style="color:#b48ead;">return </span><span>x * </span><span style="color:#d08770;">4
</span></code></pre>
<p>No matter how many times you call <code>mult(2)</code>, it will always return 8. Another
example could be our immutable password change above: You could easily write a
function that receives a user record and returns a new user record with the
password changed. You could call with the same record over and over again and
it will always return the same resulting record.</p>
<p>Pure functions are useful 'cause they are, first most, easy to test.</p>
<p>Second, they are easy to chain, specially in a <a href="/books/things-i-learnt/data-flow">data
flow</a> design: Because they don't have an
internal state (which is the real reason they are called pure functions), you
can easily call one after the other and no matter how many times you pass
things around, they still produce the same result. And because each function,
given the same input, produce the same result, chaining them all <em>also</em>
produces the same result given the same inputs.</p>
<p>Just those two concepts can make code longer (again, you're creating a new
user record instead of simply changing one field), but the final result is a
more robust code.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>Except in Haskell, but it does require sending the seed every time, so
you end up with random values based on the seed, so even there it is a pure
function.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;cognitive-cost">Cognitive Cost Is The Readability Killer</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;understand-shortcuts">Shortcuts Are Nice, But Only In The Short Run</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

111
public/books/things-i-learnt/future-trashing/index.html

@ -0,0 +1,111 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Future Thinking is Future Trashing</h1>
<span class="post-date">
2019-06-21
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/design/">#design</a>
<a href="https://blog.juliobiason.me/tags/solution/">#solution</a>
</span>
<p>When developers try to solve a problem, they sometimes try to find a way that
will solve all the problems, including the ones that may appear in the future.</p>
<span id="continue-reading"></span>
<p>Trying to solve the problems that will appear in the future comes with a hefty
tax: future problems future will never come -- and, believe me, they will
<em>never</em> come -- and you'll end up either having to maintain a huge behemoth of
code that will never be fully used or you'll end up rewriting the whole thing
'cause there is a shitton of unused stuff.</p>
<p>Solve the problem you have right now. Then solve the next one. And the next
one. At one point, you'll realize there is a pattern emerging from those
solutions and <em>then</em> you'll find your &quot;solve everything&quot;. This pattern is the
<em>abstraction</em> you're looking for and <em>then</em> you'll be able to solve it in a
simple way.</p>
<p>As Steve Jobs once said &quot;You can't connect the dots looking forward, only
backwards&quot;.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;throw-away">Be Ready To Throw Your Code Away</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;boolean-parameters">Don&#x27;t Use Booleans As Parameters</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

117
public/books/things-i-learnt/gerrit/index.html

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Gerrit Is A Mistake</h1>
<span class="post-date">
2019-07-29
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/git/">#git</a>
<a href="https://blog.juliobiason.me/tags/gerrit/">#gerrit</a>
<a href="https://blog.juliobiason.me/tags/source-control/">#source control</a>
</span>
<p>I hate calling software &quot;a mistake&quot;, but I can't find any other way to
describe Gerrit. You may see people using Gerrit 'cause Google uses it. The
thing is: Google misunderstood what Git actually is.</p>
<span id="continue-reading"></span>
<p>When Linus Torvalds came with Git, he was trying to mimic another system,
BitKeeper. Along with some improvements over CVS and SubVersion, Git made
really easy to create and merge branches, something that was either
almost-not-supported or slow-as-heck, depending on which tool you look at.</p>
<p>You need to take this into consideration: Git made branches easy.</p>
<p>Then someone came with the idea of Gerrit: Instead of managing branches, it
actually manages <em>commits</em>. Instead of having a branch for each feature, you
should have <em>one single commit</em> as feature. You can have branches on your
machine, but the server only deal with commits.</p>
<p>So Gerrit took Git, a tool that improved the way we deal with branches, and
removed branches. This is akin to taking a text editor and taking away the
ability to <em>edit text</em>. Does that sound right to you?</p>
<p>In my personal opinion, what they did was to take git apart and put an err in
the middle: gERRit.</p>
<p>When I see someone using Gerrit, I know something is wrong there.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;one-change-commit">One Commit Per Change</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;git-flow">Git-Flow Is The Way To Go</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

133
public/books/things-i-learnt/gherkin/index.html

@ -0,0 +1,133 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Gherkin Is Your Friend to Understand Expectations</h1>
<span class="post-date">
2019-06-19
<a href="https://blog.juliobiason.me/tags/book/">#book</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/gherkin/">#gherkin</a>
<a href="https://blog.juliobiason.me/tags/expectations/">#expectations</a>
</span>
<p>Gherkin is file format for writing behaviour tests (BDD). But it can also give
you some insights on what you should do.</p>
<span id="continue-reading"></span>
<p>Alright, let's talk a bit about Gherkin:</p>
<p><a href="https://en.wikipedia.org/wiki/Cucumber_(software)#Gherkin_language">Gherkin</a>
is a file format created for <a href="https://en.wikipedia.org/wiki/Cucumber_(software)">Cucumber</a>,
which describes scenarios, what's in them, what actions the user/system will
do and what's expected after those actions, in a very high level, allowing
people without programming experience can describe what's expected from the
system.</p>
<p>Although Gherkin was born with Cucumber, it is now supported by a bunch of
programming languages, through external libraries.</p>
<p>A typical Gherkin file may look something like this:</p>
<ul>
<li><strong>Given that</strong> <em>initial system environment</em></li>
<li><strong>When</strong> <em>action performed by the user or some external system</em></li>
<li><strong>Then</strong> <em>expected system environment</em></li>
</ul>
<p>Or, in a more concrete example:</p>
<ul>
<li><strong>Given that</strong> The system is retrieving all tweets liked by the user</li>
<li><strong>When</strong> It finds a tweet with an attachment</li>
<li><strong>Then</strong> The attachment should be saved along the tweet text</li>
</ul>
<p>Pretty simple, right?</p>
<p>Now, why I'm mentioning this?</p>
<p>Sometimes, specs are not the most clear source of information about what it is
expected from the system, and up can't think of <a href="/books/things-i-learnt/steps-as-comments">steps to do
so</a>. If you're confused about what
you should write, asking the person responsible for the request to write
something like Gherkin may give you some better insights about it.</p>
<p>Obviously, it won't be complete. People tend to forget the error situations --
like filling the name field with numbers, using characters in age fields,
tweets with no text and just attachments -- but at least with a Gherkin
description of the system, you can get a better picture of the whole.</p>
<p>Also, you may not like to write specs. That's alright, you can replace them
with Gherkin anyway.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;steps-as-comments">Write Steps as Comments</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;patterns-not-solutions">Design Patters Are Used to Name Solution, Not Find Them</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

112
public/books/things-i-learnt/git-flow/index.html

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Git-Flow Is The Way To Go</h1>
<span class="post-date">
2019-07-30
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/git/">#git</a>
<a href="https://blog.juliobiason.me/tags/git-flow/">#git flow</a>
<a href="https://blog.juliobiason.me/tags/source-control/">#source control</a>
</span>
<p>If <a href="/books/thing-i-learnt/gerrit">Gerrit is such a mistake</a>, what can you use
instead? Git Flow!</p>
<span id="continue-reading"></span>
<p>Git Flow is a plugin for Git for managing branches. It is based on the concept
of &quot;feature branches&quot;, in which each branch is a feature or bug you're working
on. Once you finish it, it will just close the branch.</p>
<p>Although there is a lot to be said about Git and how you should use it, the
fact is that Git Flow manages a lot of complexity of having a stable branch,
an &quot;unstable&quot;/testing branch and all features around those.</p>
<p>Not only that, but with the current source control sites like Github and
GitLab, the flow is quite similar -- although working with branches is changed
with forks.</p>
<p>You can even install Git Flow and use it on your personal project -- which is
something I do with this blog/book!</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;gerrit">Gerrit Is A Mistake</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;project-organization">Organize Your Code by Data&#x2F;Type, Not Functionality</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

103
public/books/things-i-learnt/google-code-style/index.html

@ -0,0 +1,103 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - ... Unless That Code Style Is The Google Code Style</h1>
<span class="post-date">
2019-07-16
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/code-style/">#code style</a>
<a href="https://blog.juliobiason.me/tags/google-code-style/">#google code style</a>
</span>
<p>Every freaking time Google comes with their own coding style, it's a garbage
fire. The community came with a better style way before and Google seem to
come with a style with high contrasting parts just to call it theirs.</p>
<span id="continue-reading"></span>
<p>The only reason to use Google Code Style is in case someone less smart than
you decided it would be a good idea to use it. Then, I feel sorry for you, but
you'll have to follow Google Code Style.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;code-style">Code Style: Follow It</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;hero-projects">Hero Projects: You&#x27;ll Have To Do It Yourself</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

117
public/books/things-i-learnt/handle-it/index.html

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - If You Know How To Handle It, Handle It</h1>
<span class="post-date">
2019-06-24
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/exceptions/">#exceptions</a>
<a href="https://blog.juliobiason.me/tags/error-handling/">#error handling</a>
</span>
<p>If you know an error can occur, then you should handle it properly, instead of
ignoring it.</p>
<span id="continue-reading"></span>
<p>This is the opposite point of <a href="/books/things-i-learnt/crash-it">let it crash</a>:
You're writing some code that you <em>know</em> it can crash in a certain way, what
should you do? Well, the answer is simple: <em>handle</em> it, not <em>ignore</em> it.</p>
<p>If we go back to the fact that Java will describe every single exception that
can be thrown by a function, you should handle each exception, no excuses.</p>
<p>If you're using Python, then you should capture the exceptions you know how to
handle, no exceptions -- and tying with the previous point, if you don't know
how to handle them, you should not capture them in the first place.</p>
<p>But, no matter what language you're using, if you know an error/exception can
occur, <em>deal with it</em>. If you have to save the content of the user somewhere
else, log it to be reprocessed later or even just show an error message, do
it.</p>
<p>Although I seriously meant it, it doesn't mean you have to remember every
single exception/error code and what it means when calling a function. You can
write code that will actually go through the happy path and later fill the
blanks. Or even, when you're working on another part of the code, if you
remember another problem, just write on a post-it and add the handling later.
The important bit is not to forget to handle it.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;crash-it">It&#x27;s Better To Let The Application Crash Than Do Nothing</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;data-types">Types Say What You Data Is</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

113
public/books/things-i-learnt/hero-projects/index.html

@ -0,0 +1,113 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - ... Unless That Code Style Is The Google Code Style</h1>
<span class="post-date">
2019-07-25
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/community/">#community</a>
<a href="https://blog.juliobiason.me/tags/teams/">#teams</a>
<a href="https://blog.juliobiason.me/tags/hero-project/">#hero project</a>
</span>
<p>An &quot;hero project&quot; is a project/spec change that you personally think will
solve a group of problems in your project. It could be a different
architecture, a new framework or even a new language.</p>
<span id="continue-reading"></span>
<p>Hero projects happen mostly when a single developer wants to prove something
without the support of the company or even the time they are in.</p>
<p>On those projects, developers will spend their free time to write a
proof-of-concept, just to prove a point.</p>
<p>And, sometimes, it just proves that they are were wrong.</p>
<p>(Although that last point sounds a bit sad, if you have to do an hero project,
you'll still learn something new and, maybe, even add a new bullet point to
your CV.)</p>
<p>Just to be clear: Sometimes an hero project will fail <a href="/books/things-i-learnt/right-tool-obvious">because the answer is
obvious</a>. Don't let that make you
feel down.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;google-code-style">... Unless That Code Style Is The Google Code Style</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;team-discussion">Global Changes Must Be Discussed With The Whole Team First</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

111
public/books/things-i-learnt/hero-syndrome/index.html

@ -0,0 +1,111 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Don&#x27;t Confuse Hero Project With Hero Syndrome</h1>
<span class="post-date">
2019-07-25
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/hero-syndrome/">#hero syndrome</a>
</span>
<p>Someone that suffers from Hero Syndrome will claim that things won't work
unless they are carefully watching over everything.</p>
<span id="continue-reading"></span>
<p>I've seen this at least two times in my professional life. Usually, those
people are actually doing so much micromanaging that they are not other
realize when things are in trouble.</p>
<p>I've even seen someone doing a poor job on <em>their job</em>, so things would break
and then start calling people out that he had to fix it 'cause nobody would.</p>
<p>Don't do that.</p>
<p>I know you can get frustrated when you're the only one realizing things are
breaking apart, but you can add some
<a href="/books/things-i-learnt/monitoring">monitoring</a> to your project, asking your
manager to show your solution -- you can even mention it on your group/daily
stand up meeting -- and pointing out to people how to realize when your
project broke. Suddenly, people will realize how to monitor theirs too.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;watch-reactions">Pay Attention On How People React To You</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;toxic-people">Beware of Toxic People</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

43
public/books/things-i-learnt/index.html

@ -0,0 +1,43 @@
<html>
<head>
<title>Zola</title>
</head>
<body>
<div class="container">
<h1>Welcome to Zola!</h1>
<p>
You're seeing this page because we couldn't find a template to render.
</p>
<p>
To modify this page, create a <b>section.html</b> file in the templates directory or
<a href="https://www.getzola.org/documentation/themes/installing-and-using-themes/" target="_blank">install a theme</a>.
<br>
You can find what variables are available in this template in the <a href="https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;templates&#x2F;pages-sections&#x2F;#section-variables" target="_blank">documentation</a>.
</p>
</div>
<footer>
<a href="https://www.getzola.org/documentation/getting-started/cli-usage/" target="_blank">Get started with Zola</a>
</footer>
<style>
html {
line-height: 1.5;
}
h1 {
margin-bottom: 2rem;
}
.container {
font-family: "sans-serif";
text-align: center;
margin-top: 20vh;
padding: 2rem;
background: #e9e9e9;
}
footer {
position: fixed;
width: 100%;
bottom: 1rem;
text-align: center;
}
</style>
</body>
</html>

155
public/books/things-i-learnt/integration-tests/index.html

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Unit Tests Are Good, Integration Tests Are Gooder</h1>
<span class="post-date">
2019-06-19
<a href="https://blog.juliobiason.me/tags/book/">#book</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/unit-tests/">#unit tests</a>
<a href="https://blog.juliobiason.me/tags/integration-tests/">#integration tests</a>
</span>
<p>The view of the whole is greater than the sum of its parts. And that includes
tests for the whole compared to tests of single things.</p>
<span id="continue-reading"></span>
<p>First, I just don't want to into a discussion about what's the &quot;unit in a unit
test&quot;<sup class="footnote-reference"><a href="#1">1</a></sup>, so let's take the point that a unit test is a test that tests a
class/function, not the whole system from end to end, which would require data
flowing through several classes/functions.</p>
<p>There are several libraries/frameworks that actually split this in a way that
you can't test the whole.
<a href="https://spring.io/">Spring</a>+<a href="https://site.mockito.org/">Mockito</a> is one of
those combinations -- and one that I worked with. Due the bean container of
Java, the extensive use of Beans by Spring and the way Mockito interacts with
the container, it's pretty easy to write tests that involve only one class:
You can ask Mockito to mock every dependency injection (so it injects mocked
beans instead of the real ones) in one class and mock every injected class,
simply using annotations.</p>
<p>And this is cool and all and makes tests simple and fast. But the fact that we
are making sure each class does what it should do, it doesn't give a proper
view of the whole; you can't see if that collection of perfectly tested
classes actually solve the problem the system is responsible for solving.</p>
<p>Once, in C++, I wrote an alarm system
<a href="https://en.wikipedia.org/wiki/Daemon_(computing)">daemon</a> for switches. There
were three different levels of things the alarm system should do, depending on
the incoming message from a service: It could only log the message of the
incoming error, it could log the error and send a SNMP message, or it could
log the error, send a SNMP message and turn a LED in the front panel on.
Because each piece had a well defined functionality, we broke the system in
three different parts: One for the log, one for the SNMP and one for the LED.
All tested, all pretty. But I still had a nagging feeling that something was
missing. That's when I wrote a test that would bring the daemon up, send some
alarms and see the results.</p>
<p>And, although each module was well tested, we still got one things we were
doing it wrong. If we never wrote an integration test, we would never catch
those.</p>
<p>Not only that, but because we wrote a test that interacted with the daemon, we
could get a better picture of its functionality and the test actually <em>made
sense</em> -- as in, if you read the unit tests, they seemed disconnected from
what the daemon was expected to do, but the integration tests actually read
like &quot;Here, let me show that we actually did what you asked&quot;. And yes, this
was akin to <a href="/books/things-i-learnt/gherkin">Gherkin</a> tests, although I didn't
know Gherkin at the time -- and, better yet, we had tests that proved that we
were following the <a href="/books/things-i-learnt/spec-first">spec</a>.</p>
<p>Personally, I think over time integration tests become more important than
unit tests. The reason is that I personally have the feeling<sup class="footnote-reference"><a href="#2">2</a></sup> that unit
tests check if the classes/functions have <em>adherence</em> to the underlying
<em>design</em> -- Does your view can actually work without the controller? Is the
controller using something from the model or using things that should be in
the view? -- but adherence to the design gets better over time -- developers
start using the layout from previous examples, so they capture the design by
osmosis, while the big picture starts to get more and more complex, with lots
of moving parts.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>There is no &quot;unit&quot; in &quot;unit tests&quot;. &quot;Unit test&quot; means the test <em>is</em> a
unit, indivisible and dependent only on itself.</p>
</div>
<div class="footnote-definition" id="2"><sup class="footnote-definition-label">2</sup>
<p>Again, it's pure feeling from my experience. I have no data to back that
affirmation up, so take it with a grain of salt.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;users">Think About The Users</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;tests-dead-code">Testing Every Function Creates Dead Code</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

115
public/books/things-i-learnt/interface-changes/index.html

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Beware of Interface Changes</h1>
<span class="post-date">
2019-06-23
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/interfaces/">#interfaces</a>
<a href="https://blog.juliobiason.me/tags/apis/">#apis</a>
</span>
<p>Interfaces and APIs is what you give away to others. If you keep changing them,
you'll make everyone's life sad.</p>
<span id="continue-reading"></span>
<p>When talking about <a href="/books/things-i-learnt/boolean-parameters">boolean
parameters</a>, I mentioned about
renaming the function. If you control the whole source where the function is
used, that's not issue, it's just a matter of search and replace.</p>
<p>But if that function was actually exposed in a library, you shouldn't change
function names in a whim. That will break a lot of other applications beyond
your control and make a lot of other people unhappy.</p>
<p>Remember, when you write <a href="/books/things-i-learnt/tests-apis">tests for APIs</a>,
you can see these kind of changes happening and you can see the kind of
changes you're doing on how they reflect externally.</p>
<p>You can create the new functions and mark the current one as deprecated,
either by documentation or by some code feature. Then, after a few releases,
you can finally kill the original function.</p>
<p>(A dickish move you can do is to create the new functions, mark the current
function as deprecated and <em>add a sleep at the start of the function</em>, in a
way that people using the old function are forced to update.)</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;boolean-parameters">Don&#x27;t Use Booleans As Parameters</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;crash-it">It&#x27;s Better To Let The Application Crash Than Do Nothing</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

130
public/books/things-i-learnt/intro/index.html

@ -0,0 +1,130 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Intro</h1>
<span class="post-date">
2019-06-18
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/intro/">#intro</a>
</span>
<p>&quot;Things I Learnt The Hard Way (In 30 Years of Software Development)&quot; started
as a simple sequence of toots (the same as &quot;tweets&quot;, on
<a href="https://functional.cafe/@juliobiason">Mastodon</a> when I was thinking about a
new presentation I could do.</p>
<p>But why &quot;a new presentation&quot;?</p>
<span id="continue-reading"></span>
<p>I go around my state with a group called
&quot;<a href="https://tchelinux.org/">Tchelinux</a>&quot;: We usually go to universities and talk
to people starting uni, explaining things about free/libre software and
sometimes telling people about things they wouldn't normally see in the uni
curriculum.</p>
<p>One thing that annoys me is that there are very few presentations about &quot;when
things go wrong&quot;. All the presentations show prototypes or tell the good
stuff, and hide all the wrong things that could happen<sup class="footnote-reference"><a href="#1">1</a></sup>. Obviously, after
working 30 years in the field of software development, I saw my fair share of
things going wrong -- sometimes in unimaginable piles of crap -- and I thought
&quot;maybe that's something people would like to hear&quot;.</p>
<p>(And, to be completely honest, some of those piles of crap were my own fault.)</p>
<p>And that's when the toot sequence started. Just before I noticed, I spent the
whole day just posting this kind of stuff (fortunately, my pile of things in
the &quot;incoming&quot; folder was a bit empty at the time) and it had 30 points, plus
addenda and a few explanation points. That's when I decided to group all
them in a single post.</p>
<p>(Actually, I'm lying: Someone mentioned on Functional Café that I should make
a blog post for making it easier to read.)</p>
<p>All I thought when I grouped everything in a post was &quot;this will make things
easier for the people following the thread on Mastodon&quot;. But then the post
appeared on Reddit. And Twitter. And HackerNews. And YCombinator. And none of
those where mine.</p>
<p>But here is the thing: Each point was limited by the toot size, which is 500
characters. Sometimes that's not enough to expand the point, explain it
properly and add some examples.</p>
<p>And that's how the idea to write this &quot;book&quot; came to life.</p>
<p>One thing you must keep in mind here: <em>These are my options</em>. I understand
that not everything is so black and white as put here, and some people's
experiences may not match things here. Also, you get a bit cynical about
technology after 30 years. So... thread carefully, 'cause here be dragons.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>Yup, I'm guilty of that too.</p>
</div>
<div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;disclaimer">Disclaimer</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

139
public/books/things-i-learnt/languages-are-more/index.html

@ -0,0 +1,139 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - A Language Is Much More Than A Language</h1>
<span class="post-date">
2019-06-24
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/languages/">#languages</a>
<a href="https://blog.juliobiason.me/tags/community/">#community</a>
<a href="https://blog.juliobiason.me/tags/ecosystem/">#ecosystem</a>
</span>
<p>Picking a programming language is much more than just picking the words that
will generate a code. They come with a community, a leadership, an ecosystem
and a thread the binds them all together.</p>
<span id="continue-reading"></span>
<p>Programming languages, in essence, are simply a bunch of keywords that make
things &quot;go&quot;. But besides those keywords, they also bring their community, the
way the leaders deal with the community, the tools created by the leaders or
community to deal with the minutiae of creating a system, the way those tools
interact with each other, and a lot more.</p>
<p>While a language may have a simple syntax, it may be that the ones controlling
the language actually don't give two shits -- if you pardon my French -- to
the community. They focus on solving <em>their</em> problems, not the community
problems<sup class="footnote-reference"><a href="#1">1</a></sup>.</p>
<p>Or maybe the community has duplicate tools -- which is not a problem -- but
that developers of each tool don't talk to each other. Or worse: They simply
refuse to look what other tools are doing, which could be used to improve
their own<sup class="footnote-reference"><a href="#2">2</a></sup>.</p>
<p>And maybe that third language is not as simple as others, but the leadership
is always discussing things with the community, being transparent on their
decision, allowing the community to discuss the future of the language and
even different groups building tools decided to merge efforts to give the
community better tools.</p>
<p>That's why you can't &quot;pick&quot; a language by its syntax alone. That's only the
surface of what the whole of a language encapsulates and if you ignore the
other elements in it, you may find yourself with a cute language in a
community that is always fighting and never going forward.</p>
<p>And picking a language for something <em>above</em> the syntax is even worse.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>Yes, this is common, even in larger communities. And yes, I've seen the
leadership ignoring requests from the community and, sometimes, just
ignoring all the hard work the community did to supply the missing bits
because they didn't like it.
<sup class="footnote-reference"><a href="#2">2</a></sup>: Again, I've seen this before: There was a language that didn't come with
a build tool bundled. The community created a tool, which was widely
adopted. Later, a new build tool appeared and, in one of the notes, the
author of the new tool mentioned a feature. The community came and asked
&quot;The previous build tool did something like that, what's the difference
between that and your tool?&quot; And the answer was &quot;I never used the first
tool.&quot; So, basically, the community ignored whatever the community was
using.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;monitoring">Learn To Monitor</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;outside-project">Don&#x27;t Mess With Things Outside Your Project</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

119
public/books/things-i-learnt/languages-docs/index.html

@ -0,0 +1,119 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Good Languages Come With Integrated Documentation</h1>
<span class="post-date">
2019-06-23
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/languages/">#languages</a>
<a href="https://blog.juliobiason.me/tags/documentation/">#documentation</a>
</span>
<p>If you're worried about learning some new programming language, you can bet
the one with a better documentation is the one that is <em>born</em> with a document
processor.</p>
<p>Same goes for the frameworks/libraries of that language.</p>
<span id="continue-reading"></span>
<p>The answer for that is the same as <a href="https://blog.juliobiason.me/books/things-i-learnt/languages-docs/languages-tests">languages that come with
tests</a>: because the programming language standard library
comes with a documentation generator or even because documentation is bundled
in the language itself, it reduces the friction needed to start writing the
documentation.</p>
<p>Python is a curious case that it came with a simple documentation generator
(PyDoc) and a bundled documentation format (DocStrings). Nowadays, almost
nobody is using the default documentation generator anymore, but because the
documentation format is still there and is still supported by the language
(documentation appears as a property of every function, class and module),
other tools took the post of default documentation generator, but the
documentation format is still heavy used.</p>
<p>Also, the opposite seems almost always true: If the language doesn't come with
integrated documentation, there is a very good chance that the documentation
or the language or frameworks and libraries will be bad. Or, in the very
least, every library will pick its own format, every framework will pick its
own format and they will never match the language format, and you'll end up
with a mess of a documentation to decipher.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;document-and">If A Function Description Includes An And, It&#x27;s Wrong</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;always-vcs">Always Use A Version Control System</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

108
public/books/things-i-learnt/languages-tests/index.html

@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Good Languages Come With Tests</h1>
<span class="post-date">
2019-06-20
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/programming-languages/">#programming languages</a>
<a href="https://blog.juliobiason.me/tags/tests/">#tests</a>
</span>
<p>You can be sure that if a language brings a testing framework -- even minimal
-- in its standard library, the ecosystem around it will have better tests
than a language that doesn't carry a testing framework, no matter how good the
external testing frameworks for the language are.</p>
<span id="continue-reading"></span>
<p>The reason is kinda obvious on this one: When the language itself brings a
testing framework, it reduces the friction for people to start writing tests,
and that includes the authors of the language itself and the community.</p>
<p>Sure, better frameworks may come along, and languages that don't have a
testing framework in their standard library may have options with better
support and easier access but, again, when they are there from the start, the
start is better and the final result is better.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;tests-in-the-command-line">Make Tests That You Know How To Run On The Command Line</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;document-it">Documentation Is A Love Letter To Your Future Self</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

116
public/books/things-i-learnt/learn-about-yourself/index.html

@ -0,0 +1,116 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - You&#x27;ll Learn About Yourself The Hard Way</h1>
<span class="post-date">
2019-07-19
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/burn-out/">#burn out</a>
</span>
<p>We get frustrated with code that doesn't compile. We get angry with customers
asking things back and forth. We get upset when upper management can't make up
its mind. And we lash out on others when that happens.</p>
<span id="continue-reading"></span>
<p>Unfortunately, that's the way you'll learn about yourself. You'll learn to
figure out when you get frustrated. You'll learn how you can keep getting
attacked by others -- even micro-aggressions -- but, without realizing, at
some point you'll suddenly burst into an counter-attack that may seem out of
proportion.</p>
<p>The worst part of it all? Very few people will tell you what you're doing
before it's too late -- you'll get in trouble way before you could actually
understand what you were doing.</p>
<p>But, again, you'll get in trouble.</p>
<p>And you <em>must</em> learn about these events. Take the feedback as true, even if
you don't agree with it. I had my falls, and I always took it as something I
need to improve, even if later I said to my psychologist that I thought it was
unfair and biased -- mostly 'cause I'm the quiet guy that always took the
blows and never complained about, and people taking the flak from me were more
vocal and friendlier to the higher-ups. But, again, I took it as true, and did
my best to work on those problems.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;people-care">You&#x27;ll Learn About Yourself The Hard Way</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;watch-reactions">Pay Attention On How People React To You</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

126
public/books/things-i-learnt/libraries/index.html

@ -0,0 +1,126 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Create Libraries</h1>
<span class="post-date">
2019-07-15
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/libraries/">#libraries</a>
<a href="https://blog.juliobiason.me/tags/project-organization/">#project organization</a>
</span>
<p>One thing you must learn is how to break your project into smaller libraries,
to avoid doing rounds to deal with &quot;the same, but a bit different&quot;.</p>
<span id="continue-reading"></span>
<p>I've seen a lot of projects that use things like branches for different
things. Say, you have an e-commerce page. But you also have different clients,
and they all have different colours and logo. Some people would take this
scenario and, using the VCS properties, use the main branch for the main code
and a branch for each client, merge from main branch from time to time -- and,
thus, the branches are never merged back.</p>
<p>This is suboptimal, 'cause that's not how VCS are supposed to be used.</p>
<p>But you can, for example, break the main code into a library/framework and
have one project for each client, with their assets and you just reference the
library/framework in each.</p>
<p>Simple and clean.</p>
<p>But stop there for a second. Although this makes the code cleaner, avoids
duplication and uses a VCS in the way it was supposed to be used, you can't
start this way.</p>
<p>Remember that <a href="/books/things-i-learnt/future-trashing">future thinking is future
trashing</a>. What you can do is actually
break your project by functionality, <a href="/books/things-i-learnt/project-organization">making modules related to their
data</a> and then, when you get a
reasonable number of clients, you'll notice what can be reused in each, what
modules make sense for one client and not for another. And then you'll have a
good way to deal with those.</p>
<p>One project that may appear when creating libraries is &quot;How do I create my own
library repository?&quot; 'Cause all modern languages today have support for
importing external libraries and, even if your libraries will never be out of
your control, they are external to the project. So you may need to learn how
to deal with this before creating the libraries. And, unfortunately, each
language and build tool has its own way to manage this.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;project-organization">Organize Your Code by Data&#x2F;Type, Not Functionality</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;paper-notes">Paper Notes Are Actually Helpful</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

126
public/books/things-i-learnt/log-events/index.html

@ -0,0 +1,126 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Logs Are For Events, Not User Interface</h1>
<span class="post-date">
2019-07-01
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/logs/">#logs</a>
<a href="https://blog.juliobiason.me/tags/ui/">#ui</a>
</span>
<p>Two things in one: First of all, when using logging, use it to log events, not
for user interfaces; second, log <em>events</em> in a machine readable way, not
necessarily an human readable format.</p>
<span id="continue-reading"></span>
<p>For a long time, I used logs to show to the user what was happening. To me, it
was logical to use something where I could mark errors as errors, general
information as information and, if the user requested more information, print
more information on what was going on. So I just added logging, defined normal
messages as <code>info</code>, errors as <code>errors</code>, information that may help me find
errors as <code>debug</code> and use <em>only</em> the logging system for all output of the
application.</p>
<p>But that's not what logs are targeted for -- and now I'm having to rethink
most of the stuff I already wrote.</p>
<p>Use the standard output to inform the user what's going on, in a human
readable format; use the standard error output to inform the user when things
go wrong; but use the logs to capture something that you'll have to process
later, so you should probably use a format that it is easier to parse, even if
it is not so friendly.</p>
<p>As an example, let's say you're connecting to a server. You could use the
standard output to say &quot;Connecting to server&quot;, to give the user a feedback
about what's going on; at the same time, you could log &quot;CONNECTION
[SERVER]&quot;, with the IP/Name of the server you're connecting. Surely, the
&quot;CONNECTION&quot; word is not that friendly to the user, but if you had to parse
the line, it would be really easy, wouldn't it?</p>
<p>Another example: If your application is adding a record to the database, there
is nothing wrong logging &quot;ADDING_RECORD: field=value; field=value;
field=value&quot; 'cause, in case something goes wrong while saving the record, you
could have the values to try to figure out why it failed -- surely, logging
why it failed also helps, but you know what I mean. This is an example of
something that makes complete sense in logs, but not in user interfaces.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;app-composition-stupid">Even for Application Composition, Start Stupid</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;transparent">Be Transparent With The User</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

172
public/books/things-i-learnt/magical-number-seven/index.html

@ -0,0 +1,172 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - The Magical Number Seven, Plus Or Minus Two</h1>
<span class="post-date">
2019-06-26
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/complexity/">#complexity</a>
</span>
<p>&quot;<a href="https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two">The magical number</a>&quot;
is a psychology article about the number of things one can keep in their mind
at the same time.</p>
<span id="continue-reading"></span>
<p>I've seen twice this weird construction on where a function would do some
processing, but its return value was the return of this processing, plus the
result of a second function and some bit of processing. Nothing major. But the
second function would also do some processing and call a third function. And
the third function would call a fourth. And the fourth a fifth. And the fifth,
a sixth function.</p>
<p>And the &quot;processing&quot; was not something small, like &quot;add two&quot; or &quot;multiply by
itself or a configurable value&quot;.</p>
<p>Something like this</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>func_1
</span><span> +-- func_2
</span><span> +-- func_3
</span><span> +-- func_4
</span><span> +-- func_5
</span><span> +-- func6
</span></code></pre>
<p>(If you need the <em>real</em> processing I saw, it was a class that had a function
with some processing and then it would call a function in an injected
dependency -- which is pretty nice and dandy. But the injected dependency had
an injected dependency, and the third injected dependency <em>also</em> had an
injected dependency, and so forth).</p>
<p>Now, when you're trying to understand this kind of code to find a problem,
you'll have to keep in mind what the first, second, third, fourth, fifth and
sixth functions do, 'cause they are all calling each other (inside them).</p>
<p>This causes some serious mental overflow that shouldn't be necessary.</p>
<p>Not only that, but imagine that you put a log before and after <code>func_1</code>: The
log before points the data that's being send to <code>func_1</code>, and the log after
its result.</p>
<p>So you'd end up with the impression that <code>func_1</code> does a lot of stuff, when it
actually is passing the transformation along.</p>
<p>(I got a weird experience with a function called <code>expand</code>, which logging
before the call would show some raw, compressed data, but the after was not
the expanded data, but actually a list of already processed data from the
compressed data.)</p>
<p>What would be a better solution, you may ask?</p>
<p>Well, if instead of making <code>func_1</code> call <code>func_2</code>, you can make it return the
result (which may not be the final result, anyway) and <em>then</em> call <code>func_2</code>
with that result.</p>
<p>Something like:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>result1 = func_1
</span><span>result2 = func_2(result1)
</span><span>result3 = func_3(result2)
</span><span>result4 = func_4(result3)
</span><span>result5 = func_5(result4)
</span><span>result6 = func_6(result5)
</span><span>result7 = func_7(result6)
</span></code></pre>
<p>(If we go back to the dependency injection chain, you may think that instead
of making DI7 receive DI6 as dependency [which would receive DI5 as
dependency, which would receive DI4 as dependency, which would receive DI3 as
dependency and so forth] you would actually create all the DI (dependency
injections) in one single pass and then the starting function would call the
dependencies in a single shot, not chaining them.)</p>
<p>Now you can see <em>exactly</em> how the data is being transformed -- and, obviously,
the functions would have better names, like <code>expand</code>, <code>break_lines</code>,
<code>name_fields</code> and so on, so you can see that that compressed data I mentioned
before is actually being decompressed, the content is being broke line by
line, the lines are getting names in its fields and so on (and one could even
claim that it would make things clear if there was a function after
<code>break_lines</code> which would just <code>break_fields</code>, which would make <code>name_fields</code>
more obvious -- and in a construction like this it would be almost trivial to
add this additional step).</p>
<p>&quot;But that isn't performant!&quot; someone may cry. Well, maybe it's just a bit less
performant than the original chained-calls ('cause it wouldn't create and
destroy frames in the stack, it would just pile them up and then &quot;unstack&quot; them
all in the end), but heck, optimization is for compilers, not people. Your job
is to make the code <em>readable</em> and <em>understandable</em>. If you need performance,
you can think of a better sequence of steps, not some &quot;let's make this a mess
to read&quot; solution.</p>
<p>Just a quick note: Although the famous paper mentions that the number is
around 7, new research is actually pointing that the number is way lower than
that, at 4. So simply making <code>func_1</code> call <code>func_2</code>, which would call
<code>func_3</code>, which would call <code>func_4</code> may be enough to overload someone and make
them lose the track of what the code does.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;data-flow">The Magic Number Seven, Plus Or Minus Two</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;cognitive-cost">Cognitive Cost Is The Readability Killer</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

135
public/books/things-i-learnt/microaggressions/index.html

@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Beware of Microaggressions</h1>
<span class="post-date">
2019-07-23
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/microaggressions/">#microaggressions</a>
</span>
<p>Microaggressions are defined as &quot;brief, everyday exchanges that send
denigrating messages to certain individuals because of their group
membership&quot;. The hardest part is that they don't sound aggressive.</p>
<span id="continue-reading"></span>
<p>Although I'm not part of an oppressed group, I've been microattacked more than
once, by the same person.</p>
<p>At some point, he mentioned that one couldn't talk bad about someone &quot;around
some people&quot;. That &quot;someone&quot; was a politician that got arrested for,
basically, stealing from the country to promote a certain other company. The
way that person said it, thought, made it seem I felt it was wrong to arrest
the politician.</p>
<p>Another time, I was casually saying that I shouldn't have come to work on my
motorbike, although three forecast apps said it wouldn't rain. His comment: &quot;I
just looked outside&quot;.</p>
<p>It may seem innocuous reading those, but if you look closely, all he was
trying to do was do let me down. Oh no, I'm part of a group that thinks
politicians shouldn't be arrested! Oh no, I'm not smart enough to look
outside, while he is<sup class="footnote-reference"><a href="#1">1</a></sup>.</p>
<p>And those are really hard to fight, 'cause we aren't prepared to &quot;get&quot; those
as real attacks.</p>
<p>On top of that, HR people are not really prepared to understand those (it will
always fall into the &quot;it was just a joke&quot;<sup class="footnote-reference"><a href="#2">2</a></sup> excuse and you'll be the
troublemaker<sup class="footnote-reference"><a href="#3">3</a></sup>).</p>
<p>The worst part? While you don't fully get it as an attack, it will slowly pile
up. At some point, you may even burst into attacking the person back, with all
the concentrated attacks in a single moment. And them <em>you</em> will be seen as
aggressive, not them.</p>
<p>Better just stay away and avoid contact if possible.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>In the end, when I had to leave work to go back home, it wasn't raining.</p>
</div>
<div class="footnote-definition" id="2"><sup class="footnote-definition-label">2</sup>
<p>... which is the pure definition of &quot;Schoddinger's Asshole&quot;: Someone
that make a comment and, by the other people reaction, call it a joke as a
&quot;get out of jail&quot; card.</p>
</div>
<div class="footnote-definition" id="3"><sup class="footnote-definition-label">3</sup>
<p>And I do wish you have a HR department that understand microaggressions.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;toxic-people">Beware of Toxic People</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;fixable">Toxic&#x2F;Aggressive People Are Fixable</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

108
public/books/things-i-learnt/monitoring/index.html

@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Logs Are For Events, Not User Interface</h1>
<span class="post-date">
2019-07-15
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/monitoring/">#monitoring</a>
</span>
<p>On a previous life, to understand how a system behaved, I added a ton of
metrics: how fast things were going in, how fast things were going out, how
many things were in the middle, how many the job processed... Not doing it so
makes me feel... naked.</p>
<span id="continue-reading"></span>
<p>Monitoring your project performance give you a really good view of how a
system is behaving. Is the speed going down? Is the system taking longer to
process an input? Are no inputs being processed?</p>
<p>If you have this kind of information, you can check what is going on in the
system and understand why. Is it normal? Did a change around the system (the
other system that produces the input, the system that consumes in the output)
affected the results?</p>
<p>If you're not measuring, you'll have no idea.</p>
<p>Also, &quot;If you can not measure it, you can not improve it&quot;, as Lord Kevin said.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;add-then-remove">One Version To Add, One Version To Remove</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;languages-are-more">A Language Is Much More Than A Language</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

114
public/books/things-i-learnt/not-done/index.html

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Don&#x27;t Tell It&#x27;s Done When It&#x27;s Not</h1>
<span class="post-date">
2019-07-18
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/responsibility/">#responsibility</a>
</span>
<p>You are tired of running the same thing over and over again. You kinda
remember that something weird may happen, but because you're tired, you tell
everyone that &quot;It's finished&quot;. Don't.</p>
<span id="continue-reading"></span>
<p>I must admit that I've done this. Yes, there is that corner case that I didn't
test. Yes, there is that piece of code that, although it works, it's weird.
Yes, I left a technical debt behind. But we get tired of looking at the same
thing over and over. And we get pushed by higher ups to deliver stuff. And
that's when we say &quot;It's done&quot;, when it's not.</p>
<p>Although we just dodged one, we end up leaving our colleagues -- people that
really depend on our work -- down. They expect to connect to whatever we are
doing to keep going. The expect to see the results of their work crystallized
by ours. And they can't. 'Cause we said &quot;It's done&quot; when it wasn't.</p>
<p>And you can be sure, as soon as that happens, they will be the first to point,
in minutes, that it is not done.</p>
<p>On the other hand, if you say &quot;Almost, but there is this thing that bothers me
and I think it may give us a headache in the future&quot;, they will understand. So
be clear and transparent about your work.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;responsible-code">Take Responsibility For The Use Of Your Code</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;people-care">People Get Upset About Code And Architecture Quality &#x27;Cause They Care</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

121
public/books/things-i-learnt/one-change-commit/index.html

@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - One Commit Per Change</h1>
<span class="post-date">
2019-07-09
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/source-control/">#source control</a>
<a href="https://blog.juliobiason.me/tags/commits/">#commits</a>
</span>
<p>When working with source control tools, keep one change per commit. Avoid
bundling more than one change in a single commit just to &quot;save time&quot;.</p>
<span id="continue-reading"></span>
<p>I've seen my fair share of commits with messages like &quot;Fix issues #1, #2
and #3&quot;. This is not something you should do. One commit for fixing issue #1,
another for #2 and yet another for #3.</p>
<p>Just note that I said &quot;one commit per change&quot;, not &quot;one commit per file&quot;.
Sometimes, to make a single change, you may need to change more than one file
-- it may point that you have a coupling problem, but that's a different
issue. You could, for example, make one commit which adds a new field in model
without adding a change in the controller to load this field; after all, the
controller won't (or, at least, shouldn't) break due the added field, and the
model won't break (or, at least, shouldn't) break because the controller is
not touching the field<sup class="footnote-reference"><a href="#1">1</a></sup>.</p>
<p>When making a commit, think this: &quot;In case something goes wrong, can I undo
this commit without breaking other stuff?&quot; Commit history is stacked, so
obviously you'd have to undo the commits on top of that one. And that's
alright.</p>
<p><strong>BONUS TIP</strong>! If you're using <code>git</code>, you can use <code>git add -p</code> in case you
&quot;overchange&quot;. It will allow you to pick parts of a file, instead of adding all
the changes in the file before committing.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>Ok, it <em>may</em> have some issues if the field can't be null, but you get
what I meant, right?</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;always-vcs">Always Use A Version Control System</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnr&#x2F;gerrit">Gerrit Is A Mistake</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

117
public/books/things-i-learnt/optimization/index.html

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Optimization Is For Compilers</h1>
<span class="post-date">
2019-07-15
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/optimization/">#optimization</a>
</span>
<p>Let say you need more performance on your application. You may be tempted to
look at your code and think &quot;How can I keep this same logic and still remove a
few cycles, so things seem to go faster?&quot; Well, if you want performance, you
need to change your logic.</p>
<span id="continue-reading"></span>
<p>But before jumping into the code, you may have to check your compiler options.
Maybe you're not generating the optimized version. Maybe there is an option
that you don't use that you can remove from the compilation.</p>
<p>'Cause &quot;optimization&quot; is what a compiler is for. They <em>know</em> where they can
extract most of the underlying architecture, and people have been finding ways
to make the compiled code more performance for decades. Heck, compilers can
even <em>delete</em> parts of your code 'cause they can &quot;see&quot; that a piece of code
will always produce the same result and, thus, isn't necessary and they will
just put the same result where that piece of code was.</p>
<p>What you need to do is to think about a better <em>design</em> for your code, not how
to improve the current code. And trying to trick the compiler by <a href="/books/things-i-learnt/data-types">messing with
the types</a>, although may produce faster
code, will really screw you in the future -- specially cause maintenance and
code understanding will take long and figuring out what went wrong will always
be harder.</p>
<p>Code is written for humans to read. <em>ALWAYS</em>. Optimization is what compilers
do. So find a smarter way to explain what you're trying to do instead of using
shorter words or messing with that your code is saying.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;use-utf8">Always Use UTF-8 For Your Strings</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;units">Units Makes Things Clear</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

121
public/books/things-i-learnt/outside-project/index.html

@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Don&#x27;t Mess With Things Outside Your Project</h1>
<span class="post-date">
2019-06-25
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/frameworks/">#frameworks</a>
</span>
<p>Simple rule: Is the code yours or from your team? Good, you can make any
changes you want. Does it come from outside? DON'T. TOUCH. IT.</p>
<span id="continue-reading"></span>
<p>Sometimes people are tempted to, instead of using the proper extension tools,
change external libraries/frameworks -- for example, making changes directly
into WordPress or Django. Believe me, I've seen my fair share of this kind of
stuff going around.</p>
<p>This is an easy way to make the project -- the team project, that is --
a huge security problem. As soon as a new version is released, you'll -- or,
better yet, someone who was not the person who decided to mess with outside
code -- have to keep up your changes in sync with the main project and, pretty
soon, you'll find that the changes don't apply anymore and you'll leave the
external project in an old version, full of security bugs.</p>
<p>Not only you'd end up with something that may very soon put at risk your whole
infrastructure, you won't take any benefits from things in the new versions,
'cause hey, you're stuck in the broken version!</p>
<p>Sometimes doing it so is faster and cheaper, and if you would do the same
thing using extensions or actually coding around the problem, even duplicating
the framework functions, would probably take longer and make you write more
code, but in the long run, it's worth the time.</p>
<p>Sometimes the change you need is impossible 'cause the framework you're using
doesn't have any support for extensions. This is the time you'll need to build
a new layer <em>on top</em> of the framework. Again, this may seem painful and
changing the framework directly is a lot easier, but you'll have to keep
updating your patch for newer versions, which may not be that easy. Building
on top of the framework will at least give you some assurance 'cause the
exposed API must be way more stable than the internal code.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;use-structures">If Your Data Has a Schema, Use a Structure</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;resist-easy">Resist The Temptation Of Easy</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

124
public/books/things-i-learnt/own-your-shit/index.html

@ -0,0 +1,124 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Own Your Shit</h1>
<span class="post-date">
2019-07-30
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/own-your-shit/">#own your shit</a>
</span>
<p>When I said &quot;Scala is garbage&quot; or &quot;Gerrit is a mistake&quot;, it wasn't &quot;l33th4x0r&quot;
who said that; it was Julio Biason. 'Cause I do believe that putting your face
to be slapped is the way we grow.</p>
<span id="continue-reading"></span>
<p>I do understand -- and you must have realized reading some of the previous
points when I talk about it -- that privacy is important. For some people,
hiding their real name is important for lots of reasons.</p>
<p>But I also personally believe that using some weird name and some face that
isn't yours on your avatar may give you a false sense of &quot;that person is the
guilty one, not me&quot; when it comes to criticism.</p>
<p>I mean, yes, I hate Scala with a passion. I do understand <em>why</em> the language
developers decided to come with some options about it, and I still think those
decisions were stupid and you should never sacrifice readability for
ease-to-use.</p>
<p>But it wasn't some random person using a weird name full of numbers and an
avatar of some anime saying Scala is garbage. My name is even in this blog
name, in the URL and in every social network I use there is a picture of me.</p>
<p>So yeah, Julio said Scala is garbage.</p>
<p>There is another thing about using your real name and real face: I'm not just
saying &quot;Scala is garbage&quot;, I have to back that up with some facts -- or, in
this case, personal opinions -- about it. It's not simply an attack to Scala,
is a somewhat thought out attack on Scala.</p>
<p>And, on top of that, someone will one day come to me and say &quot;Yeah Julio, that
thing you said about Scala: It is that way because of this, this and this&quot;.
And I'll probably have to say &quot;You know, you're right: I was wrong.&quot; Because I
can't simply move my mistake to some other personality; who was wrong was
<em>me</em>. And unless I own my shit up, I'd never get the understanding I'd need to
see my mistake about Scala in the first place.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;time">You Always Have The Time</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;bad-code-defense">Don&#x27;t Defend Bad Code</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

109
public/books/things-i-learnt/paper-notes/index.html

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Create Libraries</h1>
<span class="post-date">
2019-07-25
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/paper-notes/">#paper notes</a>
<a href="https://blog.juliobiason.me/tags/post-its/">#post its</a>
<a href="https://blog.juliobiason.me/tags/project-organization/">#project organization</a>
</span>
<p>I've tried to go paperless many, many times. But keeping a notepad and a bunch
of post its in my desk has been one of the most helpful tools I ever got.</p>
<span id="continue-reading"></span>
<p>I've even managed to hide all my pens, move notepads to desks and use some
note-taking application instead. In the end, none of those managed to come
close to the utility of having something to scribble notes fast, or to draw a
very high concept of whatever I'm trying to explain.</p>
<p>Also, a desk full of post its, or even a monitor with a bunch of things around
gives the impression that you're really busy working -- just be careful to not
have too many post its, or it will look like you can't complete anything. It
even beats Trello!</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;libraries">Create Libraries</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;throw-away">Be Ready To Throw Your Code Away</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

117
public/books/things-i-learnt/patterns-not-solutions/index.html

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Design Patters Are Used to Name Solution, Not Find Them</h1>
<span class="post-date">
2019-06-25
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/design-patterns/">#design patterns</a>
</span>
<p>Most of the times I saw design patterns being applied, they were applied as a
way to find a solution, so you end up twisting a solution -- and, sometimes,
the problem it self -- to fit the pattern.</p>
<span id="continue-reading"></span>
<p>My guess is that the heavy use of &quot;let's apply <em>this</em> design pattern&quot; before
even understanding the problem -- or even trying to solve it -- comes as a
form of <a href="/books/things-i-learnt/cargo-cult">cargo cult</a>: &quot;We saw that people
used this pattern and solved their problem, so let's use it too and it will
solve our problem&quot;. Or, worse: &quot;Design pattern is described by <em>Famous
Person</em>, so we must use it&quot;.</p>
<p>Here is the thing: Design pattern should <em>not</em> be used as a way to find
solution to any problems. You may use some of them as base for your solution,
but you must focus on the <em>problem</em>, not the <em>pattern</em>. </p>
<p>&quot;Do a visitor pattern will solve this?&quot; is the wrong question. &quot;What should we
do to solve our problem?&quot; is the real question. Once you went there and solved
the problem you may look back and see if it is a visitor pattern -- or whatever
pattern. If it doesn't, that's alright, 'cause you <em>solved the problem</em>. If it
did... well, congratulations, you now know how to name your solution.</p>
<p>I've seen this happening a lot: People have a problem; people decided to use a
pattern; the pattern doesn't actually solve the problem (not in the 100% mark,
but above 50%); what happens then is that people start twisting the problem to
fit the pattern or, worse, add new layers to transform the problem into the
pattern.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;gherkin">Gherkin Is Your Friend to Understand Expectations</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;data-flow">Thinking Data Flow Beats Patterns</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

105
public/books/things-i-learnt/people-care/index.html

@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - People Get Upset About Code And Architecture Quality &#x27;Cause They Care</h1>
<span class="post-date">
2019-07-19
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/care/">#care</a>
</span>
<p>At some point, you'll describe some solution/decision about some piece of
code or some architectural design and people will seem annoyed/pissed about
it. When people care about a product/code, they do that.</p>
<span id="continue-reading"></span>
<p>Or maybe <em>you</em> will get annoyed/pissed.</p>
<p>I think one of the nicest compliments I ever got was &quot;You're annoying 'cause
you care&quot; when we left a meeting in which we decided to cut corners and do
things halfway to beat some deadline -- or just 'cause people were not in the
mood to do things in a more complete way.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;not-done">People Get Upset About Code And Architecture Quality &#x27;Cause They Care</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;learn-about-yourself">You&#x27;ll Learn About Yourself The Hard Way</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

124
public/books/things-i-learnt/permanent-solution/index.html

@ -0,0 +1,124 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Nothing More Permanent Than A Temporary Solution</h1>
<span class="post-date">
2019-07-29
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/code/">#code</a>
<a href="https://blog.juliobiason.me/tags/writing-code/">#writing code</a>
<a href="https://blog.juliobiason.me/tags/temporary-solutions/">#temporary solutions</a>
</span>
<p>Depending on where you look, &quot;Nothing more permanent than a temporary
solution&quot; is either an old Russian proverb or a quote by Milton Friedman.
Thing is, temporary solutions, unless you think about the future to fix them,
will become permanent.</p>
<span id="continue-reading"></span>
<p>A temporary solution may appear either as a proof-of-concept or due some
restrained deadline. You may create perfect <a href="/books/things-i-learnt/spec-first">system
specs</a>, you may have a perfect
understanding of the whole <a href="/books/things-i-learnt/gherkin">in your Gherkin
files</a> but, at some point, you'll put some
small script to fix a minor problem, or do a &quot;not so good&quot; solution to a point
due to deadlines.</p>
<p>This happens and unless you take steps to get rid of those, you'll end up with
a bunch of spaghetti code pretty fast. And that will snowball to a point that
you won't be able to manage the project.</p>
<p>Once a scrum master suggested that we came with an idea to our product manager
to do something akin to &quot;Every three sprints, we'll focus on product value;
the fourth one is ours to fix the things that are annoying us&quot;. I don't think
we ever talking to the product manager about this, but we managed to open
issues on our ticket system about the small warts we left behind, specially
due deadlines. So there we had, a specially crafted bug type for &quot;technical
debt&quot; which we never actually took the time to fix.</p>
<p>Unless you have a pretty good safety net to fix those, they will life forever.
And it may be a better option to tell &quot;we can't deliver in time&quot; than adding
(yet another) temporary solution, as hard as it is to convince the higher ups
that you can't deliver the product with a temporary solution.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;run-locally">If It Doesn&#x27;t Run On Your Computer, You Have A Problem</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;config-file">The Config File Is Friend</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

116
public/books/things-i-learnt/post-solution/index.html

@ -0,0 +1,116 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt&#x2F;tags">Tags (PT)</a></li>
</ul>
</div>
</div>
<div class="content container">
<div class="post">
<h1 class="post-title">Things I Learnt The Hard Way - Blogging About Your Stupid Solution Is Still Better Than Being Quiet</h1>
<span class="post-date">
2019-07-25
<a href="https://blog.juliobiason.me/tags/books/">#books</a>
<a href="https://blog.juliobiason.me/tags/things-i-learnt/">#things i learnt</a>
<a href="https://blog.juliobiason.me/tags/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/solutions/">#solutions</a>
</span>
<p>You may think &quot;This project is so small and so focused on whatever I needed, I
should never post it on Github. What would people think?&quot; Github is not for
that.</p>
<span id="continue-reading"></span>
<p>Github is not a repository for &quot;cool, almost perfect&quot; projects. You're free to
show that, at some point, you were a beginner<sup class="footnote-reference"><a href="#1">1</a></sup>.</p>
<p>You can always come back, review what you did and fix it. It will, as your
<a href="/books/things-i-learnt/blogging">blog</a>, show that you're improving.</p>
<p>... or maybe you'll let your project there just to rot. I still have some
Python projects that I wrote when I was learning the language that, although
they work, they don't look like Python projects.</p>
<p>But who knows? Maybe the code you wrote to solve your small problem can help
someone else to fix their problem, which was not exactly the same, but pretty
close. Or even you could get a code review that would teach you something new
about the language/design you used.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>Whoever see the first projects I did in
<a href="https://www.rust-lang.org/">Rust</a> wouldn't think I have 30 years of
experience in the field. Everybody is a beginner at some point.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;blogging">Blogging About Your Stupid Solution Is Still Better Than Being Quiet</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;things-i-dont-know">Keep A List of Things I Don&#x27;t Know</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

159
public/books/things-i-learnt/project-organization/index.html

@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<!-- viewport-fit=cover is to support iPhone X rounded corners and notch in landscape-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<title>Julio Biason .Me 4.3</title>
<!-- CSS -->
<link rel="stylesheet" href="https://blog.juliobiason.me/print.css" media="print">
<link rel="stylesheet" href="https://blog.juliobiason.me/poole.css">
<link rel="stylesheet" href="https://blog.juliobiason.me/hyde.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
</head>
<body class=" ">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="https:&#x2F;&#x2F;blog.juliobiason.me"><h1>Julio Biason .Me 4.3</h1></a>
<p class="lead">Old school dev living in a 2.0 dev world</p>
</div>
<ul class="sidebar-nav">
<li class="sidebar-nav-item"><a href="&#x2F;">English</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;pt">Português</a></li>
<li class="sidebar-nav-item"><a href="&#x2F;tags">Tags (EN)</a></li>