Software Development (CSC 321 2016F) : Outlines

Outline 07: Ruby, Revisited


Held: ,

Back to Outline 06 - An Introduction to Software Engineering. On to Outline 08 - User Stories.

Summary

We continue some more in-depth issues pertaining to Ruby and Rails and such. We also delve a bit deeper into some software engineering issues.

Related Pages

Overview

Administrivia

Upcoming Work

Good Things to Do

What is Software Engineering?

We should step back and ask ourselves the bigger question. *What is this thing, called "software engineering", that we are studying this semester?

Why Study Software Engineering

We talked about this before, but it's probably useful to look at it again.

Why are we studying it? (Why do most institutions include it in their curriculum?)

More on Agile

A few things for us to talk about.

Web Technologies

Aka HTML 5, XML, and a history of the Web.

Pre-web.

Early web.

Web growth.

More Web growth.

Returning to root concepts.

The primary Web technologies.

Some Ruby-isms, Rails-isms, and More

Ruby != Rails

In answering questions, some of you seemed to conflate Ruby and Rails. Ruby is a general-purpose programming language. Rails is a Web application development infrastructure that happens to use Ruby for its programming aspects. (At least one of you also asked about HTML.)

Syntax

The most difficult aspect of Ruby was digesting the syntax.

Refactoring

One of the aspects that I find the most confusing about Ruby is the aspect that I also find fascinating. The ability to refactor code and make it much more concise. I understand that most of the code in Ruby can be made more concise than in other languages, but I do not know how to do so as I am very new to the language and do not know many of the ways to refactor. I would like to learn more about how I can rewrite code so that it is still easily understandable, but much more concise.

Migration

What is it exactly? Why is it useful?

Hard to parse

The calling of functions using left shift bitwise operators confused me because I’m surprised why you just can’t call using function names and just append the strings together using the ‘+’ operator.

Metaprogramming

I don’t really understand how you can generate code at runtime yet you write the code before you run the program. Is there a way to go to a program that is already running and change the code and then the program changes the way it executes.

The concept of metaprogramming is sort of difficult to understand. What are some more examples of metaprogramming?

Duck Typing

What is it? How does it relate to key oop principles?

yield

I am still working to understand what “yield” does. According to the reading, yield is commonly used with iterators. Once in the scope of the iterator, code is executed until it reaches yield. Then, any arguments given to yield are then used as arguments in the block of the iterator. I still do not understand why this is more or less useful to program with.

Scaffolding

Scaffolding continues to confuse me, though I'm slightly less confused as to why it's a good teaching tool.

Mix-Ins

I think I understand in a broad sense how mix-ins work, but I’m fuzzy on how they work syntactically in code. I’m not sure I would recognize them if I was looking at a program that used them. I understand that modules are included using the keyword include, but I’m not sure where mix-ins are included in Ruby code. I’m also not sure how yield works, even though it seems pretty intuitive, I’m just not sure if I would be sure when to use it.