Karmen Blake
Agile Developer and Instructor
Categories
- Courses (15)
Archives
- June 2008 (2)
- May 2008 (10)
- April 2008 (16)
- March 2008 (8)
- February 2008 (10)
- January 2008 (14)
- December 2007 (4)
- November 2007 (7)
- October 2007 (25)
Tags
- 206 (10)
- 234 (7)
- 282 (10)
- 283 (29)
- 284 (29)
- agile (1)
- announcements (10)
- articles (2)
- assignments (10)
- contest (1)
- employment (1)
- humor (5)
- linux (5)
- location (1)
- microsoft (1)
- office (1)
- preregistration (1)
- rails (4)
- ruby (14)
- scc (2)
- scripting (4)
- syllabi (3)
- syllabus (1)
- tips (1)
- unix (2)
- video (1)
- videos (7)
- web (2)
- windows (3)
Welcome!
You'll find my course content and collaborative discussion about technology.
I teach as an adjunct faculty in the Computer Information Systems department at Spokane Community College
Presentations/Interviews
RubyLearning.com interviewCourse Technology - Ruby on Rails Presentation
283 is el completo
March 17th, 2008 |
Ok, so ignore the horrible Spanish. The inheritance assignment is the last assignment of the quarter. Great job everyone and thanks for your dedication and hard work while we attempted to do this thing online. I’m open to suggestions for improving next quarter.
The book for next quarter is “The Rails Way” by Fernandez. It is the only updated book on Rails out right now. It is not a text book or a tutorial book. However it is an awesome reference and has many excellent examples! I’ll be using a wide range of materials from the web (tutorials, screencasts) as well as some of my own material. Before next quarter starts, I’ll have a syllabus with a course outline for you.
Take care,
Karmen
Blocks and Procs
March 12th, 2008 |
Download Source CodeInheritance Assignment
March 9th, 2008 |
Download Assignment
Source code needed to start assignment
Inheritance - using 'super'
March 9th, 2008 |
Can you hear the Superman theme song now? :)Source Code
Duck Typing
March 4th, 2008 |
Source codeProgramming contest
March 2nd, 2008 |
Anyone want to report how the programming contest at EWU went? Did you enjoy the plethora of Mt. Dew while draining the brain?
Introduction to Inheritance
March 2nd, 2008 |
Source CodeSorting and Enumerable Assignment
February 24th, 2008 |
This is a pretty hefty assignment, I suggest you start ASAP! Post questions here as usual.
Get assignment
Array review and Enumerable usage
February 24th, 2008 |
The Array class (as well as others) includes the Enumerable module (http://www.ruby-doc.org/core/classes/Enumerable.html). It provides a lot of power when dealing with collections. Great stuff. Please review the array functionality as well as the cool things you can do because of the methods in Enumerable.
Source code example
Update – I just ran into an article that writes about this topic: http://www.rubyfleebie.com/life-beyond-the-each-iterator/
Sort by lecture
February 21st, 2008 |
Source code for sort_byComparable Lecture
February 18th, 2008 |
Source code:Comparable operator
Comparable in your custom class
Video Lecture:
This weeks lecture topics
February 17th, 2008 |
Comparable Module:
- pages 251-253 in your book
- http://ruby-doc.org/core-1.9/classes/Comparable.html
- pages 307-311 in your book
- pages 287-289
- http://www.ruby-doc.org/core/classes/Enumerable.html
Change to Syllabus
February 13th, 2008 |
I’ve decided to remove RSpec from the course outline. I wish we had more time to cover it because it is an amazing tool for programming. The whole Behavior Driven Development movement is really awesome. Fortunately, you should get RSpec covered in CIS 272 Agile Software Development. I feel we need to leave enough time to cover what is left in the course outline. Thus the next topic of study is ‘sorting and filtering’. Specifically, sort_by, comparable aka “spaceship operator”, and using the cool methods in the Enumerable module.
Rspec
February 7th, 2008 |
Here is your reading to prep you for the next topic of study. Lectures to follow.- http://andrzejonsoftware.blogspot.com/2008/01/what-do-i-gain-from-tdd-or-bdd.html
- http://en.wikipedia.org/wiki/Test-driven_development
- http://video.google.com/videoplay?docid=8135690990081075324
- http://blog.davidchelimsky.net/articles/2007/05/14/an-introduction-to-rspec-part-i
- http://www.oreillynet.com/lpt/a/7058
CIS 283 - Modules Assignment
February 7th, 2008 |
Modules Example
February 4th, 2008 |
Code:UnDRY solution without modules
DRY solution with modules
Sorry about the audio in this one. There are more hisses and pffs than I care to admit.
Modules - basic syntax
January 27th, 2008 |
In this screencast I introduce modules and syntax. I demonstrate the use of include and extend and when you would use them. In the next screencast I will use modules in a practical example.Code
Code Documentation
January 23rd, 2008 |
There are two ways to communicate what your code does: the code itself and using comments.Self Documenting Code
Source code should be understandable not because it has comments but because of its elegance and clarity – correct use of variable names, good use of whitespace, good separation of logic, and concise readability. Code will be read hundreds of times and written only a few times. So invest quality time into spelling out names such as fn into firstname. Fight the urge to use cryptic variable names.Code Comments
Code should have comments however an abundance of comments can be just as bad as too few. Comments should explain why something is done. The code itself already shows what it is done. So commenting on what is done is redundant. Do not use commenting as a substitute for good code. Another way to say that is that if you need to comment code due to its unclarity then maybe you need to rewrite the code to be more clear and remove the comment.
Update: I found this article which is about using natural language in your code to make it more readable. Read it.
Rubyisms
January 23rd, 2008 |
I’ve mentioned most of these in past quarters but I know how easy it is to forget. Many of these will make your life easier if you follow them. Please read through.
Read Rubyisms
Ruby Naming Conventions
January 21st, 2008 |
I was lenient on naming conventions when grading the review assignment. Here is a review of the naming conventions that you will be accountable for from here on out. Online examples:
- http://www.softiesonrails.com/2007/10/18/ruby-101-naming-conventions
- http://beginningrails.com/2007/10/19/ruby-naming-conventions
- http://itsignals.cascadia.com.au/?p=7
Apply to all naming conventions
spell out names (no abbreviations)
File Names
all lower case, separate words with underscore Example: my_homework.rb
Classes
camel case Examples: CompanyA, YourPet, MyOldCar
Variables
all lower case, separate words with underscore Examples: age, first_name, company_one, address
Methods
all lower case, separate words with underscore
methods that return boolean end with ?
Examples: jump, jump_high, old_enough?
puts object prints to_s by default. no need to call to_s unless necessary
CIS 283 - Class Variables and Class methods Assignment
January 21st, 2008 |
Class Variables and Class Methods Example
January 16th, 2008 |
CodeVideo File
Class Methods
January 14th, 2008 |
Class variables - First attempt at screencast
January 13th, 2008 |
Don’t expect too much here. But at least I’m trying. I cannot lecture in person but at least I can screencast. :) Hopefully I’ll get better with these.
I need feedback on video quality – dimension size, sound quality, etc. I have a lot of flexibility as far video settings.
Warning: A couple of times in the screencast I mentioned ‘class method’ when meant to say ‘class variable’.
Code
Video
Class variables, class methods, and modules
January 10th, 2008 |
Primer: Topics to study for this up and coming week
- Class variables
- A shared variable among all instances of a class, so only one copy of a class variable exists for a given class. They are prefixed with two
signs as opposed to onefor an instance variable.
- A shared variable among all instances of a class, so only one copy of a class variable exists for a given class. They are prefixed with two
- Class methods (pages 140-142 in your book)
- A class method is a method that is associated with a class but not an instance of a class. You can call class methods by using the name of the class dot method name (ClassName.method_name). Class methods may also be called static methods. You send a message (method) to a class instead of an instance of an object. You create a class method when it does not make sense for an instance to have such a method. Class methods are usually generic not specific to an instance. For example, “new” is generic and called from the class itself – SomeClass.new
- Modules (pages 155-163 in your book)
- A module is like a class but it cannot be instantiated like a class. Huh? That’s not cool. We can include (mixin) methods and constants from a module into other classes to make them more feature rich. You’ll see the more complex our class structures get we can alleviate that by designing flexibly with modules. We can also use modules to namespace our classes or other modules but we won’t use those as much here.
CIS 283 - OOP Example (Playing with Dice)
January 7th, 2008 |
I know some of you want to see a solution to last quarter’s final. Here is one I hacked up tonight. Enjoy!
Check it out >>
CIS 283 - Review Assignment
January 6th, 2008 |
Please read attached assignment specifications. If you have questions, please comment here on this blog first. Secondly, you may email me at kblake.scc@gmail.com.
Review Assignment
CIS 283 - Syllabus
January 3rd, 2008 |
Here you go! I’ll be getting a review assignment out early next week. Until then I’d review the plethora of code examples found on the P: drive from CIS 282.
Syllabus