I had the pleasure this week to sit in on a 2 day Introduction to Clojure workshop being run by one of Clojure’s core developers, Stuart Sierra. YOW! and Relevance, Inc. are running these workshops on the east coast of Australia throughout May 2013 and for someone still very new to functional concepts it was a great introduction to functional programming as well as the Clojure language itself.
The key to a workshop like this is the slides with the code examples and the labs to practice the learnings, Nonetheless, here are my notes from the course on some of the concepts that I picked up.
Introduction to Clojure
designed to fix shared state concurrency, designed to run on the host platform
ClojureScript designed to target devices that cannot run a full JVM like mobile platforms, browsers, etc..
most of this course is applicable to ClojureScript, just the interrops to the host environment are different
BigInt (trailing N), BigDecimal (trailing M)
Strings in double quotes, characters in “”, reg ex are started with a #
literal true and false, nil is the same as Java null
symbols are words in your program you want to reference from somewhere else, always resolve to something else
keywords are a special type of symbol, start with a colon :, fixed labels that have no meaning, used for names of fields often, close to enum in Java
REPL – read, eval, print, loop – from LISP, all the steps are separate which is different to interactive terminal
every expression starts with an expression, everything returns an expression which is why you get nil when doing a println
REPL *1 will get you most recently used expression
print and println will give you human readable, prn and pr will give you the machine readable output
list are written in parens, usually represent function calls
vectors usually reflect collections, in []
maps are key value collections, in {}
set starts with a hash and curly brackets
commas are whitespace in Clojure
first is the function position, usually starts wuth a function or an expression that returns a function
quote (‘) is syntactic sugar for quote, prevents evaluation, common issue when starting Clojure when dealing with lists
doc – built in documentation
Leiningen – built on Maven, hides complexity but gives you its goodness
project.clj – dependency file
Functions
functions are first class and values, most of the core code are pure functions (no side effects)
defn defines a named function (defn greet [name] <body>) is a definition called greet, passes a name and runs some functions, then call as (greet )
can have multiple aritys, [] is no arguments, others are the named arguments, useful way to provide defaults
& in argument vector says next arguments gets all the remaining arguments in a list (0 or more)
fn is anonymous function with no name (fn [parms] body), to call it you can stick it at the head of a list, use this if you need to do something one time
shorter synatx is #(), and use % sign for the arguments, syntactic convenience
usually invoke a function by putting it at the head of the list
apply takes a function and list or collection or arguments, same as invoking a function on those arguments
let used for local variables, uilt into the compiler, takes a pair set of bindings (symbol and an evaluated expression) and then a body of any number of expressions
fn creates a closure, locals are stored and kept with the function
invoking Java – instantiation (Class. argument)
read Clojure inside out, read the inner most function and then read out
Expressions and Loops
in Clojure everything is an expression, always return a value even if that is nil, multiple expressions always return the last value
flow controls always return a value as well
logical false is false or nil, everything else is true, similar to the semantics in Ruby and Python
when is a macro – check and do a buch of things if evaluates true
cond – tree of if then else without lots of nesting, test – expression pair, stops when it hits the first true test, can end with an :else default by convention only
case – occasionally useful, like switch in Java, takes constants and returns value, if you don’t define a default you get an error, odd number of expressions, the last one is the default
dotimes – basic loop (dotimes [i 3]), only useful for side effects as it never returns a value
doseq – iterates over a collection, like for-each
for – not for looping, generates data, returns a sequence
recur – for recursion, rarely used, loop defines bindings which you recur
exceptions – don’t use them much in Clojure, no checked exceptions, try-catch-finally as per Java, throw to throw an exception
ex-info and ex-data that allows you to pass back a map
with-open – convenience wrapper, works with any method that needs to be closed
Namespaces
Clojure runtime is a singleton within the JVM
namespaces allow you thave the same name mean different things in different places
ns – use macro at the top of the source file to create a namespace, :require keyword to load the dependent libraries
implicit mapping between namespaces and files, dots into slashes and hypens into underscores
ns :use : only is deprecated form of :require from 1.4 up
ns :import for importing Java classes, every namespace imports java.lang
in-ns to change namespaces
equivalent macros for when using the REPL instead of a file
a bunch of functions for returning namespace information, but would rarely use these
private vars are just a metdata symbol, use ^:private, not truly private or hidden
Collections
a class or a struct becomes a map in Clojure
clojure.set – mathematical set operations
vectors are functions, can call using the indices
mostly use vectors, lists are useful when you want to work at the head of the list as it is more efficient, like simulating a stack
seq – returns a sequential view of something, like an iterator but it is not an iterator, can get first or rest
range – infinite lazy sequence of integers
into – puts a sequence into a collection
take / drop – take the first n in the sequence, drop the first n in the sequence, also filter and remove
map – the essence of functional programming – calls a function on a sequence and returns a sequence, the functional equivalent of for/each
reduce – powerful, uses first element if not initiated
some – to return the first logical true in the sequence
Concurrency
concurrency – multiple things happening concurrently that are sharing the same state
deref – returns current state, shortcut is @<ref>
atom – basic container with mutable state, changes are atomic, synchronous
ref – coordinate and share identities, synchronous, must be iolated in a transaction, uses locking under the hood
ensure – ensure the state is the same when the transaction is completed
alter – change the value of a reference in a transaction, if another transaction tries to change it gets aborted
commute – same behaviour as alter but allows concurent updates in a transaction, use for counters, adding elements to a map, if you are not sure use alter
agent – asynchronous communication, atomic updates, ensure only one thing done at a time, every agent has its own queue
send – send an action (function) to an agent, execute in the order that you send them, can’t guarantee that other threads are not sending action, fixed size thread pool
send-off – variable size thread pool
vars – thread safe, global identity, alter-var-root to modify global state created by a def, by convention dynamic var is surrounded by * (called earmuffs)
swap! and reset!, convention to put a bang at the end of functions that have side effects or shouldn’t be put inside a transation
watches – experimental, takes 4 arguments – key, reference, old state and new state, you can then add-watch
future – background process, if you de-reference the future it will block (@<ref>)
promise – like a future but no running process, like a container, can wait for it to deliver that promise to another thread, can only be delivered once
realized? – to ask if a promise has been delivered
Polymorphism
polymorphism – two types protocols and multi-methods
type – what is the type of class using class or type
maps do not have a notion of type, record allow you to give a type to a map, defrecord creates a record, by convention the name has a capital, records are maps so we can call all the map functions
record automatically creates the constructor function called -><function>, map-><function> takes a map
when you create a record you are generating a Java class, useful when creating a lot of maps with the same structure or to implement protocols
protocol – like a Java interface, group of functions that do not provide an implementation, called based on the first argument, defprotocol to create the functions
convention _ is an argument I don’t care about
reify – creates anonymous types
extend-type and extend-protocol – allows you to create new interfaces to existing types, solves the monkey patching issue
multimethods – generic methods, much more flexible than protocols, uses defmulti and defmethod, an extensible switch
Macros
macro – pure functions – defmacro – code is input and output, define the symbols to reflect the code that we want, macroexpand-1 is used for testing and debugging to see what that macro does
syntax quote `
unquote ~ and unquote splicing ~@
most of the core language where not functions are macros, write macros for syntactic convenience
Clojure and the JVM
Clojure is tightly integrated to the JVM, is unlikely to be the bottleneck performance wise
arrays can use aset and aget to access, use Clojure Collections but maybe needed for interoperability, can use to-array and into-array
types and collections are all mapped over to Clojure
built in benchmarking in Clojure using time function, time a loop to get a better indication rather than just time on its own
by default everything is boxed in Clojure, but Clojure has limited support for long and double primitives
compile – pass your namespace, will give you ahead of time compile which gives a modest (30% – 40%) speed increase amongst other benefits, usually will us leinengen or another tool (lein compile)
ClojureScript
ClojureScript is designed to deliver optimised JavaScript
two pieces – ClojureScrpt compiler written in Clojure on the JVM, compiles Clojure to JavaScript, then the Google Closure compiler optimises for space for performance
Last year, I attended a 5 day intensive lean course led by the folks at Lean Quest. The course helped cement a lot of my understanding around Lean and here are some of my takeaways from the course:
Culture
the way we execute is the culture we have
culture is how we go about solving problems, the way we do our work every day
organisations tend to fix problems by: avoiding and defelcting blame, adding resources, calling in external resources, organisation restructures, adding new technology and adding a new layer of management
the foundations are our core values and principles as well as our beliefs and assumptions. We can see and observe the norms and behaviours and artifacts. You need to focus on the bottom and the top will take care of itself
“you can only see what you can see, you can’t see what’s inside”
leaders doing things different will change the culture, need to create an environment where everyone can be successful
catastrophes are made up of little problems that are allowed to slide by – it takes 7 problems to happen simultaneously for a plane to crash
lean has 3 core values – customer first (start with the customer and optimise the process for the next process), respect for people (engage and enable people, value people over process) and continuous improvement (a thirst for perfection, fix your own work / area)
true north – don’t need to get to perfection, but continually heading there
lean principles – standardised work, just in time, problem solving, built in quality, visual techniques, culture
break the process – by increasing the measure, will expose more problems
Capability 1: Design and Operate Work to Reveal Problems
every problem is an opportunity
failure is word that people feel uncomfortable with
fail quick and often versus do it right the first time
reveal problems for the level you control – need to be able to measure this
quality starts with the customer (ask them)
add quality to the discussion, add value to the conversation
quality check at the end, adds no value to the customer
pathways break down with the connections between them
use visual queues, they are all over the place – red line to get to emergency in a hospital, lines in a carpark
work is three categories – value added work (something a customer is prepared to pay for – 3% – 4% on average, if you changing fit, form or function you are adding value), incidental work (needs to be done but the customer does not care) and waste (unnecessary activities in the process)
continuous improvement to reduce waste and incidental work in a process
7 wastes – inventory, motion (of the person), material movement (of the product), rework, over processing, waiting, over-production (the worst waste because it hides the other wastes)
we want problems to surface so we can see them and fix them
Capability 2: Contain and Solve Problems Close in Person, Place and Time
if you reward fire fighters, you get arsonists…
we don’t teach people how to solve problems very well
everytime you problem solve you are making a little more time for yourself
a problem is a gap between the expectation and the current state, the key is to set the standard , if you don’t have a standard you don’t have a gap
keep lowering the water level and/or raising the standard
start with where you are today and measure variation to the standard
PDCA – Plan, Do, Check, Act (Deming wheel)
7 step problem solving process (1. define the problem, 2. grasp the situation, 3. plan, 4. do, 5. check, 6. act, 7. conclusions and lessons learned)
A3 – used to document the journey in the most concise form possible
project charter – an improvement project that is a break from operations
use a SIPOC+M to grasp the situation or to assess the future state, want to create a SIPOC+M for the repeatable steps (there should not be 100’s of these)
SOP – Standard Operating Procedure – leverage SIPOC+M and process flow diagrams
use a standard A3 format for reading and reviewing efficiency
leaders need to understand the job – need to study it and be able to improve it
Capability 4: Leaders Coach and Develop the Previous Capabilities
traditional organisations manage people and results, high performing organisations manage processes
I first started using Yammer back in 2009 after hearing about it winning TechCrunch50, and was user number 1 on our company domain (now we have thousands of users). Its been interesting to see the organic growth from the first time I used it (I had nobody to talk to), to a community of early adopters (who treated it like a corporate Twitter) to its usage now as an important communication channel and groupware solution.
My colleague and friend Teale Shapcott arranged the guys at Yammer to come into our organisation last week to give a bunch of people an informal train the trainer session on “Yammer – Getting Started with Groups”. Steve Hopkins and Ross Hill conducted the session, and here are my notes:
Metcalfe’s Law essentially confirms that things get more useful the more people you have in the group
the problem with email is that if you send an email to 12 people, you get 12 responses!
a Yammer group is an way to replace email in a team (basically an easy way to setup a distribution list)
Yammer are currently launching new things to the site every week
Yammer recently acquired oneDrum. Essentially what this will do is put a Yammer folder on your desktop for Office integration, as well as being able to follow files and get updates when things change.
The point of the training was to help get people using Yammer for collaboration. A good exercise to start is get people to log into Yammer (set up a private group for training) and get people to say hi. Next get people to enter what they are currently working on and then get everybody to respond on others posts to get people familiar with the value of the tool.
Pages are a new feature:
pages are a good way to collaborate and brainstorm on ideas
pages can have 10 editors maximum at the same time. It will auto save. When you publish it will notify all the followers that there is a new draft. You can revert back to old versions
pages are useful for meetings, use an iPad and throw the notes or actions up on a page, you can link actions to people or files as well
coming soon is the ability to mark a page as official
documents don’t need to be run by any person specifically, they are now crowd sourced
groups are like rooms in a house
One thing that is new that I did not know about is that you can now use the share feature to share a message across groups (you used to have to duplicate the message).
In the session, one of the other participants shared their approach to getting their team to use Yammer:
they created a new private collaboration group
it took a conscious effort to use yammer by getting the leader to share things on Yammer, this took a few months
they have seen a massive reduction in email but communicating a lot more
they also created a larger department group as well
gains comfort for people using a team group rather than the All Company feed or a public group
takes time to get the comfort up and you have to make enemies
people for the most part are learning something new
you need leadership and you need to take a hard line about just using Yammer
use followed conversations mode, set their preferences to only follow groups that I follow as it removes the noise – everything you see should be relevant, you also need to clean up the feed and email notifications settings for them
update the information tab and use it for information and quick links
needed to be hardcore and had to keep asking “are you logged into Yammer” in order to cement the habit
direct people to engage with your content, rather than just posting something
use announcements to get everybody in the group
get people to follow a hash tag for things like events
Generation Y folks are good advocates to get on side
As a second exercise, we then created a page and collaborated on out own checklist of an approach and tips to setting up a group. Many of the participants (who I assume were not familiar with wikis or collaborative tools like Google Docs were in awe of seeing people collaborating at the same time).
When introducing groups, you are bound to get resistance, so the Yammer has a bunch of great case studies that cover lots of different team types.
Another use, relating this back to Agile, is one team were using it for showcases by doing a live webcast and getting people to comment on Yammer (also the posting the video to Yammer so people could talk about it later as well). In the vain of standup, another organisation would, on a Monday, start a post on what are you working on this week. There are lots of potential usages for the features of Yammer for distributed teams. Another suggestion was to organise in everyones calendar a YamJam to discuss something on Yammer a a certain time.
Finally, there are a lot of Australian companies using Yammer, and the following videos are worth a look.
stop doing stuff that does not deliver value, not laying people off
spend time doing the right stuff, not the wrong stuff
think systems, not software – Southwest think employees, customers and then shareholders
optimise the whole system (software is just a layer) – Amazon is structured around it services (2 pizza teams of 8-10 people)
a separate testing team is silly – just handoff / afterthought, need to build quality into your product
need to understand value before you deliver value – understand what your customers value, not what they want and build the right thing before building the thing right
setting up a new product is a set of learning loops
watch for what is making people uncomfortable
understand your customers not by bringing an idea but by taking the team to understand the problem
there is always demand in a service company – fix issues as fast as possible, but that is not the game
consumability – how much effort does the customer need to go through to get value?
customers decide value… and therefore decide waste
measure productivity on value delivered, not features
work in progress is waste – customers are not interested in your long list of things to do
good Agile teams have a low number of defects
map end-to-end flow to find the biggest opportunity in your end-to-end process
40-90% of the cost is maintenance not delivery, the cost of quality is way higher than the cost of building quality in, don’t put defects on a list (track them, fix them immediately), root cause every escaped defect, determine why every one happened
problem with readable specifications is that the text is not refactorable – any text page will have hundreds of ambiguities
every organisation that calls itself professional should be doing TDD
expertise takes 10 years / 10,000 hours of deliberate practice, need a teacher to challenge, feedback and dedication (The Road to Excellence)
marketing leader – for a successful product you should be able to name this person
technical leader – keep two top engineers free to roam around and give guidance
Empire State Building – on time and under budget, had to manage the flow of materials not tasks, had two alternating mills to keep up schedule and remove failure point
people who have dome something before should know how to deliver within the constraints
when managing an organisation you need to manage the capacity, you need to have a stable flow
kanban – reduce work in progress to expose problems (don’t crash your boat on the first day, keep your limits high then lower your limits and remove your problems one at a time
kanban board – every column is handover to the next column, the next column (downstream process) gets to define done
5 why’s – the cause of the cause of the cause of the cause…, The Team Handbook has good process improvement practices, as do the Six Sigma tools
product-centric development – 54% of Fortune 500 companies are heading in this direction
Here is a picture of an exercise we did to map the cycle time of a particular company (it highlighted some of the issues they are having around approvals).
Finally, a huge thank you to Nick Muldoon from Atlassian who helped me out with a space on this course. Also to one of my colleagues who reminded me that we should ask forgiveness not permission when I was dealing with some competing priorities!
I got the opportunity today to attend Apple iPhone Management and Web Application Development training with a bunch of my colleagues direct from Apple Australia. I took a heap of notes which are available below:
on iOS4,VPN functionality is now an app supplied from vendors (Juniper and Cisco), as opposed to only built into the operating system, meaning the software can be updated outside of OS revisions
security – device (pass-codes, device restrictions and policy endorsements), network (AES-256 hardware encryption, file level encryption, encrypted backups, remote and local wipes) and platform (mandatory application signing when submitted and checked when downloaded, sandboxed applications, encrypted keychain for passwords)
Profiles
self service (configuration profiles to set mail, wi-fi, etc, distributed by USB or wi-fi, made in iPhone Configuration Utility) versus managed deployments
iPhone Configuration Utility – free for Mac and PC
identity identifier – important, certificate
can set whether configuration security can be removed or not
set passcode policies – length, autolock time, remember history, etc.
restrictions
set different wi-fi settings to appear on phone, VPN settings
if you create a profile (eg com.demo.wifi) then a user could create a profile with the same name unless you sign it (in which case it would get bounced)
deploying profiles – USB, email (not recommended because they a user could use an use old profile stored in emails and you can’t tell if profile has been loaded), web, over the air
Secure Certificate Enrollment Protocol (SCEP) – a way to get the certificate and encrypted profile onto the phone when deploying over the air, Cisco technology originally used between routers, was the cludgy way before IOS4
enrollment to confirm trusted user and device, certificates and remote configuration, additional restrictions such as disable data roaming
query the phone – model and device details, version, roaming status, applications installed on phone, settings for compliance, etc
provisioning profiles for enterprise applications to set usage and expiry dates
manage phone – install and remove settings, profiles, remotely clear (good for help desks), remote locking of device, remote wipe
third party solutions in this space from Sybase, MobileIron and Trust Digital amongst others, early days for most of these vendors and technologies
once enrolled you cannot un-enrol
no limit to number of profiles – can be all encompassing or can be small (ie just a wi-fi setting), can run at the same time, can’t disable a profile only remove it
not possible to do web filtering or block a third party application to be installed (except by disallowing access to iTunes or the App Store, with MDM you can see which apps are installed
blocking access to the application (eg camera) also blocks access to the API
iTunes
activation, sync and backup and update software
activation gets carrier settings as well as registers the device, happens whenever a new SIM card is installed, possible to put iTunes into activation only mode (what they do at the Apple Store)
Application Installation
App Store, adhoc or enterprise
build application in Xcode on a Mac and get into the AppStore
adhoc and enterprise – provision, build, deploy and install (traditionally only via a cable)
for enterprise, now Wireless App Distribution, put application on a web server and install via the iPhone via your own application catalogue app
could also build an enterprise front end to the App Store, but you still need iTunes account and deal with purchases
can gift an application but is tedious
Development
SDK – native apps written in Objective C (using XCode on a Mac)
web application – native user experience but runs from a web site using HTML5 and CSS, view optimized for Mobile Safari
hybrid applications – part SDK and part web
developer platform ($99 USD) and enterprise developer ($299 USD) – get Xcode plus emulators and resources
iPhone 51% of worldwide smartphone market, in Australia it is 93% of smartphone market
web applications cannot access secure storage, camera or address book, receive push notifications orallow rapid updates, however, can do offline access and storage
web application distribution – host on a web server, create a landing page and populate with web applications
need web development skills, any IDE and most technologies (except Flash), iPhone and iPod Touch are identical to test on, can also use emulator
examples – m.uiowa.edu and m.mit.edu to replace intranet and be useful on an iPhone
same website, different view depending on the device
applications need to be finger friendly, a finger = 44px
applications need to be aware of bandwidth and latency – Edge -> 3G -> Wifi, turn on server side compression (GZip), break data into blocks (eg Wikipedia clicking Show to get more data), reduce number of files requested, JSON for requests, optimize image size for the device, use CSS3 for design
news.com.au – 1130 files on web site versus 136 on mobile site and 43 seconds versus 8 seconds load time
give users a website escape to get to more functionality if they need it
at Apple spend much more time on design and less on code, debug and test
design for ease of use- straightforward well designed workflow (such as settings screen)
viewport – 320 x 480 screen, but can display larger, set viewport via code
home screen icon – png file and link in code
full screen mode with no navigation bars, requires home screen icon and runs in own instance
set a splash screen – image and meta tag in the Head
SVG support – good for zooming and business intelligence
PDF support
URL schemes – to display maps, telephone integration, mail integration, SMS and custom – just put URL in the scheme format
geolocation API as part of 3.0 – get current coordinates, uses battery quite considerably so use on intervals
orientation – 90, 0, -90 or 180, you code if the application looks different in different modes
user agent strings for iPhone and iPad
Css3 for transforms, transitions and animations as well as design like rounded corners
touch events and gesture events eg. touchstart, touchmove and touchend
no applets, tooltips, hover, WML, file uploads and download, mouse over, print and modal dialogs, X509 certificates
Offline Data Storage
HTML5 implementation, not unique to iPhone
offline application cache – manifest file from website, requests data then keeps synchronized, means application can run offline
key-value storage – session or local storage, persist between closing the browser, cannot be encrypted in HTML5 but could store encrypted data in the value
local JavaScript database
full support for manipulating the DOM
Frameworks
Dashcode – good for simple applications or prototypes, from Apple, part of toolkit, Mac only
Sencha – rapid tool, takes care of underlying events, templates for controls and types, iPhone and iPad
I delivered some rather impromptu and unprepared training last week for some colleagues on their use of Twitter in the Enterprise. Amongst the millions of training threads, I found a very good (but also a very customer specific) Tweetcamp presentation.
So using this slide deck as a guide, I delivered the following training points:
Twitter vs Facebook
Facebook is primarily about connections with your friends and your social connections (photos, walls, games, applications, gifts)
Facebook has become more like Twitter in recent releases by asking the question “what is on your mind”?
Twitter can be viewed more about your connection with people who have common interests (although many of them are your friends)
Twitter is less rich out of the box
Following somebody on Twitter you are following the thoughts of the whole person, not just the ideas you might best know them for
Twitter vs Blogs
Twitter is what is referred to as micro-blogging
Twitter is limited to 140 characters, so is a snapshot of the authors thoughts
Blogs provide a facility for more in-depth thoughts, analysis and reporting
If summarising an event, use Twitter to throw out live snippets, thoughts and quotes and blog after the event to review and synthesise in greater detail
Twitter is a good way to advertise new posts to your blog
Twitter vs Email
There is no expectation to read and/or respond to everything on Twitter. You dive in and out of the stream as it suits you and take notice of as much or as little as makes sense
Twitter conversations are open and discoverable to all
Direct messages can be used somewhat like email for a point to point conversation
Twitter allows you to unfollow or block “spammers”
Email is still much better for more “personal” messages
Why Do I Care?
Twitter usage is growing exponentially, on the back of big celebrity support of people such as Oprah and Ellen as well as traditional media such as CNN and 60 Minutes
Twitter is still has a much smaller user base than Facebook
Social media like Twitter is here to stay, but you need to be ready for the next thing if and when it comes along.
Going Viral
Using these tools may make you go viral. Many traditional media outlets have attempted this, very few are successful, but those that are successful are extremely successful.
You Tube is currently the platform that is feeding virality
Twitter vs Yammer
Yammer is Twitter for the enterprise, posts are blocked to those that can sign up with an email on your domain
Can dual post to Yammer and Twitter by setting up your Twitter account in the Yammer settings and adding the #yam tag to the end of your posts
Many other services allow you to dual tweet. Facebook has a similar #fb plugin or the ability to import all of your tweets automatically
Conventions
#hashtags allow people to tweet on a common searchable topic, especially useful for conferences for combining posts. There is nothing to setup, just announce your hash tag to the attendees.
@replies allows you to reply to someone and get their attention (and tell others your message is directed at them more specifically)
RT @re-tweets allow you to re-tweet someones idea but you wish to credit them for it as well as highlight to them you like their idea
Twitter API
The Twitter API is what makes Twitter more powerful, by allowing programmers to build tools and services on top of Twitter
Hundreds of other tools, clients and visualisations available
Twitter Ettiquette & Ideas
In general, for business, follow legitimate users that follow you (ignore spam followers). This is less so for personal users, follow who you have interest in
Following somebody does not mean you endorse them
Auto replies to new users is not recommended, it is just useless spam
Locking updates is not recommended, if you want to lock your ideas write a journal in a pad with a lock
Replying and retweeting is recommended when it makes sense
Retweeting introduces your followers to new followers as well as crediting the original source
Clients make it much easier to manage Twitter over the basic website by automating functions and managing searches
I then followed up with a few real examples. The key takeaway is that the attendees need to get in and try out using the tool on their own accounts before tweeting on behalf of the organisation. It is much easier to understand Twitter just by using it.