Muzak File – Part 0

I don’t know if “have a blessed day!” is a national cultural universal or not, but the concept surely is. Muzak has provided for the basis for the proclamation. It’s as if he’d heard the cry and felt the pain, and knew that if he’d only take an hour, he could effortlessly fart out code so on point and so comprehensive that piles of books worth hundreds of dollars would suddenly seem like crave scribbles. Behold the day he replied to my post on FlashTiger and delivered unto the world… the .zip file.

While I respect and try to adhere to the proper way of doing things, the goal usually has more to do with deadlines than how fancy pants and best practice the code is. In the world of procedural programming, I may be a legend or an authority, but unfortunately this success fails under its own weight and the need becomes clear and the move to proper Actionscript 3 is undertaken.

So I read chapters dealing with Events and Display Lists during my morning shits and dream of black boxes, private functions (rawr!), houses as blue prints and cars as objects. Encapsulation. The years pass.

Reader, if you are like me and on the verge of getting violent over the transformation on what it means to think OOP, I pass on to you this gift. Friend, read and study my posts on this (Category: Muzak) and find that which you seek.

First, I present the final product. Basically, this file is as simple as it looks. It reads internally supplied XML and places buttons on panels. The buttons controls view states. Not much in and of itself, but it’s the way this simple concept is executed using the MVC pattern that is important.

Get Adobe Flash player

The reason you would want to write your code this way is because it is more flexible and it scales better going forward. With minor tweaks the panels and buttons could grow to dozens and buttons could trigger various view states. Abstractly, you have some information to present, the model, and how the user is able to interact with and modify that information, the controller, determines what is seen by the user, the view.

I am going to break this file down and rebuild it in steps explaining what I discover along the way. Hopefully, you will get a better sense of how OOP concepts break an application into parts. This isolation makes code easier to maintain. You can modify a particular view without affecting the rest of the application. You could easily borrow the code and use it in other applications. The app can be smarter and configure itself based on what is to be presented. All made possible by this more compartmentalized code.

So, maybe your dream is not to build two panels with a couple of ugly buttons on them, or maybe this is the perfect application for Flex, which may be true. It does not matter. The core concepts presented in this file really got me past a few major stumbling blocks in transitioning from Actionscript 2 and all of the sudden OOP feels a lot more tangible.

The main things I was having trouble with coming from a world of madcore procedural AS2 programming:

  • the loss of _root and the ability to make tangled nested messes of movies clips and just hard code in the reference or something nasty like that
  • the real fundamental nature of the event handling change and quickly moving on from bad practices like encapsulating hundreds of event listeners and moving to dispatching custom events – I can write a pretty mean function but was in a world of hurt, especially in terms of scope and event notification and data exchange between objects
  • allowing a design pattern to impact the design – I don’t profess to be a pattern expert, but it helps to even loosely adapt a design pattern and allow it to help define how things behave

Muzak File – Part 1 (app starts itself, creates 2 panels and places them in the display list)

Muzak File – Part 2 (TBD)

Muzak File – Part 1

We will get the file started. There is no code in .fla file, but there are a few movie clips in the library.

Muzak File – Part 2

Part 2

Essential OS X Leopard Terminal Hacks

1. Show path in folder title bars
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

2. Kill genre window in iTunes
defaults write com.apple.itunes show-genre-when-browsing -bool FALSE

3. Kill Apple Store links in iTunes
defaults write com.apple.iTunes show-store-arrow-links -bool FALSE

4. Kill Dashboard
defaults write com.apple.dashboard mcx-disabled -boolean YES

5. Enable Dashboard
defaults write com.apple.dashboard mcx-disabled -boolean NO

6. Recursively remove .svn folders from a directory
rm -rf `find . -type d -name .svn`

Epilogue

p 536

The Problem of Number One in Relative Decline

p 514

The Rise and Fall of the Great Powers

Not the first book to get a bum rap for its poor prediction of the future, this mars the reputation of what is an otherwise tremendous read on the the ebb and flow of real power between 1500 and the modern industrial world. A few large things happened that really thwart most predictions related to the 21st Century world stage.

First, the fall of the wall and the disintegration of the Soviet Union was kind of a yawner. Regionally, I’m sure the effect was tremendous, but compared to the hype, a sudden world without a Cold War was not that big a deal. Or was it? The rise of the Dow Jones Industrial to 14000+ lines up nicely with the end of the Cold War, as does the ensuing decade long technology boom.

The true emergence of a second world where manufacturing and value added work like software development was relocated help nations, and whole regions even to raise their economic standing. Power shifts as China’s ability to act as factory to the world has also given them unprecedented financial clout through creditor status. Cries of environmental destruction and human rights seem quaint as the First World voraciously consumes the flow of cheap consumer goods.

Thirdly, non-nation state backed terror went beyond the odd small cafe bomb to truly capturing the imagination of what was possible. The largest attack on American soil arguably contributed to misguided wars, use of a housing bubble to act as the foundation of an otherwise self-indulgent economy and has had a leveling effect on United States’ relations both diplomatic and power based worldwide. Politically, the United States suffered from a new media fueled partisanship that hinders National discussions on important issues.

I wish to go back and look at the final chapters and see where he did get it right, and briefly look at how unforeseen trends emerged. The American decline of which he speaks of in 1990, could possibly be dated September 2008 when we basically completed the loss our cash position and found our military stretched thin. The banking crisis perfected decades of work of in devious and shady financial schemes following pioneering work by MCI and Enron. Fat people bought large houses filled with things bought on credit and drove large automobiles. We cheered on large flat screen televisions as we entered the two longest wars in our history.

In 2006, everybody knew a real estate developer, agents or house flipper. Television had numerous shows on home improvement for the purpose of making a profit. The housing boom brought us the weekend house renovation warrior. The .com crash brought us the lay day trader. Enron was a glimpse into the future mindset of hedge fund managers hoping to make a lot of money doing essentially nothing more than making shrewd roulette bets minus the accounting scandals.

There is a famous story about the Great Depression, which I’ll poorly paraphrase on the off chance that you are not already familiar with it. A great banker or stock type is getting a shoe shine, and the shoeshine boy offers up some hot stock tips. Some can’t miss tips from right here on street level. The man knew to get out of the market very soon, for the end is surely near. We’ve seen this several times in the last few bubble bursts. We have a sort of flash mob economy now.

Where does he get the decline right?
Epilogue turns up the heat.

Television is Going Away.

Not anytime soon, but the computer will at some point and time control the digital content hub and the actual television will function more as a monitor and cable will be reduced to a commodity pipe as control over programming fades.

How can I be the IPTV, when you already the IPTV?

The breakthrough in the iPhone with OS X and the google Phone with Android is that they represent the fundamental shift away from phones trying to do computer things. The iPhone and gPhone are computers first, where phone calls are just part of the information stream.

Television will suffer this same fate. Cable television has already failed. On-Demand is cumbersome and limited. You pay rather a lot of money, but get an increased amount of advertising (30 minute shows are closer to 20-21 minutes) and whole channels are prone to broadcasting infomercials at some point. The whole effort of time shifting with a DVR is barely an advance over being able to schedule VHS recordings in the 1980s. The only thing television does well is live sports events and even that will be replaced as internet quality continues to evolve and then combines the highest quality with diversified internet distribution. Security guards in small huts will watch the Super Bowl on cell phones, nowhere near a cable outlet.

As with OS powered phones, it will be easier to make television an add on to the internet, as is already happening, than it will be to add internet functionality to the television.

From the Ars Technica article:

First things first: the venerable set-top box, on its way out in the cable world, will make a resurgence in IPTV systems.

They start losing me right out of the box. This is almost the number one thing that people do not want in their Internet experience, and it’s arrogant to assume that people will want cable companies and traditional channels controlling what and when we watch content. The reverse is likely to occur. A generation raised on instant downloads and streaming, legally or pirated will know how and will want to break free of any such traditional constraints.

Cable and phone companies will roll out fiber with the initial idea of creating a value added network proposition, but will lose to the internet at large that will simply share media as needed. There was a time when communication consisted of seeing someone, telling someone to tell somebody else “hello” for you, making a wire to wire phone call or using the Postal Service. News came from print, radio or one of three tv channels. Now wireless, message based (text, IM, email) or IP enabled skype or similar communications dominate and seeing someone becomes the rarest. There was a time when HBO was special and when AOL thought they could run the internet.

New ways will have to be devised to monetize this new uncontrolled mediation landscape. In some ways, this could be win win. For a long time I have always wondered why I even see ads for certain products. For instance, I’m a male. I’m never going to have brand preference when it comes to tampons. I am also kind of a euro snob when it comes to automobiles. I’m never going to buy a Pontiac, and soon, I won’t be able to even if I wanted to.

Right there are two ad spots that are a total waste when I encounter them. I would rather see an add for shaving cream or a new BMW in their place though, and oddly, so would advertisers. People should accept the fact that advertising done right is going to help bring the next generation Internet, there has to be a way to get legitimate money into the pipe stream. People should attach a value to their personal identity and online personality and trade that value for a better advertising value.

An introduction to IPTV – Article from Ars Technica. March 2006. Getting that still born feeling, eh?
iPhone Dev Center – Much about the iPhone is not about the phone.
Netflix – DVD or streaming? Movies and television shows?
Hulu – Channels? We don’t need no stinkin’ channels.
Netflix to Offer Streaming Only Accounts? Ars Technica
Broadcast TV Faces Struggle to Stay Viable
Why TV Lost

“Culture Wars” and “Decline” in the 1990s

Robert Bork, denied a Supreme Court seat in 1987, emerged in the 1990s as a leading conservative critic of the new “rot” eating at the core of the nation. America’s “enfeebled, hedonistic culture” its “uninhibited display of sexuality” its “popularization of violence in… entertainment” and its “angry activists of feminism, homosexuality, environmentalism, animal rights – the list could be extended almost indefinitely.”

Carl Rowan weighed in with his book, The Coming Race War in America, agreeing that America was “in decline… on the rocks spiritually, morally, racially and economically.” Even liberal commentators such as Paul Johnson were in decline mode with The Rise and Fall of the Great Powers. Allan Bloom was in despair over The Closing of the American Mind.

The seeds for the Republican resurgence that would lead to George W. Bush were planted by the time Bill Clinton took office. The conservative response would give rise to AM radio stars like Rush Limbaugh and eventually Sean Hannity who would be fundamental in attaching family values to the normal pro business friend of the rich image of the Republican Party. This family values angle gave Republicans mass appeal with people who from a station in life or financial perspective who might not normally be attracted to the Republican party. I call these people the Wal-Mart Republicans. They love church, hate MTV, love cheap Chinese products and hate Mexicans.

I was in College during this period, and it’s a little funny looking back, but almost all of my Political Economics books painted America as doomed and Japan as the immediate winner with a resurgent Europe given new vitality from the European Union. Japan never really got out of its recession, but never fell that far off either and even as brands like Sony lost some of their shine to reformulated companies like Apple, other brands such as Honda and Toyota remained perceived as superior products in their class. China, Southeast Asia and India were really the areas of the world that brought the most leveling moves towards parity.

Questions Concerning Technology and (Post) Industrial Society

Marx helped conceive the notion of the industrial state in constant transition. I suppose the recent bank bailouts and auto bridge loans put the notion of creative destruction to the test, but shared in this move to a service, information or knowledge based economy is the shift away from a time/labor formula to one where productivity comes from production set in motion through the deployment of appropriate technology.

If capitalism placed primacy on private property, post-industrialism puts an emphasis on knowledge for the “purpose of social control and the directing of innovation and change.”

The Age of Diminished Expectations

Writing in 1990, Paul Krugman notes the appearance of a new type of force on the corporate scene, the investment banker. Henry Kravis of KKR, “made his fortune not by building a productive enterprise in the usual sense, but by mediating in the reaarrangement of existing firms’ ownership.”

There is a difference between those who created whole new industry segements, like Apple’s Steve Jobs and Lotus’ Mitch Kapor, and these new robber barrons, who instead of meticulously arranging vertical integration over decades or pioneering new productivity, were able to amass fortunes in a matter of weeks by orchestrating large deals and realizing large paper gains from perceived improvements in efficiency.

Two fundamental shifts occurred in corporate culture to help foster these changes. Control shifted from original management with a presumed better long term view, to external management with more investment minded motives. There was also a shift away from equity finance to more debt based models.