Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added comments, docstrings #3

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

gw666
Copy link

@gw666 gw666 commented Jan 24, 2015

Hi, @thattommyhall,

I got things working properly for segment-painters (didn't bother with image-painters) and added comments and docstrings that I think would make the learning process easier for beginners.

Use however much/little/none as you wish, and modify as you see fit. I believe it is important to remove as many barriers to success as possible, which includes (in my book) having to figure out details that have nothing to do with the material being learned (which, FYI, is why I'm not bothering with image-painters).

I was a magazine editor/writer for many years (including BYTE, 1979-1988), so I think I have some experience at this process.

That being said, this is my first ever pull request ever, anywhere, so please pardon my errors (and I constantly struggle with git, too). If there's a next time, I'll create a "topic branch" (?) to make things easier for you.

Best wishes,

Gregg Williams

gw666 and others added 15 commits January 17, 2015 22:09
also added comments to help orient new users
shapes: box, x, diamond, george

segment-lists allow compound shapes to be drawn using
concat; see diamond-x

fcns: flip-horiz, flip-vert; rotate, rotate180, rotate270; below
Abstracted split-up, split-right into higher-level split function.
Source code refactored, with comments and docstrings added, to make it
easy for beginners to get up to speed quickly.

Does not implement image-painter.

To give yourself a chance to complete the exercise as ‘thattommyhall’
intended, delete the bodies of the following functions:

  add-vec
  sub-vec
  scale-vec
  flip-horiz
  rotate
  below
  path
  right-split (uncomment by removing “#_”)
  up-split (uncomment by removing “#_”)
  split

Just evaluate this file to see the “goal” function, square-limit, draw
itself. This version uses the “higher-level” versions of right-split
and up-split.

If you decide to write the code for up-split and derive the
higher-level function ‘split’, you will need to comment out or remove
the versions of right-split and up-split that follow split in the
source code and un-comment the versions that precede split in the
source code.

Enjoy, and please give me feedback if you find my version helpful!
This reverts commit f8dc53523901f84b162294b3ba8f2bd7a6a3ac6f.

Conflicts:
	src/escher/core.clj
This reverts commit f8dc53523901f84b162294b3ba8f2bd7a6a3ac6f.

Conflicts:
	src/escher/core.clj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants