a technical notebook
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.

112 lines
5.0 KiB

  1. <h1>Wednesday, January 28</h1>
  2. on replicating process
  3. ----------------------
  4. Ok, so here we are. It's 2015. The gold standard for explaining how you
  5. solved a technical problem to the internet at large is a blog post with things
  6. you can copy and paste or maybe some pictures.
  7. If you're really lucky, someone actually has reusable a public repository of
  8. some kind. If you're _really_ lucky, their code works, and if all the gods
  9. are smiling on you at once, their code is _documented_.
  10. It seems to me that we can do better than this. We possess a great many of the
  11. right _tools_ to do better than this, at least for a lot of common problems.
  12. What does it take to make a given workflow both repeatable and legible to
  13. people without the context we have for a given thing (including ourselves)?
  14. Writing about it is surely desirable, but how do you approach a problem so
  15. that, instead of being scattered across your short term memory and a dozen
  16. volatile buffers, your work becomes a kind of document unto itself?
  17. This is the (beautiful) root of what version control does, after all: It
  18. renders a normally-invisible process legible, and in its newfound legibility,
  19. at least a little susceptible to transmission and reuse.
  20. What do I know works well for transmitting process and discovery, as far as it
  21. goes?
  22. - version control (so really git, which is severally horrible but also
  23. brilliant and wins anyway)
  24. - Makefiles (except that I don't understand make at _all_)
  25. - shell scripts (except that shell programming is an utter nightmare)
  26. - Debian packages (which are more or less compounded of the above, and
  27. moderately torturous to build)
  28. - IRC, if you keep logs, because it's amazing how much knowledge is most purely
  29. conveyed in the medium of internet chat
  30. - Stackoverflow & friends (I hate this, but there it is, it's a fact, we have to
  31. deal with it no matter how much we hate process jockies, just like Wikipedia)
  32. - screenshots and screencasts (a pain to make, all-too-often free of context, and
  33. yet)
  34. Here are some things that I think are often terrible at this stuff despite
  35. their ubiquity:
  36. - mailing lists (so bad, so _routinely pathological_, so utterly necessary to
  37. everything)
  38. - web forums like phpBB and stuff (so bad, so ubiquitous, so going to show up
  39. in your google results with the hint you desperately needed, but only if you're
  40. smart enough to parse it out of the spew)
  41. Here's one problem: There are a lot of relatively painless once you know them
  42. tools, like "let's just make this a dvcs repo because it's basically free",
  43. that if you know they exist and you really want to avoid future suffering you
  44. just get in the habit of using by default. But most people don't know these
  45. tools exist, or that they're _generally applicable tools_ and not just
  46. specialist things you might use for the one important thing at your job because
  47. somebody said you should.
  48. what makes programming hard?
  49. ----------------------------
  50. 0. Most of the existing programs.
  51. 1. Most of the existing programming languages.
  52. 2. Other programmers.
  53. 3. Human thought is brutally constrained in understanding complex systems.
  54. 4. Ok you wrote some programs anyway now GOTO 0.
  55. debian packaging again
  56. ----------------------
  57. I'm starting [here](https://www.debian.org/doc/manuals/maint-guide/) again.
  58. - https://wiki.debian.org/IntroDebianPackaging
  59. - https://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf
  60. (actually more helpful than anything else I've found so far)
  61. vagrant
  62. -------
  63. Vagrant is a thing for quickly provisioning / tearing down / connecting to
  64. virtual machines. It wraps VirtualBox, among other providers. I think the
  65. basic appeal is that you get cheap, more-or-less disposable environments with a
  66. couple of commands, and there's scaffolding for simple scripts to configure a
  67. box when it's brought up, or share directories with the host filesystem. It's
  68. really lightweight to try out.
  69. Go to the [downloads page](http://www.vagrantup.com/downloads) and install from
  70. there. I used the 64 bit Ubuntu .deb.
  71. $ sudo apt-get install virtualbox
  72. $ sudo dpkg -i vagrant_1.7.2_x86_64.deb
  73. $ mkdir vagrant_test
  74. $ cd vagrant_test
  75. $ vagrant init hashicorp/precise32
  76. $ vagrant up
  77. $ vagrant ssh
  78. This stuff takes a while on the first run through, but is generally really
  79. slick. `hashicorp/precise32` is more or less just a preconfigured image pulled
  80. from a central repository.
  81. Their [Getting Started](http://docs.vagrantup.com/v2/getting-started/index.html) is pretty
  82. decent.
  83. People around me have been enthusing about this kind of thing for ages, but I
  84. haven't really gotten around to figuring out why I should care until recently.
  85. I will probably be using this tool for a lot of development tasks.
  86. Other notes:
  87. * stackoverflow: [How can I create a VM in vagrant with virtualbox with two cpus?](https://stackoverflow.com/questions/17117063/how-can-i-create-a-vm-in-vagrant-with-virtualbox-with-two-cpus)
  88. * [Development Environments with Vagrant, Docker, and Supervisord](https://tylercipriani.com/2014/05/25/lightweight-portable-vagrant-docker.html)