« January 2009 | Main | March 2009 »

February 24, 2009

  Examining foreign keys in Postgres   
| No Comments

I often need to inspect fkey usage in Postgres to audit views , and it can be a PITA combing through data.

I found this little gem on the postgres mailing list by Thomas Kellerer

SELECT c.tablename || ' references ' || tu.tablename FROM informationschema.tableconstraints c JOIN informationschema.constrainttableusage tu ON (c.constraintname = tu.constraintname AND c.tableschema = tu.tableschema) WHERE c.constrainttype = 'FOREIGN KEY' ;

That lists all your table fkey relations

With a little bit of magic we can clean it up to alphabetize a bit...

order by c.tablename , tu.tablename

and if you want to find what tables are referencing the table you're on...

WHERE c.tablename = '$$NAME$$' or tu.tablename = '$$NAME$$'

and to make things a bit more clear... we can add in the constraint name

SELECT c.tablename || ' references ' || tu.tablename || ' via ' || tu.constraintname FROM informationschema.tableconstraints c JOIN informationschema.constrainttableusage tu ON (c.constraintname = tu.constraintname AND c.tableschema = tu.tableschema) WHERE c.constrainttype = 'FOREIGN KEY' ORDER BY c.tablename, tu.table_name;

I'm not sure how the actual fkeys are stored in terms of columns, but if anyone has an idea, i'd love to update this call to list the columns on each table

Posted by Jonathan at 1:13 PM | Comments (0) | TrackBack


February 19, 2009

  Regarding the Facebook TOS debate - Social Media Standards drafts now public   
| No Comments

This past week there's been an uproar on TOS concepts , chaining from the Facebook TOS update.

In mid-2008 I started working on a whitepaper for FindMeOn & my own consulting/advising clients dealing with these exact issues -- the concepts that once you publish something, its out there... and that we need unified and understandable Social Media Standards in terms of practices and legal contracts.

Some very smart friends were gracious enough to help me work on subsequent drafts of the whitepaper, which is more formal and consistent in tone... however its not fully edited yet.

So for the sake of timeliness, I've decided to make the original drafts public on the IdentityResearch microsite and link to them here

June 2008 - Social Media Standards - Privacy & TOS- Initial Thoughts

June 2008 - Who owns The Social Graph and Social Media ? A Treatise on Content, Data, and Relationships

I'm happy to see many people 'wake up' in this debate in terms of the "Click to Publish" concept:

Mark Zuckerberg says in On Facebook, People Own and Control Their Information

When a person shares something like a message with a friend, two copies of that information are created—one in the person's sent messages box and the other in their friend's inbox. Even if the person deactivates their account, their friend still has a copy of that message. We think this is the right way for Facebook to work, and it is consistent with how other services like email work

Microsoft's Dare Obassanjo says in Some thoughts on retroactive deletion of shared content on Facebook and other social media sites

I used to be a member of the second school of thought but I've finally switched over to agreeing that once you've shared something it's out there. The problem with the second school of thought is that it is disrespectful of the person(s) you've shared the content with.

I'm hoping people begin to fall in line more with the concept of a "Social Media User's Bill of Rights".

Last year I had reached out to the Creative Commons, The EFF, and the Stanford and Harvard Internet law centers -- none thought this concept was worthy at the time. Perhaps this will finally change!

Posted by Jonathan at 1:24 PM | Comments (0) | TrackBack


  Hulu's dumbest move: blocking boxee   
| No Comments

Starting this week, Hulu will block the boxee client from its streams.

The heads of both Hulu and Boxee addressed it on their corporate blogs, calling it unfortunate Boxee Posting
Hulu Posting

The summary is very simple. Hulu's content providers got mad to learn that people were watching Hulu on TV sets, not on computers. TV ads & Neilsen metrics provide for more income than online view ( online viewing was designed as a way to make extra cash, not make big $$ and cover production costs ) -- and the content producers don't want to steal people away from network viewing. They want to get people to watch ads on their couches in groups, on the big screen, where revenue is better and ROI/efficacy is higher.

The situation is obviously unfortunate to boxee & other set-top-device/media-center users... but also a huge setback for Hulu.

Let's be clear about this - Hulu didn't want to do this. They make money every time someone watches a video on their site - whether its Boxee or a PC. They don't care how people watch the content they distribute. It's the content providers that forced this action.

But in caving in to their providers, Hulu became responsible for the largest mistake they will have made.

See, internet people are smart and savvy. It won't be long until someone makes a plugin / patch / version of Boxee that identifies itself as Safari or Internet Explorer or something else -- re-enabling the ability for users everywhere to revel in streaming video.

And once people do that, those media devices are identifying themselves as not-boxee. Those devices are saying "Oh, hey there. look at us, see, we're NOT connected to a TV, we're just a computer".

And those devices aren't saying "Yes! we're a boxee device! Someone is sitting back on a couch. there are probably multiple people watching. this is probably on a big screen. you can charge 5x the CPM for this display."

And that is what Hulu - and the brain-dead shortsighted content producers - lost. Boxee and other set-top devices are how people will consume media in the future. It's happening already. The rise of their popularity combined with the costs of cable in a flailing economy have many people dropping subscription services for broadcast networks and online viewing.

So in short, Hulu shot itself in the foot.

Boxxee users will get hulu content again, surreptitiously, but Hulu will only be making standard CPM rates for it -- and losing out on a chance to charge for premium CPMs.

By the time Hulu can make the content providers wake up, far too many projects will be made to liberate video onto set-top devices -- and they'll start spending all of their money on bribing projects to identify themselves as set-top devices , or lawyers to threaten and sue developers. ( and that is successfully or not, as they're spending money and not winning anything)

So congratulations Big Media, you're an idiot. Again. Next time technology & culture shifts, try embracing it and designing new revenue streams on it -- not try to quash it and live in the past.

Posted by Jonathan at 12:43 PM | Comments (0) | TrackBack


February 5, 2009

  Carly Fiorina should shut the fuck up. She was a failure as a CEO and is an idiot as a politician.   
| No Comments

I hate Carly Fiorina. She's consistently promoted and lauded over, but her track record has been nothing but colossal failures offset by fancy PR. After she eviscerated HP's stock, brand and personnel she finally tried her push into politics. Her history at other companies were just as elegant a trainwreck as HP.

Recently she's been promoting her own vision of oversight for the Grand American Bailout , and its nothing short of completely idiotic.

In a nutshell, as this cnn article illustrates, Fiorina believes that CEO pay should only be regulated by a traditional shareholder vote -- with the US government exercising their voting rights in proportion to the amount of stock ownership.

This might seem straightforward and fair to someone who has never been involved with corporate financial transactions -- however anyone who has gone through a corporate financing event would call this approach "absolutely fucking braindead".

Given Fiorina's recent statements, its painfully clear that she's either far more incompetent than I thought... or lobbying for some CEO's about to get hit by restrictions.

Pegging control of a company to voting rights makes perfect sense when you're talking about general stock options - and stock that you purchase during an IPO or on the free market. The Federal Bailout hasn't been that sort of event - its a corporate financing event -- and restrictions on cash are perfectly in order. In fact... restrictions on assets such as : exactly what you can and can't do with it, executive/employee compensation limits , executive retention options -- are actually the industry standard.

You see, companies need money to grow or fix problems. Growing companies ( like startups raising early capital, or established firms looking to expand ) start pitching investors on their great plans. Broken companies ( ones that have too much debt, or have turned unprofitable ) start pitching with their restructuring plans.

Potential investors look at these companies and say "Ok. You need money. Lots of it. More money than a bank would give you. We believe in your plan, and we'd be happy to help -- but there is a catch. Because you need so much money, we need to trust you with it. So these are the terms. For this $10MM amount we will own 30% of your company and have 2 seats on your board of directors. You may only use the money for these three things. You must limit executive compensation to $100k , you may hire industry specific specialists up to $200k with our approval. Your executive team needs to stay in place for 2 years. If you break these terms, we can take our money back, fire your asses, or both. Probably both. These are our terms, take it or leave it."

This happens on financing deals from $100 thousand to $100 million dollars. The only difference is that the more money that is involved, the more stringent the terms are.

Companies then try to negotiate. The more money they need, and/or the more specialized their company is, the fewer potential investors they have. Investors know this too, and use it as a bargaining chip. When left with strict terms and a 'take it or leave it' option, companies often have to take it.

Fiorina's proposal to allow companies to self-regulate is both completely irresponsible and without any sort of merit. The framework she proposes is less characteristic of a Government Bailout than it is a Government Handout -- where failing companies that can lobby for enough cash are given a without-terms loan from the Government when no other lenders are willing to do business with them. This isn't even something that falls on party lines -- its horrific to the ideals of both Democrats and Republicans.

We live in a free market economy. If a failing company needs money, it has many options across the spectrum of private investors. If it chooses to not work with any of them, or investors do not have the resources to match their needs, the funds they receive from the government should be on terms that the government sets forth. If the company doesn't like that ? It can file for bankruptcy and have assets / departments sold off. The companies in question have rich infrastructures and talented employees that many other better-run firms would love to acquire and employ.

Posted by Jonathan at 3:52 PM | Comments (0) | TrackBack


Contact