Skip to content

Instantly share code, notes, and snippets.

Avatar

Gregory Brown practicingruby

View GitHub Profile
View x.md

In order to become a permanent member of the RMU community and move on to take additional courses, each student must pass an entrance exam and then go on to successfully complete their core skills course. The entrance exam is mainly used for ensuring that the people joining the program are diligent workers who have sufficient background knowledge to do well in our core skills course. The core skills course itself though, is something I think is something genuinely unique that you can’t find anywhere outside of RMU.

Each core course starts with roughly 15 students submitting a proposal for a personal project to work on during their session. This can be anything Ruby related, but typically involves the student building an open source application or library that scratches a particular itch of theirs. This is the first learning opportunity of the course, as it filters out those who can’t think of anything to work on. There isn’t a list of suggested projects to pick from, students need to come up with an idea the

View x.rb
# this code fills out a login form,
# finds and clicks a "clock in" button on the user's dashboard
# and then inspects an HTML table representing a week calendar
# view and ensures the right time shows up in the right place
scenario "clocking in" do
timestamp = Time.now.noon
day = timestamp.to_date.cwday
simulator.log_in(employee)
View x.rb
# coding: UTF-8
require_relative "lib/prawn"
address = %{
Four score and seven years ago our fathers brought forth on this continent a
new nation, conceived in liberty, and dedicated to the proposition that all
men are created equal. Now we are engaged in a great civil war, testing
whether that nation, or any nation so conceived and so dedicated, can long
endure. We are met on a great battlefield of that war. We have come to
View x.rb
class Chainable
def initialize(target)
@target = target
end
def method_missing(*a, &b)
@target.send(*a, &b)
self
end
end
View x.md
View x.md

To begin our explorations, let's look at an example from the Internet Relay Chat (IRC) protocol. The following string represents the command that you'd send to an IRC server to post a message to a particular channel:

"PRIVMSG #practicing-ruby-testing :Seasons greetings to you all!\r\n"

Even if you've never used IRC before or looked into its implementation

View x.rb
To begin our explorations, let's look at an example from the Internet
Relay Chat (IRC) protocol. The following string represents the
command that you'd need to send to an IRC server to post a message
to a particular channel:
```ruby
"PRIVMSG #practicing-ruby-testing :Seasons greetings to you all!\r\n"
```
Even if you've never used IRC before or looked into its implementation
View x.sh
$ curl -O http://pkgs.fedoraproject.org/repo/pkgs/libyaml/yaml-0.1.6.tar.gz/5fe00cda18ca5daeb43762b80c38e06e/yaml-0.1.6.tar.gz
$ mv yaml-0.1.6.tar.gz `brew --cache libyaml`
$ brew upgrade libyaml
View lalr.md

A LALR parser is a parser that:

  • Parses text in a single direction. Backtracking is avoided by looking ahead in the input stream before deciding how to parse a single token. (LA = Look-ahead)

  • Parses text starting from the left-most side of the input stream. (L=Left-to-right input processing)

  • Builds a parse-tree from the bottom up by repeatedly attempting to match

View x.md

There's no general rule you can follow here, because it's always going to depend on context. In my experience the kind of feedback loops you create, and the kind of safety nets you need are defined entirely by the domain, the organization, and the team culture.

Here are a few examples:

  1. I do a bit of work for a medium-sized dental clinic. The business manager there is really fun to work with, but has the tendency of changing his mind six times before he settles his ideas. So when he asks for a report, I don't put any effort at all into writing tests or worrying about minor bugs even, because my only goal is to flesh out in code something vaguely resembling what he asked for.

Often times, this means doing a handful of 30 minute prototypes until the requirements settle, each of which would have taken me 2 hours if I drove them via TDD. When things finally cool down, I evaluate the complexity and maintainability of the resulting code and either leave it untested, add some acceptance tests, backfill unit tes

You can’t perform that action at this time.