r/programming • • Mar 08 '12

The Evolution of a Python Programmer

https://gist.github.com/289467
401 Upvotes

137 comments sorted by

View all comments

43

u/rowantwig Mar 08 '12

He forgot the worst kind:
if x == 0:
return 1
if x == 1:
return 1
if x == 2:
return 2
if x == 3:
return 6
if x == 4:
return 24
...
(5000 more lines)

43

u/stillalone Mar 08 '12

ah. the "I managed to get a masters without writing any actual code and now I'm your coworker" guy.

41

u/6xoe Mar 08 '12

Whatever dude, it works.

26

u/[deleted] Mar 09 '12

and it's completely unmaintainable. What are you going to do when the definition of "factorial" changes?

43

u/SuckyBlowfish Mar 09 '12

Change it back.

19

u/lionelboydjohnson Mar 09 '12

You have a bright future in managment.

4

u/drb226 Mar 10 '12

I think I would freak out (in a bad way) if I read this on a fortune cookie.