Fork me on GitHub

> I could work one week, stop two, then work one month, then disappear for other two months. Always. People need to recharge, get new energy and ideas, to do creative work. And programming at high level is a fucking creative job. Among other things, this is interesting. This hasn't been my experience. i suppose, this is possible if you have the personal liquidity and not something many business practice.

Eric Ervin01:06:08

OMG. You would miss so many meetings.

Eric Ervin01:06:40

Meetings where people would be saying things that they want people to listen to.

Eric Ervin01:06:18

So many standups and [that rugby thing....] scrums.


agree but the actual numbers seem off. 2 months away to recharge energies? (some sci pub said 9 days has the same effect...) perhaps the folk was overworking on a daily basis. even 6h of pure, uninterrumpted coding is a lot. Particularly if you WFH


Yes! I’ve found that I could keep a cadence of 5h of pure coding when I was wfh, but going to 6 meant the next day I was very slow.


4 hrs of hard braining a day is my rule

👌 8

I totally work like this on a smaller scale. I do have a fixed schedule job, but hardly work like that. Sometimes its weeks or days of focused work and then here and there its days full of unproductivity and reading up on stuff and hanging out at meetings. I find it hard to imagine its possible to have a steady outcome over time coding stuff.


Sometimes where is a week with days full of meetings like 3 or 4 hours per day. I just dont stress myself and try to be productive in that time, but concentrate on the meetings and if something gets done inbetween, fine, if not, well then.


hi people, what books do you guys recommend on testing? (preferable if applicable to clojure)


Does anyone know of a tool for managing tutorial steps using git?


git tag?


I was thinking more along the line of being inlined into a document. The problem I'm having is that the copy-pasted changes fall out of sync with the "whole".


e.g. the deps.edn needs dependency X, then you reorder the sections but forget to migrate the dependency to the correct phase and now the deps.edn doesn't work.


Can write the tut in maid, then have it checkout between the tags


I’m probably completely misunderstanding the requirement


sounds like you want to embed a slice of github code in a tutorial, right?


That's vaguely in the right direction,


@lady3janepl I suppose so, hadn't thought of it in such clear terms yet :)


so the first thing that comes to my mind is the fact that you can link to snippets


but then if you change code in github, that'll link to an old commit


they have an example of how the output looks here:


I think I want to link to the old code actually :thinking_face: eg the evolution of deps.edn through the tutorial


ah, I thought "but what if I later want to update the code in the tutorial, but forget to update the link in tutorial markdown" or something


in which case, yes, tags and snippets


Ah, no. I'm thinking more about the fact I'm syncing a document with an evolving codebase.


I suppose something like git cat-file would work well here.


when I wrote a workshop, I had a tag each for a "task" ("fill things here") and "solution" ("this is how it looks filled")


@lady3janepl I don't understand the "task" part, what did that look like?


well, that was an interactive workshop


so I showed an evolution of the thing I was teaching people, and then had them finish increasingly complex examples


Did you have markers of some kind in the tasks?


so like .... on the slides I'd list functions for opening and closing files, reading and writing to files and then in the code there'd be a

$filename = 'whatever';

// please open it
// please write "xyzzy" to it
// please close it

...code that checks file contains xyzzy


yes, tasks were fully described in code as comments


Makes sense :) that's cool


I also tried to make them discrete and teach people things step by step, rather than teach a lot and then tell them to write it all themselves


to teach how to structure things well


anyway, that doesn't sound like what you're doing 😄


Off my original idea now, but I wonder if you could add sufficient structure to those comments to allow self direction


Not at this very minute, but it is similar to something I'd like to do :)


it was meant to be as self directed as possible, so the slides also had my presentation included (in presenter comments; i used google slides)


the nice thing about having a git repo is that you can make it as long as you'd like, and people can join halfway


so when someone was late, but had an environment already setup (which i helped people do ahead of time)


they could check out the "solution" tags in order, to quickly review previous steps


or if they got stuck at some point, they could fast forward to the next task, and go back to the previous problem on their own.


Whereas workshops that have you build steps on your own code don't really allow that. Git is cool 😄


> I'm syncing a document with an evolving codebase. so, like, documentation?


Not quite what I meant. I meant that I'm copying and pasting snippets, then changing the code, and copying new snippets, then going back and updating the copied code, then going back and updating the doc


yeah, I know :) I'm wondering how most web-based tutorials solve this problem tbh.


Had a nice chat with a university post-doc yesterday about functional programming (and lots of other things 😉). He was kind enough to point out that languages like Haskell have lots of side effects all over the place. For example exceptions (eg stack overflow), the amount of energy use an algorithm causes, performance/caching aspects, etc. So we can put that particular discussion to rest I guess 🤪


😂 the amount of energy use an algorithm causes


I always joke that Haskell's biggest feature is that it's good at warming up the room

😂 8

His research was quite nice actually by the way. They have a method of modelling the energy consumption effects of a system based on the source code, which allows predictions of the energy consumption without actually having to run or simulate anything. For example, the algorithm used by a thermostat and the effect of that on the energy used by the heating system.


@dominicm I thought Haskell had no side effects 😉

😄 4

I hate to be that person, but the idea of Haskell not having any side-effects isn't totally crazy. (Of course it heats the computer and yes there are exceptions). But thinking about haskell as having no side-effects is a useful abstraction. The IO type in haskell does not actually perform actions. You can create a bunch of different IO values, put them in a list, pass them a function, etc and no effects will happen. You can think of haskell as building up a description about what effects you want to run and then passing that description to a program that will run them. It is a really interesting take on code as data.


@jimmy I didn’t say it was crazy 😉


I agree @jimmy. But it’s still interesting food for thought: how far do you want (or need in specific domains…) to take the “side-effect free” aspect.


tracking side effects is also useful for compiler optimizations: you can assume expressions are pure and optimize them based on that


IMO something more akin to algebraic effects is far more ergonomic than the IO monad

Daniel Hines16:06:48

What are algebraic effects?


the 'printing' tab for example


Seems to me, people ignore "time to completion" as a side effect. If a function doesn't complete in the same amount of algorithmic time for the same input, unintentionally, that's a side effect, right?

👍 4