December 28, 2009

This week we dive into the debate that has raged since the first database went online, MySQL or PostgreSQL ..

Stephen is a MySQL guy, while Nick is a PostgreSQL guy, and together they share the pros and cons of both, and why the debate that has raged is not likely valid anymore.

Also, subscribe to us on iTunes and leave us your comments: [ Launch iTunes ]

Follow us on Twitter :
Stephen : http://www.twitter.com/darthweef
Nick : http://www.twitter.com/niczak

  • Share/Bookmark


At the heart of every redundant thing you do, is a loop.

Even the greeks knew it.  When Sisyphus pissed off the gods, they stuck him in a while loop

while($gods == “pissed”) {

$sisyphus = “Roll rock up a hill”;

}


Granted the greek gods were a bit tempermental, but like the greeks, your application will execute these types of statements to output data, count, and do all sorts of things that are even, at times, incredibly futile and redundant.  Also like gods, while loops can be tempermental, and when hastily constructed can leave Sisyphus pushing his rock for all of eternity.

Wondering who Sisyphus is ? http://en.wikipedia.org/wiki/Sisyphus

PHP Manual on Control Structures: http://us2.php.net/manual/en/language.control-structures.php

Also, subscribe to us on iTunes and leave us your comments: [ Launch iTunes ]

Follow us on Twitter :
Stephen : http://www.twitter.com/darthweef
Nick : http://www.twitter.com/niczak

  • Share/Bookmark


At the heart of everything you do, all day long every day, is an if/then conditional.

When you decide to leave the house, this is what your brain does :

If ( $raining == “Yes” ) {
$take_an_umbrella = “Yes”;
} else {
$take_an_umbrella = “No”;
}

Granted the brain is far more complicated, but like the brain, your application will execute these types of statements to process inputs, decide on which functions to execute, and overall allow more then one scenario to occur with your application.  Also like your brain, you if/then statements and other conditions will also get more and more complicated, but today we deal with the basics.

geeksOnPHP
If/else VS Switch:

The switch statement is similar to a series of IF statements on the same expression. In many occasions, you may want to compare the same variable (or expression) with many different values, and execute a different piece of code depending on which value it equals to. This is exactly what the switch statement is for.

if($test == “foo”)
// do stuff
else if($test == “bar”)
// do other stuff
else if($test == “foo bar”)
// do other other stuff
else
// do something totally different

switch($test)
{
case “foo”:
// do stuff
break;
case “bar”:
// do other stuff
break;
case “foo bar”:
// do other other stuff
break;
default:
// do something totally different
break;
}

Visit the PHP Manual on operators.

Be sure to subscribe via iTunes and leave us your feedback there as well, we’d love to hear from you! Click here to subscribe!

Enjoy :

  • Share/Bookmark


September 14, 2009

This week we dive into Frameworks, and suggest some good coding tools such as TextWrangler, and BBEdit. We also talk a little about SVN repositories and why you should use them.

We want to hear from you … so contact us :

Twitter:

Nicholas Kreidberg : http://www.twitter.com/niczak
Stephen Johnson : http://www.twitter.com/darthweef

Rate and Review us on iTunes!

geeksOnPHPsmall

Here are the notes, which are basically just links to download the stuff we talked about.

Links to popular Mac Editors:
TextMate: http://macromates.com/
TextWrangler: http://www.barebones.com/products/TextWrangler/
Coda: http://www.panic.com/coda/

Links to popular Win Editors:
NotePad+: http://notepad-plus.sourceforge.net/uk/site.htm
PsPad: http://www.pspad.com/
ConText: http://www.contexteditor.org/

Links to popular *nix Editors:
Eclipse: http://www.eclipse.org/
Vim: http://www.vim.org/
gEdit: http://projects.gnome.org/gedit/

Subversion complete reference guide:
http://svnbook.red-bean.com/ (Entire book online)

Frameworks:
CakePHP: http://cakephp.org/
CodeIgniter: http://codeigniter.com/
Zend: http://framework.zend.com/

Thanks for listening, and Stay Geeky.

  • Share/Bookmark


This week we delve into best practices for beginners , should you psuedo code, how much time to spend on design, etc …

geeksOnPHPsmall

We talk alot from this great list of 30 Best Practices for Beginning PHP Developers:
http://net.tutsplus.com/tutorials/php/30-php-best-practices-for-beginners/

Definitely check that out, as well as Paper Prototyping by Carolyn Snyder – http://www.paperprototyping.com/

Subscribe to us on iTunes & let us know how we are doing by rating and leaving a comment. :
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=325498336

You can also follow us both on Twitter :

Stephen : http://www.twitter.com/darthweef
Nicholas : http://www.twitter.com/niczak

  • Share/Bookmark


On this weeks episode Stephen and Nicholas talk a little Comic Con, and do a versus run on PHP topics.

Also, Stephen’s dogs insist on joining the show, but they don’t add anything of value to the topics.

For our comic con discussion, if you want to see Stephen’s Flickr stream of photos go here : [ ComiCon Flickr ]

We start the PHP portion of our show with Static Vs. Dynamic and then Server Dynamic vs. Client Dynamic, with some caveats on Client Side scripting.

We also toss a little discussion of Form Validation and Form Sanitation, and Nick gives us some code to use for quick and easy Sanitation of form data. You can get that here : [ Code Snippet ]

We also hit on the overall capabilities and advantages of PHP and do a quick and dirty rundown of PHP vs. ASP.

If you want to set up your own LAMP (Linux, Apache, MySQL, PHP) server check out this great walk-through : [ How-To ]

Enjoy the show, and tell us how we’re doing in the comments.

Also, visit us on iTunes and subscribe here : [ Launch iTunes ]

Enjoy the show!

geeksOnPHPsmall

  • Share/Bookmark


July 20, 2009

In this weeks episode, Stephen and Nicholas introduce themselves, their history with PHP, and the exciting future for this podcast.

geeksOnPHP

We love validation … and will take criticism.  So let us know what you think in the comments. :)

  • Share/Bookmark


CAPS LOCK VS SHIFT

Author: Nicholas Kreidberg
April 15, 2009

caps-lock

I asked the following question on twitter yesterday: “When you type something in all caps (either a word or phrase) do you hold shift or press caps lock?”

This came up in a conversation that I had with a friend in which we both agreed that we never use [Caps Lock].

Here are some of the responses I got:

@ernie
  @niczak shift for two words or less, caps for longer . . .

@gcrush
  @niczak i like caps lock :)

@craigverse
  @niczak Hmm, I should try that. TRIES IT! I must usually hold shift.

@tyf
  @niczak I hold down shift.. quite pathetic for a DBA (when caps are so necessary.. I don’t even to UPPER())

@elainevdw
  @niczak Shift, unless it’s on my phone, then I use my phone’s version of caps lock. :)

@geekandahalf
  @niczak Both. Depends on the word I’m writing. My left pinky is FIERCE at holding down the shift key. It might be bigger than my rt. pinky.

@rdana
  @niczak for ALL CAPS I press shift ALL THE WAY

I love some of those replies and very much to my surprise there are more people out there using the great old shift key than I imagined.

- Nicholas

  • Share/Bookmark


Essential tools for PHP development

Author: Nicholas Kreidberg
March 8, 2009

b1nary

As sort of a “follow-up” to my post from last week I am here to bring you what I think is a very solid list of tools for developing web applications with PHP.

1) Editor: TextMate (Mac Only), I really love this editor. On the PC I use PsPad.

2) Debug: A combination of writing robust error reporting in software, Firebug & Web Developer (firefox plug-ins) and apache weblog parsing

3) Tools: jQuery is my favorite toy right now, I am doing a lot of neat stuff with it and really bringing some database driven web applications “to life.”

4) Framework: CodeIgniter is a great, lightweight MVC (Model-View-Controller) framework for rapid PHP development.

5) Cross-browser testing: Honestly, I just use live machines.. I have heard very mixed things about Browsershots and haven’t looked into the other options. We just test all our stuff on multiple platforms/browsers to ensure compatibility across the board.

- Nicholas

  • Share/Bookmark


March 5, 2009

The topic of browser extensions and web application development has come up a bit lately so here is a short list of my “mission critical” extensions pertaining to developing/debugging web applications:

Firebug (Debugging / Monitoring)

FirePHP (Enables logging of Firebug Console using a simple PHP method call)

HTML Validator (Exactly what it sounds like, integrates nicely to firefox status bar)

Web Developer (CSS/DOM/HTML/JavaScript tools)

- Nicholas

  • Share/Bookmark