-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwhy_clojure.html
More file actions
372 lines (268 loc) · 15.2 KB
/
why_clojure.html
File metadata and controls
372 lines (268 loc) · 15.2 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>What is programming? — ClojureBridgeMN Documentation November 4-5, 2016 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="ClojureBridgeMN Documentation November 4-5, 2016 documentation" href="index.html"/>
<link rel="up" title="Welcome to ClojureBridge" href="welcome.html"/>
<link rel="next" title="Git" href="git_intro.html"/>
<link rel="prev" title="ClojureBridgeMN Agenda for Saturday November 5, 2016" href="saturday.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> ClojureBridgeMN Documentation
</a>
<div class="version">
Saturday Nov 5 2016 @ 15:59:08 futuro
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="setup.html">Installfest</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="welcome.html">Welcome to ClojureBridge</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="welcome.html#agenda">Agenda</a></li>
<li class="toctree-l2"><a class="reference internal" href="welcome.html#introductions">Introductions</a></li>
<li class="toctree-l2"><a class="reference internal" href="welcome.html#you-are-here">You are here!</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="welcome.html#why-clojure">Why Clojure?</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#">What is programming?</a></li>
<li class="toctree-l3"><a class="reference internal" href="#what-is-functional-programming">What is “functional programming”?</a></li>
<li class="toctree-l3"><a class="reference internal" href="#why-clojure">Why Clojure??</a></li>
<li class="toctree-l3"><a class="reference internal" href="#open-source-why-the-community-is-important">Open Source: why the Community is important</a></li>
<li class="toctree-l3"><a class="reference internal" href="#a-journey-begins">A journey begins...</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="welcome.html#using-git-to-save-your-programs">Using git to save your programs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="track1.html">Track 1</a></li>
<li class="toctree-l1"><a class="reference internal" href="track2.html">Track 2</a></li>
<li class="toctree-l1"><a class="reference internal" href="resources.html">Clojure Resources</a></li>
<li class="toctree-l1"><a class="reference internal" href="community.html">Connect with the Clojure Community</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">ClojureBridgeMN Documentation</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li><a href="welcome.html">Welcome to ClojureBridge</a> »</li>
<li>What is programming?</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/why_clojure.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<p><strong>Why Clojure?</strong></p>
<div class="section" id="what-is-programming">
<h1>What is programming?<a class="headerlink" href="#what-is-programming" title="Permalink to this headline">¶</a></h1>
<p>Programs are a set of instructions for a computer to follow.</p>
<p>Computer programming is about expressing the instructions in
a language that can be translated down to the detailed steps that
a microprocessor can understand.</p>
<p>Programs that do something interesting enough that we would
recognize – like sending an e-mail, uploading a photo or
making a restaurant reservation – are, themselves, made up of
many smaller programs.</p>
<p>Software developers often start with a big goal like
“make a restaurant reservation application” and break it up
into smaller pieces. In fact this process happens repeatedly
until the pieces are tiny and bite-sized.</p>
<p>Because everyone likes to eat let’s use preparing an Italian
dinner as an analogy. The goal is:</p>
<ul class="simple">
<li>Italian Dinner</li>
</ul>
<p>So let’s start by breaking that into independent parts: we’ll combine all three parts to make the meal.</p>
<ul class="simple">
<li>Italian Dinner<ol>
<li>Fettuccine Alfredo</li>
<li>Salad</li>
<li>Red Wine</li>
</ol>
</li>
</ul>
<p>We can even break the parts into steps:</p>
<ul class="simple">
<li>Italian Dinner<ol>
<li>Fettuccine Alfredo<ul>
<li>Cook pasta</li>
<li>Make Alfredo sauce</li>
</ul>
</li>
<li>Salad<ul>
<li>Cut veggies</li>
<li>Make homemade vinaigrette</li>
</ul>
</li>
<li>Red Wine</li>
</ol>
</li>
</ul>
<p>Now each of the steps (except maybe making the sauce :) is short and straightforward.</p>
<p>In computer lingo we would say that each of these steps are “functions”:
each is designed to accomplish a specific task. A “program” is just
a big function that’s built on top of lots of other little functions.</p>
</div>
<div class="section" id="what-is-functional-programming">
<h1>What is “functional programming”?<a class="headerlink" href="#what-is-functional-programming" title="Permalink to this headline">¶</a></h1>
<p>The words “functional programming” mean more than just programming
with functions. It means programming with small functions that
take some input and provide some output without depending on
other knowledge of how “the system” is running.</p>
<p>By contrast “imperative programming” describes functions that
are changing things in “the system” that you have to remember.
Set the variable <em>X</em> to $19.95 and the variable <em>Y</em> to 3.
At first the “change this, then change that...” approach
seems easy to understand until you get a lot of details that
you have to keep in your head to understand the function.</p>
<p>In “functional programming” the idea is to have short
functions where you can <em>see</em> everything that’s happening
without having to remember what’s going on outside the function
(i.e. in “the system”). Clojure programmers like to talk about
functions taking in data of a certain shape and returning
data of a different shape. The data could be numbers or text
or collections of things.</p>
</div>
<div class="section" id="why-clojure">
<h1>Why Clojure??<a class="headerlink" href="#why-clojure" title="Permalink to this headline">¶</a></h1>
<p>Clojure is a modern adaptation of of the classic functional programming
language LISP (which stands for list processing language) which dates
back to 1954!</p>
<p>In LISP everything is a list. The functions you write are lists.
The data for your functions are lists. The clever bonus of having
everything is a list is that programs and data <em>look the same</em>.
That means we can have functions that create or improve other functions
because they all look like data!</p>
<p>Many programmers are surprised by LISP because the parentheses are
always on the outside:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">(</span><span class="n">italian</span><span class="o">-</span><span class="n">dinner</span> <span class="n">main</span><span class="o">-</span><span class="n">course</span> <span class="n">side</span> <span class="n">beverage</span><span class="p">)</span>
</pre></div>
</div>
<p>... because many popular computer languages put the function name
first (instead of at the beginning of the list of arguments)</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">italian_dinner</span><span class="p">(</span><span class="n">main_course</span><span class="p">,</span> <span class="n">side</span><span class="p">,</span> <span class="n">beverage</span><span class="p">);</span>
</pre></div>
</div>
<p>In designing Clojure, Rich Hickey combined the good parts of LISP
and combined it with the powerful Java Virtual Machine.
As a result Clojure is an <em>opinionated</em> LISP that...</p>
<ul class="simple">
<li>Is simpler to learn and understand (much easier than Java)</li>
<li>Has higher performance and works on a broad range of computers thanks to the Java Virtual Machine (<em>NOTE: Clojure also works on JavaScript and the CLR</em>)</li>
<li>Provides easy inter-operation with many existing Java libraries (makes it practical to write real-world programs)</li>
<li>Can be used for both client and server development (ClojureScript has one of the
best stories for web development)</li>
</ul>
<p>And it turns out the Clojure community is wonderful</p>
<ul class="simple">
<li>Tends to be full of explorers: people that are curious, eager to learn and happy to help each other</li>
<li>Even though typically big companies are hesitant to adopt new technologies Clojure is beginning to see more commercial use.</li>
<li>Values diversity (e.g. conference opportunity grants, ClojureBridge)</li>
</ul>
</div>
<div class="section" id="open-source-why-the-community-is-important">
<h1>Open Source: why the Community is important<a class="headerlink" href="#open-source-why-the-community-is-important" title="Permalink to this headline">¶</a></h1>
<p>Clojure is open source software... what does that mean?</p>
<p>Open source software is...</p>
<ul class="simple">
<li>Designed to be shared for free with everyone (using a hack on copyright)</li>
<li>Created by volunteers (and increasingly by companies)</li>
<li>Published publicly to encourage collaboration and improvement</li>
</ul>
<p>Typical examples are Linux (runs in every Android phone), the Firefox web browser,
and the Libre Office suite of tools.</p>
<p>Why makes open source software great?</p>
<ol class="simple">
<li>Volunteers work on projects that they are passionate about</li>
<li>You can adapt and change it to make it work for you</li>
<li>The investment in learning an open source program often pays off because (good ones) often last a long time</li>
<li>Because the code is open anyone can inspect it for security weaknesses or privacy vulnerabilities.</li>
<li>Everyone can get involved simply by being a user, reporting bugs, working on documentation and, yes, contributing code.</li>
</ol>
<p>Why is diversity in technology (especially open source software) important?</p>
<ul class="simple">
<li>Women are 50% of users, but only 15% contributors</li>
<li>For any software to be successful it <em>has</em> to take the needs of users into account</li>
<li>In order to make better software we need YOU!</li>
</ul>
</div>
<div class="section" id="a-journey-begins">
<h1>A journey begins...<a class="headerlink" href="#a-journey-begins" title="Permalink to this headline">¶</a></h1>
<p>Today you will publish a program on the Internet!</p>
<p>After today you can continue your learning...</p>
<ul class="simple">
<li>Join the <a class="reference external" href="http://www.meetup.com/clojuremn/">clojure.mn</a> user group</li>
<li>Continue to converse with people you’ve met on <a class="reference external" href="http://clojurebridge-minneapolis.github.io/setup.html#instructions-for-all-slack">Slack</a></li>
<li>Join us at the <a class="reference external" href="http://2016.clojure-conj.org/">Clojure Conj</a> - registration is free for ClojureBridge alumnae! <em>note: lambda ladies, opp grants</em></li>
<li>Going further with the <a class="reference external" href="https://developers.google.com/open-source/gsoc/">Google Summer of Code</a> (e.g. <a class="reference external" href="https://www.youtube.com/watch?v=Elg17s_nwDg">Maria Geller’s work on ClojureScript</a>) and <a class="reference external" href="https://www.gnome.org/outreachy/">Outreachy</a></li>
<li>Code academies (e.g. <a class="reference external" href="https://primeacademy.io/">Prime Digital Academy</a>)</li>
</ul>
<p>Software is everywhere!</p>
<p><em>speaker note: reveal the secret now</em></p>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="git_intro.html" class="btn btn-neutral float-right" title="Git" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="saturday.html" class="btn btn-neutral" title="ClojureBridgeMN Agenda for Saturday November 5, 2016" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2016 ClojureBridgeMN volunteers.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'November 4-5, 2016',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>