PHP Objects and Sessions

December 11, 2008 – 1:24 pm

We stumbled across an interesting issue at work today with the Zend Framework and objects.  We’re working on a filter for a series of reports that carries over from page to page and in the process of development, decided it would be best to move this from page to page within an object.

The error we were receiving while doing so however was “The script tried to execute a method or access a property of an incomplete object.”  Doing a bit of reading up on php.net, it turns out that php serializes an object, then when the session is started, it unserializes the object.  You won’t actually find out there’s a problem until you call a method that is supposed to reside within the object.

The work around for this problem is loading the class into memory before starting your session.  In our situation, we’re running the Zend Framework which start’s the session on it’s own and it seems unsensible to modify the Zend libraries but we still had a problem with an incomplete object.  Thus on my path to finding a way to work around this problem, I created class.cow.php.

Read the rest of this entry »


A moment of clarity…

October 30, 2008 – 7:54 am

I always seem to hit these moments of clarity. Where I’m currently at in life, and usually know where I will take my life from that point. The odd part is I’m at a point of clarity and don’t know where I should go. I live my life largely by logic, and the direction I feel myself wanting to go doesn’t match the logic. Two plus two makes five right? This is another one of those things that even though I’ll probably keep my thoughts to myself, I feel like I need to write about it. Odd isn’t it? In a way the whole purpose of webninja was for me to have a place to be a mental dump. Somewhere I could write about anything I wanted, be it music, code, design, my personal life, cars, etc.

This is a problem because I feel as though I’ve lost focus with the site. In a way I’ve decided I wanted to keep webninja to code oriented things but the personal life bleeds through. The thing of it is, if I write about cars, I know the majority of the people reading this wont care. If I write about code, the car audience won’t care. Music? Well I enjoy both hip hop and electronic and those genres don’t generally cross.

The funny thing is, I took a look at my stats and really I don’t have an audience. A few tech friends visit, but I don’t really advertise the site either. So I’ve decided I’m going to take a new approach and just write about whatever is on my mind. If I think something is cool, I want to try to write about it.

Although to get back to the original point, I still can’t write about everything I’d want to. If I’m frustrated about something with friends, I can’t exactly write about it here. Eventually I’d like to think most of my friends find this site at one point or another, it’s just a matter of if they come back. I’m guess the latter is true due to lack of updates. So I guess I should change that.


somethings are funny just to me

October 24, 2008 – 11:12 am


i’ve found it!

August 11, 2008 – 12:03 pm

I was on a training session last week with a company for data cleansing software we purchased from the company he works for. I love the chance to have a discussion with other tech people, specifically ones that have their head on their shoulders. With Brandon’s departure, I find myself having less of these conversations at work. Over the years, I’ve come across few but usually have excellent discussions about other programs. Vincent from Spillman introduced me to Beryl (now Compiz Fusion), and just recently, Rick from matchIT suggested a program that will probably change this website specifically.

In my last post, i made mention of wanting a utility that does it all for me. lets me take a screenshot, crop it, add a border, then upload it to my ftp. The Jing Project has completely met all of my expectations when it comes to this solution. Jing comes from TechSmith, the company that created the popular screen capture program SnagIt. It’s a great application but comes with a $49.95 price tag that makes it not worth it to me, let alone the average consumer. Instead, Jing is totally free. I assumed there had to be a catch somewhere, but my up front assumption is TechSmith is considering ways to make an application free for the home user, and get away with something such as advertising when images are linked to. At the moment, there’s none of that either.

I’m getting ahead of myself though so I’ll start first my explaining how it works. You have 2 options, an annoying (to me at least) sun orbital at the top of your primary screen, or you can set a hot key. Personally, I’m using Control-PrintScreen. Upon hitting the key combination, the screen is grayed out and you draw a box over the area. I would have loved to show a screen shot of this, but print screen wouldn’t dump this to clipboard. After you pick the area, you decide image or video (which creates an swf file). Next you get this screen:

Now you may have noticed the FTP highlighted. With Jing you have the option to create a free account at Screencast.com with 2 gigs of storage, or dump it to your flickr account, ftp, or straight file. Since I’ll be using it for ftp I predefined my login info, where I wanted my screenshots to go, etc. Then you have multiple choices. The first icon uploads the file and copies the direct link to your clipboard. The second copies an embed link (think <img> tag, which you can also change for example if you wanted to us bbcode [img] tags) The third saves to disk, and the last option puts it in your clipboard. Along with this you can perform small changes such as creating a text label, highlighting areas of the screen shot, or even creating a frame (like the above screen shot)

So in other words, I’ve not simplified posting screenshots tenfold. I wish I could find applications like this every day.


It’s funny to watch the peaks and valleys

July 31, 2008 – 7:18 am

I go from not posting at all, to posting a ton.  Then drop off again consistantly.  I suppose my stats would spike more if I continually updated.  I think part of the problem is I want to take the time to effectively write whatever I post here, but sometimes that holds me back.  You know, life gets busy, etc.  I’d be interested to look at my past history of the last 5 years of webninja and see what my posting frequency is based on month.  Perhaps I post more in the winter?  This seems like a common theme for people I know.  We’ll post every now and then in spurts.  Maybe I’ll change that eventually, who knows.

I think part of the issue is ease of use.  I’d love to post images more but that requires opening up photoshop, tweaking any images I want, saving it, then uploading it to an ftp.  It’d be nice to have a screen capture application that has borders, does cropping, resizing, and saves directly to ftp.

I’ve been experimenting with better ways to organize my digital life and get things done faster.  For example one application, Launchy.  It’s much like QuickSilver but on PC.  Thus far it’s pretty useful.  In short it indexes certain things like applications, and directories you configure it to, then those are accessible by pulling up it’s search screen with the windows key and space (also definable).

Then once you find what you’re looking for, hit enter and its loading.  You can also add certain triggers, for example you could create one that would allow you to type yt dramatic squirrel and having it automatically search youtube for a dramatic squirrel.

Anyways, beyond that, I have a bunch of really exciting coding projects I’ve been working on which I’ll be sharing here soon hopefully and with Brandon leaving, I’ll need someone to share them with.


Can you smell the summer air?

May 15, 2008 – 5:33 pm

Well it’s about that time of year again. I’ll be taking the doors off of the Jeep in no time and hopefully getting the Focus running again. New tires, a bit more boost, it should be fun. Along with this will be more grilling. I really want to try to grill lots of chicken this summer and try to shy away some from red meat. Want and will are 2 different things though and I love steaks and burgers. I’m still trying to figure out how I’ll be managing the summer but I’m up to the challenge.

We’re going to be doing another trial run of the PodCast soon, we’re still working out some things such as topics, focus, etc. Oh and probably a name eventually. Along with that, I’m hoping to start doing more writing akin to my previous post about PowerSet. I’ve been trying some offline blogging utilities, currently I’m writing this post in ecto on my way over to Sean’s house. If you happen to be familiar with a decent offline utility, please let me know. Some day I’d like to move to the bay area and this could be a good start at getting my foot into the door out there.

On another note, I’ve been using Twitter a lot lately. On the new layout I have my twitter updates on the sidebar however until I get around to that, you can see what I’m up to at www.twitter.com/trahma. I’ve been using the Twinkle iPhone application as well so quite frequently you’ll see pictures attached to my tweets.

And with that, I’m pulling up to Sean’s house, time to steal his WiFi and post this.


Google really rules my life.

May 13, 2008 – 10:05 pm

I think I’ve made mention before just how much Google has changed my life. So many times during the day a quick command-K or ctrl-K gets me any of the data I’m looking for. It’s odd to see myself search Google versus other users, it seems as if my brain has learned which keywords work best for my query, without me needing to think.

Unfortunately, lots of the world isn’t like me. Most people don’t think in queries, and which words are most likely to be indexed. Enter, Powerset, a company that is working on developing a search engine targeted towards parsing the human language. While I can applaud them for trying, I have to admit I was skeptical if they can knock google down. It’s time to do a comparison.

Read the rest of this entry »


Projects projects projects…

May 13, 2008 – 8:29 am

So life is pretty busy as usual when Summer hits.  Lots of things are on the horizon for me and I’ve more and more turned into a techie again.  In June, I’ll return to downtown and be djing every Friday again so it should be interesting to see how this all plays out.  Managing work, side web projects, a dj / promo crew, and having a girlfriend will certainly be quite the task.   That’s why I have the jeep though, top down, doors off.  Freedom.

On the project note, Brandon, Chrispian, and myself have decided we’re going to step into the world of Podcasting.  We ran a technical test last night and things went well.  I think we’ll probably have one “pilot” episode of sorts to see how things work out, then launch from there.  We’ll most likely target the tech sector, with a dash of geek.

To handle my voice, I picked up a Microsoft LifeChat VX-3000 headset and am actually quite amazed with the quality.  I wore the headset for about 2 hours and never really felt like it was cumbersome.  On top of that, the clarity is top notch and it works well with Leopard.


more time past..

April 16, 2008 – 7:29 pm

So much has gone on in the past month and a half.  Not to mention I have plenty of things from the prior to my last writing which I wasn’t necessarily talking about.  I really would like to get to finding more time for myself again.  It seems like more and more the rush of life has caught me in its wake.

From work to to my personal life, it seems like I have no time and I’m always rushed.  Work has been busy as usual, I’ve come to learn the crunch time doesn’t end.  It has it’s ups and downs, but in general I’m still fairly happy with my job.  There are so many unemployed programmers out there, or even worse, those working tech support.  I’m glad to say every day I get to write code.

My life outside work has consisted of djing, planning what Nascent Numen is doing next, and recently my new girlfriend.  I try not to talk about my personal life as far as relationships go here but occasionally I make mention and this is one of those times.  Suffice it to say, I feel like a lucky guy.

I recently came back from a trip to Washington D.C.  I played a couple dj gigs out there and also was able to do plenty of site seeing.  I took quite a few pictures while I was in D.C., and played the role of tourist.  As usual, you can see the pictures on my Flickr account.

So in an effort to try to grasp for more personal time, I’ll be making frequent stops to Caribou Coffee or perhaps other places with free WiFi once I start searching.  Also I’ve been slacking on my gym membership.  I pay monthly for it, I need to utilize it again.  I’m a bit behind on my initial target goal so I’ll have to create a new one.


Would it help to say I’m sorry?

March 4, 2008 – 5:25 pm

I’ve been pretty busy with life lately.  Work has been chaotic as usual.  While I’ve been told it’s going to die down once the initial rush of bridal season hits, I don’t feel as if it has.  It seems like no matter what I’m working on that’s computer related lately has been a fight to a degree.  At work I deal with the horrible code from our previous developer that is slowly going away.  I rewrite a major portion of our call center application and we’re putting it through testing now.  I’ve also been working on a new layout for the site.  I figured I can’t let all of the time I’ve wasted in photoshop go too far to the wayside and feel dirty using a pre-made layout.

Along with this, I’m intent on writing the new site sans-tables and it’s proving a headache getting browser compatibility to work.  As would be expected, it looks great in Firefox and Safari but Internet Explorer likes to add random spaces all over the place.  Then again I could just be creating my own problems by writing my own CSS hacks to make the site work.  As it is I still have a few issues with spacing not being perfect in IE vs anything else but I’ll resolve those issues later.  In other words I should have the new layout up soon.  I’ll probably try to find a decent tutorial on CSS design and maybe run with that.

Beyond that, life has changed a lot, mostly for the better.  I have a ton of code I’ve been working on generalizing so I can share it here, most of it involving the Zend Framework to some degree.  I haven’t been pushing DJing as much as I was in the past, but I’m heading out to Washington DC to play in March so I”m pretty excited for that.  I’ll write more soon as I have time.