Posted on

Parallel Processing in PHP?

So we have this requirement in our project to start up a “thread” of execution asynchronously.

First we had to come to an agreement that it can’t be done with multi-threading, but instead has to be done with multiple processes.  We can’t have our controller executing a thread, and waiting around for it to finish in memory.

This will leave a process living on the system that we don’t necessarily need. Although now that I think about it, it may have the visual effect of fulfilling our requirement, its not a good overall design.

What we really need is to start an external process that will execute not as a child of the current process.So we have tried it a couple of different ways.

pcntl_fork which doesnt work with Apache php module, so we have to redeploy as a FastCGI.

system()  call sending the shell into the background, which seems to be not working right now.

And the two things I coded in but never tested, proc_open and popen.

Now we are not trying to achieve true parallel processing, and utitlizing the computer’s multiple processes. Just a simple outside process.

Stay tuned, we’ll let you know.

_______________

The answer was popen with &> dev/null & in the command string.

Posted on

CoD MW2

Finally beat this game.
I was avoiding it for the longest time. But I have this badass new Dell display, and I got the game when I worked at G4 (thanks guys for hooking that up!). So I finally mounted the ISO’s and installed the game.

I was not disappointed! I passed the whole single player in 2 days time. And now I WANT MORE! I don’t mind being behind in the franchise. It gives me lots of content to burn through when I do go back to gaming.
Don’t get me wrong, I played individual levels here and there. An xbox controller with the level “No Russian” was thrust into my hands by cousin. But this was the first time I played the game all the way through from start to finish.

I real cinematic experience. Quite addictive.

Posted on

Raspberry Pi First Boot

I bought three 64GB SanDisk microSD cards this week.
I figure, one for my wife’s phone, one for my new underwater shock resistance travel cam, and another one for the Raspberry Pi.
These microSDX come with SD adapters. So I thought it would be perfect. I download Raspbian, and install it on a SD card with UnetBootin, and then put it in my raspberry pi, power it up and NOTHING!
I was pretty shocked, there were multiple points of failure here. I had no choice but to try alternate methods.
I saw on adafruit that they sell a kit with SD / cables / case for 105USD. I felt remorse not being aware of this earlier, as I glanced on my Pi tangling off the edge of my desk, suspended by an HDMI cable.
“Definitely worth it,” I thought, “Maybe next time.” That is if I can get the current investment to pay off in some form of achievement. I had no choice but to venture worth and attempt yet another method.
I tried to download Fedora’s image installer utility as outlined by the adafruit tutorials. Alas, to no avail. The utility software could not recognize my external devices. A few horrible thoughts later, I found the solution  back on the pi’s flagship site, where I downloaded the OS in the first place.
They pointed me to an image writer utility on launchpads website. So once again I tried loading the Raspbian image file unto the microSD card. It loaded rather quickly, and I stuck the SD card in the Pi.
I powered it up and I was super excited, watching the green light flash for the first time, and the OS load up on the screen, from my dangling Pi. 🙂

Thinking back to why I didn’t find the solution on the Pi’s .org site in the first place. I realize I depend on google too much!
I googled each task separately, and went with the results, looking for a quick fix each time.

Posted on

Disney Movies Online

So sometime in 2011 I had the pleasure of working on DMO.

It was a short run, the product was being discontinued.
And today I received a communciation confirming that:

Dear Guest,

As a reminder, Disney Movies Online is closing on December 31st. You can continue to stream your existing movies until then.

You can still enter Magic Codes on DisneyMovieRewards.com, and Disney Movies Rewards services will not be interrupted. You can also continue to use your Disney member name and password to access and enjoy other Disney websites. In addition, if you purchased a Disney Combo pack with Digital Copy, your Digital Copy can still be transferred and watched from either iTunes or Windows Media Player. Please visit our FAQs for more details.

We truly appreciate your support of our service—we have enjoyed serving you!

Best regards,
The Disney Movies Online Team

Posted on

Infuriating Dell Web Pages

So this Christmas I feel like complaining about Dell.
They totally shafted me when it come to delivering the 3D TV I bought a month ago from their website.
It still hasn’t arrived.

And tonight I was doing a search for a firewall, vpn, hardware solution and bumped into a page that just infuriated me even further:
http://www.sonicwall.com/us/en/SSL_VPN_Platforms.html

Its another “Product Detail” page with obfuscating BS instead of real product details. I can’t tell you how many times I have bought stuff online only to be surprised at what arrives. Usually the #1 issue is that Product Images don’t match the actual product.

For example the 29  inch UltraSharp monitor I got. Its widescreen as heck. But on the product detail page they have a photo of a completely different monitor.
This sonic wall page doesn’t even have a picture of any hardware or pricing information.

I had more pertinent information when I was looking at the SERP’s.
Alright let me call these clowns and find out what happened to my TV.

 

Posted on

Innovation through Miscommunication

Funny story right. A friend of mine is working with some interesting people right, and he tells me about this graphic/web designer, who was asked to make a drop down during the daily standup. So my friend is telling me about how he is doing a total facepalm cause this guy is estimating the addition of a drop down as an eight hour task, right. I mean, that was all that was there, find a space on the page, design a niche spot in photoshop maybe, where this drop down will go nicely and contain some hard coded values. I gotta say, I agree with my buddy cause you think drop down you think select tag. Bada bing Bada boom. Heck the wireframe had a freaking select tag based drop down in it. But apparently the designer didn’t quite get it, so it took him a while to even answer back. He took like 5 minutes to make sure what he was supposed to do, looking all confused and the rest of the team totally accepted his estimate. So about 8 hours into his task, it becomes apparent that he is actually making a fly out pane that drops from the top! And my friend tells me its beautiful. With a great design, and nice tween, a great value added to the project.

But who would have thought it, that what someone else might interpret as a miscommunication, is actually innovation!

Posted on

Raspberry Pi

Just got my Pi in the mail. So I open the box and quickly began to wonder.
“How the F*ck do I power this thing up?”
I ordered the darned thing like 3 months ago, so I sure as hell don’t want to fry it.

I am planning on turning my old LCD TV into a Smart TV with a bit of duck tape and some luck.
But the best laid plans of mice and men matter not when you can’t find the right power adapter.

Sure, sure, it uses micro USB you say. But seriously,  do you know how to power it up?

Posted on

Working with SlickGrid

Got a chance to play around with SlickGrid at work. Honestly don’t think I was seeing its full potential.
There was a lot of bad code written on the page, duplicate body tag, all kinds of horror.
Work is interesting, this time around. Not everyone is 1337 like on my last team.

So I have been tasked with setting up a DataTables example.
I think TableKit is also cool. I first used it back in 07.

 

Posted on

A Comment on Phil’s “laravel-is-awesome”

I guess you can’t compare a platform like Grails with PHP. But if your writing a “large scale application” or what some might call, Enterprise, then is it necessary to have support for simple web hosts. I don’t see how being able to deploy everywhere is something that an Enterprise application has to even be concerned with. Truly being bored with PHP might mean that you take a look at a newer language, one that eliminates the need for awkwardly typed characters and simplifies development. Laravel actually reminds very much so of Grails. Groovy is awesome. Its leap over Ruby, and lands on the JVM. And lets not mention Ruby as an alternative to PHP, because that language makes a mockery of what beautiful code should look like. Basically I think we should not say ‘Laravel is better than CI’ but that PHP is not going into the right direction at all. Backslashes for namespacing, really?

Posted on

SVN Time Lapse View

This software is, http://code.google.com/p/svn-time-lapse-view/,  a total fail.
At least for me, I couldn’t get it to work at all!

I am trying to find the difference between revisions of a file. And remembering Perforce’s time lapse view, I quickly tried SVN’s revision graph feature, hoping it would be similar. No dice.

I quickly googled svn time lapse view, and surprising found a software right away.
But following the directions, and trying to load file to review, I ran across nothing but error prompts.

Please guys at CollabNet / TurtoiseSVN, lets roll this feature into SVN already! How can anyone survive without it. I don’t know. Just incredibly disappointing.

________

Update, I have found where to put the revision number with the diff in turtoiseSVN, and other ways to get the comparison’s I need of different file revisions.