Yes, Yes.

In Search of Flexible Data

Some time ago, on a project long long archived, I philosophised a new database structure. Being of a sound-mind — and most importantly a one-man development team — I could run with this theorised new structure, which in essence is built on the idea of flexibility.

In a nutshell — everything is an item, items are defined by their attributes.

Items are anything. Blog posts, a person, a customer order. Each of these things have defining properties — a blog title, a name, an invoice number etc. Some have 400 defining properties, some have 4. Some are integars, some are 4000 words.

For a basic example, the structure looks like this...

112016-06-30 00:12:001
212016-06-30 00:13:000
312016-06-30 00:14:001

111Hello World2016-06-30 00:12:00
212This is a blog post, shortened here so...2016-06-30 00:12:00
321How To Blog 1012016-06-30 00:13:00




In the small example outlined above, item_id=1 has 2 attributes assigned — a blog title and some blog content — while item_id=2 has just a blog title set.

This system (with some indexing and the occasional custom view) has served me well, allowing new attributes to be added — even if they apply to a single blog post, promoting a depth-over-breadth structure.

However (as always), structures are tested with queries. And this is where the strength of the flexibility was tested. Even something as simple as getting all the blog posts and printing them out as an archive would require multiple queries — ie. get all the items, cycle through and get the required attributes (if they exist). I've searched tirelessly over the past few years for a cleaner JOIN for these queries, but because this was my own theory, there wasn't an easily defined search term. I experimented with my own, but it was always faster/lighter to simply run with multiple small queries.

And then I stumbled on this (via The Straight Dope Forum), which I've been informed is similar to an Excel pivot statement...

MAX(CASE WHEN item_attribute.item_attribute_type_id=[attribute_id] THEN item_attribute.item_attribute_value ELSE NULL END) as [attribute_name]

For the example above...

SELECT i.*, MAX(CASE WHEN item_attribute.item_attribute_type_id=1 THEN item_attribute.item_attribute_value ELSE NULL END) as blog_title, MAX(CASE WHEN item_attribute.item_attribute_type_id=2 THEN item_attribute.item_attribute_value ELSE NULL END) as blog_content FROM item i LEFT JOIN item_attribute ON (item_attribute.item_id = i.item_id) GROUP BY i.item_id ORDER BY i.item_date_added DESC

Taking this further (spoiler: I did) the attribute part of the query can be drawn directly from the attribute table. An extra query for your page load (cached as needed, obvs) but will allow this main query to expand as new attributes are added.

There are some obvious scalability issues that I haven't yet tested (the current project I'm trialling this on only has about a dozen attributes so far). Not sure what kind of heavy load will be endured when there's 400 different attributes and all we need is a knife and/or 4 or 5 to display a bloody blog post on a page.

A possible solution could be a table that connects the specific query to the required attributes needed for that specific page. For example:



Continuing the original example, here we just need to first grab the specific attributes required for the blog_archive page (blog_post and blog_content) and then plug them into the query above. Later on, if we discover we also need to include the output of a new attribute called blog_image on this same page, we simply need to add the attribute and then connect it all up in the page_2_attribute joining table. Furthermore, this could even be expanded so the page_name is referenced automatically in the URL (settle down, sport).

As said, still very much in test mode, but the flexible structure and this new pivoting query is so far serving me well. But as Dave Winer would say "I'm still digging".


McGuire and White Ribbon

Previously: Eddie McGuire 'Jokes' About Drowning Journalist Caroline Wilson

Jessica Rowe (June 20):

"If we think this is appropriate behaviour, heaven help us. I'm really sick of these posturing blokes thinking they can get away with stuff because they think it's funny. There are a lot of women who are sick and tired of feeling belittled and undermined. [...] He is a leader, people know who he is, and he can do a whole lot better than that."

Collingwood football board (June 21):

"The board accepted Eddie McGuire's unreserved apology for inappropriate on-air comments he made last week. It also expressed its complete and ongoing support for his position as president. The board and the club take the matters raised by these comments seriously"

Sam Newman (June 22):

"If you're going to want to be treated equally, the point is, don't complain when it's too equal [...] The jig's up Caro, honestly and truly. You're becoming an embarrassment. And even if you were underwater, you'd still be talking [...] Those excrement who have weighed into this — I'd like to mention their names, but as nobody reads or listens to them because they're on second tier media outlets I won't bother. But if you spray excrement with perfume or put aftershave on a piece of excrement, at the end of the day, it's still a piece of excrement."

Nina Funnell (June 23):

"As a public survivor of sexual violence, you'd think I'd agree with Rowe. But while I'm all in favour of McGuire donating money to a cause that stops violence against women, I wouldn't in a million years suggest that he donate it to White Ribbon.

Why? Because I and many survivors I know wouldn't give a single cent to White Ribbon.

The problem is that each time a celebrity commits or excuses violence against women, we watch the same predictable script unfold. Perhaps a high profile athlete has glassed his girlfriend or a media personality has sexually harassed a woman live on air. Then quicker than you can say 'opportunism', the White Ribbon collection plate will be whipped out.

But the question to ask is this: how much of that 'sorry' money is ever passed on to the support services that are assisting the victims in question?

And if White Ribbon is happy to pocket 'blood money' by cashing-in on individual acts of violence against women, then shouldn't they inject a hefty chunk of that money back into the frontline services that are expected to respond to the fallout caused by the initial violence? Services like domestic violence shelters, sexual assault counselling centres, or victim's legal aid — you know, the pragmatic services that do a little more than host 'awareness raising' breakfasts and the like."

Saving Private Medicare

Malcolm Turnbull (May, 2009):

"In an ideal world, every Australian would have private health insurance. That would be the best, that would be the best outcome"

Bob Hawke (June 11, 2016):

"Everybody knows you don't set up a Medicare privatisation taskforce unless you aim to privatise Medicare"

Malcolm Turnbull (June 17, 2016):

"Medicare will never ever be privatised. Medicare will never ever be sold. Medicare is a core government service," he told reporters while campaigning on the NSW north coast. "It will always be delivered by the government and every element of Medicare's activities will continue to be delivered by the government."

Bill Shorten (June 19, 2016):

"Don't listen to what they say, look at what they do. The Liberals want to tear down Medicare, brick by brick."

Phillip Coorey (June 19, 2016):

"The federal government has dumped plans to outsource the back-office operations of Medicare in a bid to take some of the sting out of Labor's key election message."

Dennis Shanahan (June 19, 2016):

"Malcolm Turnbull has thrown any chance of even minor savings on administration costs for Medicare under a bus."

Andrew P. Street (June 20, 2016):

"According to Labor, the Coalition has been planning to gut and sell off Medicare, claiming this has been part of the plan for every Coalition government. And to be fair, the facts have seemed to suggest this is the case. After all, Liberal leader Malcolm Fraser abolished Medibank after it was introduced by the Labor Whitlam government, then it was resurrected by Labor's Bob Hawke and renamed Medicare, then John Howard started giving rebates for those using private health insurance while cutting the Medicare rebate for doctors - the same trick that the Turnbull government has done, and which the Australian Medical Association is campaigning against."

Bill Shorten (June 21, 2016):

"If you want to protect Medicare, you vote Labor in the election ... don't believe Malcolm Turnbull's words, look at his actions. It is a matter of record that they intend if re-elected to freeze GP rebates till 2020. That will mean that bulk-billing will become a thing of the past for many Australians. Mr Turnbull set up a privatisation task force and has commissioned the Productivity Commission to investigate options to privatise the delivery of human services by the federal government. Malcolm Turnbull has a plan to get rid of the bulk-billing incentive to pathology laboratories and diagnostic imaging services."

Dr Michael Gannon (June 22, 2016):

"There is absolutely no evidence at all that the Liberal Party has any desire to privatise Medicare. They've traditionally been a greater friend of private medicine but that's a completely different issue."

69 Minutes of Love Songs

1. Buy/steal The Magnetic Fields' 69 Love Songs (all three discs)

2. Merge
% cd 69LoveSongs/01/
% cat * > 01.mp3

3. "Stretch and pitch" down to 69 minutes




Eddie McGuire 'Jokes' About Drowning Journalist Caroline Wilson

Daisy Pearce, Melbourne captain, re: inaugural AFL women's league

"It's great to have the opportunity to play an elite sport out on an elite arena in a professional environment. But more so, to look around today and see those little girls who will grow up knowing that's something they can achieve is amazing [...] I have to take myself out of the bubble and realise what an amazing revolution this is."

Eddie McGuire:

"In fact I reckon we should start the campaign for a one-person slide next year. Caroline Wilson. And I'll put in 10 grand straight away - make it 20. [laughter] And if she stays under, 50. [louder laughter]"

Miki Perkins:

"This is why in the week where the AFL announced their first-ever women's league (yes!), and the Western Bulldogs and Geelong played in White Ribbon anti-violence match (yes!), we can't let the misogynist 'banter' of Collingwood president Eddie McGuire slip past."

Eddie McGuire:

"It was clearly banter..."

Caroline Wilson:

"It was such a pity they needed to default to that really vicious language. I don’t accept that it was just playful banter."

Erin Riley:

"The first notable thing about this is, of course, that is is absolutely awful. These are some of the most high-profile men in football joking about hurting one of football’s most prominent women. So much of our discussions about violence against women acknowledge the importance of language and of attitudes in shaping the way men think about women. As the current government campaign says, 'violence against women doesn't just start.' While McGuire and co were undoubtedly joking, the underlying attitude is dangerous: it reenforces the attitudes of those who are willing to take their hatred of women beyond a 'bit of banter.'"

Eddie McGuire:

"Clearly it was a poor attempt at humour, which I sincerely apologise [for], so we'll just leave it at that [...] As I said, it was a poor attempt at humour and it didn't go down that way."

Eddie McGuire:

"Anything at all that can be perceived to promulgate domestic violence is unacceptable."

Clementine Ford:

"These are the powerful men who get to be the mouthpieces of one of Australia's largest sporting communities. And where do they find their platforms? On equally culpable radio stations like Triple M, where a sea of men find favour despite not only holding misogynist views but in some cases having documented histories of violence against women."

Kate Seear:

"[What] we need to ask is this: why was this story not picked up by the mainstream media? Why did it take our podcast, and our listeners, to generate this conversation?"

Gill McLachlan:

"Words and jokes have incredible power. The fact that the comments were made on radio a week ago and were not called out is an indictment on everyone working in football. The fact that we can argue that this may have been done in jest shows a lack in understanding of this issue. I understand that the men who made these comments feel horrified that they could be construed as creating an environment that makes sexist behaviours or a culture of violence against women more acceptable. But the truth is these kind of comments do. The statistics and data say so."

Caroline Wilson:

"No journalist no commentator, male or female, should have to put up with personal attacks for doing so. McGuire avoided the issue at hand. He played the woman and engaged a couple of willing blokes only too happy to do his bidding."

Bookmarks (Week 24, 2016)

Soundcloud - B00bjob 'Brown Shane Warne' (prod. King Single)

Who The Hell Listen - Treehouse 'Centre of Their World' LP


Bookmarks (Week 23, 2016)

MacStories - I Made You a Mixtape Federico Viticci: "There's an idea that has stuck with me since I was in middle school – music creates connections."

Pitchfork - Moonface / Siinai: 'My Best Human Face' Album Review Benjamin Scheim: "After two records of quiet, lonely, piano-only music, Spencer Krug returns to the guitars, bleeping synths, and pounding rhythms of his best-loved work."

Medium - The Man in the Woods Ashley Powers: "When a mind begins to unravel, who has the right — and the responsibility — to step in?"


Bookmarks (Week 22, 2016) - Your human-size life Dave Winer: "One of the biggest mistakes rich people make is to try to live larger than a single human being can. A mathematical impossibility. You can buy a big house, but you can only sleep in one bedroom at a time. You can own twenty fantastic cars, airplanes and yachts, but you can only be in one at a time. You can own an NBA team and a MLB team, and you get to sit in the nicest seat in the house at games, but you still can only sit in one seat. In other words, your humanity doesn't increase just because your wealth did. You don't get bigger."

Medium - Love Nature Jamie Maddison: "Chris Velten disappeared in Africa 13-years-ago, then he sent a Friend Request"


Bookmarks (Week 21, 2016)

The Guardian - It's hard to begrudge long-suffering Cronulla their NRL surge

Medium - WestConnex. Is it a good project? No. Garth Ivers: "Eighteen billion dollars is the most cowardly number to spend on this project — far too much to achieve what it will, but too little to solve the problem. It purchases only the ability to claim you are doing something."

Lifehacker - How to Rip a DVD to Your Computer

RE-UN-REVIEW - EP7: VULTURE STREET "This week the boys are joined by a special guest, comedian Aaron Gocs, to talk about why Powderfinger's Vulture Street deserves to be made into landfill."

9R4A7539.jpg (1080×720) Sirius Building photo.

The Guardian - New South Wales council mergers have political ramifications Ben Raue: "Local councils don’t just pick up rubbish – they are political bodies that hold political positions – and their amalgamation will change their political direction." - America never was great Dave Winer: "What Trump really means is that he wants to make America white again. As it was before we had our first African-American president. It's a racist dog whistle. I should have seen it coming, we all should."

Stereogum - The Hotelier 'Goodness' Album Stream And Interview "I think that if people are looking for anguish, that's fine and they don’t need to get that from this record. This isn't Home #2, this is a transition. You have to find a way out.You can’t live in anguish your whole life."

The Daily Life - I had a migraine for 10 months so you wouldn't have to Oliver Mol: "A year passed. The pain went away. I could write. I could work. But then the migraines returned and the crying did too. I couldn't understand what was going on." Read his Rolling Stone story on his migraines.



May, 2016
20: Bookmarks (Week 20, 2016)
17: Podcast: How's The Views?
16: royale
13: Best Music of 2016 (April)
13: Bookmarks (Week 19, 2016)
06: Bookmarks (Week 18, 2016)

April, 2016
29: Bookmarks (Week 17, 2016)
28: And The Sober Days That Follow These Ones
27: Origin of Ladyfoot (Poem for Romi)
26: Save Sydney, Pave the Ocean
22: Bookmarks (Week 16, 2016)
15: Bookmarks (Week 15, 2016)
13: Best Music of 2016 (March)
08: Bookmarks (Week 14, 2016)
01: Bookmarks (Week 13, 2016)

March, 2016
25: Bookmarks (Week 12, 2016)
18: Bookmarks (Week 11, 2016)
11: Bookmarks (Week 10, 2016)
08: Dick Pix + Flicks
08: The Healthy Hate, Part 3: Stadiums of the Suburbs
04: Bookmarks (Week 09, 2016)
01: Places Lived: Wylam, PAN Magazine

February, 2016
26: Bookmarks (Week 08, 2016)
25: Christchurch, New Zealand (February, 2016)
24: Best Music of 2016 (February)
19: Bookmarks (Week 07, 2016)
17: Queenstown, New Zealand (January, 2016)
12: Bookmarks (Week 06, 2016)

January, 2016
29: Bookmarks (Week 04, 2016)
23: Weak Boys, Last Show of 2016
22: Bookmarks (Week 03, 2016)
17: Canoelands to Gentlemans Halt
15: Bookmarks (Week 02, 2016)
08: Bookmarks (Week 01, 2016)

December, 2015
18: Bookmarks (Week 51, 2015)
11: Bookmarks (Week 50, 2015)
07: Places Lived: Illawong, PAN Magazine
04: Bookmarks (Week 49, 2015)
02: My Enemy's Enemy is Also My Enemy

November, 2015
27: Bookmarks (Week 48, 2015)
20: Bookmarks (Week 47, 2015)
13: Bookmarks (Week 46, 2015)
06: Bookmarks (Week 45, 2015)
05: Official Press Release: "The Wedge Tape", Various Artists

October, 2015
30: Bookmarks (Week 44, 2015)
28: smug cardigans
23: Bookmarks (Week 43, 2015)
20: What if we just did this forever, then what
16: Bookmarks (Week 42, 2015)
09: On the Edge with Marc Maron
09: Bookmarks (Week 41, 2015)
02: Bookmarks (Week 40, 2015)

September, 2015
30: Briggs on his new Bad Apples label
25: Bookmarks (Week 39, 2015)
24: The Healthy Hate, Part 2: Mortality and Marathons
18: Bookmarks (Week 38, 2015)
11: Bookmarks (Week 37, 2015)
04: Bookmarks (Week 36, 2015)
01: How To: save on S3 monthly charges and avoid "dude, you've gone about 10000% over your allocated bandwidth" emails from your webhost

August, 2015
28: Bookmarks (Week 35, 2015)
21: Bookmarks (Week 34, 2015)
14: Bookmarks (Week 33, 2015)
07: Bookmarks (Week 32, 2015)

July, 2015
31: Bookmarks (Week 31, 2015)
24: Bookmarks (Week 30, 2015)
17: Bookmarks (Week 29, 2015)
10: Bookmarks (Week 28, 2015)

June, 2015
24: all good contemporary poetry is replicated from Instant Messenger screenshots from 2011
22: There are no good unexpected phone calls at 10:51pm.
19: Jogging About Wine
19: Bookmarks (Week 25, 2015)
12: Bookmarks (Week 24, 2015)
09: Down Silky Roads
05: Bookmarks (Week 23, 2015)
04: The Healthy Hate, Part 1

May, 2015
29: Bookmarks (Week 22, 2015)
22: Bookmarks (Week 21, 2015)
15: Bookmarks (Week 20, 2015)
09: Waltzing About Waterparks All Week
08: Birds
08: Bookmarks (Week 19, 2015)
01: Bookmarks (Week 18, 2015)

April, 2015
24: Bookmarks (Week 17, 2015)
17: Bookmarks (Week 16, 2015)
10: Bookmarks (Week 15, 2015)
03: Bookmarks (Week 14, 2015)

March, 2015
27: Sarah Mary Chadwick: "I Always Feel Like I Kill The Party"
27: Bookmarks (Week 13, 2015)
20: Bookmarks (Week 12, 2015)
18: re:build
18: We bought a new house

February, 2015
15: Review: The Districts "A Flourish and a Spoil"
06: Review: Joey Bada$$ "B4.DA.$$"

July, 2014
17: The Healthy Hate, Part 1 (draft)

April, 2014
22: twenty sex miles

January, 2014
30: gambino excerpt (draft)
29: consumption; january, 2014
16: step 6
09: it's pretty easy to feel guilty about anything
09: fml.sql
08: These Legs (Part 1)

December, 2012
11: S + S
11: NYC

November, 2012
01: Greenery

April, 2012
02: Gem
01: Alex And Erica

March, 2012
01: Bummer

February, 2012
01: Coast2coast

January, 2012
01: Shonty

December, 2011
24: December
01: Berlin

November, 2011
10: Whiskey Club

October, 2011
15: White
04: Everything Got Better

August, 2011
24: Champions
23: Homes

June, 2011
07: Out Here

May, 2011
23: Dunks

April, 2011
26: Canberrrra
18: What are you doing?

March, 2011
03: Newcastle-Upon-Tyne
01: Gold City

February, 2011
12: NY IV
11: NY III
10: NY II
01: Warriors

January, 2011
30: Bellas 21st
10: This Summer
10: NY I
01: December

December, 2010
09: San Francisco

October, 2010
12: Soccer Trip

September, 2010
27: September

August, 2010
17: August

July, 2010
26: Sick Kate

June, 2010
08: Fuk

May, 2010
24: Hey Now
17: Cathie
03: Gift Boy

April, 2010
12: Wallet Contents (April 2010)

March, 2010
22: Last of the Summer Wine
21: Osaka2
21: Osaka1
20: Nara
04: Monotonix

February, 2010
24: Accountability
12: Falls
11: Slurps
02: Good Clean Bong

January, 2010
27: Radio
19: Sonny
14: Further
14: Dinner
06: Xmas + NYE
06: Circle Pit

December, 2009
12: Casiotone for the Wombara Alone
10: Honeymoon
09: Wedding

September, 2009
14: Necks That Talk

July, 2006
22: All Nights

February, 2006
17: Aust Day 2005