DEBUGGED: Marc's PHP, NuSOAP, and SOAP

For the more-programming inclined.

The rest of you, you’ve been warned.

So I’m trying to implement this google response page using the Google SOAP API for this new teacher’s conference for the state of Illinois. The search needs to be able to search through two different databases (programs and resources) and the site itself. The reason I’m trying to do this in the deprecated fashion and not the new AJAX method is that a) we need the customization and b) we need the accessibility.

Lots of things have been going wrong, and I’m here to share with you the pains of my world this week.

First mistake was that I didn’t know the PHP Apache Module for Mac OS X that Marc Liyanage puts up doesn’t come with “display_errors = On” as default (Step by step way to turn it on here). It kind of makes sense, but since I haven’t really done PHP programming while using my own laptop as the dev box, I didn’t know of the existence of this issue. It also doesn’t help that my live box is also a Mac OS X, and I was completely confused when I didn’t get a single error when I started typing random characters into the .php file.

Heck, I started to doubt the validity of the “include” and “require” functions… and found out over and over that it works, just not for this soap class file I was trying to include. When I found out that there was indeed an error in executing the SOAP call after enabling display_errors, I was met with this lovely error:

“Fatal error: Cannot redeclare class soapclient in /Users/jk/Sites/google/nusoap/nusoap.php on line 7240″

You’ve got to be kidding me. After a quick google search, I find that NuSOAP is having issue with PHP 5:

There seems to be a clash of PHP5 build-in soap class and the nusoap class. Simply rename all occurences of “soapclient” in all 10 nusoap files into “soapclientw” (or whatever instead of “w”) and for me it worked.

YES. Now it should work right?

NO.

Yet another error, this time was something completely different. It looked like it was looking for a WSDL file (looking for the element), but wasn’t finding it at the http://api.google.com/search/beta2 address… I think. I’m still not sure what the problem is.

So at this point, I decide to go another route. Instead of using NuSOAP, let’s go ahead and install the PEAR module for SOAP. Of course, I have to update PEAR itself, because it was out of date. Dependencies… install one, update the other… okay, installed. Nothing. Nothing happened again.

Then I decided to restart the apache server.

> apachectl restart

Thank goodness I didn’t type sudo in front of that… or I would have an angry mob of college students outside of my office. Whew. But crisis averted… thank goodness.

I have a question for those that know: would restarting after installing the PEAR module do anything? Isn’t it running as a separate process apart from apache? I don’t know… but I guess I have all of tonight to figure this out.

Oh boy, not another all-nighter… Please not another one…

wasdfps

Lent commitment included nothing about games… crap. Games stopped “playing” (Pun! YES! BINGO!) any discernible role in my life maybe a year ago, so I guess I kinda left them out.

Okay, let me vent a little bit, before I go back and start to cry, looking at my code.

Right now, I feel like my code is shooting me in the face. With an AWP. (Oh, I miss those days… sorta kinda… all those wasted hours on a silly game from the 90s…) I have no weapons to speak of. (Do I get points for really bad metaphors, too?) I’m having one of the hardest times figuring out why my “include” and “require” aren’t doing as they’re supposed to be.

Sidenote: Currently working on: Google SOAP calls to customize the Google search page. All I have to do is include NuSOAP. What the heck is going on? (And like half the links to the sourceforge for NuSOAP is down for some random reason…)

Now… Wasn’t That Roundabout

Okay, back to the point of the post.

  • WASD: the four buttons needed for any first person shooter game
  • ASDF: just another ridiculous computer nerd “joke”… I love typing “asdf”…
  • FPS: first person shooter

Add the three together to get: wasdfps. I have no idea why this is funny. In about 30 seconds, I’m going to look back and say, “who wrote this garbage?”.

Regardless, this sucker’s copyrighted JK 2007 style.

Okay, back to work.

Lent Commitments and Goals

I really should have posted this yesterday. But I was struggling with something.

I always thought that Lent was something that the Catholics partook (partaked…? I think partook is right… hmm…) in, and I learned of its existence through learning about history. For me, since it was yet another deed that one had to do, I thought it wasn’t a good thing at all. Oh, how foolish and extreme I am.

But I realized later in life that deeds and faith go hand in hand.

14What good is it, my brothers, if a man claims to have faith but has no deeds? Can such faith save him? 15Suppose a brother or sister is without clothes and daily food. 16If one of you says to him, “Go, I wish you well; keep warm and well fed,” but does nothing about his physical needs, what good is it? 17In the same way, faith by itself, if it is not accompanied by action, is dead.

18But someone will say, “You have faith; I have deeds.” Show me your faith without deeds, and I will show you my faith by what I do.

19You believe that there is one God. Good! Even the demons believe that—and shudder.

20You foolish man, do you want evidence that faith without deeds is useless[d]? 21Was not our ancestor Abraham considered righteous for what he did when he offered his son Isaac on the altar? 22You see that his faith and his actions were working together, and his faith was made complete by what he did. 23And the scripture was fulfilled that says, “Abraham believed God, and it was credited to him as righteousness,”[e] and he was called God’s friend. 24You see that a person is justified by what he does and not by faith alone.

– James 2:14-24

And I see how awesome Lent can be, if used effectively. Now, being the all-or-nothing type of person I am, if I decide to give up something or replace it with something, I want it to be that way for LIFE. And if that’s not the case, I don’t even want to start.

This mindset needs to change. I need to know that even the slightest motion forward is still motion forward. Even the intention of moving forward is better than sitting and wallowing.

As long as I follow through, like a good golf swing, no matter how poor my first, second… billionth shot may be, it’s going towards the hole.

And with that, I’ve used up my horrible metaphor quota for the day.

No More Video Sharing Sites, Movies, TV…

Yes. I don’t know if I can make exceptions to videos that will improve my understanding of subjects I need to understand (entrepreneurship, web 2.0 applications, screencast demos of mac applications…), but I know exactly the types of crap I need to stop poking around for.

This includes Xman. Oh sad… I’ll be missing 6 weeks worth of quality Korean variety show entertainment. It also includes Battlestar Galactica, ATHF, The Office, and any other random shows I started to watch due to the innovation and time sink online video sites are. And to think I was going to start off Heroes…

Wrong Motive: Waste of time, anyway. Might as well kill two birds with one stone by saying it’s for lent.

Correct Motive: Truly, these things are time sinks. Big chunks of time that could be used towards something more useful, be it reading the Word or working. Gotta redeem the newfound chunks of time…

Memorize Philippians

Tonight, I’m taking some time to do some research as to why the heck I’ve been wanting to memorize this book for YEARS. The first time the thought of memorizing a full book crossed my mind was during a retreat in LA. I’m not sure what the circumstance was, but the pastor was talking about memorizing Philippians for some reason. From that point on, I’ve been wanting to do this on and off.

My junior year in college, I had the urge again to want to actually go through with it. A small group co-leader (Karen Seo) and I was going to keep each other accountable. I still remember to this day, meeting up at the Union for like 5 minutes, testing each other if we knew it. At that point, I was able to recite chapter 1 and parts of chapter 2. Then… the dry times known as my senior year hit.

Fast forward to now.

Of all the churches, their contributions (which Paul gratefully acknowledges) are among the only he accepts.

I knew that there was a letter that Paul had written, and only one church that this statement applied to. I just didn’t know which one. I’m not sure why this would make Philippians THE book to memorize for this Lenten season (and it’s not even the shortest book…), but I want to do it.

Motive: To be able to spit out verses more and more. The few that I painfully memorized for Helper’s Training helps immensely. I even remember back to the AWANA days in middle school… wow… I’m so old. Do they still have AWANA?

Read through Matthew, Mark, Luke, John

John Kim and I are going to start reading through Mark every Friday. This is going to be awesome. But not only that, I want to see all sides of the story this Lent season.

This is in addition to my Old Testament readings I’m doing. Sweetness.

Bonus

I stopped posting my quiet times up here. I think I’m going to start doing that more and more. At least, the ones that I can keep public and those that can maybe possibly help others to grow also.

Morning Prayer. My negative legalistic views kill me on this subject. At least, tomorrow, I’ll be going. I guess more prayer is needed on this topic of… Morning Prayer.

Warnings

Please don’t look at this list and point to my pride. I really want you guys to keep me accountable on these issues.

And with that, here we go for the next 40 days.

(Yeah, I know… I messed up already with my Justin Timberlake post… but we won’t talk about that. Looking to the future!)

George Orwell: 12 Writing Tips

Short of going out and buying Strunk and White (actually, I should) and memorizing everything in it, here’s a random link I found through my feeds that I’m going to try and think about as I start the set of night posts.

>* What am I trying to say? >* What words will express it? >* What image or idiom will make it clearer? >* Is this image fresh enough to have an effect? >* Could I put it more shortly? >* Have I said anything that is avoidably ugly? >* Never use a metaphor, simile, or other figure of speech which you are used to seeing in print. >* Never use a long word where a short one will do. >* If it is possible to cut a word out, always cut it out. >* Never use the passive where you can use the active. >* Never use a foreign phrase, a scientific word, or a jargon word if you can think of an everyday English equivalent. >* Break any of these rules sooner than say anything outright barbarous.

Link

A Lesson in Indirect Advertising, the Justin Timberlake Story

Justin Timberlake’s third single “What Goes Around, Comes Around” smashed iTunes record for the fastest-selling video on iTunes. (source)

I wonder what led to that. And no, I’m not just talking about the content (of which I can’t really speak for, because I don’t even think I’ve heard the song…).

Indirect Advertising

I’m just going to throw out a theory here. I believe indirect advertising has something to with this success. Just like how movie stars and singers do late-night show appearances to increase awareness of their product, using technology and social networks to do the dirty work might have worked out this time.

What’s in that box?

Maybe possibly… this little SNL Digital Short had to do with it… (You guessed it. NSFW, but it’s always hilarious…)

Sidenote: I was never told about this video from a friend. I ran into it looking through YouTube for some NBC shows. And because of the lack of the introduction through the proper channels (i.e. friends or feeds), I didn’t know what to expect. All I knew was that SNL Digital Shorts are making SNL shine in my book. (Chronic-what-cles of Naria, Laser Cats, and others… sorry, I hope you didn’t just go waste like an hour watching all these goodies)

Please tell me you’ve seen this before

I’m seeing it all over the place. Even on facebook with their gifting system (if you haven’t seen this yet, you’re not in my target demographic, hehe.) I’m talking about the gift that looks like someone completed the first of the three step process.

Facebook gifts?

I am absolutely stunned that some people don’t get what it is. And I giggle incessantly when that happens.

The Point

I really feel like the MPAA and the RIAA need to get their acts together and see that there are some amazing sources of advertising that they’re probably not even thinking about. They need to stop thinking about making money up front by selling antiquated physical media but understand that by (I’m using this word again…) leveraging (I think I threw up in my mouth a little) technologies they could possibly make even MORE money. Viral-content FTW.

Think, you old media people. Think. Hire college students to do your advertising campaigns, and stop paying the mid-30s people to force the consumers how they should pay for products.

Gone are the days of clever placement of one or two hit songs on a CD and forcing people to pay for 8 (or even less…) filler tracks. iTunes change the game, and will continue to do so. Other companies will try and step up to follow suit and, through competition, things will only get better for all of us.

And through the “advent” of social video sites and beautiful technologies as bittorrent, the game is changing daily. I feel so happy I’m just alive seeing these changes in the industry.

Ah, technology… bringer of all things good and time-wasting.

Three Hypotheses on User Interface Design

If you don’t know who the author if this article is, it’s okay. Just know that this man is behind everything to see here. Yeah, it’s the guy that has a CSS hack named after him… You know someone’s important when you’ve got that happening for you. Now, let me continue to the point of the post.

Three Hypotheses of Human Interface Design

Hypothesis 1: Human interface cognitive load is proportional to the number of clicks/keystrokes/gestures

For me, this hypothesis comes to life through the wonders of Quicksilver and keyboard shortcut. With Quicksilver, my fingers have less reason to leave the keyboard. Maybe one day… we’ll have bitmapped keyboards (iPhone, anybody?)

Hypothesis 2: Human interface cognitive load is inversely proportional to interface latency

In other words: Make the user feel smarter than the computer at all times. Sure, the computer is able to calculate much much better and faster than the average human being… but what it comes down to is making the user feel like he’s in control. Regardless of how fast he can type or not type, the user shouldn’t be the one that’s waiting: The computer should be the servant to the master user, never EVER the other way around.

I hate you, beachballs and hourglasses.

Hypothesis 3: The usability of an interface is inversely geometrically proportional to its cognitive load

The better the interface, the easier it’ll be to use, and people will want to use it. It’s as if the system is calling out to the user, “Use me, and feel better about yourself.”

This is the case with me and Apple products: I want to not only use them, I want to lick them.

Conclusions

What does this all mean?

When designing human computer interfaces (including web UIs):

  • Minimize the number of text fields in your interfaces down to the absolute minimum necessary.
  • Minimize the number of click/keystrokes/gestures necessary to accomplish actions in your interface.
  • Make your interface as responsive as possible – minimize the latency of each and every action a user might take in your interface.

And be prepared for both lots of users, and frequent users.

I’m going to take these points to heart in designing my next web application’s interface. I want things to be customizable, but at the same time, I don’t want to impede the user at all in his or her quest to achieve UI heaven.

Simplify. Simplify. Simplify.

A VERY long day

After going to sleep at around 3 AM (not sure… I just kept reading the Bible), I woke up again before the alarm at 7:30, only to be so tired that I decided to cut down on RSS time and get like 15 minutes more sleep.

Missed the bus that would have taken me to work by 9, but instead took the next one to make it by 9:30. Worked like a crazy person until 2 PM, with no discernible break in between… and I’m still not done. Lots to do tomorrow… but I wonder if I can get out of going in. Trackball’s supposed to come by mail, and I wonder if someone’s going to be here to accept the package.

I decided to stick around campus and finish up what little lunch I packed. Read through the Bible… I feel more and more confident and able to point out where things are in the Old Testament each day… I feel like it’s fast becoming my textbook on life.

Took the bus back, then without warning, I fell into a deep sleep. Then woke up and started going through my feeds, yet again… to find out that a friend needed a ride to a meeting, and she was already late. Taking this as a sign, I packed myself a very VERY light dinner (comprising of grapes and yogurt… wow, I’m such a girl…) and got ready to head for WIMPE.

But you see, my day should have ended with me, coming back home, making dinner, and going to bed. NOPE. I went to ISR, to meet the likes of Colin, Christine, Andrew, Ken, Jon Chu; and the list goes on and on…

And I feel like this all-nighter was only possible because of those people. Well, yeah, they did take up my time and forced me into this position… but what I’m saying is that the energy that these guys spewed forth into me… something about being near students again makes me feel alive.

Oh, a sidepoint: For the first time since… that one really messed up night during college… I had a nosebleed. This happened while I was helping Christine with her ECE 205. I have a theory: My brain freaked out when it started getting bombarded with resistors and diodes. I can’t believe I still remember some of this stuff.

Just goes to show you: God’ll redeem everything. Even elementary circuit analysis.

Now, to the code and to the writing of worthwhile posts.

Talk about Caffeine Rush…

I think being up late plus the Dew brought me to this point of high alertness.

I called both Derek Remund as well as Alex Argo to check out my newest idea yet. I’m not sure still as to how serious I am about the project (i.e. how I’m going to be making $$ from it…), but it sounds like a project that might… definitely… attract some attention, regardless of it being profitable or not.

I set up a deadline for myself to do some more direct research into the area, and write up some documentation by the end of the month. One week is all I need to make some really large decisions about where this project is going to go.

Not only that, but now I’ve been tasked by a friend for yet another freelance job. I’ll be researching CMS’s and trying to customize it for jmbarrie.net. I’ll be in charge of a slight redesign, as well as a complete change in the back-end essay posting system.

And on top of this… there’s still that half-time (which I’ll be working full-time hours for) job I’ve got with the College of Education.

This week, is going to be amazing.

But alas, amidst the hecticness, I must refocus daily and… WIMPE it up daily.

PS: Yeah, I know you’re curious, but let me figure out a little bit more about what I want to do. I’ll then share it to the world.