Browse Source

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

master
Julio Biason 11 months 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? *.sw?
public/* # public/*
tags 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>
<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 - Organize Your Code by Data&#x2F;Type, Not Functionality</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/project/">#project</a>
<a href="https://blog.juliobiason.me/tags/project-organization/">#project organization</a>
</span>
<p>A lot of projects assume that you'll put things with the same functionality in
the same place, no matter what data they deal with. This makes things harder
to break apart later.</p>
<span id="continue-reading"></span>
<p>Most projects keep organized by the functionality each component do. For
example, all the models are in the same place, all the functions that convert
one model into an internal structure/DTO are kept together, and so on.
Something like this:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>.
</span><span>+-- IncomingModels
</span><span>| +-- DataTypeInterface
</span><span>| +-- DataType1
</span><span>| +-- DataType2
</span><span>| +-- DataType3
</span><span>+-- Filters
</span><span>| +-- FilterInterface
</span><span>| +-- FilterValidDataType2
</span><span>+-- Processors
</span><span>| +-- ProcessorInterface
</span><span>| +-- ConvertDataType1ToDto1
</span><span>| +-- ConvertDataType2ToDto2
</span><span>+-- OutgoingModels
</span><span> +-- DtoInterface
</span><span> +-- Dto1
</span><span> +-- Dto2
</span></code></pre>
<p>This is fine and works. But when you organize by data, it'll make a lot easier
to split your project in smaller projects -- 'cause, at some point, you may
want to do almost the same thing as you're doing right now, but with small
differences.</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>.
</span><span>+-- Base
</span><span>| +-- IncomingModels
</span><span>| | +-- DataTypeInterface
</span><span>| +-- Filters
</span><span>| | +-- FilterInterface
</span><span>| +-- Processors
</span><span>| | +-- ProcessorInterface
</span><span>| +-- OutgoingModels
</span><span>| +-- DtoInterface
</span><span>+-- Data1
</span><span>| +-- IncomingModels
</span><span>| | +-- DataType1
</span><span>| +-- Processors
</span><span>| | +-- ConvertDataType1ToDto1
</span><span>| +-- OutgoingModels
</span><span>| +-- Dto1
</span><span>...
</span></code></pre>
<p>Now you can make a module that deals <em>only</em> with Data1, another that works
only with Data2 and so on. And then you can break them into isolated modules.</p>
<p>And then when you have another project that also have Data1 but also deals
with Data3, you can reuse most of the stuff in the Data1 module.</p>
<p>And I do understand that this creates an explosion of directories/packages,
which may seem a bit unnecessary.</p>
<p>Believe me, I also thought the idea of keeping things by functionality made
more sense. But in one project, I got a requirement to do almost the same
thing as I was doing before, but with a small change, which would require one
less step/transformation (in our example, you can think as the new requirement
as doing exactly what the Data1, Data2 and Data3 did, with their
transformations and such, but without the Data3 part). By breaking by their
types, I managed to create small modules for each one and the new project
would simply reference Data1 and Data2, but not Data3.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;git-flow">Git-Flow Is The Way To Go</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;libraries">Create Libraries</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

110
public/books/things-i-learnt/quit/index.html

@ -0,0 +1,110 @@
<!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-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/quit/">#quit</a>
</span>
<p>Instead of taking the blows and keep moving, maybe it would be better to your
own health to simply quit.</p>
<span id="continue-reading"></span>
<p>Unexpected circumstances caused a delay on your task and your boss lashed at
you.</p>
<p>You need to keep avoiding a guy that keeps bad mouthing some minority,
something that you don't agree.</p>
<p>Another guy keeps an aggressive posture around women, and you know that's not
something nice to do.</p>
<p>Yet a third one keeps complaining that, when he's not around, things don't
work.</p>
<p>I've to say it: You're in a toxic environment. Even if the pay is nice and the
project is interesting, it's not worth your health. You'd end up being a
constantly pissed off, annoyed person on your forties (<em>cough</em>).</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;fixable">Toxic&#x2F;Aggressive People Are Not Fixable -- Unless It&#x27;s You</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;small-world">I.T. World Is Really Small</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

111
public/books/things-i-learnt/resist-easy/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 - Resist The Temptation Of Easy</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/ides/">#ides</a>
</span>
<p>Sure that IDE will help you with a ton of autocomplete stuff and let you
easily build your project, but do you understand what's going on?</p>
<span id="continue-reading"></span>
<p>I'm not denying the fact that IDEs make things easier. I'm trying to say that
you should not rely heavily on their features.</p>
<p>I mentioned before that you should at least know how to <a href="/books/things-i-learnt/tests-in-the-command-line">run tests on the
command line</a> and the same
applies to everything in IDEs: how to build, how to run, how to run tests and,
let's be honest here, how to find proper names for your variables and
functions. 'Cause it's nice that the IDE can complete all the names of
the functions, but if the autocomplete feature was off, would you know which
function you need? In other words, have you thought at least 10 seconds about
a good name for your function so you <em>won't</em> need to use autocomplete to
remember its name?</p>
<p>These days, IDEs can autocomplete almost everything, from function names to
even how to name your variables. But using the autocomplete is not always a
good solution. Finding better names is.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;outside-project">Don&#x27;t Mess With Things Outside Your Project</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;start-stupid">Start Stupid</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

128
public/books/things-i-learnt/responsible-code/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 - Take Responsibility For The Use Of Your Code</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>This is hard. Very very hard. It's the difference between &quot;freedom&quot; and
&quot;responsibility&quot;.</p>
<span id="continue-reading"></span>
<p>There is nothing wrong in writing, for example, a software to capture people's
faces and detect their ethnicity, but you have to think about what that will
be used on.</p>
<p>Even on an open source project, you can take responsibility without blocking
people. You can make your project harder for people trying to abuse to use it,
to the point they will have to take control of their own fork.</p>
<p>One example is a small application called <a href="https://tusky.app/">Tusky</a>, which
is &quot;An Android client for the microblogging server Mastodon&quot;, completely open
source. Mastodon is a network of microblogging servers with connect to each
other, kinda like Twitter, but you can pick a different server that is not
twitter.com and still get updates from that server. One of the servers that
appeared in the server list is an alt-right server which, as most alt-right
forums, promote a lot of hate. What Tusky did? When you try to add an account
on that server, instead of adding the account, <a href="https://github.com/tuskyapp/Tusky/pull/1303">they play a video of Never
Gonna Give You Up</a>, basically
<a href="https://en.wikipedia.org/wiki/Rickrolling">rickrolling</a> anyone who, well, is
an alt-righter.</p>
<p>Tusky broke the open source license? No, the code is still available. Anyone
wanting to use the server can pick the code, fork it, remove the rickroll and
release their own version of the application. But Tusky developers took an
instead of saying &quot;We'll not take part in promoting hate speech&quot; and one can't
deny that they did.</p>
<p>It is a bit hard to do so on the company code -- you would get some reprimands
if you try to shame or block one of the company clients from using the company
application -- but you <a href="/books/things-i-learnt/say-no">can say no</a> and,
depending on how offensive you think the use the code is, you can even start
looking for a new place to work. People on larger and &quot;cooler&quot; companies, like
Google, left their jobs because they didn't agree with what the company was
doing, and so can you.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;say-no">Learn To Say No</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;not-done">Don&#x27;t Tell It&#x27;s Done When It&#x27;s Not</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

107
public/books/things-i-learnt/right-tool-agenda/index.html

@ -0,0 +1,107 @@
<!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 - &quot;Right Tool For The Job&quot; Is Just To Push An Agenda </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/right-tool/">#right tool</a>
<a href="https://blog.juliobiason.me/tags/agenda/">#agenda</a>
</span>
<p>A lot of times I heard &quot;We should use the right tool for the job!&quot; Most of
those times it was just a way to push an agenda.</p>
<span id="continue-reading"></span>
<p>When someone claims we should use the &quot;right tool&quot;, the sentence mean there is
a right tool and a wrong tool to do something -- e.g., using a certain
language/framework instead of the current language/framework.</p>
<p>But sadly, none of those times it was really the &quot;right tool&quot;. Most of the
time, the person saying we should use the &quot;right tool&quot; was trying to push
their own favourite language/framework, either because they disliked the
current language/framework or because they don't want to push the &quot;hero
project&quot;.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;cargo-cult">Understand And Stay Away From Cargo Cult</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>

108
public/books/things-i-learnt/right-tool-obvious/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 - The Right Tool Is More Obvious Than You Think</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/right-tool/">#right tool</a>
</span>
<p>Maybe you're in a project that needs to process some text. Maybe you're
tempted to say &quot;Let's use Perl&quot; 'cause you know that Perl is very strong in
processing text.</p>
<p>But that may still be not the right tool.</p>
<span id="continue-reading"></span>
<p>Although Perl is an amazing tool to process files, providing every single
switch and option you'll ever need, you're missing something: You're working
on a C shop. Everybody knows C, not Perl.</p>
<p>Sure, if it is a small, &quot;on the corner&quot; kind of project, it's fine to be in
Perl; if it is important for the company, it's better that if it is a C
project.</p>
<p>One of the reason your hero project may fail is because of this: You may even
prove that what you thought it was a better solution is actually a better
solution, but it can't be applied 'cause nobody else can maintain it.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;right-tool-agenda">Right Tool For The Job Is Just To Push An Agenda</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;code-reviews-style">Code Reviews Are Not For Style</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

122
public/books/things-i-learnt/run-locally/index.html

@ -0,0 +1,122 @@
<!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 It Doesn&#x27;t Run On Your Computer, You Have A Problem</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/local-run/">#local run</a>
<a href="https://blog.juliobiason.me/tags/cloud/">#cloud</a>
</span>
<p>I've seen a lot of systems that would never run on a isolated computer, like
the developer tool, 'cause the system requires running on a specialized
environment. Those things are wrong.</p>
<span id="continue-reading"></span>
<p>Requiring a specialized environment absolutely kills productivity.</p>
<p>If your system will run on a specialized environment -- and I'm including &quot;the
cloud&quot; here -- look for something that can abstract whatever you're using. For
example, if you're using AWS SQS, which is a queue, look for a library that
can abstract the way a queue works so you can also run with RabbitMQ, which
can be easily run on your own computer.</p>
<p>If you're using a very specialized thing, you may have to write the
abstraction yourself, isolating it from the main system, so you can develop
the main product in peace.</p>
<p>One of the most productivity killer environment I worked require running the
project on a customized Apache installation, running the client specialized
framework. The whole problem is that the client refused to allow us to not use
it or install on our local machines (mostly 'cause the install of said
framework was really complex). In other for us to work and see things working,
we had to use a VPN to the client computers, develop things there and manually
forcing things to reload. No only we had absolutely nothing to do when the VPN
was down ('cause it require out company infrastructure working hand-in-hand
with the client infrastructure and the internet provider infrastructure, which
is absolutely impossible), the flow was really cumbersome.</p>
<p>If we had the chance to not use it and run all the development and tests on
our own computers, I have the feeling we could deliver the product 2-3 months
earlier.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;units">Units Makes Things Clear</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;permanent-solution">Nothing More Permanent Than A Temporary Solution</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

110
public/books/things-i-learnt/say-no/index.html

@ -0,0 +1,110 @@
<!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 To Say No</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/say-no/">#say no</a>
</span>
<p>Sometimes, you'll have to say no: No, I can't do it; no, it can't be made in
this time; no, I don't feel capable of doing this; no, I don't feel
comfortable writing this.</p>
<span id="continue-reading"></span>
<p>Saying no doesn't mean you won't do it. Once I had to say to our CTO: &quot;Ok,
I'll do it, but I want to note that I don't agree with what we are doing.&quot; In
the end, the app was barred exactly because the thing we were doing.</p>
<p>Being explicit about what you don't feel is a good point may not be what some
higher ups are expecting. The fact that you don't approve but will do it
anyway may be something that can either show that your not simply a drone or,
unfortunately, label you as a &quot;troublemaker&quot;. Honestly, if you feel it threw
you in the former, you should start looking for a new place to work. If you
said you won't be comfortable and still <em>did the work</em>, and they had to label
you something, then this place doesn't respect you as a person.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;coc">Code of Conduct Protect YOU, Not THEM</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;responsible-code">Take Responsibility For The Use Of Your Code</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

116
public/books/things-i-learnt/small-world/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 - I.T. World Is Really Small</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>
</span>
<p>We have two expressions here: &quot;The world turns around&quot;; it means whatever you
do, sometime in the future, you'll face the consequences of it. Another
expression is &quot;The world of <em>something</em> is an egg&quot;; because the world turns
around, if the world is an egg, you'll face the consequences sooner than you
think.</p>
<span id="continue-reading"></span>
<p>What do I meant with those two expressions?</p>
<p>Well, first thing, if you do a bad job, if you don't care about your
co-workers, if you're not a team player, if you keep bad mouthing someone...
You'll find someone that heard about the things you do and may damage your
reputation.</p>
<p>So be nice and a team player.</p>
<p>Just to be clear: Yes, I did my fair share of not being a team player and bad
mouthing people<sup class="footnote-reference"><a href="#1">1</a></sup> and I'm pretty sure there are companies around that would
never hire me 'cause someone inside heard that I bad mouth someone or didn't
do as a team player in some other place. I try to avoid doing it so as much as
I can but, hey, I'm just human.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>I still call actions of previous colleagues around even to this day. If
I'm bad mouthing or just telling what happened is up to whoever is listening
to me.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;quit">Realize When It&#x27;s Time To Quit</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;blogging">Blogging About Your Stupid Solution Is Still Better Than Being Quiet</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

130
public/books/things-i-learnt/spec-first/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 - Spec First, Then Code</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/specs/">#specs</a>
<a href="https://blog.juliobiason.me/tags/code/">#code</a>
</span>
<p>&quot;Without requirements or design, programming is the art of adding bugs to an
empty text file.&quot; -- Louis Srygley</p>
<span id="continue-reading"></span>
<p>If you don't know what you're trying to solve, you don't know what to code.</p>
<p>A lot of times we have this feeling of &quot;let me jump straight to the code&quot;. But
without understanding what problem you're trying to solve, you'd end up
writing a bunch of things that doesn't solve anything -- or, at least,
anything that <em>should</em> be solved.</p>
<p>So here is the point: Try to get a small spec on whatever you want to solve.
But be aware that even that spec may have to be <a href="/books/things-i-learnt/throw-away">thrown
out</a>, as the understanding of the problem
tend to grow as long as the project continue.</p>
<p>Yes, it's paradoxical: You need a spec to know what to code to avoid coding
the wrong solution, but the spec may be wrong, so you <em>end up</em> solving the
wrong solution anyway. So what's the point? The point is, the spec reflects
the understanding of a problem <em>at a certain point</em>: All you (and your team)
know is <em>there</em>.</p>
<p>The times I stood longer looking at my own code wondering what to do next were
when we didn't have the next step defined: It was missing some point of the
solution or we didn't have the communication structures defined or something
of sorts. Usually, when that happened, I stumbled upon Twitter or Mastodon
instead of trying to solve the problem. So when you see yourself doing this
kind of stuff -- &quot;I don't know what to do next, and I'm not sure if I'm done
with the current problem&quot; -- then maybe it's time to stop and talk to other
people in the project to figure that out.</p>
<p>Another way to think this: Erik Deitrich have a post about <a href="https://daedtech.com/dont-learn-to-code-learn-to-automate/">Don’t Learn to
Code — Learn to Automate</a>,
something I can get behind 'cause most of us, when doing stuff, think &quot;I need
to do this, then I pick that thingy and put it there and from there I do this
other work&quot;. Basically, we create mental models of specs, step by step, on
what we need to do. And, from there, it may be even simpler, 'cause now all
you need to learn is &quot;First, how I do this; Ok, got it, now I get the result
from this and put there&quot; and so on. You can even have a learning path, if
you're a beginner.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;disclaimer">Disclaimer</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;steps-as-comments">Write Steps as Comments</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

126
public/books/things-i-learnt/specialists/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 - Companies Look For Specialists But Keep Generalists Longer</h1>
<span class="post-date">
2019-07-17
<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/jobs/">#jobs</a>
<a href="https://blog.juliobiason.me/tags/specialists/">#specialists</a>
<a href="https://blog.juliobiason.me/tags/generalists/">#generalists</a>
</span>
<p>If you know a lot about one single language, it may make it easier to get a
job, but in the long run, language usage dies or loses its charms and you'll
need to find something else. Knowing a bit about a lot of other languages
helps in the long run, not to mention that may help you think of better
solutions.</p>
<span id="continue-reading"></span>
<p>Even if you're in a shop that is mainly in one single language, that's no
excuse to not check other languages. But, then again, learning languages that
are just small changes on the current language would not help you either.</p>
<p>Alan Perlis, author of the ALGOL language, has one excellent phrase: &quot;A
language that doesn't affect the way you think about programming, is not worth
knowing.&quot;</p>
<p>I still maintain one single rule for programming languages: The language I use
at work must not be the same language I use outside it<sup class="footnote-reference"><a href="#1">1</a></sup>. That simple rule
made sure I was always learning something new.</p>
<p>Learning a new language can also help you understand things in some language
you used before: Rust help me understand how generics works in Java; seeing
how to do dependency injection in C++ help me understand how Spring does it in
Java.</p>
<p>On top of that, because I was always learning something new, moving between
projects was something that happened a lot. At one point, I was hired to work
with Python, but the contract was taking too long to be signed, and my manager
asked if I could help some other team with their iOS application. Because I
did learn a bit about Objective-C, surely I could help. Later, another project
in C show up and guess who also knew C?</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>... which led me into some sad times when I was working with Python.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;team-discussion">Global Changes Must Be Discussed With The Whole Team First</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;stupid-bugs-list">Keep A List of Stupid Bugs That Took More Than 1 Hour To Solve</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

112
public/books/things-i-learnt/start-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 - Start Stupid</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/kiss/">#kiss</a>
</span>
<p>One way to get away from the IDE is to &quot;start stupid&quot;: Just get the compiler
and get an editor (ANY editor) with code highlight and do your thing: Code,
build it, run it.</p>
<span id="continue-reading"></span>
<p>Notice that say &quot;stupid way&quot;, not &quot;simple way&quot;.</p>
<p>Doing things in the stupid way is not the easiest way to start a project. How
could one beat the easy of clicking a button and having the whole structure of
a project done for you?</p>
<p>But starting it in the stupid way, in which you have to think your project
layout, how to build stuff, how to run tests, how to do <em>everything</em> may give
you some insights on how things work, how the pieces mesh together and how to
cogs turn around. Even better: It make give you some insights on what
<em>doesn't</em> work.</p>
<p>Honestly, you don't have to do this with all projects. You can still use your
favourite IDE and do things in the easy way. But you can also have that side
project on which you'll do everything in the stupid way, just to understand
what your IDE is doing.</p>
<p>And when you grasp that, you'll be able to use <em>any</em> IDE.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;resist-easy">Resist The Temptation Of Easy</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;use-timezones">Always Use Timezones With Your Dates</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

141
public/books/things-i-learnt/steps-as-comments/index.html

@ -0,0 +1,141 @@
<!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 - Write Steps as Comments</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/steps/">#steps</a>
<a href="https://blog.juliobiason.me/tags/comments/">#comments</a>
<a href="https://blog.juliobiason.me/tags/code/">#code</a>
</span>
<p>Don't know how to solve your problem? Write the steps as comments in your
code.</p>
<span id="continue-reading"></span>
<p>There you are, looking at the blank file wondering how you're going to solve
that problem. Here is a tip:</p>
<p>Take the spec you (or someone else) wrote. Break each point into a series of
steps to reach the expected behaviour. You can even write on your natural
language, if you don't speak English.</p>
<p>Then fill the spaces between the comments with code.</p>
<p>For example, if you have a spec of &quot;connect to server X and retrieve
everything there. Save the content in the database. Remember that server X API
allow you can pass an ID (the last ID seen) and you can use it to not retrieve
the same content again.&quot; Pretty simple, right?</p>
<p>Writing this as comments, pointing the steps you need to make, you may end up
with something like this:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>// connect to server X
</span><span>// retrieve posts
</span><span>// send posts to the database
</span></code></pre>
<p>Ah, you forgot the part about the ID. No problem, you just have to add it in
the proper places -- for example, it doesn't make sense to connect to the
server before you have the last seen ID:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>// open configuration file
</span><span>// get value of the last seen ID; if it doesn&#39;t exist, it&#39;s empty.
</span><span>// connect to server X
</span><span>// retrieve posts starting at the last seen ID
</span><span>// send posts to the database
</span><span>// save the last seen ID in the configuration file
</span></code></pre>
<p>Now it is &quot;easy&quot;<sup class="footnote-reference"><a href="#1">1</a></sup>: You just add the code after each comment.</p>
<p>A better option is to change the comments into functions and, instead of
writing the code between the comments, you write the functionality in the
function themselves and keep a clean view of what your application does in the
main code.</p>
<p>In <a href="https://blog.pragmaticengineer.com/a-comment-is-an-invitation-for-refactoring/">A Comment Is An Invitation For
Refactoring</a>,
Gergely Orosz points that comments in the code could be converted to function
calls, including things like grouping common things, or bugfixes. This is,
basically, the same thing, except in different points of development: One when
the code is about to be written and one when the code is already there.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>Yes, that was sarcastic.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;spec-first">Specs First, Then Code</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;gherkin">Gherkin Is Your Friend to Understand Expectations</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

107
public/books/things-i-learnt/stupid-bugs-list/index.html

@ -0,0 +1,107 @@
<!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 - Keep A List of Stupid Bugs That Took More Than 1 Hour To Solve</h1>
<span class="post-date">
2019-07-17
<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/lists/">#lists</a>
<a href="https://blog.juliobiason.me/tags/stupid-bugs/">#stupid bugs</a>
</span>
<p>If it took you more than one hour for you to figure out what went wrong, it is
a good idea to put it on list, 'cause these things have the tendency to appear
again.</p>
<span id="continue-reading"></span>
<p>I must admit that this is one thing that I should be doing, but I keep
forgetting. The worst part: It usually takes me about an hour to figure out
what went wrong, only to realize by the solution that I had the same problem
(with the same solution) before and it took me about one hour to figure out
what went wrong.</p>
<p>If I just had a list of stupid bugs that took me about 1 hour or more to
solve, I wouldn't be stuck for another hour figuring out what went wrong.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;specialists">Companies Look For Specialists But Keep Generalists Longer</a>
</div>
&nbsp;
<div style="float:right">
<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> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

123
public/books/things-i-learnt/team-discussion/index.html

@ -0,0 +1,123 @@
<!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 - Global Changes Must Be Discussed With The Whole Team First</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/team/">#team</a>
<a href="https://blog.juliobiason.me/tags/changes/">#changes</a>
</span>
<p>So you got tired of bad tests and decided it is a good idea to add some <a href="https://en.wikipedia.org/wiki/Fuzzing">fuzz
testing</a> tool. Before you do add it in
the main branch, you <em>have</em> to discuss it with your team.</p>
<span id="continue-reading"></span>
<p>It's mind-bogging that some people think something it's so good that they
don't need to discuss with the whole team about it; they simply do. They don't
seem to care that people have their workflows and changing something would
break them. But hey, I've seen it so many times it is not even fun.</p>
<p>And let me clear here: You need to discuss it with the <em>whole</em> team, not just
some of it (excluding people on vacations, 'cause you don't want to call them
just to tell them something will change). Worse: Don't discuss only with those
that will agree with you; you may not have seen all the problems those changes
will inflict on the other devs workflows but, by bringing that with those that
may not agree with you, you may gain some more insights on what could go
wrong.</p>
<p>Also, focus on what would be the gains and the loses. &quot;We'll get better tests,
but you'll have to take a bit more care on the way you write tests&quot; is a good
explanation, specially if you show the changes people will have to do in
future tests. Also also, notice that I said <em>future</em> tests: if you want to
implement something new, you <em>must</em> be sure it won't require everyone getting
out of their way to make your idea work -- don't make people rewrite tests
'cause they will break; don't make the other devs reformat their code 'cause
you decided, alone, to add a linter to your CI with your own rules; don't make
people worry about unwritten tests 'cause you decided it would be a good idea
to add a code formatting tool and that would make your coverage tool think
they are changing some unrelated piece of code that wasn't untested before.</p>
<p>Don't be a jerk thinking you know more than your whole team.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;hero-projects">Global Changes Must Be Discussed With The Whole Team First</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;specialists">Companies Look For Specialists But Keep Generalists Longer</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

129
public/books/things-i-learnt/tests-apis/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 - Tests Make Better APIs</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/layers/">#layers</a>
<a href="https://blog.juliobiason.me/tags/apis/">#apis</a>
</span>
<p>Testing things in isolation may give a better view of your APIs.</p>
<span id="continue-reading"></span>
<p>After reading the <a href="/books/things-i-learnt/integration-tests">integration tests</a>
chapter, you may end up with the impression that I don't like unit tests<sup class="footnote-reference"><a href="#1">1</a></sup>.</p>
<p>Actually, I think they provide some good intrinsic values.</p>
<p>For example, as mentioned before, they can provide a better look at the
adherence to the design.</p>
<p>But, at the same time, they give a better view of your internal -- and even
external -- APIs.</p>
<p>For example, you're writing the tests for the view layer -- 'cause, you know,
we write everything in layers; layers on top of layers<sup class="footnote-reference"><a href="#2">2</a></sup> -- and you're noticing
that you have to keep a lot of data (state) around to be able to make the
calls to the controller. Or that you have similar calls, but the parameters
are sometimes switched (say, one function gets a token and a user ID, and
another function gets a user ID and a token -- why?) That's a sign that you
may have to take a better look at the controller API.</p>
<p>Not only that, but take, for example, the fact that you're working on a
library -- which will be called by someone else -- and you're writing tests
for the most external layer, the layer that will be exposed by that library.
And, again, you're noticing that you have to keep a lot of context around,
lots of variables, variables coming from different places and similar calls
using parameters in different ways. Your tests will look like a mess, don't
they? That's because the API <em>is</em> a mess.</p>
<p>Unit testing your layers makes you the <em>user</em> of that layer API, and then you
can see how much one would suffer -- or, hopefully, enjoy -- using that.</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>Again, let's ignore for a second that there are no &quot;unit&quot; in &quot;unit
tests&quot;...
<sup class="footnote-reference"><a href="#2">2</a></sup>: And layers all the way down, <a href="https://en.wikipedia.org/wiki/Turtles_all_the_way_down">like
turtles</a>.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;integration-tests">Unit Tests Are Good, Integration Tests Are Gooder</a>
</div>
&nbsp;
<div style="float:right">
<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> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

138
public/books/things-i-learnt/tests-dead-code/index.html

@ -0,0 +1,138 @@
<!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 - Testing Every Function Creates Dead Code</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/unit-tests/">#unit tests</a>
<a href="https://blog.juliobiason.me/tags/dead-code/">#dead code</a>
</span>
<p>If you write a test for every single function on your system, and your system
keeps changing, how will you know when a function is not necessary anymore?</p>
<span id="continue-reading"></span>
<p>Writing a test for every single function on your system may come from the
&quot;100% Coverage Syndrome&quot;, which afflicts some managers, thinking that the only
way to be completely sure your system is &quot;bug free&quot; is to write tests for
every single line of code, till you reach the magical &quot;100% coverage&quot; in all
the tests.</p>
<p>I do believe you can reach 100% coverage, as long as you're willing to
<em>delete</em> your code.</p>
<p>(Cue the universal grasps here.)</p>
<p>But how do you know which pieces of code can be deleted?</p>
<p>When I mentioned <a href="/books/things-i-learnt/integration-tests">integration
tests</a>, I mentioned how much more
sense it made to me reading them instead of the &quot;unit&quot; tests, because they
were describing exactly how the system would operate in normal (and some
abnormal) conditions. If you write tests that go through the system, assuming
it is a black box with an input point and an output, and you can get tests for
all the normal cases -- and some &quot;abnormal&quot;, like when things go wrong -- then
you know that, if you run those tests and they mark some lines as &quot;not
tested&quot;, it's because you don't need them.</p>
<p>&quot;But Julio, you're forgetting the error control!&quot; I do agree, specially when
you're talking with project owners or some other expert, that people will
forget to tell you what to do in case of things going wrong -- say, the user
typing their name in the age field -- but <em>you</em> can see those and <em>you</em> know
that you need error control so <em>you</em> can add the error control and describe
the situation where that error control would trigger.</p>
<p>If, on the other hand, you write a test for every function, when you do a
short/simple check, you'll find that the function is still being used in the
system by the tests, not actually, &quot;value to the user&quot; code. Sure, you can
use your IDE to go back and forth between code and test and see if it points a
use beyond the test, but it won't do it for yourself.</p>
<p>There is one other weird thing about using integration tests for error
controls: Sometimes, you can't reach the control statement. It's true! I did
wrote control checks for every function once but, when running in the
integration tests, there was no way to produce an input at the input layer of
the system that would reach the error control in that function 'cause the
other functions, which would run before the one I was trying to test, would
catch the error before it. If that's a design problem or not -- it probably
was -- it's a different discussion, but the fact is that that function didn't
need error control, something that I wouldn't see if I wrote test specifically
for it, but it was clear in an integration test run.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;integration-tests">Unit Tests Are Good, Integration Tests Are Gooder</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;tests-apis">Tests Make Better APIs</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

117
public/books/things-i-learnt/tests-in-the-command-line/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 - Make Tests That You Know How To Run on the Command line</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/tests/">#tests</a>
<a href="https://blog.juliobiason.me/tags/command-line/">#command line</a>
</span>
<p>You know that &quot;Play&quot; with a little something on your IDE that runs only the
tests? Do you know what it does?</p>
<span id="continue-reading"></span>
<p>A long time ago I read the story about a professor that taught his students to
code. He preferred to teach using an IDE, 'cause then &quot;students have to just
press a button to run the tests&quot;.</p>
<p>I get the idea, but I hate the execution.</p>
<p>When we get into professional field, we start using things like <a href="https://en.wikipedia.org/wiki/Continuous_integration">continuous
integration</a> which,
basically, is &quot;run tests every time something changes&quot; (it's a bit more than
that, but that's the basic idea).</p>
<p>Now, let me ask you this: Do you think the students of the professor above
would know how to add the command to run the tests in a continuous
integration system?</p>
<p>I know I'm being too picky (one could even call me &quot;pricky&quot; about this) but
the fact is that whatever we do today, at some point can be automated: our
tests can be run in an automated form, our deployment can be run in an
automated form, our validation can be run in an automated form and so on. If
you have no idea how those things &quot;happen&quot;, you'll need the help of someone
else to actually build this kind of stuff, instead of having the knowledge
(well, half knowledge, the other half is the CI tool) with you all the time.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;tests-apis">Tests Make Better APIs</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;languages-tests">Good Languages Come With Tests</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

93
public/books/things-i-learnt/things-i-dont-know/index.html

@ -0,0 +1,93 @@
<!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 - Keep A List of Things I Don&#x27;t Know</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/things-i-don-t-know/">#things i don&#x27;t know</a>
<a href="https://blog.juliobiason.me/tags/richard-feyman/">#richard feyman</a>
</span>
<p>Richard Feymann, famous physicist, kept a notebook with the title &quot;Things I
Don't Know&quot;.</p>
<span id="continue-reading"></span>
<p>I keep a similar &quot;Task List&quot; for myself. If some technology starts appearing
everywhere or something grabs my attention, but I don't have the time to
research it, I put it on this task list.</p>
<p>When I start my research, I keep some notes together, although <a href="/books/things-i-learnt/paper-notes">not on
paper</a>, so I can use as reference in the
future.</p>
<p>{{ chapters(prev_chapter_link=&quot;/books/things-i-learnt/post-solution&quot;, prev_chapter_title=&quot;Don't Hide Your Stupid Solution&quot;, next_chapter_link=&quot;/books/things-i-learnt/time&quot;, &quot;next_chapter_title=&quot;You Always Have The Time&quot;) }}</p>
</div>
</div>
</body>
</html>

120
public/books/things-i-learnt/throw-away/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 - Be Ready To Throw Your Code Away</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/code/">#code</a>
</span>
<p>A lot of people, when they start with TDD, get annoyed when you say that you
may have to rewrite a lot of stuff, including whatever your already wrote.</p>
<span id="continue-reading"></span>
<p>TDD was <em>designed</em> to throw code away: The more you learn about your problem,
the more you understand that, whatever you wrote, won't solve the problem in
the long run. Also, as you slowly solve new problems, you may notice some
pattern in the code emerging (you're doing the same thing over and over, with
only minor changes). That's a good time to go over and rewrite everything to
take advantage of this pattern.</p>
<p>You shouldn't worry about this. Your code is not a wall (or any physical
object): if you have to throw it away, you didn't wasted materials. Surely it
means your time writing code was lost, but you got a better understanding
about the problem now, or you may start to think in a more concise way to
solve the problem.</p>
<p>Not only that, but as you progress through your project, solving problems and
getting &quot;acquainted&quot; with the problem, you'll also notice that the
<a href="/books/things-i-learnt/spec-first">spec</a> will also change. This means that
the problem your code solve wasn't exactly the problem you <em>needed</em> to solve;
your code is trying to solve something that isn't exactly the problem.</p>
<p>Also, specs changing is really common. One thing that you can be sure is that
it won't change <em>everywhere</em>. Some of the things you solved will stay the
same, some others will be completely removed and some others added. And you
will see that you'll refactor your code a lot, and throw a lot of code away.
And not just code that solves the problem, but also the tests for that code.</p>
<p>... unless you focus mostly on <a href="/books/things-i-learnt/integration-tests">integration
tests</a>.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;paper-notes">Be Ready To Throw Your Code Away</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;future-trashing">Future Thinking Is Future Trashing</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

108
public/books/things-i-learnt/time-to-stop/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 - When It&#x27;s Time to Stop, It&#x27;s Time To Stop</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/stop/">#stop</a>
<a href="https://blog.juliobiason.me/tags/personal-time/">#personal time</a>
</span>
<p>Learn when you can't code anymore.</p>
<span id="continue-reading"></span>
<p>Learn when you can't process things anymore.</p>
<p>Don't push beyond that, it will just make things worse in the future.</p>
<p>I tried to keep coding once when I had a migraine (not strong, but not mild).
Next day, when I was better, I had to rewrite most of the stuff I did, 'cause
it was all shit.</p>
<p>Also, when you're not feeling fine, you won't be able to concentrate and your
productivity will plunge. It's a lot better to be a burden to society at your
own place than a burden to society at work.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;stupid-bugs-list">Keep A List of Stupid Bugs That Took More Than 1 Hour To Solve</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;coc">Code of Conduct Protect YOU, Not THEM</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

116
public/books/things-i-learnt/time/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 Always Have The Time</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/personal/">#personal</a>
<a href="https://blog.juliobiason.me/tags/time/">#time</a>
</span>
<p>You may think &quot;Alright, I have a list of things I don't know, but I have no
time to learn those things!&quot; You do have time.</p>
<span id="continue-reading"></span>
<p>Most of this blog/book was written during my lunch breaks; I can have my lunch
in 30 minutes, and then I still have 20-30 minutes free for myself. In those
lunch breaks, I wrote a very stupid application in Rust to download some stuff
I wanted.</p>
<p>I don't fall asleep straight away, it still takes me about 30 minutes to
actually feel sleepy. That's when I pick my tablet and read a book, which most
of the time is technical book, about some technology I'm interested in.</p>
<p>Even if when I get home I don't feel like sitting in front of a computer to
code/write something, I always have the time to slowly progress.</p>
<p>And that's how I always have the time.</p>
<p>Sure, I could take those 30 minutes after lunch just to play games. I could
put myself to sleep watching Netflix. But, then again, I'd never wrote this
bunch of words, would never have an automated downloader and would not learn
about new stuff that people are talking about.</p>
<p>Maybe people think &quot;If I don't finish, it's over&quot;. Your life doesn't end in
one day. You still have tomorrow to keep going -- <em>to keep going</em>, not to
start.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;things-i-dont-know">Keep A List of Things I Don&#x27;t Know</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;own-your-shit">Own Your Shit</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

115
public/books/things-i-learnt/toxic-people/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 Toxic People</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/toxic-people/">#toxic people</a>
</span>
<p>You'll find people that, even if they don't small talk you, they will bad
mouth everything else -- even some other people -- openly.</p>
<span id="continue-reading"></span>
<p>Toxic people love drama. They love to put people down. They love to point
mistakes made by others -- but never by themselves. Some of them actually do
that to make themselves look better in the eyes of the upper management.</p>
<p>Not totally toxic, but I did work with people who would never answer an email
unless the manager was in the discussion. Another person would always claims
his team did everything they could, even putting himself at the disposal of
the manager to solve any issues, and that the problem was not related to their
work -- which we proved three times it was.</p>
<p>You need to stay away from those people. They will harm in ways you can figure
out immediately. Their attitude towards other (and maybe even yourself) will
drive you so down you'll waste more time wondering what you did wrong than
doing your job.</p>
<p>One thing to take a lot of care: Even if it is not your intention, you may not
realize that you may be seen as toxic 'cause <a href="/books/things-i-learnt/learn-about-yourself">you don't understand yourself
yet</a> and the way <a href="/books/things-i-learnt/watch-reactions">people react to
you</a>.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;hero-syndrome">Don&#x27;t Confuse Hero Project With Hero Syndrome</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;microaggressions">Beware of Microaggressions</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

112
public/books/things-i-learnt/transparent/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 - Be Transparent With The User</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/ux/">#ux</a>
<a href="https://blog.juliobiason.me/tags/ui/">#ui</a>
</span>
<p>Since we are talking about <a href="/books/things-i-learnt/log-events">logging</a>,
another thing you must do is to be transparent with the user in your user
interface.</p>
<span id="continue-reading"></span>
<p>And by &quot;be transparent&quot;, I meant that your website/mobile app needs to point
out to the user that the webserver is down instead of saying to the user to
check their internet connection; your application <em>is</em> getting something from
the webserver, so you <em>can</em> say &quot;Oops, something wrong on our side&quot;.</p>
<p>Another example: If you need to check a bunch of data before saying &quot;It's
done&quot;, add a counter to show the user that the application is doing something.
<a href="https://joplinapp.org/">Joplin</a>, when syncing data with a webdav server,
needs to check a bunch of files; one version would simply sit still with a
spinner on &quot;Syncing&quot; and nothing more; when they added a counter, I could
easily see that there was something going on.</p>
<p>Those small details, for as bad as they may make you look, will win points
with the user in the long run.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;log-events">Logs Are For Events, Not User Interface</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;add-then-remove">One Version To Add, One Version To Remove</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

118
public/books/things-i-learnt/understand-shortcuts/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 - Shortcuts Are nice, But Only In The Short Run</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/frameworks/">#frameworks</a>
</span>
<p>A lot of languages/libraries/frameworks add a way to make things shorter,
reducing the number of things you need to type.</p>
<p>But, later, that will bite you and you'll have to remove the shortcut and do
the long things.</p>
<span id="continue-reading"></span>
<p>Frameworks and libraries -- and even some languages -- come with &quot;helpers&quot; for
most boilerplate things. Instead of typing the same 5 lines of code over and
over, you can use a simple function; instead of writing the function with 5
parameters, you can skip a bit and use another one with just one. Or you could
just add a simple macro expansion on top of your struct/class and it would
complete all the missing points.</p>
<p>Don't get me wrong, they are great.</p>
<p>But you must understand what the macro/function is hiding from you. 'Cause
sooner or later, you'll find a case where it doesn't have a perfect fit and
you need to change just a small detail. And then you'll start running in
circles 'cause, well, how the hell the macro/function did <em>that</em>?</p>
<p>I've bitten before by <a href="http://spring.io/">Spring</a> and
<a href="https://serde.rs/">Serde</a> 'cause I started with the shortcuts without
understanding what they were doing. And then I got a problem which the
shortcut wouldn't solve, requiring me to go deep into the documentation. And
because I skipped a few steps and jumped straight into the shortcut, it took
me awhile to actually get <em>what</em> I needed to do different from the shortcut to
solve my problem: I had no idea what the shortcut did and, thus, I had no idea
what I needed differently from the shortcut to solve my problem.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;functional-programming">Learn The Basics of Functional Programming</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;debuggers">Debuggers Are Overrated</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

109
public/books/things-i-learnt/units/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 - Units Makes Things Clear</h1>
<span class="post-date">
2019-07-17
<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/units/">#units</a>
<a href="https://blog.juliobiason.me/tags/explicit/">#explicit</a>
</span>
<p>You know what's one of the worst function names ever? <code>sleep()</code>.</p>
<p>Sleep for how long? It is seconds or milliseconds?</p>
<span id="continue-reading"></span>
<p>Now let me ask you this: Would it clearer if the function was called
<code>sleepForMs()</code>? Would you understand that the function would make the
application sleep for a number of milliseconds?</p>
<p>What about <code>sleepForSecs()</code>? Do you understand that this will force your
application to sleep for a number of seconds?</p>
<p>What if, instead of using the function name, you could use <code>sleep(&quot;10s&quot;)</code>? Does
it make clear that you want it to sleep for 10 seconds?</p>
<p>That's why adding units to the function or parameters make sense. It removes
the ambiguity of what it means and doesn't rely on some specialized IDE/Editor
that display the parameter names.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;optimization">Optimization Is For Compilers</a>
</div>
&nbsp;
<div style="float:right">
<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> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

141
public/books/things-i-learnt/use-structures/index.html

@ -0,0 +1,141 @@
<!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 Your Data Has a Schema, Use a Structure</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/data-classes/">#data classes</a>
<a href="https://blog.juliobiason.me/tags/structs/">#structs</a>
</span>
<p>You may be tempted to use a list (or tuple, if your language allows) to keep
your data if it has, say, only 2 fields. Don't.</p>
<span id="continue-reading"></span>
<p>Some languages allow unstructured data to be kept in the format of tuples:
They act like lists, but you can use to store heterogeneous data (which is a
cute way of &quot;it stores fields of different types&quot;).</p>
<p>This languages also allow you to &quot;destructurize&quot; them, so you can extract
elements from them without directly accessing them by index.</p>
<p>For example, in Python, you can have a tuple with:</p>
<pre data-lang="python" style="background-color:#2b303b;color:#c0c5ce;" class="language-python "><code class="language-python" data-lang="python"><span>a_tuple = (&#39;</span><span style="color:#a3be8c;">A String</span><span>&#39;, </span><span style="color:#d08770;">1</span><span>, </span><span style="color:#d08770;">7.5</span><span>)
</span></code></pre>
<p>And you can destructure it with</p>
<pre data-lang="python" style="background-color:#2b303b;color:#c0c5ce;" class="language-python "><code class="language-python" data-lang="python"><span>some_string, an_integer, a_float = a_tuple
</span></code></pre>
<p>See? It's simple! You don't need to create a whole structure if you're just
passing a string, an integer and a float around.</p>
<p>Except, you do need a structure 'cause your data has a <em>schema</em>.</p>
<p>Tuples and destructuring should be used only when you need to pass data from
one function to another -- and barely that. When you have this tuple being
passed around, being destructured and created again -- say, you are adding one
value of the tuple to another value and producing a new tuple in the same
format -- then you have a structured -- and <em>schemaed</em> data.</p>
<p>And when you have a structured data, you must use a data class or a struct (or
even
<a href="https://docs.python.org/3/library/collections.html?highlight=namedtuple#collections.namedtuple">NamedTuples</a>,
if you're using Python).</p>
<p>Although it may look way more simpler to keep destructuring and building the
tuple over and over, in the long run you'll end up with a mess: a simple
change -- like adding a new field -- will require checking every destructuring
and every creation of the tuple to make sure if will stay in the same shape
every time.</p>
<p>So: You data has a schema? Use a Data Class or Class or Struct. Only if it is
schemaless, then you can use a tuple.</p>
<p>I've seen this used at least once. At the very start of the project, it
may seem easier to just store the data as a tuple and destructure it and build
it again when needed. There was even a whole module designed to receiving
tuples, destructure them and rebuild new ones (for example, a function that
would receive two tuples and compute the sum of the &quot;value&quot; field of each,
building a new tuple as a result). But because of this design, to add just a
new field, I had to change 14 files and do 168 changes around -- 'cause there
was a function to add two tuples, but there were points where you need just
one field, and there wasn't a function for it.</p>
<p>It would be easier to use if there were functions to extract each field, and
add two tuples, and what else was needed for managing the tuples, but then you
have to ask yourself: Why not use a class for that?</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;data-types">Types Say What Your Data Is</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>

121
public/books/things-i-learnt/use-timezones/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 - Always Use Timezones With Your Dates</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/dates/">#dates</a>
<a href="https://blog.juliobiason.me/tags/timezones/">#timezones</a>
</span>
<p>No matter if the date you're receiving is in your local timezone and you'll
display it in your timezone, sooner or later, the fact that you ignored there
was a timezone behind that date will hurt you.</p>
<span id="continue-reading"></span>
<p>(Note: Most of this post when I say &quot;date&quot; you can think of &quot;date and time&quot;,
although the date should also be &quot;timezone aware&quot;.)</p>
<p>At some point of my professional life, ignoring timezones was easy: You just
pick the date, throw in the database, then read it back and everybody was
happy.</p>
<p>But things are not like this anymore. People will access your site from far
away locations, the source of the date may not be in the same timezone of your
system, your system may be running in a completely different timezone of your
dev machine (it's pretty common to run things in our machines in the local
timezone but the production system will run in UTC), the display may be a
complete different timezone than your production and dev machine and so on.</p>
<p>So always carry the timezone with the data. Find modules/classes that support
dates with timezones (a.k.a. make things <em>timezone aware</em>), capture the
timezone as soon as possible and carry it around in all operations.
Modules/classes that don't support timezones for dates/times should, as soon
as possible, removed from the system.</p>
<p>Any developers a bit more seasoned -- and by &quot;seasoned&quot; I meant &quot;Had to deal
with times before&quot; -- will probably claim &quot;Hey, this is <em>obvious</em>!&quot; And I'd
have to agree. But it's annoying how many times I got bitten by some stupid
bug 'cause we decided that &quot;well, everything is in the same timezone, so it's
all good&quot;.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;start-stupid">Start Stupid</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;use-utf8">Always Use UTF-8 For Your Strings</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

133
public/books/things-i-learnt/use-utf8/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 - Always Use UTF-8 For Your Strings</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/utf-8/">#utf-8</a>
</span>
<p>Long gone are the days where <a href="https://en.wikipedia.org/wiki/ASCII">ASCII</a> was
enough for everyone. Long gone are the days where you can deal with strings
with no &quot;weird&quot; or &quot;funny&quot; characters.</p>
<span id="continue-reading"></span>
<p>I became a developer in a time when the only encoding we had was ASCII. You
could encode all strings in sequences of bytes, 'cause all characters you
could use where encoded from 1 to 255 (well, from 32 [space] to 93 [close
brackets] and you still have a few latin-accented characters in some higher
positions, although not all accents where there).</p>
<p>Today, accepting characters beyond that is not the exception, but the norm. To
cope with all that, we have things like
<a href="https://en.wikipedia.org/wiki/Unicode">Unicode</a> and
<a href="https://en.wikipedia.org/wiki/UTF-8">uTF-8</a> for encoding that in reasonable
memory space (UTF-16 is also a good option here, but that would depend on your
language).</p>
<p>So, as much as you to make your system simple, you will have to keep the
internal representation of your strings in UTF-8/UTF-16. You may not receive
the data as UTF-8/UTF-16, but you'll have to encode it and keep transmitting
it around as UTF-8/UTF-16 till you have to display it, at which point you'll
convert from UTF-8/UTF-16 to whatever your display supports (maybe it even
supports displaying in UTF-8/UTF-16, so you're good already).</p>
<p>Today, I believe most languages do support UTF-8, which is great. You
may still have problems with inputs coming from other systems that are not
UTF-8 (old Windows versions, for example), but that's fairly easy to convert
-- the hard part is figuring out the input <em>encoding</em>, though. Also, most
developers tend to ignore this and assume the input is in ASCII, or ignore the
input encoding and get a bunch of weird characters on their printing,
'cause they completely ignored the conversion on the output point. That's why
I'm repeating the mantra of UTF-8: To remind you to always capture your input,
encode it in UTF-8 and <em>then</em> convert in the output.</p>
<p>One thing to keep in mind is that UTF-8 is not a &quot;cost free&quot; encoding as
ASCII: While in ASCII to move to the 10th character, you'd just jump 10 bytes
from the start of the string, with UTF-8 you can't, due some characters being
encoded as two or more bytes (you should read the Wikipedia page; the encoding
is pretty simple and makes a lot of sense) and, due this, you can't simply
jump 10 characters 'cause you may end up in second byte that represents a
single character. Walking through the whole string would require traversing
the string character by character, instead of simply jumping straight to the
proper position. But that's a price worth paying, in the long run.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;use-timezones">Always Use Timezones With Your Dates</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;optimization">Optimization Is For Compilers</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

114
public/books/things-i-learnt/users/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 - Think About The Users</h1>
<span class="post-date">
2019-07-17
<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/privacy/">#privacy</a>
</span>
<p>Think how the data you're collecting from your users will be used -- this is
more prevalent on these days, where &quot;privacy&quot; is a premium.</p>
<span id="continue-reading"></span>
<p>I once had a discussion with a CTO about collecting the user IMEI on our
mobile app. Basically, there was no use case for capturing that information
yet but, as he put at the time, &quot;We may want to know if one user uses two
phones, or if two users use the same phone&quot;. I raised the fact that we didn't
need this information and, besides that, it felt like we were invading the
users privacy. He still decided to go ahead. My answer: &quot;I'll do it, but I
want to point that I'm not happy with it.&quot;</p>
<p>In the end, the store blocked the app... because we were capturing the IMEI.</p>
<p>But there are cases and cases. If you really <em>really</em> need to capture user
information, be sure to protect it against unauthorized use, be it by external
forces (someone found a way to attack your data) or internal (some disgruntled
colleague decided to take the data from your users with them).</p>
<p>And be sure, there <em>will</em> be a leak at some point, it's just a matter of time.
If you can, the best way to protect your users data is to never capture it.
When a flaw on your system is found or when some colleague leaves the company
in bad terms, there will be no data to expose to the world, anyway. You can't
be more secure than this.</p>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;debuggers">Debuggers Are Overrated</a>
</div>
&nbsp;
<div style="float:right">
<a href="&#x2F;books&#x2F;things-i-learnt&#x2F;integration-tests">Unit Tests Are Good, Integration Tests Are Gooder</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

113
public/books/things-i-learnt/watch-reactions/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 - Pay Attention On How People React To You</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/reactions/">#reactions</a>
</span>
<p>One way you can learn about yourself is to pay attention on how people react
to your actions.</p>
<span id="continue-reading"></span>
<p>I have a &quot;angry man resting face&quot;, which means that, even when I'm in a null
mood, it looks like I'm angry.</p>
<p>I already had one meeting and which I started to ask something and noticed
that the other person move a bit back. That's when I realized that didn't
sound exactly how I meant. I had to add &quot;I'm not saying what you're proposing
is wrong, I'm just confused.&quot;</p>
<p>Also, I got a manager once come up with &quot;I thought you were <em>the</em> serious
person... till you suddenly started singing in the middle of a meeting&quot;<sup class="footnote-reference"><a href="#1">1</a></sup>.</p>
<p>You need to keep an eye on this. How is people reacting to your reactions? Are
they opening themselves to you or are they closing?</p>
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
<p>I have this &quot;serious&quot; problem that, depending on the word someone says,
I recall some lyrics and suddenly start singing it.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href="&#x2F;books&#x2F;things-i-learnt&#x2F;learn-about-yourself">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;hero-syndrome">Don&#x27;t Confuse Hero Project With Hero Syndrome</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

105
public/books/uma-licao-de-vim/00-intro/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">00. Introdução</h1>
<span class="post-date">
2015-12-22
</span>
<p>Esta é a parte em que eu explico porque eu escrevi tudo isso e cujo conteúdo
não vai afetar em nada seu conhecimento de VIM ou a sua vida.</p>
<span id="continue-reading"></span>
<p>Em 2000 tive meu primeiro contato com programação em Linux e, como era de se
esperar, o primeiro editor sugerido foi o &quot;VIM&quot;.</p>
<p>Foi WTF à primeira vista (e o clássico &quot;Como é que eu fecho isso?&quot;).</p>
<p><img src="https://blog.juliobiason.me/books/uma-licao-de-vim/00-intro/vim-zero.png" alt="Ok, não é a mesma versão que eu usei a 8 anos atrás, mas a sensação é a mesma." /></p>
<p>Depois de usar outros editores por algum tempo (<em>cough</em> FTE <em>cough</em>), finalmente
decidi dar o braço a torcer e passei a usar VIM, continuo usando até hoje. Não
que eu tenha usado somente VIM desde então, utilizei outros editores (TextMate,
Sublime Text 2, Gedit) mas eu sempre sinto falta de alguma coisa nos outros
editores que acabei de acostumando no VIM. E, ainda, VIM ainda é o editor que
eu mais ouço &quot;Cara, como é que tu fez isso?&quot;.</p>
<p>Não que VIM seja um editor completo e perfeito. Existem coisas novas surgindo a
todo momento que ninguém sequer imaginava quando VIM foi criado; existem coisas
que pelas próprias limitações do editor, o VIM não faz. Para algumas dessas,
existem plugins -- e eu vou falar de alguns interessantes mais pra frente -- e,
infelizmente, para outras, não há nada que possa ser feito, a não ser saber que
estas &quot;faltas&quot; existem e estar preparados para elas.</p>
<p>E vejamos quantos &quot;Cara, como é que tu fez isso?&quot; vão aparecer até o final
deste livro.</p>
<div>
&nbsp;
<div style="float:right">
<a href=".&#x2F;01-modos">Modos</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

BIN
public/books/uma-licao-de-vim/00-intro/vim-zero.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
public/books/uma-licao-de-vim/01-01-modo-normal/Mind-Blown.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

142
public/books/uma-licao-de-vim/01-01-modo-normal/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">01.01. Modo Normal</h1>
<span class="post-date">
2015-12-22
</span>
<p>Esta é a parte em que você ainda vai precisar de um arquivo pronto para ver
as coisas funcionando.</p>
<span id="continue-reading"></span>
<p>A apresentação mais clássica do modo normal são todas as demais explicações que
você vai achar por aí que dizem que é preciso usar <code>h</code>, <code>j</code>, <code>k</code> e <code>l</code> para
mover o cursor na tela. Tirando o fato que isso é uma balela sem tamanho e que
o VIM suporta movimentação com as teclas direcionais e que você não precisa
ficar pensando em mnemônicos como &quot;j tem uma perna pra baixo, k tem uma perna
pra cima&quot; e outras absurdices, estes são comandos normais válidos: ao
pressionar <code>k</code>, o cursor irá mover para a linha de cima, <code>j</code> moverá o cursor
para a linha de baixo e assim por diante.</p>
<p>Nem todos os comandos são acionados com apenas uma tecla. Alguns iniciam um
comando, mas ficam esperando mais informações para saber o que fazer ou onde
fazer. Assim, temos comandos que são de movimentação e outros de ação.</p>
<h2 id="comandos-de-movimentacao">Comandos de Movimentação</h2>
<p>Comandos de movimentação são comandos que movem o cursor no texto. Como já
vimos, <code>h</code>, <code>j</code>, <code>k</code> e <code>l</code> são comandos de movimentação. Além destes temos<sup class="footnote-reference"><a href="#1">1</a></sup>:</p>
<h3 id="f-letra">f[letra]</h3>
<p>Posiciona o cursor na próxima <code>[letra]</code> na linha. Se <code>[letra]</code> não existir, não
move o cursor. Por exemplo, <code>fa</code> irá mover o cursor para o próximo &quot;a&quot; na
linha.</p>
<h3 id="f-letra-1">F[letra]</h3>
<p>O mesmo que <code>f[letra]</code>, mas voltando na linha ao invés de ir pra frente.</p>
<h3 id="t-letra">t[letra]</h3>
<p>Posiciona o cursor uma posição antes de <code>[letra]</code> na linha. Praticamente o mesmo
que <code>f[letra]</code>, mas uma posição antes.</p>
<h3 id="t-letra-1">T[letra]</h3>
<p>Assim como &quot;F&quot; faz o mesmo que &quot;t&quot;, mas voltando na linha.</p>
<h3 id="0">0</h3>
<p>Move o cursor para a coluna 0.</p>
<h3 id="">_</h3>
<p>Move o cursor para a primeira letra que não seja espaço ou tabulação na linha.</p>
<h3 id="-1">$</h3>
<p>Move o cursor para o final da linha.</p>
<h3 id="-2">%</h3>
<p>Move o cursor para o outro elemento do par (por exemplo, % quando cursor
estiver sobre um &quot;(&quot; irá mover o cursor para o &quot;)&quot; correspondente).</p>
<p>Até aqui eu acredito que você esteja pensando &quot;nada que mude minha vida&quot;. Bom,
então aqui vem a primeira grande dica:</p>
<blockquote>
<p>Se você digitar um número antes de fazer um comando, VIM irá repetir o
comando quantas vezes o número indicar.</p>
</blockquote>
<p><img src="https://blog.juliobiason.me/books/uma-licao-de-vim/01-01-modo-normal/Mind-Blown.jpg" alt="" /></p>
<p>Ok, talvez não tenha sido a revelação do século, mas isso quer dizer que se
você digitar <code>3f.</code>, VIM irá mover o cursor para o terceiro ponto na linha atual.
E isso também pode não parecer importante, mas daqui pra frente isso vai fazer
sentido.</p>
<div style="border:1px solid grey; margin:7px; padding: 7px">
<p>Todas as imagens são copyright (C) seus respectivos donos.</p>
</div>
<p><sup class="footnote-reference"><a href="#1">1</a></sup> De forma alguma, esta é uma lista completa de todos os comandos de
movimentação existentes, apenas os mais interessantes.</p>
<div>
<div style="float:left">
&lt;&lt; <a href=".&#x2F;01-modos">Modos</a>
</div>
&nbsp;
<div style="float:right">
<a href=".&#x2F;01-02-entendendo-o-cursor">Entendendo o Cursor</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

BIN
public/books/uma-licao-de-vim/01-02-entendendo-o-cursor/areyoufuckingkiddingme.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

112
public/books/uma-licao-de-vim/01-02-entendendo-o-cursor/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">01.02. Entendendo o Cursor</h1>
<span class="post-date">
2015-12-22
</span>
<p>Esta é a parte em que você vai lembrar quando o texto não parar exatamente
onde você pensava que ele iria parar.</p>
<span id="continue-reading"></span>
<p>Antes de passar para comandos do modo normal que realmente alteram o texto, é
preciso entender como o VIM entende o cursor, porque o funcionamento pode
parecer um pouco diferente dos demais editores.</p>
<p>Para todos os efeitos, considere que o cursor está sempre na parte inferior
esquerda do bloco do cursor.</p>
<p><img src="https://blog.juliobiason.me/books/uma-licao-de-vim/01-02-entendendo-o-cursor/vim-cursor.png" alt="" /></p>
<p><img src="https://blog.juliobiason.me/books/uma-licao-de-vim/01-02-entendendo-o-cursor/areyoufuckingkiddingme.jpg" alt="Mais uma foto de você, nesse exato momento." /></p>
<p>Porque é importante ter isso em mente?</p>
<p>Porque a maior parte dos editores trata as coisas um pouco diferentes: Por
exemplo, se houver uma linha inteira no clipboard, o VIM irá inserir (com o
comando padrão de colar, que vamos ver mais adiante) a nova linha abaixo na
linha atual -- a maior parte dos outros editores cola a nova linha no lugar da
linha atual e move a antiga linha uma posição abaixo.</p>
<p>Apenas tenha isso em mente agora que vamos começar a mudar de modo e alguns
comandos consideram a posição do cursor desta forma e tem uma &quot;contraparte&quot;
para ações antes do cursor -- e por isso o próximo capítulo parece ter comandos
repetidos.</p>
<div style="border:1px solid grey; margin:7px; padding: 7px">
<p>Todas as imagens são copyright (C) seus respectivos donos.</p>
</div>
<div>
<div style="float:left">
&lt;&lt; <a href=".&#x2F;01-01-modo-normal">Modo Normal</a>
</div>
&nbsp;
<div style="float:right">
<a href=".&#x2F;01-03-modo-de-insercao">Modo de Inserção</a> &gt;&gt;
</div>
</div>
</div>
</div>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save