View blog-post.md

[Teaching programming] Lesson five - lazyblog

Joy

When everything works and good definitions and examples just flow naturally and the other person seems to be learning everything you're saying.

I don't have anything particular to say, except the fact that the work from the previous weeks seems to be paying off, over all giving her a method improved dramatically the way she deals with implementing functions from scratch. Also, doing exercises as we go in the book it's way more effective having her solve them on her own.

View blog-post.md

[Teaching programming] Lesson four - lazyblog

On exercises

They are way too difficult. I've slowed the pace considerably due to a misjudgement of exercises difficulty.

On giving a method

It was her who raised this point and it actually makes a lot of sense, it's a shame I didn't think about this earlier on.

View simulate-work.sh
#!/bin/bash
while true; do
filename=$(((RANDOM %10) + 1))
if [ -f $filename ]; then
mkfile 30m data/$filename
else
randomstring=$(LC_CTYPE=C tr -dc A-Za-z0-9 < /dev/urandom | fold -w ${1:-$(((RANDOM %1000000) +1))} | head -n 1)
echo $randomstring >>data/$filename
fi
View blog-post.md

[Teaching programming] Lesson three - lazyblog

Thoughts

There was some confusion on how to use functions and recursion in the end. I didn't spot that previously. I am starting to think that a lot of what "being a teacher" means is to understand when your audience got the idea you're trying to pass on.

So what didn't I understand? For sure the fact that going from

View gist:f3f994bdae98e0abf175d17ef19bce4a
https://github.com/leoliu/ggtags#install-global-and-plugins
### ctags
https://github.com/universal-ctags/ctags/blob/master/docs/osx.rst#building-with-homebrew
### global
View exercises.scm
;; in the previous solution we implemented 2nd and last
;; but we did not define proper return values for the edge cases,
;; this time we will
;; your task will be to provide those values, as you can imagine
;; (sum 4 'gatto) does not have an answer
;; make it so that expressions will return true
;; a suggestion would be to paste the definitions of 2nd and last
;; above the exercises and fix the errors you get, by returning proper values
View exercises.scm
;; write the function "2nd" that given a list of atoms
;; returns the second atom
;; return values for illegal cases are up to you
;; try to be reasonable though
(define 2nd
(lambda (lat)
;; ...
))
;; then write the results for these applications by running your function
(2nd '()) ;; ???
View blog-post.md

[Teaching programming] Lesson two - lazyblog

From the previous lesson

It wasn't clear, and still isn't to me as of now, how S-exps are counted in a list, for example

;; how many are here? Is it 2?
(((a b c) d))
View exercises.scm
;; given leq? that checks for lists equality
;; complete the following, so that the result is true
;; all these exercises can be solved with combinations of
;; car, cdr, cons
;; be creative!
;; this is just an example I solved for you :)
;; l -> (1 2 3)
;; m -> (0 1 2 3)
View blog-post.md

Walking the Emacs Path

So, I'm walking the Emacs pPath:

seek features in other editors and port them in Emacs, there shouldn't be a moment in which you see an useful feature in another editor that you don't have in your .emacs.d

It's not a pleasant path, there are always things that don't work, that happen when they shouldn't. The great thing though is that I feel regressions to happen very rarely if ever. There are few different