py con 2012 my presentation

19
Python as a Learning Language (an undergraduate student's view) Rishi Mukherjee 3rd year Computer Science NITMAS, Kolkata

Upload: gadha145

Post on 12-May-2015

212 views

Category:

Technology


0 download

DESCRIPTION

My talk at PyCon India 2012

TRANSCRIPT

Page 1: Py con 2012 my presentation

Python as a Learning Language (an undergraduate student's view)

Rishi Mukherjee3rd year

Computer ScienceNITMAS, Kolkata

Page 2: Py con 2012 my presentation

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.

Page 3: Py con 2012 my presentation

C and Disaster

•Introduction to the C language#include<stdio.h> int main() { printf("Hello World!\n"); return 0;}•My Reaction

Page 4: Py con 2012 my presentation

Python and Awesomeness

•Introduction to Python Language

print "Hello World!"

•My Reaction.

Page 5: Py con 2012 my presentation

Introduction to Programming Contests and Experience

•SPOJ•Codechef•Google Code Jam

Page 6: Py con 2012 my presentation

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

Page 7: Py con 2012 my presentation

Contribution to FOSS

Image Processing with SimpleCV•Bug Fixes•Examples

CODE

Page 8: Py con 2012 my presentation

Learning other Languages became easy

•Learn to drive first.•Only then try to know the machine.

Page 9: Py con 2012 my presentation

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.

Page 10: Py con 2012 my presentation

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.

Page 11: Py con 2012 my presentation

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.

Page 12: Py con 2012 my presentation

C, Python and Pseudocode

CODE

Page 13: Py con 2012 my presentation

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.

Page 14: Py con 2012 my presentation

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.

Page 15: Py con 2012 my presentation

An Issue to Discuss

Most parts of India, deprived of technical workshops.

Page 16: Py con 2012 my presentation

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.

Page 17: Py con 2012 my presentation

Conclusion

Page 18: Py con 2012 my presentation

Question / Answer Time

Page 19: Py con 2012 my presentation

Thank You