Jan
27
2012

PHP Cloud and education

Tags:

One of the problems that anyone who has taught a programming class will know is that the worst part of the class isn’t bored students, inane questions or poor material, but, rather, getting started.  I delivered Zend’s training for 3 years (myself among several others) and I can say, without reservation, that one of the most consistent impediments to the classes were getting things up and running.

Getting students to install stuff on their local desktops was often problematic.  They might have some conflicting software that would need to be removed (with the corresponding pulling of teeth).  There might be restrictions of what they could and could not install.  Or they might not have had the skills to set up a working environment on their local machine.  So we basically had to support any kind of scenario

To get around that issue we started creating VMWare instances.  Lots of them.  And it ain’t easy either.  You have to keep all of the OS instances up to date along with the IDE.  And once you’re done you need to zero out the free space to maximize compression to keep the VM’s from becoming quite large.

In short, managing coursework is not necessarily as straightforward as one might think.

If you’re in this predicament you might actually want to take a look at phpcloud.com. With the DevCloud what you can do is set up a container that has all of the example code, scripts and anything PHP in nature and take a snapshot of it.  That snapshot includes things like database content.  Students can then take that snapshot and create their own container out of it, without having to install new software, manage an environment that they may not be familiar with or do tasks that they don’t have the skills for.  You get the full PHP environment without any of the hassle plus some additional goodies for free that you’d normally have to pay for (like Zend Server).

So, if you’re doing any kind of training or class work and don’t like wasting time helping people get an environment up and running on a machine that you’re not familiar with, check out phpcloud.com.  It’s currently in a technology preview state but it’s pretty robust.  And the cost?  It’s free.  And we expect there to be a free tier as far into the future as we can see.  Check it out.

Here’s a video where I show how you can use snapshots.

Jan
27
2012

Why are you part of a software community?

I’m thinking about posting a poll in a couple of days about software communities and I’m looking for some input on some of the responses.  I have my set of possible responses, but I’d like some input before posting the poll.  So, if you have some ideas, please post them in the comments.

The question is

Why are you part of a software community?  or How do you participate in a software community?

Notice that I didn’t necessarily limit this to “open source”.  Clearly that’s a big part of it.  But there are a good number of robust communities that are not based around open source.  Adobe, Microsoft, IBM all have massive communities.  I know that for those of us in the open source realm that’s a little hard to understand (one of the reasons why I’m doing this), but it’s true.  Some of the ideas I’ve had so far…

  1. I like to provide input on the direction of the software I use
  2. I have some free time and I like to code
  3. The software helps me earn a living
  4. I am socially awkward and this is the best I can do
  5. I like hanging out with nerds
  6. I want to try new things that I don’t normally get to do

What about you?  Are there other responses I should put in there?

Jan
19
2012

High Scalability – Is it time to get rid of the Linux OS model in the cloud?

High Scalability – High Scalability – Is it time to get rid of the Linux OS model in the cloud?.

I’ve sometimes thought about where we are and where we come from in terms of programming.  Programmers have this habit of falling for new and shiny things.  So I read this article with some interest as they were asking a couple of interesting things at the end.  Namely,

 Do we need a device driver layer? Do we need processes? Do we need virtual memory? Do we need a different security model? Do we need a kernel? Do we need libraries? Do we need installable packages? Do we need buffer management? Do we need file descriptors? 

My answer, in short, would be a big “yes”… for the time being.  Legacy may be a bad word in some circles but it is simply where we came from.  We could not have gotten here without going the way we came.  Do we need a device driver layer, virtual memory, kernels, etc?

Yeah, pretty much.  Retooling is a massively, mindblowingly expensive operation if we were to remove those.  So, in the short term (months-years) and medium term (years to decade), I don’t think you’ll see a lot of that stuff go away.

But that doesn’t mean we shouldn’t look at ways around it.  I read an interesting article a while ago that was talking about how there is not a single current programming language that will be able to run on the processors of 10-20 years because there is no language that can handle the level of concurrency that we will need to deal with.  Hopefully I’ll have retired a rich man by then so I don’t have to learn how to do it.  But at some point, our systems are going to be run differently.

I think that this is a great opportunity for the cloud.  You can actually ramp up new ways of thinking quite easily in the cloud.  I believe this to be true (right now, at least)  because you can easily provision and de-provision systems that are completely separate from your end users.  What someone could do is build an AMI (as an example) that implements this new shiny way of doing things and it would not have to be wide spread.

Actually, I think that one of the biggest revolutions in the software industry has been the API revolution.  What that means is that you can build part of your infrastructure on one technology while leaving the rest on another.  You don’t need to commit to a technology.  Given that we really don’t know the world will look in 20 years, that is probably a good thing.

Jan
19
2012

On SOPA and copyright

Ugh.  I didn’t want to write a blog post about this, mostly because I intend to stay away from political issues on this blog.  I hate politics and I really hate that send enough money to the Federal government to buy a new car each year so they can spend it on things that get their names on it.  I would much rather write about software and music, which is where my passions lie.  I dislike the administrative state but begrudgingly accept that some freedoms must be curtailed to ensure a civil society.  If you disagree with this you are either a totalitarian or an anarchist.  Since you are probably not one the only question is where on the slide do you lie concerning liberty and control.  I tend to be more on the liberty side.  And while I don’t want to write about things that have political ties, if I don’t write this post I’ll be trying to keep myself from writing it for the rest of the day.

Concerning SOPA and PIPA, I am against both.  I am against them primarily because I don’t think that the government should be enlisting private enterprise, large or small, to be its eyes and ears.  If you have evidence, bring it to court.  Don’t force private organizations to do your dirty work.

But the main reason I’m writing this is not because of SOPA but because of a blog post I read about why the author is a pirate.  He claimed that the laws were written to get people like him, which it probably is.

A little background, first.  I hold a few copyrights.  I’ve written a book on PHP on the IBM i and a book on crazy things to do with PHP.  I’ve also release an album and am working on a second, when I have the free time.  In other words, I have some skin in the game.  Not much, but a little skin.

That blog post pisses me off.  Why?  He does what a lot of people do nowadays.  He dislikes the rules and, with a wave of his hand, declares that they are stupid and that he won’t follow stupid rules.  He gives several reasons for this.

  1. Copyright law is broken
  2. He wants to be free to enjoy content however he likes
  3. They’re too expensive
  4. The original artists don’t get enough of the revenue
  5. Pirates actually spend more money on music

I will address each one indiviually

1. Copyright law is broken

Answer: Do you have the right to copy?

2. He wants to be free to enjoy content however he likes

Answer: Do you have the right to copy?

3. They’re too expensive

Answer: Do you have the right to copy?

4. The original artists don’t get enough of the revenue

Answer: Do you have the right to copy?

5. Pirates actually spend more money on music

Answer: Do you have the right to copy?

Notice something?  I am quite confident that each of his assertions are completely irrelevant.  Quite simply, if you do not own the copyright you do not have the right to copy.  He also demonstrates a misunderstanding of what copyright is.  I quote (which I am doing legally as quoting like this is what fair use actually is)

Let me give you an example of how copyright is meant to work. If I produce a painting and hang it in a gallery, copyright ensures that no one takes a photo and sells or prints copies. If I produce official copies of my painting and sell them, you are completely free to do whatever you like with your copy. If you want to deface it, you can. If you want to give it to someone as a gift, you can. This is what your money is meant to buy you.

Actually, he misses it completely.  With any form of copyright you can do whatever you like to your copy.  But what you cannot do is make copies of your copy.  This is because, unless the copyright holder has given you permission, you don’t have the right to copy.  Regardless of the medium, it is illegal to copy it.  When you buy an album, or a movie or a book, you do not own it.  You either own the copy or you are being granted a license.  You may hate that very little of the money goes back to the artist, but you know what?  The artist SOLD their copyright to the label in exchange for the label to spend more money on them than they were worth to promote  their crappy band.  The label also spent gobs of money to record them in a freaking expensive (and freaking cool) recording studio.  Is the label a money grubbing, exploitive enterprise that is looking for a quick buck?  Probably.  But who owns the copyright?  The money grubbing, exploitive enterprise.  In other words, NOT YOU!

But isn’t copyright law broken and unable to handle the 21st century?  Yes, on the first, no on the second.  ALL law is to some extent broken.  Capital crimes, tax law, copyright, they are all flawed.  But that does not mean they are optional or that they are irrelevant because some new circumstance has come about.  Would I like to “own” the music I listen to?  Sure.  But I don’t really care.  I have a music subscription that I pay $10 a month for and I can listen to butt-loads of music as much as I like.  OOooooo, I don’t get a physical disk.  Who cares?  I want to listen to music and I don’t give a crap about some shiny disk.  If artists don’t get paid, they won’t write great music unless they have a full-time job and write music in their spare time at 5:00 in the morning like I do.

What it comes down to is that piracy (software, music, movies, whatever) is a problem not so much because it costs money but because people have no problem copying other people’s work without paying (stealing, in the layman’s terms).  There is only one question that pirate needs to answer.  ”Do I own the rights to copying X”.  If the answer is “no”, no other justification is legitimate.  Should they have the rights to copy as they see fit?  Maybe, maybe not.  But the only question that matters is “do they?”

To quote the article,

That is why I pirate: When I buy something, I want to be free to enjoy it however I like. I don’t want to be forced into “borrowing indefinitely” or only being allowed to play a movie through iTunes, on a computer.

To which I respond, “Unless you own the rights to the work it doesn’t matter what you want.”

In other words, suck it up.  I gave up piracy 15 years ago when I asked myself these simple questions and my answers came up lacking.  And you know what?  I survived!!

And heck, most media these days sucks and isn’t worth copying.

Jan
19
2012

Watch 12 Cute Dogs Bark The Star Wars Imperial March In VW’s Super Bowl Ad Teaser

Watch 12 Cute Dogs Bark The Star Wars Imperial March In VW’s Super Bowl Ad Teaser.

Jan
17
2012

Always on top Webcam

I’m going to be doing a video critique of some source code later on today and the people being critiqued wanted to have my mug showing so they could see the looks of incredulity (I am kidding, of course).  So I did some looking around to find something that would keep the webcam software on top of the other windows.  Turns out there’s not much there or there was some kind pay mechanism and I really didn’t want to pay money to see myself in a webcam window that stayed above the other windows.

So, me being me, I decided to use our Flash Builder for PHP IDE and write what I needed.  It’s nice and simple.  Here’s the code.

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
 xmlns:s="library://ns.adobe.com/flex/spark" 
 xmlns:mx="library://ns.adobe.com/flex/mx"
 alwaysInFront="true"
 creationComplete="initCamera()">
 <fx:Script>
 <![CDATA[
 import mx.collections.ArrayCollection;
 import mx.rpc.events.ResultEvent;
 
 protected var video : Video;
 protected var resolutions : Array = [{
 height: 480, width: 640
 },{
 height: 600, width: 800
 },{
 height: 768, width: 1024
 },{
 height: 720, width: 1280
 }
 ];
 
 protected function initCamera() : void {
 if (video) {
 videoDisplay.removeChild(video);
 }
 var camWidth : int = resolutions[cameraRes.value]["width"]; 
 var camHeight : int = resolutions[cameraRes.value]["height"]; 
 video = new Video(camWidth, camHeight);
 var camera : Camera = Camera.getCamera();
 camera.setMode(camWidth, camHeight, 30, true);
 video.attachCamera(camera);
 videoDisplay.addChild(video);
 width = camera.width;
 height = camera.height;
 }
 ]]>
 </fx:Script>
 <s:VideoDisplay x="0" y="0" width="100%" height="100%" id="videoDisplay" />
 <s:HSlider bottom="10" width="17%" change="initCamera()" horizontalCenter="-1" maximum="4"
 minimum="0" value="0" id="cameraRes"/>
</s:WindowedApplication>

Here’s the AIR file.  If you have AIR installed you can easily run it.  Here it is with a Windows installer.

Jan
17
2012

Call for webinars

Just wrapped up a call working on our webinar schedule for the year.  We’ve got a bunch of ideas but we’d like to also get your input as well.  Yes, I know y’all want ZF2 webinars.  We have that down.  I would also like to do an HTML5 and mobile webinar but I need an SME (Subject Matter Expert) for that.  If you know anyone I’d love to hear about it.

I would also love to have webinars on how to use various API’s, even if there is not native PHP support.  So, what kinds of webinars do you want?  Put your suggestions in the comments and let’s see if we can get some good ideas going.

Also, if you have a great topic, or know someone who would give a good one, let me know about that too!

Jan
11
2012

New album coming out

Right prior to ZendCon 2010 I released an album called Coronal Loop Safari.  It was a decent album, but not one that really “fit” well with the style that I find most compelling.  The album was a little “rock-y” but mostly dance-like.  Given that I’ve been a metalhead since the day of my birth the album always seemed a little light.  I like a little grit.  I like it to hit my chest and say “I bet you could beat up Chuck Liddell right now” to which I would reply “Hell yeah”.

Part of the reason for that, I believe, is the gear.  Since I work on Windows I work with Roland’s SONAR Producer.  Don’t get me wrong, it’s a great software package, but the synths that it provides tend to be more “dance-y”.  This time around I’ve been buying up a couple of synths from Native Instruments, specifically 3 products from Heavyocity called Evolve and Evolve Mutations (1 & 2).  They are more cinematic in nature (think Hans Zimmer) and give me a lot of really nice, dark tones and chest-pounding percussion.  Given my German/Russian background I also seem to tend towards deep orchestra tones and so I also purchased Session Strings Pro since my dream sound would include a full orchestra and the Vienna Symphonic Library is a little out of my price range and given that I have a very full time job I don’t have the time to orchestrate the whole thing.  The last link was Razor, also by Native Instruments.  It’s an additive synthesizer and it gives me some of the aggressive tones that I really like with some great modulations to play with.

So far I have about a half dozen or so instrumentals done and I’m really quite pleased with it.  The pieces are what I like.  They are heavy.  There’s some good solid beats in there.  Some wild synths and some hair-raising guitars.  It’s also cinematic.  I like music that changes throughout.  I like it when music starts soft and then hits you hard enough to cause cardiac arrest.  Similarly I like it when music starts out intense but has brief interludes of solitude that let you catch your breath.  While I still have a few tunes to knock out I am really getting excited about this.  Once it is done it will have been about a year and a half since my first release where I gained a baby through foster care, lost the baby (she went to a family member) and gained three more foster children who all have their unique needs.  Finding time to write has been hard.  But the writing is worth it.  I don’t recall the author, but someone once said “I don’t like writing a book, but I love having written it”.  In other words, the process is difficult.  Triple-y so when you lose a baby.

The music stopped for a while but it’s starting to come back, and hard.  This time around the music I publish will be closer to my soul.  It will have highs, lows, change-ups, slow downs, accelerations with catchy beats.  My best work so far, in my opinion, and something I am really looking forward to sharing.  It will still be a few months, but I’m coming back.  And this time you better wear a cup.

Now to go kick Chuck Liddell’s butt.

Jan
06
2012

Zend Server 5.6 is out

Zend Server 5.6 is out.  I’m actually pretty stoked about this release.  Here’s a few reasons why.

  1. Zend Server CE now contains the full Zend Server stack.  Why do I find this exciting?  Because the upgrade path from CE to the full version is stupid easy.  That means you can try out all of the features in Zend Server and if you don’t want them, just let the license expire.  I call it a gateway drug.  Seriously.  Get Studio or PDT and try the deployment feature.  If you’re not using it you’ll ask yourself “why am I not doing this?”
  2. All of you Mac users can finally stop bitching and complaining about the lack of Mac support.  We don’t (and probably won’t) support Mac for production (does anyone besides Apple actually use their server products in production?) but for dev work you now get the full stack on your Mac.  This is not GA yet but will be later on.  If you want a preview release you can go to http://forums.zend.com/viewtopic.php?f=8&t=26873.
  3. Fault tolerance in the Job Queue through MySQL clustering.  In clustered environments job queue information has moved from local storage to remote MySQL storage.  So you can have a single MySQL server sitting there, a clustered setup or RDS or some other cloud-based DB, it doesn’t matter.  If it can be accessed using the MySQL drivers then it can be used by the new Job Queue.
Jan
05
2012

Debug tunneling with the Zend DevCloud

Tags:

Found out something interesting.  If you’ll notice there are no blog posts on how to debug PHP with the DevCloud.  That’s because while I can get it to work quite easily with Studio I was having a bear of a time getting it to work with anything else.  Since Studio worked I knew it was NOT the DevCloud’s fault, but had no idea what could be going on.  Turns out that the version of Putty that you have for setting up the tunneling matters.  If you have version 0.60, like I did, debug tunneling will not work even though DB tunneling does.  You need to have version 0.62 for debug tunneling to work

Switch to our mobile site