Showing posts with label quick-reference. Show all posts
Showing posts with label quick-reference. Show all posts

Wednesday, January 28, 2009

Brain Rules

I just read John Medina’s book Brain Rules. It is a book about how our brains work. What I find most interesting is how it applies to learning.

Attention

Our brains are able to pay attention to three things. It can be characterized by these questions.

  • Does it want to kill me?
  • Can I have sex with it?
  • Does it remind me of anything?

All three questions are relevant to how you give a presentation. If everyone seems to be dozing off they can be awakened by I sudden sound or a picture of something sexy. But these measures are just that, attention grabbers, and if a presentation is so boring that I have to slam the table all the time I’m definitely doing something wrong.

The third question: Does it remind me of anything? is different. It is very important both to giving presentations and to learning. If I can find a way while giving a presentation to have the audience relate to my subject in any way, they are more likely to pay attention. It’s the same with learning. If I’m learning something that reminds me of something else it will be easier for me to put it in a context that means something to me and that will enable me to learn it much better.

I find this very interesting since lately I’ve found that I like doing things that I suck at. The things I like and suck at are very diverse. I have started to like skateboarding, playing Guitar Hero, and even carpentry. I think that it is because I know more now and even if I’m no good at these things they remind me of other things that I’m better at. And just as important, they widen my frame of reference, so next time when maybe I have to weld something I wont find the entrance barrier to high to even imagine doing it. The more I recognize, the more I relate to, the more I like. It is a good loop.

Memory

In the book Medina also talks about memory. There are, at least, two kinds of memory, short-term memory and long-term memory. The short-term memory is our working memory and it is good for very short periods of time. To store something in long-term memory, repetition is required. The more I repeat something, the better I will learn it.

The best books I have read that take advantage of repetitions without being boring are The Little Schemer-series, The Little Schemer, The Seasoned Schemer and The Reasoned Schemer. These books are built up as a series of questions in one column and the answers in another. The difficulty increases gradually as you read more.

The point of The Little Schemer is to teach to think recursively in Scheme. It does a great job of teaching this, probably because of all the repetitions that are involved.

The point of The Seasoned Schemer is to teach more advanced concepts of functional programming in Scheme, such as continuations.

The point of The Reasoned Schemer is to teach logic programming in a functional context.

It is interesting that the concepts taught in the books are quite complex and still they never feel hard when presented in this way. I highly recommend them to anyone.

Another interesting thing about repetition is that it seems to be happening while we sleep. When we are sleeping our brains keep repeating things that we learned during the day. After going to sleep while reading The Seasoned Schemer, I remember waking up one morning and finally getting how continuations work. Quite a good feeling.

Stress

Stress affect learning in a bad way for almost everybody. Stress is defined, to allow researchers to measure it, as having three criteria.

  • It has to create physical arousement.
  • If you could avoid it, you would.
  • It has to feel like it is out of your control.

If any of the above is true, it is said to be stress. When we are stressed our brains cannot focus on the task at hand and this will decrease our learning abilities severely.

You can also listen to John Medina talking about the book on the Ruby on Rails Podcast.

Monday, January 19, 2009

Making the Mac OS X Terminal Hum

I recently had reason to get back to hacking at the command line again and it certainly is a pleasure. At least it was before some annoyances started to ruin my day.

The Terminal in the Mac has been improved with tabs in Leopard making the iTerm application that I used on Tiger redundant. New tabs are easily opened with Cmd-T and closed again with Cmd-W. But if I want to move between them I have to press Cmd-{ and Cmd-} which is closer to a vulcan nerve pinch than I am comfortable with.

Luckily my old license of Menu Master comes to my rescue. Menu Master ($12) is a simple tool that lets you reconfigure the menu shortcuts painlessly. So now the tabs can be easily switched with Cmd-Left and Cmd-Right as they should.

Next step is to configure bash to support my commands. My Emacs days are long gone and I don’t like to have different sets of shortcuts for the same thing in different applications. Bash uses readline for editing on the command line. I can choose between Emacs-mode and VI-mode. Emacs is still closer to my heart so I start out with this.

Aaargh!, What!, the Option key is not sent as a Meta-key and nothing works as it should. A quick look in the Terminal preference window on the Keyboard tab, shows me that I can check the use option as meta key. That sounds right…ok, here we go: Meta-delete – deletes word, Meta-. – inserts last argument of previous command, Meta-T transpose words,... Hey, we’re moving!

Ok, now I’ll just check what I did since yesterday:

git log @{yesterday}

What! No friendly at-sign appeared by the cursor, instead we move into some stupid digit-argument mode. Bastard international keyboard requiring me to use the Option key to write a simple at-sign. Ok, back to the drawing board. readline can be configured with an .inputrc file. Here’s a fix to all the number keys.

"\e1": "©"
"\e2": "@"
"\e3": "£"
"\e4": "$"
"\e5": "∞"
"\e6": "§"
"\e7": "|"
"\e8": "["
"\e9": "]"
"\e0": "≈"
"\e/": "\\"
"\e(": "{"
"\e)": "}"

While we’re editing this file we might as well add some candy to the sugar.

# Shows all files instead of beep when tab-completing
set show-all-if-ambiguous on
# Ignore case when completing, very nice!
set completion-ignore-case on


"\e[1~": beginning-of-line    # Home key
"\e[4~": end-of-line    # End key
"\e[3~": delete-char    # Delete key
"\e[5C": forward-word    # Ctrl+right 
"\e[5D": backward-word    # Ctrl+left 
"\e\e[C": forward-word    # Alt+right 
"\e\e[D": backward-word    # Alt+left
"\C-K": unix-line-discard   # Ctrl+K 
"\e\"": "@{}\e[D"     # Insert @{} move cursor into braces

Thanks to Antibaddy on Stack Overflow for help with the last one. Ok, we’re on track again. I’ll just update my .bashrc with the nice git bash extension, git-completion.bash.


mate ~/.bashrc

Sure enough, no tilde appears. I thought I could go back to .inputrc again to fix this. But the tilde is a dead key on my Swedish keyboard and it does not even seem to arrive to the Terminal when the option as meta is on. I never liked dead keys anyway but how can I get rid of them. When installing Ubuntu it is as easy as selecting a Swedish keyboard with no dead keys. Not as easy on the user friendly Mac… Can mighty Google help me. Not really. I found a couple a clues in the Apple developer notes, but it seemed to involve firing up XCode and hacking away at a brand new keyboard layout!

I’ll ask Stack Overflow again. Sure enough, a tool called Ukelele can be used. Just start it up, base your new keyboard layout on the one you are using, double-click on the dead keys, and terminate them. I got rid of all my dead keys and while I was at it I changed my umlaut (¨) to tilde (~) and vice versa. I type tilde quite often in comparison with umlaut and I’m wiling to make the mistakes I will make on a foreign keyboard.

Now I’m finally set to go. :)

Wednesday, October 01, 2008

Notes on 'Secrets of Successful Speakers'

Notes on Secrets of Successful Speakers
by Lilly Walters.

Effective Communication

To be able to communicate effectively with your audience you need to have a clear message.
People will typically forget 90% of what you have said after one week. What are those 10%?

Decide what the purpose of your speach is. Write it down in one sentence. It should be:

  • Precise
  • Measurable
  • Reasonable
  • Relevant to your audience
  • Obtainable within your time limit

Don’t talk about something you are not passionate about.

Know and care about your audience:

  • Are they positive or negative?
  • What do they want?
  • Are they analytical, relational, dominating, expressive?

Developing the Presentation

  • Pick a simple easily remembered theme; one central idea.
  • Only use three to four main points. Every point should be relveant, independent and advantageous.
  • Create your own material.
  • Find a suitable structure: Story, Problem-Solution, Analogy, Acronyms.
  • What, Where, When, How, Why and Who?
  • Edit without mercy. No one ever complains that a speach is too short.
  • Give it a good title.

The Presentation

  • Attention: Be silent, look at the audience, joke, surprise.
  • Convince: Ethos, make them like you. Pathos, make them laugh or cry. Logos, substantiate your position.
  • Remember: Repeat
  • Practice

Wednesday, September 24, 2008

Notes on 'How to Solve It'

A quick overview of George Pólyas How to Solve It. Problem solving can be divided into four separate steps: Understand the problem. Make a plan. Carry out the plan. Reflect on the solution.

Understand the problem

What is the unknown? What are the data? What is the condition? Do you understand the problem? Restate it in your own words. Can the condition be satisfied given the data? Introduce suitable notation. Draw a figure. Write it down.

Make a plan

Have you seen it before? Have you seen a related problem? Find a problem with a similar unknown. Divide the problem into simpler problems. Look at a more specialized problem or a more general.

Carry out the plan

As you carry out the plan: check each step! Can you see that it is correct? Can you prove that it is correct?

Reflect on the solution

When the solution is found: check the result! Check the solution. Can you derive the result differently? Can you use the result for another problem?

Saturday, August 16, 2008

Notes On Design

A summary of The Non-Designers Design Book by Robin Williams. The four basic principles of design are: Proximity, Alignment, Repetition and Contrast – PARC.


Proximity

The purpose of proximity is to organize. Elements that are intellectually connected should be visually connected. Unrelated elements should not be in close proximity. The closeness or lack of closeness indicates the relationship. Equal amounts of whitespace between elements indicate that they are part of a subset.

Alignment

The purpose of alignment is to unify and organize. Every element on a page should have visual alignment with another item on the page. Nothing should be placed on the page arbitrarily. Find a strong line, such as a graphic, and use it.

Repetition

The purpose of repetition is to unify and to add visual interest. Repetition is being consistent. Examples are headlines, list items, page numbering, etc. Repetition can be accomplished with a mere suggestion of a repeated element. It is not necessary to use the whole thing.

Contrast

The purpose of contrast is to create interest. If two items are not exactly the same then make them very different. Contrasted elements can often be used with repetition in the page.

Using Color

Get to know the color wheel. Good color combinations are:

  • Complementary colors – two color on opposite sides of the color wheel.
  • Triads – three colors equidistant from each other.
  • Split complement triads – two colors on each side of the complement instead of the complement.
  • Analogous colors – three colors next to each other on the wheel.

Use shades (black added) and tints (white added) to vary the combinations above. Be aware that cool colors recede into the background and warm colors come to the front.

Using Fonts

Fonts can be categorized into roughly six categories:

  • Oldstyle with slated serifs.
  • Modern with horizontal serifs.
  • Slab Serif with fat horizontal serifs.
  • Sans Serif without serifs.
  • Script looks like handwriting.
  • Decorative are crazy fonts like Zapf Dingbats

Never use two different fonts from the same category on the same page.

Friday, March 07, 2008

Summary of "Tog on Maximizing Human Performance"

Summary of Tog on Maximizing Human Performance with additional conclusions.

Prefer the human model to the machine model:

  • Eliminate as much as possible through calculations or guesses.
  • Prefer the human model to the machine model, compare two faucets, a good one lets the user control flow with one control and temperature with another.

Decrease Data Entry

  • Limit decision making.
    • Limit required information.
  • Provide the user with the needed information.
    • Pop up help information.
    • Find the information automatically if possible.
  • Communicate high probability answers.
    • Present choices so the odds become clear.
  • Hide obscure information under an advanced tab.

Limit percieved wait

  • Do calculations in the background.
    • Get the needed information first.
    • Start the background task while the user enters other information.
  • Pop up something relevant for the user to read if the wait is inevitable.
  • Mark lengthy operations early in the design process.

Thursday, September 21, 2006

Textile Quick Reference

I started using Textile and Enscript for blogging but found no quick reference for textile so I wrote one.
h1. H1
h6. H6
bq. blockquote
[1] footnote ref
fn1. footnote def
_word_ em
*word* strong
??word?? cite
@word@ code
-word- deletion (strike-through)
+word+ insertion (understrike)
^word^ superscipt
~word~ subscript
p<. align left
p>. align right
p=. align center
p<>. align justified
* bulleted list ( may be nested * *)
# numbered list ( may be nested # #)
"Google":http://google.com Link to google.com named Google
"Google":alias Link to alias named Google
[alias]http://google.com Alias definition of alias
!image! Image
!image!:http:// Image with link
!>image! Image aligned right
CSS(Cascading Style Sheet) acronym