July 2006

Two quick, simple management ideas.

I liked this post about ‘Secret Job Titles. These are the titles for what you actually do instead of what your business card says. I think it varies from week to week. This week mine might be “Be generally helpful” for the ZeroOne conference.

I also liked this post which mentioned ‘Personal Slogans on Nameplates. Not everyone has a personal slogan or catch phrase. People who do enjoy sharing them, and a personal slogan is a great icebreaker. The idea is buried in the post.

As a disclaimer, I am not a manager.
off joel on software

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Idea
Ideas

Comments (0)

Permalink

Miami Vice, Police Don’t Pay

I saw Miami Vice last night.  It struck me as a comment on the stupidity of our Drug War.
This post contains spoilers related to the current movie Miami Vice. Continue Reading »

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Society

Comments (0)

Permalink

FavIcon added for this blog

favicon.ico is a file that one puts in a website to make the little picture you are seeing next to the URL in the address bar of your browser.

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Web

Comments (0)

Permalink

EngEdu Video Write-up: “Practical Common Lisp”

Practical Common Lisp by Peter Seibel

Date: May 10, 2006

Overview

  • Good material with mediocre presentation. Seibel seems to hint obliquely at his three major points:
    1. Lisp gives a higher level view of an implementation than Java et al.
    2. Lisp constructs can be made to work in other languages, but verbosely.
    3. The key tool is Macros, which allows programmers to define new syntax to better express the problem.

Details

These are my mostly raw notes from watching the hour long video.

Peter Seibel

  • Pronounced “Sigh-bull”
  • Practical Common Lisp
    • 500 pages long
    • Winner of Jolt Award
    • Aimed at an expert non-LISP programmer
  • Worked at Kenamea, BEA, Organic Online
  • Second generation LISP programmer

Ideas from Peter Naur’s “Programming as Theory Building”

  • View that ‘theory’ is the essence of a program
  • Can only get theory from code without work equivalent to writing it
  • Programming languages allow us to write more concisely

Views from Patterns

  • Software patterns for people writing software
  • Building patterns make some rooms more usable
  • Alexander looked for a generative language
  • Patterns generate forces; a good language could make closure
  • Software patterns are for a particular language sets; others do it automatically.

What’s Natural

  • Language wars are often fought based on what’s natural
  • What’s natural is often confused with what was learned
  • Infix notation is hard to learn, but is ‘natural’ because we learned

Sapir-Whorf hypothesis

  • By Edward Sapir and Benjamin Whorf in 1920’s
  • Suggests the thoughts we think are largely determined by the language we speak
  • Sometimes called Linguistic Determinism
  • Strong Linguistic Determinism is that you can’t think what you can’t say
  • Weak Linguistic Determinism is that what you can say influences what you think
  • Strong LingDet undermined by fact we can translate human languages
  • Weak LingDet supported by colors being easier to remember when named
  • Turning Completeness destroys Strong LingDet for programming languages

Paul Grahm

  • “Beating the Averages” by Paul Grahm
  • The ‘Blub’ paradox of the intermediate powerful programming language
  • Looking at less powerful languages shows what they lack from Blub
  • Looking at more powerful languages looks like Blub plus unknowable gunk
  • If you could think in most powerful language possible, could work in any.

Quotes

  • “Beware of the Turning Tarpit” by Alan Perlis
  • “LISP isn’t a language, its a building material” by Alan Kay
  • “LISP has assisted … in thinking previously impossible thoughts” by Dykstra

Vistor Pattern (Double Dispatch)

  • Often used when traversing a tree of heterogeneous objects
  • Traversal is not the point of the pattern
  • Double-dispatch is point of the pattern.
  • Example: use for pretty printing or compiling a tree of syntax tree
  • Trying to dispatch to a particular function based on two object hierarchies.

Java Vistor Pattern Example

  • Polymorphing is like “Object o; o.display()”
  • Non-polymorphing, or overloading, is like “Object o; ((Book) o).display()”
  • Could write hand-coded dispatching but maintenance nightmare
  • Java cannot direct dispatch correctly a something like DisplayPtr.display(MediaPtr)
  • The DisplayPtr subtype cannot be resolved at compile time, so is Non-polymorphing overloading
  • Pattern concentrates the grunt code in one place and makes it more maintainable.
  • Lisp does this without writing grunt code

Language rants

  • Simula and LISP mixed well made SmallTalk by Alan Kay (Good)
  • SmallTalk (did he mean Simula) and C mixed make C++ (Bad)
  • SmallTalk added message dispatch, now back in CommonLisp
  • Methods no longer are member of classes, so organize them well.

Multiple Dispatch

  • Explained much better in Wikipedia
  • Shows using a pattern in Java that accomplishes the same thing as in Lisp.
  • Key aspect is that same pattern can be implemented, but with easy syntax in Lisp.

Error Handling in General

  • Pre and post condition testing is not sufficient
  • There are ‘actual’ pre/post conditions that cannot be derived from code
  • Formal pre/post conditions are what we can derive from code
  • Actual pre/post conditions are real corner cases, like file gets deleted during run
  • Can open up our expectations and passing error handling upward to a degree.

Error Handling in C, Java, etc

  • C uses a ‘return value’ which is often ignored
  • Java, Python, etc. propagates exceptions so routine must “handle it or fail”
  • Some exceptions need to have decision about how to handle it far up the stack.
  • Making that decision in a Java exception system unwinds the stack too early.

CommonLisp Exceptions

  • Example is pretty badly described. Think “Top level decides if parse problem is fatal or not.”
  • Allows signal of error to be passed up stack independently of unwinding the stack.
  • Can use an ‘restart’ method to keep the original stack
  • Key aspect is that this is a pattern easier in CLOS, but implementable in other languages

* 55 minutes into video
Macros are the most important feature of CLOS

  • The language parser parses into a generic abstract syntax tree
  • You can hook your own code generator into the compiler at any scale or level
  • These macro hooks expand into lots of Lisp code.
  • This allows one to create new syntax and language concepts
  • New, compile-time syntax is often best way to express a problem
  • Making the pattern explicit in a macro avoids making it implicit in code

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Coding
EngEdu
Reviews
SelfEd
Write-up

Comments (2)

Permalink

Hello world!

Yes, I’m moving my blog to its permanent home.

del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Tailrank Yahoo Bloglines Newsvine Spurl Fark

Personal

Comments (0)

Permalink