Webelos “First Responder” Adventure

Our den started working on the “First Responder” adventure. I really wanted to make a concerted effort to make sure everything was very hands-on for the scouts. I’m a firm believer that you have to practice something in order to have it stick in your head.

We have a den of about 11 scouts. We decided to break them up into about 3-4 groups at each meeting. I drafted parents to handle one topic for each meeting. We had about 4-6 stations per meeting and had the boys rotate through them in SMALL groups (not more than 3 in a group). Having small groups was key so they each got a chance to practices.

For the hurry cases, we made sure to talk to them about identifying the symptoms of the issue how to treat and then we had parents act out certain cases and the boys each had to apply the proper treatment.  We also made sure to review everything at the end of the meeting. We kept pretty close to the content in the new handbook.

I do believe like the scouts learned a lot in this adventure. We were fortunate to have very willing parents. We were lucky to have a Dr. in our group as well as several parents in the medical profession. Having parents involved was really key to the success of this adventure.

Unfortunately, we did not have access to a CPR dummy. This would have been nice for the CPR portion.

Advertisements

Learning Rust for ex C++/Java developers (Part 1)

I’ve decided to start learning Rust.  It’s starting to be used across Mozilla and Mozilla has been heavily involved in defining it.

Additionally, I’ve been focused on JS  for a couple years now and this seems a nice language to get back to my C++/Java roots.  One of the main tutorials I’m reading is  here.

Rust is a strongly typed language and it’s main selling point is memory safety.  Rust will be a good language of choice for drivers or other systems programming.  Rust also has convenient ways to connect to other languages as a stack with many languages is quite commonplace these days.

Building and Running

Tools in Rust seem quite simple at first glance.  You can quickly build by running rustc.  Rust also has a sweet build and packaging system called cargo.  I found all this quite simple to get going with the basics.  I believe the “up and running” phase to be easier than Java and C++

First Impressions

Safety First!

I like how Rust makes safety a priority.  You’ll find TONS of safety checks built into Rust. For example, when you’re indexing into a vector you need to use a usize vs. an int; otherwise, you’ll get a compiler error which could save you from future grief.

Patterns

Rust has pretty powerful pattern matching capabilities.  Here’s one really cool thing:

In C++/Java a standard switch/case example:

switch (x) {
case 1:
// do something
break;
case 2:
// do the same thing as case 1
break;
default:
// do the default
break;
}

becomes the following in Rust:

match x {
case 1:
1|2 => // do something
_ => // do the default
}

Sweet!  A lot more brief in Rust.  One of the big selling points of Rust is the safety.  IF you forget to add a catchall ‘_’ you will get a compile time error.  Rust is demanding exhaustiveness here.

Traits

Initially, traits are a little difficult to grasp.  I started thinking of them as something similar to an interface in Java.  Interfaces are specified and then implemented inside of a class in Java.  In Rust, they are specified and then implemented inside of the struct.  Rust does have a trait called “drop.”  This is similar to destructor capabilities in C++.  It allows you to run some code when a variable goes out of scope.  You could use this to clean up resources that were used.  Additionally, it could be used to implement a reference count.

Testing

I took a cursory look at how unit tests can be written and it seems like a clean design.  There is an option to include the tests in the same file as the implementation or include a separate tests module.  The infrastructure seems quite simple and is integrated right in with cargo.  I particularly liked this.

Overall, I’m very enthusiastic about Rust and there is still lots to learn!