# hyperactive computing
![](./img/code%20test%20story%20tape.jpg)
The ultimate goal of all ~art~ code is the _act of_ building!
### reproducibility is political
## literacy ain't
from util import *
i = 0
toc
<module '__style__' from '/home/tonyfast/Documents/XlbsOSh_t/xlbs/__style__.md.ipynb'>
0 | 0 |
---|---|
1 | skateparks |
2 | demonstration |
3 | hyperactive-programming |
4 | demolition |
5 | dead-pixels |
## computational essayists
> ### _I'm gonna open this notebook/terminal/application to try something!_
### donny knuth & literate `#programming`
[The Computer Scientist Who Can’t Stop Telling Stories](https://www.quantamagazine.org/computer-scientist-donald-knuth-cant-stop-telling-stories-20200416/)
{{g("""source->document[label=weave] source->code[label=tangle] rankdir=LR""")}}
#### The practitioner of literate programming can be
## regarded as an essayist,
### whose main concern is with exposition
# & excellence of style.
#### Such an author, with thesaurus in hand, chooses the names of variables carefully & explains what each variable means.
## He or she
### strives for a program that is comprehensible because its
#### concepts have been introduced in an order that is best
### for human understanding, using
## a mixture of
# formal & informal methods
### that reinforce ~co-develop~ each other.
#programming
¶The Computer Scientist Who Can’t Stop Telling Stories
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd%22%3E> ## I am imposing a moral commitment on everyone who hears the term;
>> # surely nobody wants to admit writing an illiterate program.
## [The patron saint of yak shaves](https://yakshav.es/the-patron-saint-of-yakshaves/)
![](https://i.makeagif.com/media/2-21-2015/5FmXL8.gif)
[web]: http://www.literateprogramming.com/knuthweb.pdf
I am imposing a moral commitment on everyone who hears the term;¶
surely nobody wants to admit writing an illiterate program.¶
### literate `#computing`
### From this perspective, we therefore refer to the workflow exposed by these kinds of computational notebooks
#### (not just IPython, but also Sage, Mathematica and others),
## as "literate computing":
# it is the weaving of a narrative directly
## into a live computation,
### interleaving text with code and results to construct a complete piece
## that relies equally on the textual explanations and the computational components.
>> Fernando Perez - ["Literate computing" and computational reproducibility: IPython in the age of data-driven journalism]
["Literate computing" and computational reproducibility: IPython in the age of data-driven journalism]: http://blog.fperez.org/2013/04/literate-computing-and-computational.html
[Jupyter meets the Earth: EarthCube Community Meeting](https://blog.jupyter.org/jupyter-meets-the-earth-earthcube-community-meeting-4bb9fb49cada)
#computing
¶Fernando Perez - "Literate computing" and computational reproducibility: IPython in the age of data-driven journalism
This presentation was written with ❤ in `#pidgy`. @tonyfast will be talking more about at this years virtual jupyter con.
This presentation was written with ❤ in #pidgy
. @tonyfast will be talking more about at this years virtual jupyter con.
## coding with more fingers
![](https://media1.giphy.com/media/fsoCk5kgOcYMM/giphy.gif)
## [A Notebook is a Hypothesis](https://github.com/deathbeds/wtf)
* Computational essays take parts from literacy and programming to tell data driven stories..
* Best practices for maturing notebooks into computational essays.
* Formal software testing practices to extend the sell by date of a notebook.
### testing ideas, doing new tricks
https://docs.python-guide.org/writing/tests/
## `import importnb`
## `importnb` is a key tool in the `#deathbeds` arsenal.
A while ago we started using **notebooks as source**, changing our ability to collaboratively
**build**, **test**, and **demo**
## testing 💩 in environments
>> ### _Environments are invisible. Their ground rules, pervasive structure, and overall platforms elude easy perception._
> - The Medium is the Massage
### literate [`#_testing`]
#### robotlab
λ.YouTubeVideo()("uYGh9_c3b7s", start=10)
import robot
### programming the browser with `robot` testing
When `#deathbeds` builds UI, robotframework keeps us honest
```robot
*** Settings ***
Library JupyterLibrary
Suite Setup Wait for New Jupyter Server to be Ready
Test Teardown Reset JupyterLab and Close
Suite Teardown Terminate All Jupyter Servers
*** Test Cases ***
A Notebook in JupyterLab
Open JupyterLab
Launch a new JupyterLab Document
Add and Run JupyterLab Code Cell print("hello world")
Wait Until JupyterLab Kernel Is Idle
Capture Page Screenshot
```
import robot
robot
testing¶When #deathbeds
builds UI, robotframework keeps us honest
robot
*** Settings ***
Library JupyterLibrary
Suite Setup Wait for New Jupyter Server to be Ready
Test Teardown Reset JupyterLab and Close
Suite Teardown Terminate All Jupyter Servers
*** Test Cases ***
A Notebook in JupyterLab
Open JupyterLab
Launch a new JupyterLab Document
Add and Run JupyterLab Code Cell print("hello world")
Wait Until JupyterLab Kernel Is Idle
Capture Page Screenshot
i = 0
i = 0
### `__import__("IPython").InteractiveShell`
#### IPython inspection
{% for i in range(i) %}{{"🤣😂😆"[i%3]}}{% endfor %}
{{fizzbuzz(i)}}
i |= 16
i += 1
fizzbuzz:\
A functional formal of [fizz buzz].\
= λ.range().map(
# no remainder for 15
λ**(-λ[Λ%15][bool]) & "fizz buzz".format
# no remainder for 5
| λ**(-λ[Λ%5][bool]) & "buzz".format
# no remainder for 5
| λ**(-λ[Λ%3][bool]) & "fizz".format
| λ()
).list()
[fizz buzz]: https://en.wikipedia.org/wiki/Fizz_buzz
!!!!!!
__import__("IPython").InteractiveShell
¶🤣😂😆🤣😂😆🤣😂😆🤣😂😆🤣😂😆🤣
[0, 1, 2, 'fizz', 4, 'buzz', 'fizz', 7, 8, 'fizz', 'buzz', 11, 'fizz', 13, 14, 'fizz buzz']
i |= 16
i += 1
fizzbuzz:\
A functional formal of fizz buzz.\
= λ.range().map(
# no remainder for 15
λ**(-λ[Λ%15][bool]) & "fizz buzz".format
# no remainder for 5
| λ**(-λ[Λ%5][bool]) & "buzz".format
# no remainder for 5
| λ**(-λ[Λ%3][bool]) & "fizz".format
| λ()
).list()
!!!!!!
i = 16
i = 16
## [Language server protocol][lsp]
### inspection, completion, 100+ other things
[lsp]: https://en.wikipedia.org/wiki/Language_Server_Protocol
## Takeaways
* Develop with and co-develop against community tools
* There are many facets to demo code
* The balance takes practice
toc
0 | 0 |
---|---|
1 | skateparks |
2 | demonstration |
3 | hyperactive-programming |
4 | demolition |
5 | dead-pixels |
toc