Tuesday, June 28, 2011

Great Tutorial - PHP and cURL

Since I'm making heavy use of PHP and cURL, I thought I'd share a great tutorial, "PHP and cURL Functions Tutorial," for those interested in working with these technologies to implement their own scraping/crawling web service.

As you should know, PHP is a multi-purpose web scripting language. It is relatively simple to use, fast and uniquely designed to work with the web!

cURL is a set of libraries that enables a user to access web resources remotely, meaning you never have to go to a web page to get the page contents, or fill out a form. In theory, you could process all your online banking requests via PHP and cURL without ever having to manually login and navigate the bank's website.

Basically, with these two technologies, coupled with Google Search, you can do a whole lot of very cool, very good (or very bad) things on the web. These technologies are especially useful for data-mining through the web.

Continuing along with the food discourse in cyberspace project

It has been super hectic these past couple of months. In fact, it has been so stressful I have had little time to perfect my code. Or finish up my drafts for the dissertation for that matter! And this is due like last week!

Fortunately, the code works though, but only partially. I still need to enable the "crawl" function, at least provide a better implementation. Plus, I want to provide an interface to make usability a lot easier. With those two things on the current wish list, I went a head and began an implementation of the project using the CodeIgniter framework for PHP. It is very slick, easy to use and if you have experience with the Model-View-Controller approach to software development then you will be up in no-time writing cool software.

I'm planning to have this newest iteration completed by July 15th. I'm making a public commitment! I'm not promising I'm going to release the project for download just yet, I need to analyze the data and finish writing my paper first, but I will post some returned results from the software.

Fortunately, things are starting to settle down, well the end is in sight! So, I anticipate being able to actually finish this in the time I have allotted.

But first I have a move to tackle! I just got a job with the Washington Sustainable Food and Farming Network, acting as their web developer and online operations manager. I guess I'll be acting kind of like a Swiss Army Knife, not only will I be managing the web operations, I will also be doing some policy work for supporting local food economies in Washington State. The other plus is that its part-time, which means I'll have time for other endeavors, like finishing the dissertation!

A Learning Experience -

I haven't talked about this at all on this blog, but a little known fact is that back in January I moved my family out of Pullman to Ebey Island right outside of Everett. We found a place with 35 acres, a house, barn and water rights. The plan: to start a small organic market garden and catering service. I even started a brand new blog to document this process and hopefully provide a resource for other wanna-be farmers/foodies. We paid a lot of money up front for the land, seed, and equipment. About 3 weeks before planting, the landlord shows his true colors. It would appear that giving him a large sum of money up front was a bad thing because he seemed to expect that on a regular basis.

Now, I'm not going to go into every detail, I think everyone I know has heard the story a dozen times. But basically he freaks out that we aren't paying him months in advance. His attitude and actions scared me into second guessing whether we wanted to establish this business here. I mean once you plant, you are vested unless you want to loose everything. It's not like I can dig up a 2 acre vegetable garden and move it!

Despite the anger and resentment over his behavior, I learned a valuable lesson in all this (maybe more than one). The first thing is:
  • Follow your gut! While the economics might point you in one direction, that should be tempered with an honest assessment of the person you are doing business with.
  • The second lesson is: Do not agree to a month-to-month situation! It might work for some, but legally the landlord can give you 20 days notice, without cause, to vacate the premises. Another reason I got scared...
  • The third lesson: I will have to be more persist-ant than ever in order to make this dream a reality.
And finally...
  • The fourth lesson: Never let anyone walk all over you, or think they can. To be more specific, don't be so trusting and don't be so accommodating, unless it is reciprocated.
I have a tendency to be too giving, almost to the point of it being a shortcoming. I think people who don't know me take this as a sign of weakness, when in fact it is in my nature and comes from a deep seeded belief that we have to be the change we want to see! But when values and reality collide, it is best to embrace reality!

So, with all that said, we are moving on to another community, probably to move into an apartment till we can start over. The dream isn't dead, and no asshole is going to kill it for me. Because what I lack in intelligence, I make up through perseverance!