“Had Better,” not “Should”

A few years ago, I read the account of a woman, Sue, whose teenage step-daughter Sandy became out of hand:

[Sandy] began to lie, borrowed money without returning it; she sneaked into Sue’s bedreoom, went through drawers, and stole Sue’s personal items; she left the kitchen messy, etc. All these actions effectively got Sue’s goat because she told herself, “Sandy shouldn’t act so sneaky. She’s crazy! It’s unfair!” [1]

But Sue was in error: Sandy should do bad things.

What “should” means

Was Sandy’s behaviour wicked and self-destructive? Yes. But is she a teenage girl? One whose parents are no longer together? Yes. I don’t mean that accepting the negative parts of her nature is what’s best for her, but when we say “Sandy shouldn’t act so sneaky,” we’re expressing an expectation which is contrary to her nature, her character, and our experience.

I find that “should statements” usually come out this way, and they are a recipe for disappointment, one which ensures that our behaviour shall be out of step and less effective than we want.

What “had better” means

Therefore, when I find myself in circumstances like Sue’s, I express myself with the phrase “had better.”

E.g. “Sandy had better change her ways.” I.e. it is in Sandy’s best interest but perhaps not what I expect from her.

Turning it on myself

Using the phrase “had better” can serve as a reminder of what’s positive, whereas “should” in the same context can emphasize the negative.

For example, when I tell myself, “I should get up earlier in the morning,” I focus on the idea that I or others will judge me negatively if I fail to live up to the mark; if I tell myself, “I had better get up earlier,” I explicitly say that here is a way to have things better for me.

I still use the word “should,” but now I use it either as the past tense of “shall” or to express an expectation which I truly anticipate (not just a burden of expectation to lay upon myself or others). E.g. “I should arrive at my destination in another five minutes” or “This code correction should make my application run.”

[1] Burns, David D., Feeling Good: The New Mood Therapy. William Morrow and Company, Inc. New York: 1980. p. 158

11 Must-play Flash Games (+ 10 more)

These are some free, above-the-rank-and-file  games you can play on your browser. I tend to like puzzle games, so that’s what I recommend. (Most or all of these games can be found on multiple free flash game sites. If you find one host’s background or ads offputting, try another: kongregate.com, newgrounds.com, addictinggames.com, etc.)

One and One Story : Lovely music, strong atmosphere, and a clever, novel way of delivering story make this game a winner. It’s short enough to not be a waste of time, but not so short that it won’t engage you. The puzzles continue to require you to think of new solutions, all the way through.

The Company of Myself : It bears a similarity to One and One Story in terms of game play and in the delivery of its story, yet both are distinct: you will be surprised, and your skills will be stretched. The story of The Company of Myself is more clever and provocative than that of the One and One Story, although the graphics are not nearly so good. Lovely piano soundtrack.

Riddle Transfer : Lots of games have puzzles; this one has an additional flavour of riddling to its problem-solving requirements. Quite a lot of fun. Quite humorous. (There are a few games earlier in this series, but I have not looked into them.)

Escape #1: The Car (also: #2, #3, #4, #5, #6) : The graphics are generally substandard (particularly in the early installments), but this series has a great diversity of puzzles. It’s downright fun to look for clues and items, then use or combine them in clever ways to escape from a closet, a freezer, a phone booth, a car, etc. Some of the installments feel a bit thin, but overall, it’s quite a good gaming experience.

Super Mario Bros. Crossover (2.0 is all I could find): I know it’s not a puzzle game, and I know I’ve recommended it before, but this is the greatest work of mankind since the Renaissance. Play through Super Mario Brothers with any of a number of other 8-bit heroes, including Link, Mega Man, Samus, Simon Belmont, and Bill Rizer.

Version 2.0 gives you more character choices and config options. New characters include Demon, Luigi, Mega Man 10, Ryu Hayabusa, and Sophia III.

Portal: The Flash Version : This game requires more finesse on the keyboard than most puzzle games; it sometimes feels like an action/adventure game. In my opinion, this game was a lot more fun before I learned that you could move the blocks by using the ‘F’ key (the puzzles are more puzzling without it). It turns out that about three levels from the end, you cannot complete the puzzles without use of the ‘F’ key.

Honourable mentions

Take Something Literally (also: T.S.L. 2): This game really stretches the limits of what a computer game can be and is supposed to be. It will likewise stretch the limits of your imagination and problem-solving skills. You will really have to step outside the game in more ways than one in order to get through all these puzzles.

Alice Is Dead (also: Ep 2 & Ep 3) : This game reboots the characters from Lewis Carrol’s Wonderland books. It’s rather a shame to have such good literature warped so, but the game offers a worthwhile escape into the bizarre. Rich artwork and some neat discoveries make this game stand out. To its discredit, nearly half of the puzzles must be solved almost randomly or with a walkthrough (not with problem-solving skills).

The game comes in three short installments. If you play through, make sure you hang on through the final credits for the real ending. The third installment includes a song (in the cabaret) which was written and recorded just for this game. I very much enjoy it. You can download it for free here.

Doodle God (also: Doodle Devil & Doodle God 2) : Who hasn’t played this game? Combine elements to make new elements (which you can combine to make more elements). This game goes on for quite a while, but even if you only spend 10 minutes on it and then drop it, you’ll probably have enjoyed yourself. You’ll be surprised at how much fun this concept can provide.

Doodle Devil is essentially the same as Doodle God but with more elements and categories of element. I never went far in it, nor have I tried Doodle God 2.

NB: Doodle God provides quotations when you create new elements. At least one of them comes from none other than… I don’t recall now. It was some prominent LDS, I think James E. Faust.

Worthy of mention also…

Memohuntress : I didn’t play all the way through this one, but I liked its artwork, the world it created, and the care which the creator clearly had for his/her story.

Tanooky Tracks : Not as good as some of the other games, but it’s on the right track. It requires some imagination to complete. It invites and almost requires you to step inside the game.

On my to-do list

If I ever get around to it, I may play the following titles, which have stirred my interest:

  • Musaic Box
  • Zombie Minesweeper
  • Moonlight Differences
  • Knightfall 2
  • Lilith – A Friend at Hallow’s Eve

How to use Arduino as AVR Programmer (for ATMega328p)

You can use an Arduino as an AVR Programmer to upload a program onto another miniprocessor microchip (in this document, an Arduino UNO and ATMega328p).

(Much of the following information can be found on arduino.cc’s tutorial pertaining to this topic. More of it can be found at high-low tech’s tutorial. Here I combine all the details necessary for getting away from the Arduino IDE for writing and compiling code. For the best read, I recommend the tutorial at Inside Gadgets.)

  1. Connect the programmer Arduino to the receiving ATMega chip
  2. Write the program
  3. Upload the program onto the receiving ATMega chip
    1. Visit the ArduinoISP file
    2. WINAVR and the Makefile
    3. Make and upload

Connect the Arduino to the ATMega chip

According to the image above, connect the Arduino to the ATMega328p:

(click image to enlarge)

  • pin 1 (Reset): connect to ground via a 10KOhm resistor; also connect to pin 10 on the Arduino
  • pins 7 & 20 (VCC & AVCC): connect to +5V
  • pins 8 & 22 (GND): connect to ground
  • pins 9 & 10 (X1 & X2): connect to a 16MHz crystal; also attach both leads on the crystal to ground, through two 10uF ceramic capacitors.
  • pin 17 (D11): connect to pin 11 on the Arduino
  • pin 18 (D12): connect to pin 12 on the Arduino
  • pin 19 (D13): connect to pin 13 on the Arduino

Remember that Ground on the ATMega328p (receiving programming) must be connected to Ground on the Arduino (programmer).

Write the program

You won’t define the methods setup() and loop() as you did in the Arduino IDE. Instead, just define main(), as you would with any C or C++ program.

The following code will replicate the Blink program for the Arduino. (Plug an LED into D9 of your ATMega328p to see it work after we compile and upload it.)

#include <avr/io.h>
#include <util/delay.h>

#define ledPin PB1 // pin 9

int main(void)
{
  DDRB |= (1 << ledPin); // pinMode WRITE

  while(1)
  {
    PORTB |= (1 << ledPin); // digitalWrite HIGH
    _delay_ms(400);
    PORTB &= ~(1 << ledPin); // digitalWrite LOW
    _delay_ms(400);
  }
  return 1;
}

Upload the program to the ATMega328p

The ArduinoISP file

In the Arduino IDE, you can find an entry named ArduinoISP under File > Examples. This sketch must be uploaded onto your programmer Arduino. Before you upload it, though, we need to change one line in the file. The Arduino IDE won’t let you save changes to this file, so you’ll have to open it in an ordinary text editor.

Find the definition of void heartbeat() and change the delay(40) (on line 98) to read delay(20).

Alright. Save changes. Restart the Arduino IDE, and upload this sketch onto your programmer Arduino.

WINAVR and the Makefile

You can download WINAVR for free. It’s an IDE you can use to manage your projects, compile, and upload them. (I actually just use it for the sake of its sample Makefile. With the help of this Makefile, I use Mingw to compile and upload my projects.)

Whatever you do, find the sample Makefile in the ‘sample’ subdirectory of the WINAVR program folder. Copy it, and paste it into your own project folder. (If you haven’t used make and Makefiles before, that goes beyond the scope of this tutorial, so you’ll need to do some outside research.)  There are a few adjustments we must make to this Makefile:

Find the definition of F_CPU and set it to match the speed of your clock (crystal): F_CPU = 16000000

Find the definition of MCU and set the identity of your receiving miniprocessor: MCU = atmega328p

Find the definition of AVRDUDUDE_PROGRAMMER and set the identity of your programmer (Arduino): AVRDUDUDE_PROGRAMMER = stk500v1

Find the definition of AVRDUDE_PORT and set it to the port where your programmer Arduino is attached to your computer (for me, always COM8): AVRDUDE_PORT = com8

Compile and Upload

Using the (altered) sample Makefile, we have only to make use of two tasks. In WINAVR, under Tools, select Make (all). This compiles the project to the appropriate format for the miniprocessor. Then under Tools, selec Make (program). This will upload the program onto the receiving miniprocessor.

You are done.

Poem for Mother’s Day

Homage for A Mother

Has one of us his strength more nobly spent
Than she who safeguards one whom God has sent

And rather than to honours men can give
Attains to help this lesser wight to live

And service intimate and dearly bought
Imparts to progeny whose pow’r cannot

Remunerate or e’er to her restore
The years, the tears, the pleasures she forebore,

Such things as total parenthood’s great fee?
Though yet she live, she gave her life for me.

(finished 28 Apr 2012)