-
-
Notifications
You must be signed in to change notification settings - Fork 807
Convert print statement to print function #142
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
Conversation
|
This super seeds #141. This uses |
|
hi @r-gaia-cs are you sure about the decision of using the format method? |
|
I feel the |
Is my preference.
I agree it is simpler. I want to use the |
can't argue about that :)
Perhaps there's space for both, we can do the simple way first and then tell the students there's a more powerful way if needed. IMHO using format for very simple statements looks like killing a fly with a bazooka. My 2c anyway. |
|
+1 to keeping it simple (no format), though I am embarrassed to admit I thought some manner of string formatting (either old style %f or new style {}) were required for even simple tasks, and didn't know the simpler option until now (thanks!) |
|
Hi - I'm a mailing list lurker but as someone who's only recently "graduated" from SWC student level I'd like to vote for including the format method. I really love putting numbers in text using, for example {:2.2f}. I think it's really intuitive and much easier to read than the % style. |
|
Keep it simple to start with - you're just trying to demonstrate simple features of numpy and I think throwing |
|
I like the idea of keeping it simple, but to make the students aware of .format later on. Maybe by including it in an exercise towards the end of one of the first lessons? |
|
+1 to using the simpler version but mentioning that the |
|
I would be inclined to use |
|
+1 to including |
|
+1 to @andreabedini's suggestion of delaying |
|
The consensus above seems reasonable to me: don't introduce |
|
I'd suggest not using |
|
So this is a case where a micro-lesson may be appropriate, perhaps similar Sincerely, 2102B National Center for Supercomputing Applications On Thu, Jul 16, 2015 at 11:31 AM, Matt Davis notifications@github.com
|
|
Thanks to all for the comments. I will remove the |
|
@abostroem Could you review this pull request? I dropped the |
02-loop.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did the {.python} disappear in line 117?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I remember we are using {.python} for code that learners could type and will actually work when following the lesson. Since this isn't the case I drop it.
If I missed something about how we use {.python} sorry about it. If the documentation isn't good enough I will improve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to make this PR only Python 3 changes and make this change as a separate PR. Is there a way we are denoting pseudo code?
|
I agree with the basic points about format method (mention in followup, but don't lead with it). That said: Software Carpentry does have a repo for an intermediate python lesson- is it actively being worked on? A lot of programming lessons focus on either novices or the very advanced, but teaching https://github.com/swcarpentry/python-intermediate-mosquitoes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should introduce a different bug so that we can still have the discussion of debugging. I alway try to keep in mind that whatever the quirks of a language - we are really using it as a vehicle for teaching programming skills - and debugging is one of them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should introduce a different bug so that we can still have the discussion of debugging.
I totally agree on this. I just don't know a good bug to introduce right now and for sake of consistence of the lesson the easy solution is drop this part. Since this will not goes live right now I will request to create one issue for this and doesn't block the merge because of it.
I alway try to keep in mind that whatever the quirks of a language - we are really using it as a vehicle for teaching programming skills - and debugging is one of them
We think in the same way. =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put a comment in saying that in earlier version of python this returns a truncated integer and see how the lesson does without the bug lesson here.
|
@r-gaia-cs This is a great start! I've made a few minor comments in line. The biggest thing is whether we should remove the section in 06-func.md which discusses debugging or replace it with a different bug. Comments welcome. |
Addressed.
As I said before, I will ask to not block this pull request because of it since this pull request is against |
|
@rgaiacs I've added two notes to the inline comments - once those are taken care of we're ready to merge :) |
@abostroem I toke care of the comments. Could you review the call out box that I add? |
|
@rgaiacs I think you accidentally committed the html files. Is it possible for you to have this PR only update the md files (I'll regenerate the html files after I merge the PR)? |
05-cond.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the statements below do this any more (although I wouldn't encourage it anyway.)
The bug doesn't happen anymore since learners will use Python 3 now.
|
@QuLogic Thanks for the review. @abostroem I rebased this pull request so that it could be merge smoothly. |
We are trying to teach best practices.
…procedure Reminder to go through checkout procedure
Add Library Carpentry to the workshop template
This is part of porting the lesson to Python 3.