2014年10月14日星期二

Picking up Python...

Believe me or not, picking up a language that you've not been using for the past three years is harder than you thought...

I started Python programming when I was a freshman majoring Computer Science. The syntax of the language was very interesting and it is actually a great language for program starters.

Recently I started to pick up Python because the task now for my HFOSS class is to design an educational game for 4th graders. The game should(and is easier to )be implemented using Python.

I went back and looked at the code I did back when I was a freshman. Python contained a .turtle graphics class that allows the programmer to type in a list of commands that draws shapes. It is a great way to introduce programming to new programmers.
This is a recursion code I did to draw a series of circles.

Also by going over the old codes that I did, I found out that Python is ultimately fast at calculating small data. This is a big advantage over other languages in my case because the educational game should not really take a lot of calculations (both for the machine and the student).

The hard part for me in learning Python is mainly the syntax of the language(or my coding habit). Since python handles variable and data differently, it will switch your variable from a type of a string to an int - which is a horrible design pattern issue. Therefore I had to be really careful in creating variables to keep both me and my variables static...

I will keep up learning Python myself and hopefully by the time my team started to develop the actual game I will be more familiar than I was.

没有评论:

发表评论