py con 2012 my presentation
DESCRIPTION
My talk at PyCon India 2012TRANSCRIPT
Python as a Learning Language (an undergraduate student's view)
Rishi Mukherjee3rd year
Computer ScienceNITMAS, Kolkata
My Story
•C and disaster.•Introduction to python.•BIG change.•Algorithms and python.•Introduction to programming contests.•Contribution to FOSS with python.•Learning other languages became easy.
C and Disaster
•Introduction to the C language#include<stdio.h> int main() { printf("Hello World!\n"); return 0;}•My Reaction
Python and Awesomeness
•Introduction to Python Language
print "Hello World!"
•My Reaction.
Introduction to Programming Contests and Experience
•SPOJ•Codechef•Google Code Jam
Algorithms and Python
•Working PseudocodePython Algorithm
insertion_sort(A) for j = 2 to A.length key=A[j] i=j-1 while i>0 and A[i]>key: A[i+1]=A[i] i=i-1 A[i+1]=key
def insertion_sort(A): for j in range(1,len(A)): key=A[j] i=j-1 while i>=0 and A[i]>key: A[i+1]=A[i] i=i-1 A[i+1]=key
Contribution to FOSS
Image Processing with SimpleCV•Bug Fixes•Examples
CODE
Learning other Languages became easy
•Learn to drive first.•Only then try to know the machine.
Problems Faced and Solutions
•Python is slow on SPOJ1. for line in sys.stdin vs for i in range(int(raw_input()))2. Using if __name__ == '__main__': main() is good.
3. import psyco is awesome.
4. import gc; gc.disable() to disable garbage collection.
5. Function calls are expensive.
6. Itertools is your friend.
Problems faced by Students of Non-Top Technical Colleges
•Big issue being overlooked.•Similar faces when introduced to C.•Ignore programming.•Code-o-phobia.•Fear of Technical rounds at interviews.•Waste of population.
Reasons for these problems
•Top tech college faculties are highly trained.•90% students have no computer background.•Unaware of the beauty of programming.•Syntax and compile errors of C seem
confusing.•Garbage in output seems confusing.•Data type seems unnecessary to beginners.
C, Python and Pseudocode
CODE
Reasons to choose python in colleges
•Python is simple.
•Python is object oriented.
•Learn it yourself (no dependence on the faculty)
•Awesome library.
•General purpose language.
•Great books and tutorials available.
•Programmer time more valuable than compiler time.
•Interpreted.
•Used in real world projects.
•Open Source.
•Universities like MIT teach python.
Why not scheme?
•Different from system languages.
•Python has advantages of scheme and is similar to c, c++, and java.
•Easy code translation.
•Python has map, lambda etc for functional programming.
•Used for projects and companies all over the world.
An Issue to Discuss
Most parts of India, deprived of technical workshops.
Suggestions to Spread Awareness
•Small groups of students and professionals in all parts of the country.
•Online python software development event once a year.
•Groups teach students and faculties of colleges occasionally.
•Algorithmic contests must allow python as a choice.
Conclusion
Question / Answer Time
Thank You