PHP Weekly

PHP closing tags….Don’t need them, so don’t use them. At least in files that have nothing but PHP code in them.  Here’s a quote from the Zend Programmers Guide:“For files that contain only PHP code, the closing tag (”?>”) is never permitted. It is not required by PHP, and omitting it prevents the accidental injection of trailing whitespace into the response.” Have you even gotten that “headers already sent” error? Since this is often caused by trailing white space in your include files, leaving off the closing tag will prevent that form happening.Thanks all for now. 

Posted by mnoga on August 23rd, 2008 No Comments

PHP Weekly (May 18, 2008)

Today, were talking about dates, specifically getting the difference between two dates.

We will be using GregorianToJD(); which converts a Gregorian date to Julian Day Count.

This is handy when you need to find out how many days have passed since a specific date or the difference in days between two dates.

Here is an example:

  1. dateDiff('8','25','1975','2','26','2004');
  2.  
  3. function dateDiff($m1,$d1,$y1,$m2,$d2,$y2)
  4. {
  5. $date1 = gregoriantojd($m1,$d1,$y1);
  6. $date2 = gregoriantojd($m2,$d2,$y2);
  7.  
  8. $diff = $date2 - $date1;
  9.  
  10. echo $diff;
  11. }

Above is a simple function that you send in to dates and you get back the difference in days. Simple, but can be very useful.

Posted by mnoga on May 17th, 2008 No Comments

PHP Weekly

PHPI’m going to try a new weekly series. Nothing to involved, just a short writeup about something new I’ve found or started using in the past week. Anything from a new PHP function to a new way of doing something thats I’ve done a thousand times before.

I will try to post at least once every week, more if I actually have time.

I anyone has any suggestions or requests, just let me know.

Posted by mnoga on May 17th, 2008 No Comments

A moment to congratulate Matthew Donohue

Matthew DonohueI would like to say congratulations to my bother in-law Matthew Donohue on his new position as Head Womens Basketball coach at Catholic University of America.

You can read about it on the Catholic University website

Great work Matt, were all proud of you!!! Not to mention how happy we all are that you Laurie and Ryan will be half the distance away as you are now in Elmira NY

Posted by mnoga on May 12th, 2008 No Comments

Google App Engine giveth and then takes it away….

Google App Engine no worky

So I received my invitation to Google’s App Engine last night, actually I got three of them, but their not invite codes or anything like that, the invites are tied to your email address so don’t bother asking me to give you one.

One major problem though, when I click on the link in the emails, up pops a web page telling me space is limited and asking me if I would like to be notified when more space becomes available.

Umm, I thought thats what the email was all about, the subject even says “Invitation to try Google App Engine”. Something not working quite right in Google land today……

I guess it’s back to the waiting game. I supposed I can use this time to brush up on my Python skills.

UPDATE - May 6 2008

Nick Johnson suggeested a different login URL for those who signed up for Google App Engine with an and email on a Google Hosted Domain, which is what I did. I use Googel Hosted Gmail for realdimensions.com.

http://appengine.google.com/a/yourdomain

This worked perfect for me, I’m not logged in and working on my obligatory “hello World” app. I’ll post more when I have something to show (and say).

Thanks for the suggestion and link Nick!!!!

Posted by mnoga on May 4th, 2008 1 Comment

Marketing 2.0

The Social graph trumps features…..

Thats all for now.

Posted by mnoga on April 30th, 2008 No Comments

I drank the Cool Aid!!

It’s official, I’m an apple fan boy. It started out when I switched to a MacBook Pro laptop at my previous employer, and I loved it. I just works fantastic, not to mention how much easier it is to develop Ruby on Rails applications on it over a Windows box. Then I got a new MacBook Pro for my current job and Freelance work. I’ve since stopped all use of windows, with the exception of parallels for testing. And now, the closer on the fan boy claim…..

I bought an iPhone!!

Yes, I love it, it works fantastic. There are to many good point to list, but I will say one thing, it is extremely easy to use. I had a Blackberry from my old company and I really had to look around to figure out how to do things or search on Google for info. With the iPhone, I have been able to use almost all it’s features with out reading the manual or searching on-line.

Before anyone goes commenting about how ridiculous it is to spend $600 on a phone (yes I got the 8 gig) , let me explain why I got it (besides the fact that it is amazing). With my new job I commute into NY City several days a week, this requires me spending two plus hours on a train each time I go into the office (round trip total). My old iPod Mini died a few weeks ago so I’ve been looking to get a new iPod, plus, with my freelance work I really wanted to get a new phone that I could check my e-mail on. So, I could spend $250 to $350 on a new iPod and another $200 to $300 on a good smart-phone that does email and Wifi or spend that money on one device that does it all. I opted for the one device, the iPhone, believe me, I am not disappointed.

I’m not going to do any kind of review since there are tons of them out there done by better writers than myself, but if you have any specific questions, feel free to ask and I will try my best to answer.

Posted by mnoga on July 26th, 2007 2 Comments

GrandCentral, now part of Google

GranCentralGrandCentral is a service that allows you to have one number to control several other phone numbers (cell, home, office). You put all your contacts into groups, and then choose which number you want each group to ring to. You can also use different voice mail recordings for each group and choose a different ring for each group. When someone calls you on your GrandCentral number you have the option to screen your calls, you can actually listen to them as they are leaving a voice mail on your computer. If it’s someone you want to talk to you can answer the phone. If it’s someone you never want to talk to you can send their number to a spam group, like the spam you get in your email. Now thats a really useful feature!!!

Since being acquired by Google Inc. (fantastic job and congrats to all the GrandCentral Team) they’re not currently accepting new users but you can sign up on the list to get one, hopefully sooner rather than later. I’ve put my name on the list, once I get an invite I will be sure you share so leave a comment in you would like one after I get some. Or if you have invites please send me one and I will be sure you pass along the favor.

EDIT: I got an invite (thanks TJL) so if you’re interested in one as well, I have 10 to give away!! Also, I will have a new review of GrandCentral coming soon.

Posted by mnoga on July 11th, 2007 No Comments

Firefox Plugins - VeriSign EV Green Bar Extension

This plugin adds a visual confirmation that the secure wensite your viewing is actually secure. It was written by Verisign, a known and reputable internet Security company.

This is what Barry Ferg, the developer has to say about it;

“Enables Firefox to recognize SSL servers that have implemented the Extended Validation Certificate as currently supported by Microsoft in IE7. Installing this extension brings identical functionality to Firefox.”

If the website your viewing is secure and they are using the Extended Validation Certificate then your address bar will turn green.

You can test it by going to https://www.paypal.com/, your address bar should be green if you have installed this plug in. And if the SSL certificate is a fake, then the address bar should turn red or just do nothing.

Get the plugin here;

https://addons.mozilla.org/en-US/firefox/addon/4828

Posted by mnoga on June 28th, 2007 2 Comments

Firefox Plugins - Web Developer

I’ve added a new category, Firefox Plugins. I often getasked what tools I use when developing websites or what Firefox plugins I use to make development easier. So I’m starting a new category to list Pugins I use, and I will start it out with one I use almost every day, the Web Developer Plugin.
The Web Developer extension adds a menu and a toolbar to the browser with various web developer tools like disabling elements, cookies handling, forms, viewing and editing CSS style sheets, managing images, displaying and outlining page elements, resizing your window and more. One I use very often is View Generated Source (under View Source). This lets you see what the source code looks like after it has been manipulated by JavaScript, like for instance by an AJAX call or a DOM manipulation. If your a web developer this is a must have.

Get it here: https://addons.mozilla.org/en-US/firefox/addon/60

Posted by mnoga on June 8th, 2007 No Comments