A bit about me
I'm currently a college student (not a CS major, unfortunately) in my last year of undergrad.I started programming in my first year of college, and eventually realized that I love it enough to try and make a career out of it! Most software developers I've met had been tinkering with computers and code for a decade by the time they were my age, so I feel like I have some catching up to do. Luckily, programming is fun, and there are plenty of resources to learn from and potential projects to play with!
Most of the programming I've done has been related to the simple modelling of some biological phenomenon (neurons firing being my favorite), and everything I've coded so far has been for a class. Hopefully, this will soon be remedied. I don't quite know yet where my interests lie in the world of software development, so I guess you can expect posts to be pretty mixed until I figure it out.
Planned Projects
Here's a partial list of projects I have planned for the near future (for my own housekeeping as well as to let you know what you might be reading about):- Mercurial, BitBucket - For various reasons, I've never properly used version control. So as soon as I get everything set up, I'll do a post on what I did and why I did it, and then I can be open-source!
- Learn R programming in preparation for Data Analysis on Coursera.
- Sudoku solver for Android - My first Android app! I'm excited for mobile development, and excited for puzzle games. This is a project I've started on my own, to practice Java and play with mobile development.
- Custom Drupal Module - For work at STS, I'm helping developing a custom Drupal module for our school's library. I didn't know Drupal or PHP before I started this project, so this should be interesting.
- Programming Languages on Coursera - I'm only experienced in object-oriented programming, so an overview of functional programming should teach me quite a bit.
- A review of Java + Data Structures basics. I might not blog about this, but it's been a while since I've actually programmed in Java, so I'll be brushing up, mostly via reading a textbook.
- That's... already a lot of projects! Later on I've got a couple more Coursera courses, a Computer Integrated Surgery project (any ideas?), and an Algorithms course. So, more to come!
I'm really excited to get started, and really excited to share everything! That being said, my goal is to update weekly, with some sort of significant progress on at least one project.
Duck
I like ducks. I think they're cute, and delicious. That being said, here's a game about ducks two of my friends like to play. I'm told it's best played with a large group of people, which explains why it was years before I understood what was going on between the two of them.
def duck(n):
print n, "Do you want to buy a duck?"
for i in range(n+1, 1, -1):
print i, "A what?"
for i in range(1, n+1):
print i, "A duck!"
for i in range(n+1, 1, -1):
print i, "Does it quack?"
for i in range(1, n+1):
print i, "Of course it quacks!"
duck(n+1)
duck(1)
That... was actually more challenging than I thought it'd be. Just goes to show, I really didn't understand that game. I've never seen the ending to this game, because once they run out of people, they just circle back to the first person and keep going. So, as much as I'd love for you to run this in your friendly Python interpreter and behold my awesome translation of this camp game... be warned - it's an infinite loop =P.
Yay! Hopefully I'll be able to be someone to get you to keep this blog up.
ReplyDeleteAs for the duck, here's my implementation, in Python 3.
def duck(n):
print(n, "Do you want to buy a duck?")
responses = ('A what?', 'A duck!',
'Does it quack?', 'Of course it quacks!')
for response in responses:
for _ in range(n):
print(response)
n = 1
while True:
duck(n)
n = n + 1
Oh dear, it doesn't preserve the whitespace, as is so direly important in Python. We may need to work with Blogger to get this corrected, if possible. Anyway, huzzah!
ReplyDeleteNo worries; soon, both our versions will be hosted on Bitbucket for all to compare!
ReplyDelete