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.
119 lines
4.5 KiB
119 lines
4.5 KiB
11 months ago
|
<!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 - 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 "helpers" 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">
|
||
|
<< <a href="/books/things-i-learnt/functional-programming">Learn The Basics of Functional Programming</a>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div style="float:right">
|
||
|
<a href="/books/things-i-learnt/debuggers">Debuggers Are Overrated</a> >>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
|
||
|
</html>
|