Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Tuesday, August 18, 2015

Starting Out With Python by Tony Gaddis in Computer Science 256

My Computer Science Class uses Starting Out with Python by Tony Gaddis as its text.  Today, I completed my first week of coursework using the book working my way through chapter 1 and Appendix B.  I read and took notes on all of the basics of the computer including the CPU, Memory, Secondary Storage, Inputs, and Outputs.  The first chapter also features a brief explanation of machine language, assembly languages, and high level languages.  This is as far ahead as I have ever been in an undergrad class!

My early musings on the Gaddis text are essentially that this is totally a textbook.  I am sure the people at Addison-Wesley are good people with nice families who need the work, but I have to say that they have a way of creating texts that are intimidating and generally terrible.  I grew to hate the Addison Wesley name as an elementary and middle school math student and the name continues to send chills down my spine 25 years later.  Despite the fact that I am deeply interested in this topic, this very entry level book made me feel kind of inadequate and spoke in a tone which seemed really detached.  Gaddis speaks with the classic textbook voice which seeks neither to urge you on nor inspire.

As a professor myself, I do understand the reasons for this, however as a student I find this type of text really off-putting.  Given the host of upbeat, accessible, and interesting resources to read, this book seems to go out of its way to keep the reader at arms length.  While Pine takes the jokes to the extreme and Shaw seems to have a healthy sense of humor even as he demands you type this stuff out all over AGAIN, this book seems intent on proving that Python is bone dry, difficult, and a challenge you may not be up for.

On the plus side, I really enjoyed some theoretical framework.  While Code Academy, TreeHouse, and even Pine and Shaw focus strictly on teaching you code, this book provides some background.  Why does it work?  How do we get to the point where we can make computers do stuff?  While most people don't want this much background it really helped me to get a grasp on what a compiler is versus an interpreter and understand more about what the art of computer programming actually is.  He also does a wonderful job explaining how Python sets up and what the different programs it installs do.  I think in many ways reading Gaddis is jut a culture shock.  Web resources emphasize that you can do it!  Communities form and encourage!  Folks follow you on Twitter and pat you on the back!  Gaddis simply presents the information and is making no promises about how awesome you will surely be.

As for code, I am not there yet.  However, there will be more to come a I continue through the book!

Total hours into Programming: 74 (4 since last time )
Total Weeks Programming/Hours per week: 3/25

Progress on Gaddis' Starting out with Python: Done With Chapter 1, Appendix A,B
Progress on Shaw's Learning Ruby the Hard Way: Finished Exercise 1-9
CSC Class Time: 1 Hour

My Text game: 2 hours, 107 lines

TreeHouse (551 Points, 9 Badges) 

Code Academy Points: 632
Code Academy Badges: 66
Code Academy Skills Finished: 2 (Make a Website, Ruby)
Progress on Hartl's Tutorial Ready to start Chapter 3! 

Resources Finished:
Josh Kemp's No Degree, No Problem 8/14/2015
Chris Pine's Learn to Program 8/9/2015 

Monday, August 17, 2015

Computer Science 256: Computer Programming Day 1

So I went to Computer Programming I today and I thought it was going to be 6 people.  It was over 20!  Apparently the course is cross listed as both compsci and computer information systems so I was only seeing the computer science students.  I sat next to two of my former students which was a little surreal and they kept asking me questions.  Luckily, I knew most of the answers at this stage but it was still a little weird.  We went through the installation of Python, learned some basic stuff about Python, and created the classic "Hello, World!" program.

It's too early in the process to say whether the course will be of great help or not.  I obviously knew everything that was happening today, but I feel pretty optimistic about it and it will hopefully keep me focused and accountable with my coding goals.  We are using Starting Out With Python by Tony Gaddis which is really expensive compared to many of the other resources out there, but I am holding out hope that it will be a great resource along with the course's instruction.  Luckily, one of my old students is loaning me the book!

So far, so good!


Total hours into Programming: 70 (1 today)
Total Weeks Programming/Hours per week: 3/23

 Progress on Shaw's Learning Ruby the Hard Way: Finished Exercise 1-9
CSC Class/Homework Time: 1 Hour

My Text game: 2 hours, 107 lines

TreeHouse (487 Points, 8 Badges) 

Code Academy Points: 630
Code Academy Badges: 65
Code Academy Skills Finished: 2 (Make a Website, Ruby)
Progress on Hartl's Tutorial Ready to start Chapter 3! 

Resources Finished:
Josh Kemp's No Degree, No Problem 8/14/2015
Chris Pine's Learn to Program 8/9/2015 

Sunday, August 16, 2015

Back to School! Taking CSC256: Computer Programming I


One of my big concerns about starting this project during the summer was what would I do once school started and I had to teach my classes again.  In Kemp's book he wisely suggests you need to aim for about 20 hours a week (about 3 a night) and I was concerned that I would allow this to slip when school started.  I have already seen that if you allow too much time to pass in between studying it takes some time to get back into the flow again.

However, a couple weeks ago, it occurred to me that I work at a college (brilliant right?).  There are a few computer science courses here that I could sit in on.  While we only have a 2 or 3 a semester because we only offer a minor, there is a Computer Programming course this semester focuses on Python.  I debated about whether I wanted to ask my colleague to sit in on it or not, concerned that this would maybe be weird.  However, ultimately I decided to do it.

I think having some accountability here as well as 3 times a week scheduled to learn programming during the day will keep me focused and will actually be fun.  It has been well over 10 years since I was a student in an undergrad class and I am filled with both anticipation and dread.  It will also be a pretty intense experience given that there are only 6 people in the class.  I w
ill have to keep up with my work or risk humiliation at the hands of my co-worker!

I am not taking the class for credit, though I suppose I could.  I guess I am not at this point due to some lingering anxiety about whether or not I can actually survive it!  I have a student who has taken these courses and he insists that they are not difficult, but I will see for myself before I actually get a grade on record!  I will report on this fascinating and potentially humbling experience throughout the semester!

On a side note, I got in a lot of good work yesterday and continue to actually learn about coding while writing about learning about coding.

Total hours into Programming: 69 (4 today)
Total Weeks Programming/Hours per week: 3/23

 Progress on Shaw's Learning Ruby the Hard Way: Finished Exercise 1-9

My Text game: 2 hours, 107 lines


TreeHouse (487 Points, 8 Badges) 

Code Academy Points: 630
Code Academy Badges: 65
Code Academy Skills Finished: 2 (Make a Website, Ruby)
Progress on Hartl's Tutorial Ready to start Chapter 3! 

Resources Finished:
Josh Kemp's No Degree, No Problem 8/14/2015
Chris Pine's Learn to Program 8/9/2015 

Thursday, August 13, 2015

Entering the TreeHouse (vs CodeAcademy)

Today was a pretty busy work day, so I did not have a great deal of time to put in to my coding exploits.  That said, I have decided to try out Treehouse.  Treehouse is roughly similar to Code Academy, but features a few key differences:

(1) The worst, it runs $25 or $50 for a premium membership.  I am currently on a 14 day trial but in order to get the trial you do need to provide a credit card.  So, compared to Code Academy, this is a definite downgrade!

(2) Videos!  I always said I did not love videos because they require a measure of absolute attention which I do not often have to give (sometimes I try to sneak in lessons while my son plays with legos!).  However, the videos have so far been really helpful and explained the information much more fully than the brief text blurbs on Code Academy.

(3) Quizzes!  As a professor, I love quizzes.  These prevent you from totally zoning out during the videos and actually listening.  They also focus you more on learning and less on simply getting through the exercises.  If you missed something that was important they can also refocus you.

(4) Tracking!  When you first begin they ask you a few more questions about what you want to do with your coding training.  While, as a newcomer, I found this a bit frustrating because I don't know exactly what I want yet, the system was a a little bit more robust than CodeAcademy's.

(5) Robust Profiles!  At CodeAcademy, you get one point per lesson.  Sometimes the lesson takes 2 seconds, like ones where you read a line and click save.  Others take 20-30 minutes of struggle depending on how much willpower yo avoid cutting and pasting you have.  At any rate, getting one point becomes pretty demoralizing after a while even though this makes no real difference in how much or little you learn about coding.  Tree House has a similar points system but there are different values for different tasks and you can also get points from being a valued contributer to the forums.

At this point, I am less than 2 hours into TreeHouse and have spend well over 30 hours on CodeAcademy, so I am not really qualified to weigh in with any kind of final verdict, but those were my thoughts after just a sampling of TreeHouse.  I should also mention that I am not into the coding part yet, I am just doing the basic HTML which they sort of force you to do unless you just opt out of the tracks altogether.

Total hours into Programming: 59 (.5 yesterday, I have had faculty orientation for 2 days, its been rough)
My Text game: 2 hours, 107 lines

Progress on Shaw's Learning Ruby the Hard Way: Finished Exercise 1-5

TreeHouse (105 Points) Code Academy Points: 567
Code Academy Badges: 60
Code Academy Skills Finished: 2 (Make a Website, Ruby)
Progress on Hartl's Tutorial Ready to start Chapter 3! 

Books Finished:
Chris Pine's Learn to Program 8/9/2015 

Saturday, August 8, 2015

Working on Many Fronts at Once

I am not totally sure this is the best course of action, but I find myself working on many different fronts at once.  Let me explain what I am doing and where I am at on each one and perhaps I can explain why I have done such a thing!

(1) Code Academy  -  I am working though Python mostly to prepare for the Computer Programming Course I am taking in the fall.  I also stubbornly refuse to give up on my daily streak which is now up to 16.  I continue to love Code Academy as an introductory tool, but feel that you will always have to go to different and varied sources to advance.

(2) Chris Pine's Learning to Program (Ruby)-  This is my priority.  I am trying to finish going through the book.  I am currently on chapter 10 (of 14) and am feeling pretty unsure about the content right now, but I will finish it up and revisit these ideas in different forms and resources when I finish the book.  I may also work through the book again when I finish at some point.

(3) My text game -  Because I have read over and over again that in order to make it stick you have to do it, I have begun work on my text game.  I am writing my own methods and creating my arrays and encountering my own problems.  The real problems you encounter when coding are so much more interesting and seem so much more practical than some of the designed exercises.  I have learned from Pine's book that sometimes you need to work out the solution "in English" before thinking in the program language and working on my game has helped me in this regard.  As I finish more of the game, I will post versions of it here, hopefully today or tomorrow!

Total hours into Programming: 47 (2 yesterday)
My Text game: 1 hour, 51 lines
Chris Pine's Learn to Program (Finished with Chapter 9 of 14)
Progress on Hartl's Tutorial Ready to start Chapter 3! 
Code Academy Points: 502
Code Academy Badges: 56
Code Academy Skills Finished: 2 (Make a Website, Ruby)

Friday, August 7, 2015

Battleship and Pine

Continued on today with Code Academy, well over halfway done with their Python course.  I am working now on the Battleship game they have you make.  Now that I have gotten about halfway through the tutorial, there is a lot of looking up of the problems in the forums.  I often find myself pasting the correct code next to mine and comparing to see where I went wrong or what I do not know.  There was a message posted to the local forums which expressed frustration at a similar situation.  If you always have to go to the forums in every lesson are you learning it yourself and will you realistically be able to replicate it?  I say, probably not which is why I love Code Academy as a starting point but not necessarily as an ending point.

Meanwhile, I continued on in Pine's Learn to Program with Ruby.  I have finished up to Chapter 9 and have to say that I continue to enjoy the explanations and hands on activities spread throughout this book.  I have managed to completed a couple of the challenges with no help and the rest of them I have done with some guidance from his answers in the back.  Whereas I used to totally freeze up when being asked to start writing my own code in response to a problem, Learning to Program has gotten me more comfortable writing my own code without the Code Academy scaffold.  I have also learned a great deal more about the details of the syntax because you just find yourself at the prompt running test programs all the time in this volume (which I like).

Total hours into Programming: 47 (3 yesterday)
Chris Pine's Learn to Program (Finished with Chapter 8 of 14)
Progress on Hartl's Tutorial Ready to start Chapter 3! 
Code Academy Points: 495
Code Academy Badges: 54
Code Academy Skills Finished: 2 (Make a Website, Ruby)

Sunday, August 2, 2015

Code Academy Python Course Review at 30%

While it is entirely possible that the completion of the Code Academy Ruby course made this one go down quite a bit smoother, I am really liking the Code Academy Python course.  I think it features the correct amount of guidance and practice to this point.  At times (even early) in the Ruby course, I felt like the exercises and lessons were not readily solvable with what I had been given in the lesson.  In Python I have probably completed over 100 lessons and have only had to refer to the forums a handful of times.  This is in direct contrast to my experience with Ruby wherein I was seemingly in the forums nearly during every lesson.  There were also a few times in the Ruby tutorial where I ceded that I would simply paste the code and move on without a true grasp of the content.

I have gotten everything so far in Python.  I think the major reason for this is that this tutorial features more practice (though I still wish there were more exercises!).  I have been trying to do the exercises with as little guidance as possible and so far I have made it through sections on basic syntax, types of variables, built in functions, control flow, modules, and built in Python modules and I have a really nice grasp on what is going on.  In short, I love it so far!

Note:  I am waiting until the quiet evening to restart chapter 2 of Hartl's Rails tutorial...wish me luck!

Total hours into Programming: 37 (2 today)
Progress on Hartl's Tutorial 2.0.0 (got the 2.2.1, but am starting this section this evening)
Code Academy Points: 419
Code Academy Badges: 48
Code Academy Skills Finished: 2 (Make a Website, Ruby)

Saturday, August 1, 2015

Python and Rails

Today I worked with Python in the early section of the Code Academy site.  I am finding that to be a kind of review of what I did in Ruby and it is satisfying to understand much of it without having to grip my skull in agony.  I have a solid grasp on if, or, not, else, elif, else, equal, less than, greater, than and most of the basics (sometimes called Control flow).  I am hard at work forming an app that converts words into Pig Latin which is a real challenge since Pig Latin on its own is more confusing to me than it should be.

I also completed Hartl's Chapter 1.  In the intro there is a introductory paragraph singing the tutorial's praises by some brave soul that completed this whole tutorial in 3 days.  I can't imagine anyone who really needs this training completing this in 3 days.  So far, I have completed an app that only displays one line to the world and in that process I have been introduced to a host of programs/websites that I had no clue existed before, memorized a basic directory structure for Rails apps, gotten basic training and a definition of version control, and deployed the app to Heroku (without success, see below).

Good news, everything went slow, but great.  Bad news, my stupid app does not run on Heroku like I desperately wanted it to.  Just as I was about to paste my app's test web address into an email and send it my wife (to demonstrate that I have indeed learned something!) , it failed to work.  I followed up on a few of the Heroku error messages such as putting a Ruby version in the gemfile, but my meager store of knowledge is not yet strong enough to troubleshoot deploying an app.  So, this was kind of bittersweet.  I completed the chapter and the exercises and feel really good, but I was robbed of my small moment of glory! That said, I remain undeterred and will start the "Toy App" tomorrow in chapter 2.



Total hours into Programming: 33 (3 today)
Progress on Hartl's Tutorial 2.0.0
Code Academy Points: 393
Code Academy Badges: 45
Code Academy Skills Finished: 2 (Make a Website, Ruby)

Friday, July 31, 2015

Ruby on Rails Tutorial: Day 1

After a very confusing intro to Ruby on Rails via Code Academy (where I somehow managed to "complete" 24% of the lesson), I was not feeling so confident about apps, Ruby on Rails, or much of anything really.  Tonight, I started Michael Hartl's Ruby on Rails tutorial book which seems to be a real standard in learning the ropes of Rails.  I spent about 2 hours with it so far and have completed 1-1.4.1.  This doesn't seem like much and at the end of the day it is a very small chunk of the tutorial, but I am trying to take my time and really learn it.

So, how is it for the complete newb?  I like it a lot, actually.  I am actually working in an Integrated Development Environment, and it is really explaining in detail what is going on at every stage.  I was introduced to Cloud 9, Git, and Bitbucket today and I have a pretty solid concept of what version control is and why programmers do it.  Hartl does a nice job of explaining what is pertinent to the new coder without speaking a different language I would never understand.  I was also really happy to recognize some of the formats I had learned from the Ruby Code Academy tutorial and understood what was going on when instructed to place a method within the controller.  I also now have a clue what a gem is and understand what is happening on some basic level when rails designs the framework for your new app.  So far, I really love it!

I also worked through a few lessons on Python this morning which were much easier and faster than my early Ruby lessons.  I am enjoying the learning process and have actually had a few moments today where I knew what to do without making many, many mistakes and having to scratch my head in frustration.  Good day!

Total hours into Programming: 30 (4 today)
Progress on Hartl's Tutorial 1.4.1
Code Academy Points: 368
Code Academy Badges: 43
Code Academy Skills Finished: 2 (Make a Website, Ruby)

Tentative Plan of Action

After a long and fitful sleep, I have come up with a plan of action.  I am going to concentrate on doing Michael Hartl's Ruby on Rails tutorial when I have time to really think and concentrate.  The Code Academy tutorial was frustrating to me and did not include nearly the level of detail I wanted.
However, when I have somewhat distracted time I am going to continue to work through Code Academy's intro lessons to other languages so I have some sense of them.  First up: Python!  This way, I will be learning Ruby on Rails in a meaningful way, but also getting a wider breadth of knowledge as I go.

Based on my estimates, I am around 30 hours into learning coding so far.

Code Academy Stats
Skills: Ruby (Complete)
Make a Website (Complete)
Python: 3%
Ruby on Rails 24%

347 Points
41 Badges

Hartl's Tutorial:  Begins Tonight!

Tuesday, July 28, 2015

Deep or Wide?

As I close in on completing my Ruby tutorial on CodeAcademy (69%!), I am pondering what to do next.  Should I try to work more in Ruby to develop a deep knowledge or should I work through a series of Code Academy tutorials so I have an idea which I will like the best.  I am quite sure the CodeAcademy tutorials will not get me to a functional level in any language so I am seeing them as more of an extended preview.  At this point, I am thinking I will work through at least the major lnaguages on CodeAcademy including Rails, Python, JavaScript, and maybe a few more.  Once I have some idea of how they all work, I will begin to specialize.  After all, there is no rush here.

I have also read that it is crucial to begin to make your own programs which seems pretty scary to me right now 'but I totally understand why this is the way to learn.  Living in the happy bubble world in CodeAcademy is fun, but I have already encountered lessons I have forgotten because I did not work seriously enough with them and just moved through the lessons.

Am I doing it wrong?