Re: [Tutor] Sharing Code Snippets

2013-04-11 Thread Sayan Chatterjee
Tried it out.It's really cool.From next time on, shall try to make use of
this. Thanks. :)


On 11 April 2013 06:58, Amit Saha amitsaha...@gmail.com wrote:

 Hello everyone,

 I am not sure if this has been shared on this list. However, to help
 both those seeking help and those wanting to help, may I suggest that
 for all of you posting your programs, how about using a service such
 as GitHub's Gists [1]. It allows you to post entire programs with
 advantages such as intact code formatting, syntax highlighting and
 perhaps others such as version control.

 I hope that's a useful suggestion.

 [1] https://gist.github.com/

 Best,
 Amit.

 --
 http://amitsaha.github.com/
 ___
 Tutor maillist  -  Tutor@python.org
 To unsubscribe or change subscription options:
 http://mail.python.org/mailman/listinfo/tutor




-- 


--
*Sayan  Chatterjee*
Dept. of Physics and Meteorology
IIT Kharagpur
Lal Bahadur Shastry Hall of Residence
Room AB 205
Mob: +91 9874513565
blog: www.blissprofound.blogspot.com

Volunteer , Padakshep
www.padakshep.org
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Sharing Code Snippets

2013-04-11 Thread Albert-Jan Roskam
 Subject: [Tutor] Sharing Code Snippets
 
 Hello everyone,
 
 I am not sure if this has been shared on this list. However, to help
 both those seeking help and those wanting to help, may I suggest that
 for all of you posting your programs, how about using a service such
 as GitHub's Gists [1]. It allows you to post entire programs with
 advantages such as intact code formatting, syntax highlighting and
 perhaps others such as version control.
 
 I hope that's a useful suggestion.
 
 [1] https://gist.github.com/

Hi,
 
Is this better than e.g. http://www.pastebin.com/? I wouldn't like it if the 
emails contain *only* links to such sites.
That way the information is lost forever if github decides to remove the code. 
Often these sites have expiration
dates for their contents.

Albert-Jan
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Sharing Code Snippets

2013-04-11 Thread Amit Saha
On Thu, Apr 11, 2013 at 9:33 PM, Albert-Jan Roskam fo...@yahoo.com wrote:
 Subject: [Tutor] Sharing Code Snippets

 Hello everyone,

 I am not sure if this has been shared on this list. However, to help
 both those seeking help and those wanting to help, may I suggest that
 for all of you posting your programs, how about using a service such
 as GitHub's Gists [1]. It allows you to post entire programs with
 advantages such as intact code formatting, syntax highlighting and
 perhaps others such as version control.

 I hope that's a useful suggestion.

 [1] https://gist.github.com/

 Hi,

 Is this better than e.g. http://www.pastebin.com/? I wouldn't like it if the 
 emails contain *only* links to such sites.
 That way the information is lost forever if github decides to remove the 
 code. Often these sites have expiration
 dates for their contents.

GitHub's Gists doesn't have an expiration date, since its primary
purpose is not a paste bin. But yes, I understand that if GitHub
decides to remove this service some day, the code is lost.

-Amit.




 Albert-Jan



--
http://amitsaha.github.com/
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Sharing Code Snippets

2013-04-11 Thread Steven D'Aprano

On 11/04/13 11:28, Amit Saha wrote:

Hello everyone,

I am not sure if this has been shared on this list. However, to help
both those seeking help and those wanting to help, may I suggest that
for all of you posting your programs, how about using a service such
as GitHub's Gists [1]. It allows you to post entire programs with
advantages such as intact code formatting, syntax highlighting and
perhaps others such as version control.



Please don't. Small code snippets should be posted directly in the
body of the email, not on some external website.

They should be posted in PLAIN TEXT (do not use so-called
rich-text, HTML formatted emails, since they destroy critical
indentation and make it difficult for those using plain-text email
clients to read your code). Like this:


import random

def coin_toss():
if random.random()  0.5:
return head
else:
return tail


It's much less work for everyone to read code snippets in the email:
compare:

SENDER: copy and paste code directly into email

READER: read email
write response


versus:

SENDER: open browser
log in to external site
copy and paste code into external site
make sure code has been saved
copy and paste url into email

READER: read email
open browser
copy and paste url
fix url if it has been mangled by line-wrapping
read code
copy and paste back to email for the response


to say nothing about how it may effect those who use a screen reader. (They
generally work well with email, not so well with many websites.)

People may have access to their email, and be able to read and answer your
question, but they may not have access to the web. Perhaps they are behind
a firewall that blocks the website. For whatever reason, just because
somebody is reading your email doesn't mean that they can or will follow
to a website to read the important bit (the actual code). You should make
it *easy* for people to answer, not harder.

Code sharing sites are great for posting entire programs, but you, the
reader, shouldn't be posting entire programs and expecting us to work out
where the problem lies. Identify where the problem lies, and eliminate all
unnecessary code. Please read this for more details:

http://sscce.org/


--
Steven
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Sharing Code Snippets

2013-04-10 Thread Amit Saha
Hello everyone,

I am not sure if this has been shared on this list. However, to help
both those seeking help and those wanting to help, may I suggest that
for all of you posting your programs, how about using a service such
as GitHub's Gists [1]. It allows you to post entire programs with
advantages such as intact code formatting, syntax highlighting and
perhaps others such as version control.

I hope that's a useful suggestion.

[1] https://gist.github.com/

Best,
Amit.

--
http://amitsaha.github.com/
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor