Helpful Code Snippets (and app ideas!)

This post is about sharing my ‘Programming Notes and Code Snippets’ document, which I’ve been building on-and-off for a while in the hopes that it might help some of you solve a programming question you have or save you time while you’re building your code project.

I’ve also found this document to be very handy for coming up with new app ideas to get me started using new languages or tool chains. It’s how I got started on Quoats.

Google Wave used to offer this really awesome document embedding feature that doesn’t appear to be available with Google Docs (am I wrong? Correct me, please!), so I’ll just include a link to my code snippets document and an iframe version below.

Note that on all of the code snippets I include a link back to the source that I’m referencing. If these are in error or you’re the owner of the content and want it removed, be sure to drop me a line and I’ll correct the problem. As it is, these code snippets were found scattered across the Internet and this work-in-progress document merely hopes to compile them into something useful.

Enjoy and happy coding.

Learning PHP Using Google Wave

Google Wave
Image via Wikipedia

Tonight at Guelph Coffee and Code I walked the group through the first steps of learning PHP. Because our projector was unavailable, I substituted its functionality with Google Wave. Even though I’ve had access to Google Wave since the summer, this was the first time I had truly used the service.

When I first heard about Google Wave, the idea seemed intriguing enough. I had a hard time figuring out exactly what it could be used for. I’m a huge fan of Gmail and other Google communication tools including Google Apps, so I had faith they’d pull something cool off. However, my first few attempts at trying it were met with less than stellar results.

Truth be told: I couldn’t quite see how it could help me communicate with my friends and colleagues any better than Gmail. So, a few days after receiving notification of my acceptance into the world of Wave, I abandoned it and went back to my life with E-Mail.

What We Did

Using Google Wave, the group followed along with my presentation of syntax and functions and contributed their own code snippets and links. I was able to quickly type example PHP code into the wave and have it appear on their screens as I was typing it instead of all at once when sending the message. The removal of the wait-message-wait-message barrier is critical to its success in groups. It’s just as easy as talking.

This sort of instant chat has been done before, however, most notably with ICQ chat back in the 1990s. But, back then we weren’t quite the society were are today. Have to give credit where credit is due, though.

I knew it was going to go well when after pasting my first code block into the wave, the others in the group started to modify the code without me prompting them. After returning from the fridge, there were already 3 or 4 new lines of code directly beneath mine were with perfect syntax. It was fun!

Is It E-Mail 2.0?

To be perfectly honest, I am not sure. I love Gmail and it will take a lot to move me away from it. Perhaps its a case of uncertainty with respect to how it will interact, if at all, with Gmail in the future.

Even after tonight’s experience, I still have a hard time defining Google Wave or identifying its place in my communication paths. But there are two things I know for sure: It’s great in groups and makes an excellent discussion platform when your projector is down.

Reblog this post [with Zemanta]