Logo

Allolexicon

  • Email Me
  • Photo Blog
  • Politics & Culture
  • Portfolio
  • Franscrollow
  • Archive
  • RSS
Here’s my submission for a NPR Planet Money “Minimalist Econ Poster”. It’s the concept of “negative equity”. 
It’s Copyright ©2012 Damon Allen Davison. Permission is granted to NPR to use or re-publish this online as long as I’m credited.
Pop-upView Separately

Here’s my submission for a NPR Planet Money “Minimalist Econ Poster”. It’s the concept of “negative equity”. 

It’s Copyright ©2012 Damon Allen Davison. Permission is granted to NPR to use or re-publish this online as long as I’m credited.

    • #negative equity
    • #poster
    • #econposters
  • 2 months ago
  • 1
  • Permalink
  • Share
    Tweet
Southern Studios control room.
Pop-upView Separately

Southern Studios control room.

  • 2 months ago
  • Permalink
  • Share
    Tweet

PHP Testing Resources for Wordpress Plugins

Since I’ve been developing a WordPress theme and plugins for the new website at work, I’ve been working with PHP quite intensively for the last couple of months. For a lot of reasons, PHP isn’t my favourite language to work in, and the lack of testing culture amongst PHP programmers is really underlined by WordPress theme and plugin developers not shipping their code with tests, which could also be a reflection of the WordPress core having lots of tests, but having them available only when you clone the Subversion repository.

I’ve also been thinking about how projects like CASH Music DIY could really benefit from a combination of test-driven development (TDD) for the developers themselves and behaviour-driven development (BDD) to allow non-experts to write tests that can double as documentation using Cucumber. In fact, I started this whole search by looking for tips on how to use Cucumber and Capybara to do integration testing on PHP projects.

Cucumber allows you to write natural-language feature tests, such as the following example taken from their Github repository:

Feature: Addition
  In order to avoid silly mistakes
  As a math idiot 
  I want to be told the sum of two numbers

  Scenario Outline: Add two numbers
    Given I have entered  into the calculator
    And I have entered  into the calculator
    When I press 
    Then the result should be  on the screen

  Examples:
    | input_1 | input_2 | button | output |
    | 20      | 30      | add    | 50     |
    | 2       | 5       | add    | 7      |
    | 0       | 40      | add    | 40     |

On the unit testing and TDD front, Smashing Magazine has a brand new article on writing unit tests for WP plugins that uses the JavaScript QUnit. There is a simple Lastcraft Unit Testing Tutorial using SimpleTest.

Where BDD is concerned, Otaqui.com has a Gist for using Cucumber, Capybara, Mechanize and Selenium to test remote PHP web sites.

Since I’m just starting out with this, I’d love to hear from some PHP testing experts and anyone else who can help me fill in the gaps.

More resources I’ve found since posting this:

  • Eric Hogue’s post on TDD in PHP using SimpleTest and PHPUnit.
  • There’s a PHP port of RSpec called PHPSpec, which is a really cool idea for doing outside-in BDD with PHP. It’s not as pretty as Ruby because PHP isn’t syntactically sweet enough to eliminate all the sigils that are optional in Ruby and the Domain-Specific Languages (DSL’s) derived from it, plus other stuff*.
  • Sebastian Bergmann and Stefan Priebsch have written a book called Real-World Solutions for Developing High-Quality PHP Frameworks and Applications whose content is hopefully easier to digest than the English title. Their original German title is Softwarequalität in PHP-Projekten ‘Software quality in PHP projects”, and much leichter zu verdauen.

* Camel case for everything, really?

      • #development
      • #wordpress
      • #php
      • #testing
      • #TDD
      • #BDD
      • #integration testing
      • #unit testing
      • #Cucumber
      • #Capybara
    • 2 months ago
    • Permalink
    • Share
      Tweet
    [Flash 9 is required to listen to audio.]
    '\x3cscript type=\x22text/javascript\x22 language=\x22javascript\x22 src=\x22http://assets.tumblr.com/javascript/tumblelog.js?914\x22\x3e\x3c/script\x3e\x3cspan id=\x22audio_player_18870826610\x22\x3e[\x3ca href=\x22http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\x22 target=\x22_blank\x22\x3eFlash 9\x3c/a\x3e is required to listen to audio.]\x3c/span\x3e\x3cscript type=\x22text/javascript\x22\x3ereplaceIfFlash(9,\x22audio_player_18870826610\x22,\'\\x3cdiv class=\\x22audio_player\\x22\\x3e\x3cembed type=\x22application/x-shockwave-flash\x22 src=\x22http://assets.tumblr.com/swf/audio_player.swf?audio_file=http://www.tumblr.com/audio_file/18870826610/tumblr_m0f5sfacjg1qdkv8q\x26color=FFFFFF\x22 height=\x2227\x22 width=\x22207\x22 quality=\x22best\x22 wmode=\x22opaque\x22\x3e\x3c/embed\x3e\\x3c/div\\x3e\')\x3c/script\x3e'
    • 1,274 Plays
    Download External Audio

    npr:

    “There are about 175 indigenous languages still spoken in the United States and a vast majority of them are on the verge of extinction.”

    A Road Trip In Search Of America’s Lost Languages

    Linguist Elizabeth Little took a two-year trip across the U.S. in search of the country’s lost languages. The resulting book is Trip of the Tongue: Cross-Country Travels in Search of America’s Lost Languages.

    Source: NPR

      • #linguistics
      • #varieties
    • 2 months ago > npr
    • 244
    • Permalink
    • Share
      Tweet
    [Flash 9 is required to listen to audio.]
    '\x3cspan id=\x22audio_player_17817514574\x22\x3e[\x3ca href=\x22http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\x22 target=\x22_blank\x22\x3eFlash 9\x3c/a\x3e is required to listen to audio.]\x3c/span\x3e\x3cscript type=\x22text/javascript\x22\x3ereplaceIfFlash(9,\x22audio_player_17817514574\x22,\'\\x3cdiv class=\\x22audio_player\\x22\\x3e\x3cembed type=\x22application/x-shockwave-flash\x22 src=\x22http://assets.tumblr.com/swf/audio_player.swf?audio_file=http://www.tumblr.com/audio_file/17817514574/tumblr_lzcm6qwcwM1qatyxd\x26color=FFFFFF\x26logo=soundcloud\x22 height=\x2227\x22 width=\x22207\x22 quality=\x22best\x22 wmode=\x22opaque\x22\x3e\x3c/embed\x3e\\x3c/div\\x3e\')\x3c/script\x3e'
    • 503 Plays
    • Mothlite - The One In The WaterMothlite

    I absolutely love this album! Here’s a photo I took of Mothlite around the time the album was released.

    Mothlite at the Scala

    southernrec:

    Mothlite - from the debut album “Flax Of Reverie”. The album’s six pieces encompass elements as diverse as choral madrigals cascading with strings, the melody and dissonance of Arvo Part and Moondog and the cinematic, studio-as-instrument manipulations of Pink Floyd, Coil, Cocteau Twins and late period Talk Talk. Woodwind and percussion take their cue from the devotional mantras of Alice Coltrane and Albert Ayler. O’Sullivan’s words are of the same bloodline as Jorge Luis Borges, Lewis Carroll and Henry Williamson. Mothlite will release their second album on K Scope in 2012.

    Source: soundcloud.com

    • 3 months ago > southernrec
    • 5
    • Permalink
    • Share
      Tweet
    Fifi Fatale’s Powder Puff striptease, filmed by Damon Allen Davison
    Pop-upView Separately

    Fifi Fatale’s Powder Puff striptease, filmed by Damon Allen Davison

    Source: damonallendavison.com

      • #fifi fatale
      • #burlesque
      • #film
      • #photography
      • #showreel
      • #striptease
    • 4 months ago
    • 4
    • Permalink
    • Share
      Tweet
    “Awesome” would be appropriate here.
    Pop-upView Separately

    “Awesome” would be appropriate here.

    (via melancholiceuphoria)

    Source: stevettattoos.blogspot.com

      • #danhiggs
      • #tattoo
    • 4 months ago > danhiggs
    • 157
    • Permalink
    • Share
      Tweet
    Billie hiding her nose
    Pop-upView Separately

    Billie hiding her nose

    • 4 months ago
    • Permalink
    • Share
      Tweet

    Restricting users when setting up a file transfer server

    In my role of Production Manager at Southern, I keep running across rather, shall we say “sub-optimal” server configurations for delivering masters, artwork and other very large files to manufacturers.

    For example, one of the plants we have worked with has a single SFTP account for all their clients to upload their masters to. It’s not an append-only solution like an OS X “Drop Box” where people can’t see what was uploaded—you can potentially download other companies’ masters. Another company we work with for digital retail doesn’t let you read anything, but you can see all of their clients. There aren’t many servers I think have been set up well.

    I’ve decided that it’s a basic system administration skill to be able to set up private, chrooted SFTP accounts for any number of users on a system, so I’m linking to this HOWTO, which worked very well for me. Just create a user and home directory, add it to the “transfer” group, create a subdirectory under the home and chmod it so it’s world readable/writable/whatever.

    A couple of important notes about the configuration:

    • Make sure you put the “Match” stanza at the very end of the ssd_config file. I had a single directive after it, which sshd parsed as if it were part of the stanza. Not good.
    • Even though the entire path has to belong to and be writable only by root, you can still use the %h variable to chroot individual user directories, and then put useful directories underneath the home, for instance “pick_up” and “drop_off” or similar.

    Here’s the bottom (and relevant) part of my sshd_config:

    #Subsystem sftp /usr/lib/openssh/sftp-server
    Subsystem sftp internal-sftp  
    UsePAM yes  # not relevant to this discussion, but see my point 
                # above about Match being at the *bottom*
    Match Group transfer 	
      ChrootDirectory %h 	
      AllowTCPForwarding no 	
      X11Forwarding no 	
      ForceCommand internal-sftp
    

    Read the HOWTO.

      • #OpenSSH
      • #SFTP
      • #System Administration
      • #chroot jail
      • #Unix
      • #Linux
    • 4 months ago
    • 14
    • Permalink
    • Share
      Tweet

    Fugazi Live Series: Los Angeles, CA USA 9/08/91

    Palladium gig flyer

    Dischord have started their release of the Fugazi Live Series.

    Between 1987 and 2003, Fugazi played over 1000 concerts in all 50 states and all over the world. Over 800 of these shows were recorded by the band’s sound engineers. The goal of this project is to make each of these recordings available to download for a small fee. We will start with 130 shows and release more monthly until we’re done. A searchable archive lists each show along with available photos, flyers and general show info. Each listing with a download offers a streaming preview of material for sound quality as well as the reading and posting of comments on the show and the recording.

    The size and scope this archive dictates that it will remain a semi-permanent work-in-progress. We welcome visitors to contribute photos, recordings, corrections, and any additional info that may be missing from specific shows. Please see the About section for information about contributing content.

    I was at the September 8th show at the Hollywood Palladium in 1991, but I don’t have a contiguous memory of the gig. Hearing the audio from the show when it is released is certain to bring back some memories.

    I’m afraid neither of the opening bands left much of an impression, but then again we were there for Fugazi. It was a big deal.

    Source: dischord.com

      • #Fugazi
      • #Live
      • #Dischord
    • 4 months ago
    • 2
    • Permalink
    • Share
      Tweet
    ← Newer • Older →
    Page 1 of 2

    Me, Elsewhere

    • @allolex on Twitter
    • allolex on Vimeo
    • DamonAllenDavison on Youtube
    • allolex on Flickr
    • allolex on github

    Twitter

    loading tweets…

    • RSS
    • Random
    • Archive
    • Mobile

    Copyright ©2011-2012 Damon Allen Davison. Effector Theme by Carlo Franco.

    Powered by Tumblr