Tag Archives: Formula

Google forms and regular expressions for response validation

I was kind of shocked with the proliferation of teachers now using Google Classroom to conduct classes, that the documentation for the Quiz sections of the Classwork assignments is quite insufficient (or presumes you’re an IT geek like me, and can just figure out what programming is available to you.)

The example situation is given by this Blog entry related to Google Classroom and students’ answers being marked Incorrect because on Short Text responses, every answer is matched as a “literal” string – that is, upper and lowercase letters MATTER (a lot!)

Link to:
Student’s answers were marked wrongly in a short answer quiz by Google Forms.

https://support.google.com/edu/classroom/thread/39155344

The odd thing is while Google provided a solution for simple e-mail address validation, and various numerical responses, it’s been horrible at dealing with text answers.

The answer is in the 3rd category of Response Validation: Regular Expressions. RegEx’s are commonly used in programming languages and OS shells (like Linux, Unix, HPUX, etc.) since when scripting various commands, we often need to parse parameters and do things with various input like file directory listings, and long lists of things separated by some arbitrary character (like a comma or a vertical bar character.)

Thus here in my example, dealing with a student who was marked with Incorrect answers simply because they didn’t provide the exact case required by the 3 answer versions entered by the instructor (e.g. “Any Dog”, “any dog”, “ANY DOG”) – and the student typed “Any dog” and got it marked Incorrect.

One more typical way to prevent this is specifying in the Quiz preamble the exact format responses you want as an instructor for the short answers. For example, “Please enter all short answers in lowercase letters only, with no leading or trailing space or tab characters.”

But a more practical way is exercising that Regular Expression engine that’s built into Google Forms.

My example question wanting a response from the student like “inner core” (preferably providing a graphic picture of the planet’s layers and just labeling them A/B/C/D/E would have been simpler, but maybe I’m testing vocabulary at this point.)

Selecting the Response Validation type “Regular expression” and using “Matches” the pattern: “^[A-Z]” is interepreted as meaning, “if the Short answer text contains any uppercase letters from A to Z” then display the warning text “Please use all lowercase answers only!” – and do not accept the answer, as submitted.

Regular Expressions can get really complicated, but if you think of them as basically describing what’s in a string of text and matching it as either TRUE or FALSE (and preferably keeping your Answer expectations limited unless you happen to be teaching a course in OS-level scripting, in which case, go ahead and get as complicated as you’d like…) I think you’ll find your student’s will be gently guided into providing the answers in the form you were thinking of when you prepared the Quiz.

And isn’t that what this was all about in the first place?

Here’s a link to a more thorough (and lengthy, and complicated) discussion of the power of Google Forms using Regular Expressions:

Advertisement

Nespresso Vertuoline Coffee Capsule Brew Formulas

I like Nespresso’s Vertuoline single brew appliance – not because it’s convenient (which it is), nor because it’s quick (ditto). But because of inventive others like My-Cap.com, the rather otherwise wasteful aluminum capsules can be re-used indefinitely (as long as you’re careful not to pierce or dent them too much through handling.)

My-Cap.com foil kit for Nespresso Vertuoline
My-Cap.com foil kit for Nespresso Vertuoline

My-Cap.com makes foils, replacement capsules, little plastic quick caps, and all sorts of accessories for single-use pod/capsule coffee makers which definitely extends their environmental friendliness geometrically (which otherwise, at 1 plastic or aluminum pod per cup creates a ridiculous amount of landfill over time, if not properly recycled – Nespresso is one of the only company that provides free shipping for recycling capsules.)

My full user review is up at Amazon.com:

Nespresso Vertuoline Finished Lungo Custom Deathwish

https://www.amazon.com/review/R2CA7L5M1YTU1M/ref=cm_cr_rdp_perm

But this post is about a more in-depth feature about the Vertuoline capsule brewing formulation coded into the barcodes that surround the bottoms of each capsule.

Only recently has Nespresso started revealing the numerous formulas used in each version of the capsules, allowing those of us doing the re-use/re-pack/re-foil thing, to properly select a barcode that will work best with the coffee being refilled.

I’ll try to keep the following table updated as new information arrives on this subject:

Capsule Type Color Prewetting Flow Temperature
Altissio Espresso Dk Purple Short Slow High
Diavolitto Espresso Dk Blue Long Slow High
Voltesso Espresso Bright Gold Short Slow Low
Decaf Intenso Espresso Dk Red Long Fast High
Giornio Lungo Orange Long Slow Low
Solelio Lungo Yellow Short Fast Low
Intensio Lungo Dk Brown Long Med High
Stormio Lungo Dk Green Long Slow High
Odacio Lungo Med Blue Long Med High
Melozio Lungo Dk Gold Short Fast High
Elvazio Lungo Pink Short Slow->Fast Low->High
Decaffeinato Lungo Red Short Med Low
Half Caffeinato Lungo Red/Black Short Med Low
Cafe de Cuba Lungo White/Red script Short Slow Low
Flavored Lungo Various Short Med Low

My-Cap.com custom Deathwish after brewing
My-Cap.com custom Deathwish after brewing

I use #2 espresso grind for the Lungo size capsules (taking 10-12g of coffee grounds), and #1 espresso for the Espresso size (which take from 5-8g by comparison).  I pack each to within 1mm of the top of the flat rim of the capsule, which allows plenty of expansion room during the pre-wetting stage.

To remove the original foil, just hobby knife around the rounded part of the rim inside the flatter portion that the foil is glued to leaving a nice flat foil ring for the reusable foils to adhere to during extraction.

A cardboard my-cap storage sleeve
A cardboard my-cap storage sleeve

I also made up a few cardboard sleeves (ala Pringles style cans) that close-fit to the edges of the capsules to better keep the re-use foils on the capsules (the adhesive works well during extraction, but I disliked all the extra clamping and crimping others were doing to attempt to seal them better.  I find just placing them on top,  and running around the edge with the fan-brush handle is fine, then just gently fold over the edges.  The adhesive is enough to seal against the rim lip during extraction, and as long as you keep the capsules upright, they won’t spill.)

The price for convenience is that these little capsules do use about 200% more coffee per cup in order to reach the strength level of a standard French press style cup of coffee, but produce a good 2cm of crema in the process (more like a Vev-Vigano stove-top pressure coffee extractor.)  The espresso versions are a little lighter,  in that the brewing process is modified and thus consume closer to the “normal” puck’s worth of coffee per espresso (and they can be double-brewed – reset the cycle by turning the lock open, but don’t open it, then re-lock again to allow the 2nd button press, and re-trigger the pre-wetting cycle, if you prefer something like a 1-1/2 Espresso.)