You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
5.3 KiB
130 lines
5.3 KiB
<!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://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="/">English</a></li> |
|
|
|
<li class="sidebar-nav-item"><a href="/pt">Português</a></li> |
|
|
|
<li class="sidebar-nav-item"><a href="/tags">Tags (EN)</a></li> |
|
|
|
<li class="sidebar-nav-item"><a href="/pt/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>"Without requirements or design, programming is the art of adding bugs to an |
|
empty text file." -- 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 "let me jump straight to the code". 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 -- "I don't know what to do next, and I'm not sure if I'm done |
|
with the current problem" -- 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 "I need |
|
to do this, then I pick that thingy and put it there and from there I do this |
|
other work". 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 "First, how I do this; Ok, got it, now I get the result |
|
from this and put there" and so on. You can even have a learning path, if |
|
you're a beginner.</p> |
|
<div> |
|
|
|
<div style="float:left"> |
|
<< <a href="/books/things-i-learnt/disclaimer">Disclaimer</a> |
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div style="float:right"> |
|
<a href="/books/things-i-learnt/steps-as-comments">Write Steps as Comments</a> >> |
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</body> |
|
|
|
</html>
|
|
|