MongoSF 2012 Tip #1

I’m starting to watch some of the presentations from MongoSF 2012. Here’s a great tip regarding an oft forgotten little switch for storage systems: ReadAhead.

On one support call, RA was set high @ 4MB – probably reasonable for a laptop / desktop, which is where mongoD was running in this case on a dev box – causing severe disk utilization issues. The solution was to throttle RA back to 32K. That is, something closer to the average document size in mongo for that user.

Performance … waay up.

Overall a great talk. I love this fellow. Smart, funny. :)

Source

Quote

“Everything will be alright” is not the same as “everything will stay the same.” – Seth Godin

Simple chef recipe that installs Jenkins

# Cookbook Name:: jenkins
# Recipe:: default

# https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
# This is super-simple, compared to the other Chef cookbook I found
# for Jenkins (https://github.com/fnichol/chef-jenkins).
#
# This doesn't include Chef libraries for adding Jenkin's jobs via
# the command line, but it does get Jenkins up and running.
#
# I'd rather build up a Chef cookbook than strip it down, so here's
# a good starting point.

include_recipe "apt"
include_recipe "java"

apt_repository "jenkins" do
  uri "http://pkg.jenkins-ci.org/debian"
  key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key"
  components ["binary/"]
  action :add
end

package "jenkins"

service "jenkins" do
  supports [:stop, :start, :restart]
  action [:start, :enable]
end

source

5 Essential Questions for Great Design

From Kim Goodwin:

  1. What is the user trying to accomplish?
  2. What does the user need to know to accomplish their goal?
  3. How should the user feel as they accomplish it?
  4. How does the current design (or alternative) currently make them feel?
  5. What did they do to accomplish it?

source

WordPress › Taking WordPress to War

 

 

WordPress › Taking WordPress to War.

Powerful video – recorded at San Francisco Wordcamp 2011 - of a photo journalist working in Afghanistan, and how he used WordPress to connect a particular group of soldiers to their families back home and to the rest of the world.

Success

“It’s my firm belief that one of the keys to success is avoiding the artificial, uniform face that most companies present. Success means being an accessible collection of genuine people that incidentally comprise a company.”

- Bill DeRouchey [source]

Notes from WordcampTO 2011

Child (Daughter) themes

Make changes to existing themes without modifying them directly

Child themes:
Allow you to brand themes for clients in admin area

To build:

  • Template: (parent)

Parent themes don’t have template tag in comment header

  • Theme name: (your name)

First line in your child theme imports (parent’s) stylesheet

  • Include screenshot.png to get WordPress to use it in admin appearance area

Eg. Copy footer.php into daughter theme folder to change copyright footer

  • WordPress prefers php files in daughter folder over parent

Exception function.php – both parent and daughter are loaded (daughter first, parent second)

Functions.php

Don’t hack framework code ;)
Prefer extension-plugin mechanisms, Apis

WordPress alternatives:

  • Child themes: changes that go away if your theme changes
  • Site plugin: changes that shouldn’t go away – ever

Plugins:
Wp-content/plugins
Create a dir (eg. akismet)
Create a file (eg. a.php – no filename restrictions)
Can create a header in the plugin’s php file that provides info to admin backend
Note: Plugins load before themes

Theme development best practices

Documentation standard: phpdoc

  • Page-level
  • Function-level
  • Think about copyright and license restrictions documentation

Use child themes

  • get_stylesheet_dir – files intended to be overridden by child themes
  • get_template_dir – files not intended to be overridden by child themes
  • get_template_part – graceful fallback mechanism for including template fragments (eg. header-404.php)

Stylesheets & scripts

  • Use wp_enqueue_scripts

Gravity forms?

add_*_page to insert admin pages into we backend

  • Eg. add_theme_page(…) adds subpage to Appearance menu
  • For special admin panel configuration for a theme

Multisite

Multi-tenant wp installation
Make.wordpress.org
Buddypress.org

Multisite examples:

  • Bestbuy
  • Universities/colleges
  • Businesses
  • WordPress.com
  • Liberal association?

Pm101 – project management for small business

Think on time, on budget… but much more to it

Flexible but firm
Deadlines are important but inherently arbitrary

3 stages of a project: starting, work, finishing

Starting

Define 4 things:
Scope
Budget
Timeline
Objectives – kpi

(may need discovery step – who, where and why. Identify project roles: who has go, no-go decision, who’s the Pm. Business model, overall objectives, marketing strategy)

Best projects have fixed and flexible characteristics. Eg. scope and budget are fuzzy but have to be ready for demo next Tuesday

Interesting/revealing questions:
What browser do you use daily?
“I don’t know, whatever’s on my computer?”
Gauge tech savvy

Work

Communicate what you need and when
Feedback
Follow up

Set expectations as you go
Browser limitations
Unknowns…
Wordpress.com/.org

More important to keep things moving than to be right

Read Dan Pink’s drive

Finishing

Launch party (do something to acknowledges effort of team)
Maintenance
Evolve/enhance

Code reading

Josh Bloch’s Effective Java is easily one of the earliest deeply technical books I can remember that really help nudge me along the road to becoming a more conscientious programmer. Language mastery, he says, is a play in 3 parts:

  • Grammar
  • Vocabulary
  • Common usage

#1 and #2 are fairly narrow in scope – usually taking no more than 2-3 weeks – and are what I consider to be every language’s cover charge. The bare minimum you simply must know to get in the door. #3 on the other hand is a bit more nebulous and often takes anywhere from months to years.

The good news is picking up a good sense of common usage has never been easier thanks to the likes of github, bitbucket et. al. Start reading somebody else’s code! Many somebody else’s actually.

Just this morning I had an hour free before rolling into work – the perfect opportunity to start poking around in WordPress’s codebase. :)

Notes: TechTalksTO – August 13, 2011

The Best Framework is a Myth (Aaron Quintz – Paperless Post)

Take a look at Sammy.js
Seems to use mustache (take a look at that too)

Inspiration: Sinatra (ruby)

Frameworks should be small
Better to be componentized letting users take only the bits they need

Framework demands

  • Clean API
  • Enough structure to help
  • Solves a problem for your app

Performance (Morgan Tocker – Ex-Percona)

Variance is a crucial metric when talking about performance – that is, what’s the diff. between what the fastest response and the slowest. Avg sucks.

Recall Fb optimizes Top N queries

Can’t look at a single contributor to workload and expect to change the overall user’s pereived experience of a task – often need to look at wholistic system profile

Should be focused on user tasks
Eg. How long does a typical user login task take?

Should always be business oriented: how do we make the workflow of signup faster or less painful? Might mean turning a 3 page workflow into a single signin screen. (Don’t start with tuning mysql… necessarily.)

Throughput != performance
Response time is much better metric

95th percentile is important metric… Are most people getting responses within acceptable amount of time given your personal goals?

@morgo

Look atScout.app for server monitoring

Continuous Integration (Timothy Fitz – Canv.as)

Loop:

  • Check in code
  • Run automated tests
  • Deploy

New features should include:

  • Health checks/alerts for business level metrics related to it (eg. has anyone logged in in the last 5secs?)
  • Monitoring scripts of infrastructure required to run it

Book: Release it

Infrastructure Automation with Chef (Aaron Peterson)

Add chef client run to list of crons
Apt-get update will run regularly

Prefer rebuilding infrastructure nodes to modify when services change

Use chef server for

  • Data bags (user, passwords, other?)
  • Search – eg. A load balancer can look for new nodes and rewrite its configuration file on changes (add or retire)

New nodes register with chef server on create

Quote

Entrepreneurs yearn for eureka moments.

A moment where uncertainty is abolished and the way forward becomes clear. Reality is that clarity isn’t common and great ideas aren’t typically born out of thin air. Developing an idea is done largely through trial and error. Most startups zigzag with a founder navigating with limited data and intuition.

Recognize that your startup is an ever-evolving idea and survival comes through adaptation. Don’t hold out waiting for an eureka moment. Make adjustments when change is necessary.

Test, measure and learn.