-
Notifications
You must be signed in to change notification settings - Fork 0
/
the-missing-tech-context.html
67 lines (56 loc) · 3.95 KB
/
the-missing-tech-context.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta id="keywords" name="keywords" content="">
<link id="stylesheet" rel="stylesheet" type="text/css" href="https://oskipa.github.io/theme/css/code.css"></link>
<link id="stylesheet" rel="stylesheet" type="text/css" href="https://oskipa.github.io/theme/css/site.css"></link>
</head>
<body>
<header class="header">
<h1 class="site-name">
<a class="home-link" href="https://oskipa.github.io">Dada</a><br />
|> Structures<br />
|> Algorithms</h1>
<nav>
<menu class="minimal-menu">
<li><a href="https://oskipa.github.io/pages/today-i-learned.html">til</a></li>
<li><a href="https://oskipa.github.io/pages/now.html">now</a></li>
<li><a href="https://oskipa.github.io/short_index.html">index</a></li>
<!--
<li><a href="category/log.html">web log<a></li>
<li><a href="">about<a></li>
<li><a href="">site map<a></li>
-->
</menu>
</nav>
</header>
<div class="container">
<div class="row">
<div class="col-md-8">
<h2>The Missing Tech Context</h2>
<h3>Tech discourse will become better the more we take tools, environments, and culture into consideration</h3>
<label>21 November, 2021</label>
<p>Recently I ran into a discussion on a Ruby forum about the "right" way to implement a <code>.double</code> function. One solution used a <code>case</code> block that checked on the object's type. The other one added <code>.double</code> methods to the <code>Numeric</code>, <code>Array</code>, etc. Which one is better?</p>
<p>People with Smalltalk experience will say that adding methods is the proper object oriented solution. And they are right. Right, that is, if we are writing in Smalltalk. If we are writing in another OOP language, this solution may be wrong. A grave mistake, even.</p>
<p>Isn't OOP the same in any language? Our current expectation is that it is. The reality is that isn't. Each language operates with a different context from the others.</p>
<p>Ruby is heavily inspired by Smalltalk. It is essentially a command-line Smalltalk dialect that lacks the GUI and the tools. Let's examine the different contexts.</p>
<p>In Smalltalk we have good development tools. Developer education explains how the language works, how message dispatch works, and how each Smalltalk image is a unique system once you finished your project.</p>
<p>Ruby has a different culture. It has many people who use it to get things done. It is mainly written in text editors. Message dispatch is learned once we are learning about metaprogramming. The language is syntactically more complex. Developers don't expect that base classes will be modified.</p>
<p>So while the Smalltalk developer can easily find where a method is defined in their system, even expecting changes, the Ruby developer will be surprised. We want to reduce those surprises.</p>
<p>An interesting consequence is that if changing Object becomes a common practice in Ruby, then this practice, which today may be considered incorrect, will be fine. We need to be flexible because context changes with time.</p>
</div>
</div>
</div>
<footer class="footer">
<!-- <p class="about"><a href="http://hugoestr.github.io/blog/manifesto.html">About</a> --> <a href="https://oskipa.github.io/pages/about.html" >I am</a> a software developer. I code in Python, Ruby, Lisp, and many other languages. I like poetry, museums, and ukuleles. I try to guide my life on principles of dadaism and nonviolence.</p>
<p>
<a href="feeds/all.atom.xml">atom</a>
<!-- <a href="http://github.com/oskipa/">github</a> -->
</p>
<p>Artisanally built with <a href="https://blog.getpelican.com/">Pelican</a>. Content handcrafted in <a href="https://www.vim.org/" >Vim</a>. All hallucinations are human. 100% AI Free.</p>
</footer>
</body>
</html>