What have I been up to recently…

Last month was an action packed month for me. I had a few events going on and lots of work to get done.

Atlanta PHP User Group

We had a really cool presentation on load testing using JMeter and Xdebug by Brian DeShong. Load testing and profiling are very important to help identify possible bottlenecks in your application/server before reaching a breaking point. JMeter allows a user to setup different scenarios to run with varying loads (number of users, ramp up time). It’s pretty fancy with all the options you can do such as submit variables to pages to simulate login ins to an application and tracking sessions. Xdebug lets us analyze logs to see what was going on in your application to easily spot which part of the execution process took the most amount of time. At that point, you can look at your code to see how to improve that particular process.

At work we have an outside firm doing our testing/load testing so it was nice learning about JMeter so eventually we can start doing some of our own load tests for things we need done asap. I currently use Zend Studio’s profiler to profile my applications so I probably won’t be using Xdebug any time soon.

TEK-X

I asked around our local user group what conference they would recommend if they could only attend one PHP conference and this was the one I heard the most good things about. This was my first time attending a PHP conference and it was WELL worth it. The sessions were great with three tracks daily to choose from. The conference was small enough where you could spend time with the presenters interacting and asking questions. I met a bunch of new people which made the whole experience that much better. There was always something to do during presentations as well as after hours.

This is the web site for TEX-K if you want more info or want to take a look at the schedule. Some of my favorite were the two Flex sessions by Keith Casey since I want to start doing more Flex and the Lost Art of Simplicty by Josh Holmes was interesting as well. It was really nice having a bunch of Adobe and Microsoft people there. They were all great and helpful. We had been having some server hiccups at work and the guys at Microsoft were extremely helpful in trying to help us figure things out. We also learned from various people (both the MS and PHP crowd) that we (at work) should start using IIS instead of Apache for Windows. Microsoft has been spending resources in working with the PHP team to make sure things run smoother with PHP on IIS for Windows than before.

Two thumbs up for Microsoft and Adobe for being there and supporting the community (and for the drinks and dinners :p) . I’ll definitely try to go next year again.

Flash Builder for PHP

I took a one day-8 hour course on using Flash Builder and wow… I’m sold. After working on Flash for so many years, Flex is just too amazing to ignore. The class was taught by Adobe certified Jeanette Stallons and it was a small class which was great for us since we could get a lot more time for questions and one on one time. She did a great job keeping our attention and was very easy to follow. This was a hands on class so we each had our own computer to work the examples with.

The class started with us learning about the different Adobe applications, the difference between Flash/Flex, and reasoning behind changing the name Flex builder to Flash builder. Then we went through the basics of the IDE and how to setup a project and what the different folders and files are for. Next is when things got fun. We started creating an application that communicates with the database through PHP. We did all the code manually to better appreciate the last lesson which was creating the exact same application in an automated fashion with literally only a few lines of code at most. That was the coolest part of this class, how easy it is to use the wizards (that actually spit out good code!) to be able to just click and drag and have everything working correctly in such a short amount of time.

I already downloaded the two month trial from the Adobe’s site and have been playing around with Flash Builder at work and at home.

Google AdWords API v13 to v2009

A few years ago I wrote an application that heavily uses the Google Adwords API. It worked without me touching it for years until recently Google changed their Adwords API and my app completely stopped working. This was my fault of course since many months ago Google emailed me letting me know this was going to happen but at the time I figured there wouldn’t be much difference between both versions so I didn’t pay much attention to it… boy was I wrong.

The new API v2009 is very different since you call things differently now and many of the old services I was using no longer exist in the new version. I spent some time trying to rework my code to use the new calls but that was not working well for me. It just seemed as if I was wasting time instead of just starting over with a clean rewrite. Fortunately for me, after doing some research, I found that Google had already created a client library for PHP that already did all the heavy lifting code to interact with the services. I downloaded the library, ran a couple tests and everything was working perfectly. All I had to do was rewrite the application using the client library and everything is running smoothly again.

Thanks Google! You saved me a lot of time but don’t change your API again 😛

My Birthday

Not much to mention here other than it was my birthday last month as well so had dinners with parents and drinks with friends. I have been running a lot lately so I bought myself a nice new watch with my birthday money: Garmin 405. I saw this watch on sale on slickdeals.net for under $200 and I couldn’t resist. I’ve used it a couple times already and it’s great. The GPS seems to be working flawlessly for me so far and all the features it brings are neat to play with. My biggest sellers were: GPS to track my distance and pace and the heart rate monitor.

Peachtree Road Race, here I come!

Finally gave my blog a much needed face lift!

So what do you guys think? Does it look better now? It is not finished, I still need to tweak some graphics and colors but overall I’m very pleased. I started out with a new theme: Arclite by digitalnature. It has many customization options so I haven’t had to do too much tweaking of the .css files but there has been some. Since I blog so much about code, I finally stopped being lazy and got a code highlighter. I’m using: Dean’s Code Highlighter by Dean Lee. It’s very easy to use and supports a range of different code syntax such as PHP and Actionscript. One of the reasons I decided to update my look was because I have been running an older version of WordPress and it was about time to upgrade. I’m now running 2.9.1 and it looks great. I really like the new admin back office and it is so easy to use and setup.

I also created my first widgets! The ‘Interesting Links’ and ‘Interesting Images’ on the sidebar are no longer hacks done on the themes sidebar.php file. I learned how to create a plugin in WordPress and make it into a widget. Here is what one of the widgets looks like:

/*
Plugin Name: JR-Images
Plugin URI: http://www.joeyrivera.com
Description: Show my images
Version: 0.1
Author: Joey Rivera
Author URI: http://www.joeyrivera.com

  Copyright 2010  Joey Rivera  (email : joey1.rivera@gmail.com)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License, version 2, as 
    published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
 
function show_images() 
{
	global $wpdb;
	
	$query = '
		SELECT image_file, image_origin, image_thumbnail
		FROM wp_images
		ORDER BY image_id DESC
		LIMIT 6';
	
	$results = $wpdb->get_results($query);
	
	if(!$results)
	{
		return;
	}
	echo '
  • Interesting Images

    '; echo '
      '; foreach($results as $row) { echo '
    • ', "\n"; } echo '
    '; echo '
  • '; } function register_images() { register_sidebar_widget("JR-Images", "show_images"); } add_action("plugins_loaded", "register_images");

    I had to go back to all my old posts and make updates. If you find any issues anywhere, please let me know so I can fix it asap. I’ve found instances in code where there should be two && and instead the code blocks shows &&. I’m currently trying to figure out why my preview button doesn’t work, hopefully I’ll figure that out soon so I can move on to changing some colors around and finally updating my ‘About Me’ page. I hope to have some content in that page by the end of this weekend. Other than that, I hope you all enjoy the new look and am looking forward to hearing some feedback!

    Sony’s Motion Controller for PS3

    Soon after Microsoft showed off project Natal, Sony introduced their own motion controllers they’ve been working on. Both seem very cool and just from watching these videos it seems to me that the Microsoft technology is more sophisticated but the Sony controllers would be more fun to play with. And like they said in the video below, sometimes it feel more natural to push a button.

     

    Microsoft Project Natal for Xbox 360 looks neat

    I must say I’m very impressed with what I’m seeing. Microsoft announced Project Natal at E3 and it’s a control/camera that detects sound and motion for the Xbox 360 so the user can play a game without ever holding a remote control. It’s easier to understand through these videos:

    And here is a bit more info:
    http://e3.gamespot.com/story/6210641/microsofts-project-natal-3d-camera-system

    I personally don’t own a console but am very eager to try this one out.

    EQ vs IQ: Emotional Intelligence (also know an EI or EQ)

    Ever talked to a neighbor that won’t stop talking no matter how many hints you give that you want to leave? Are you giving the right clues? Ever talked to people that don’t care what you have to say and only want to tell you about themselves? Ever talked to someone at work that snapped at you for no reason? Did you notice them before to see if they seemed stressed or were having a bad day?

    If you aren’t familiar with Emotional Intelligence I recommend you read some more about it. I recently learned about EQ at a work seminar and thought it’s a great concept that others should know about as well. Here’s are a couple resources:

    http://en.wikipedia.org/wiki/Emotional_intelligencehttp://www.time.com/time/classroom/psych/unit5_article1.html

    If you like psychology you will probably enjoying learning more about this.

    Taken from the wiki page:

    “The model introduced by Daniel Goleman [16] focuses on EI as a wide array of competencies and skills that drive leadership performance. Goleman’s model outlines four main EI constructs:[1]

    Self-awareness — the ability to read one’s emotions and recognize their impact while using gut feelings to guide decisions.

    Self-management — involves controlling one’s emotions and impulses and adapting to changing circumstances.

    Social awareness — the ability to sense, understand, and react to others’ emotions while comprehending social networks.

    Relationship management — the ability to inspire, influence, and develop others while managing conflict.”

    Some of you may find some of this common sense but others may not. Why is this important? Because even the smartest person in the world (IQ) will have problems succeeding if he/she can’t manage their emotions or the way they interact and are perceived by others (EQ). I think the more understanding a person has of EQ, the easier life becomes. There are various situations that can be avoided or easily overcome just by paying attention causing less unnecessary stress.

    Here is an example of where I think I use EQ relating to technology. When I go to speak to a person about say coding, I have to ask myself – “Do I know this person and if so, how tech savy are they?”. Based on that answer, I’ll adjust the way I speak to this person and use wording and or acronyms that I think this person would understand. If I don’t know this person and don’t know enough of their background to guesstimate, I’ll start talking to this person in a very general level (not too low to insult them if they are techy but not too detailed to lose them from the start if they aren’t) and based on the way this person interacts with me, see if I can go more tech details or if I need to get more generic and use none-tech related examples.

    From then I also try to pay attention to see if this is a person that really truelly understands what I’m saying or is just knoding since many, including myself, are guilty to this. And finally based on the interaction or lack of I know if it’s time to change the subject or if we can keep going. All that just to have a conversation…

    Have any similar experiences to share? Please do! We can all learn from each other.

    Atlanta PHP User Group – 11/06/2008

    So I attended my first Atlanta PHP user group thanks to Moses nagging me about going :p. I’m glad I went, I had a great time. I really enjoyed being there listening and even sharing a little. The things I took with me that I’m going to mention are:

    Atlanta Startup Weekend
    During the meeting I found out about this really neat event. The objective of the Atlanta Startup Weekend is to get a bunch of people together, divide them into groups (developers, marketing people, business people, etc) and in one weekend finalize a product from a concept. Tickets are already sold out so I’ll have to try for next year. I’m sure I could learn a lot.

    PHP Wiki
    I didn’t know about this page: http://wiki.php.net/. You can get lots of neat information from the PHP group. The rfc (request for comments) section is also very informative. You can see what requests have been made, which request are going to be implemented and which have already been implemented. It’s a good way to stay ahead of the curve since you would know what’s coming out before it’s out.

    REST
    Don’t quote me on any of this, this is just bits and pieces that I think I gathered from listening to others talk. If I understand correctly, REST is a standard for creating RESTful url/url/web services that are efficient and scalable… maybe? I heard REST mentioned a lot during the <head> conference a couple weekends ago and I heard it mentioned a few times last night during this meeting. So, now I need to go do some more research and figure out what this REST thing is all about. Seems like it’s something worth knowing about and maybe even following? If you have any info or resources you can recommend please do.

    Finally!

    I’ve been resisting for the longest time to start blogging but with the help of my friend and co-worker Moses I’ve decided it’s about time. My thoughts at the time are to blog about my interests such as coding (mainly PHP and Flash), current projects, and every once in a while about my car. I think this will be a good way to organize myself (having a centralized location for my ideas, thoughts, projects) as well as a good way to get to know more people out there. Help me via comments on what you would like to see more or less about. Would you like things more or less technical etc. Thanks for reading!