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.
June 4th, 2009 in
General | tags:
console,
ps3,
sony |
No Comments |
views: 18
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.
April 28th, 2009 in
General | tags:
ei,
emotional intelligence,
eq |
No Comments |
views: 52
I’ve been using the Zend for the last few months and I’m loving it. Here at work we were having a discussion about implementing some web services in the future so I decided to see what it takes to create some web services in PHP using Zend. I was pleasantly surprise (well not really surprised) that it was extremely quick and easy to get things up and running.
In this post, I’m going to explain how to create web services that can be accessed via AMF, XMLRPC, JSON, and REST using the Zend Framework. Hopefully these should cover most uses out there. I left SOAP out since I don’t really see myself using it any time soon. I will be communicating with a database as well to make the tutorial more informative. The db will consist of one table with information about courses such as mathematics courses.
I’m going to show you the final product first, hopefully to catch your attention so you’ll read the rest :). This is what the final product will look like. If you look at the following links in Chrome, do a view source to see the formatted response.
XMLRPC
One course: http://www.joeyrivera.com/ZendWebServices/xml-rpc/course-info/abbr/math101/
All courses: http://www.joeyrivera.com/ZendWebServices/xml-rpc/courses-info/
JSON
One course: http://www.joeyrivera.com/ZendWebServices/json/course-info/abbr/math101/
All courses: http://www.joeyrivera.com/ZendWebServices/json/courses-info/
REST
One course: http://www.joeyrivera.com/ZendWebServices/rest/course-info/?method=getCourseInfo&abbr=math102
All courses: http://www.joeyrivera.com/ZendWebServices/rest/courses-info/?method=getCoursesInfo
AMF
One course: http://www.joeyrivera.com/ZendWebServices/amf/course-info/abbr/math101
All courses: http://www.joeyrivera.com/ZendWebServices/amf/courses-info/ Read the rest of this entry »
March 26th, 2009 in
Flash,
PHP | tags:
amf,
framework,
json,
PHP,
rest,
web services,
xmlrpc,
zend |
2 Comments |
views: 1,728
I just found this link on twitter and it’s a really good read. The author mentions a few points on how to identify a good programmer and I agree with all of them. Check it out:
http://www.inter-sections.net/2007/11/13/how-to-recognise-a-good-programmer/
March 17th, 2009 in
General | tags:
programmer,
programming |
1 Comment |
views: 62
So here’s a quick post on calling dll’s in Windows using php. I have a dll that encrypts data in a certain format that we need for another process. So I need to pass the dll a string and it returns the encrypted string back.
I tried calling the dll using the COM class in code and was having issues until I realized I have to register the dll in windows first before I can call it using the COM class. To register a dll in windows you do the following in your command line:
REGSVR32 MyStuff.dll
Now that the dll is registered you can do the following to start accessing the dll:
$my_dll = new COM(’MyStuff.Functions’);
MyStuff is the dll name an/or id and Functions is the object inside the dll that we want to use. Now I call the method I need and pass the parameters:
$encrypted_text = null;
$input = ‘This needs to be encrypted.’;
$my_dll->EncryptString($input, $encrypted_text );
This is pretty much it. We instantiate the COM class with the dll and function I want. Then I call the method in the dll passing my text and it returns into my $encrypted_text var the encrypted text. I can now do my next process with the encrypted text like:
print $encrypted_text;
February 27th, 2009 in
PHP | tags:
com,
dll,
PHP,
regsvr32 |
No Comments |
views: 69
So I decided to play around with creating a dynamic php image to see how much work was involved and it’s actually pretty easy to do. In my case I wanted to solve the following problem.
I have a trip planned for a weekend coming up and I keep wanting to see what the weather is going to be like for that weekend. It seems everyday the weather.com forecast changes so I keep checking it on a daily basis. My options are
- go to the weather.com website, search for the zip code, then select view 10 day forecast or
- create a quick and easy automated way of looking for this information as a graphic.
Of course, I picked the latter. Here’s what we are about to create:

Read the rest of this entry »
February 17th, 2009 in
PHP | tags:
gd,
imagecolorallocate,
imagecreate,
imagepng,
PHP |
2 Comments |
views: 111
Wondering how to use stored procedures with PHP and MySQL? So was I and here’s what I’ve learned. In this tutorial I’ll explain how to use PHP (I’m using 5.2.6) to call MySQL (I’m using 5.0.2) stored procedures using the following database extensions:
First we need to setup our enviroment which consists of a new database with one table and two stored procedures. In your db tool of choice (I’ll be using the MySQL Query Browser) create a new database named test. After you create the new database, make sure to add a user called example with password example to the database and give it read access.
CREATE DATABASE `test`;
Now create the table users:
DROP TABLE IF EXISTS `test`.`users`;
CREATE TABLE `test`.`users` (
`users_id` int(10) unsigned NOT NULL auto_increment,
`first_name` varchar(100) NOT NULL,
`last_name` varchar(100) NOT NULL,
PRIMARY KEY (`users_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Read the rest of this entry »
January 27th, 2009 in
MySQL,
PHP | tags:
MySQL,
mysqli,
pdo,
PHP,
sp,
stored procedure,
tutorial |
22 Comments |
views: 3,464
I’ve read a good bit on search engine optimization and I’ve tried doing what I can to get my pages optimized. In this case, having some of these pages optimized is hurting my page stats. They are getting some traffic but not the right traffic. Iv’e been checking the traffic stats on my site with Google Analytics and my bounce rate is a bit on the high side :p. On November it was 55%, December 67%, and so far into January it’s 64%. Now, the culprits seem to be a few pages I created such as:
*Data from Nov. 1st 2008 to Jan. 8th 2009
The first thing I’m going to try is changing the title of these two posts since I believe they are a bit misleading. They made sense at the time but lets discuss the names I gave them in more detail.
Read the rest of this entry »
January 8th, 2009 in
SEO | tags:
bounce,
rate |
No Comments |
views: 159
So the other day someone was looking for a quick php script that would load a random image from a folder (rotating banner script) and display it on their website. There are already a ton of scripts out there that do this but of course, this was an excuse to build something for fun. So, I decided to create a script that would do just this but with the least amount of code lines still keeping it efficient (again, just for fun). This is what I came up with:
<?php
$files = @opendir($dir=trim($_REQUEST['dir'])) or die('Not Valid');
while($file = readdir($files)) preg_match('/(.png)|(.gif)|(.jpg)/i',$file) ?
$images[] = array($file,substr($file,strlen($file)-3)) : null;
count($images) ? header('Content-type: image/'.$images[$id=rand(0,count($images)-1)][1]) :
die('Not Valid');
print file_get_contents($dir.(substr($dir,strlen($dir)-1)!='/'?'/':null).$images[$id][0]);
?>
Read the rest of this entry »