Geeks on PHP – Episode 4 – Beginners Best Practices

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

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Share

Read Users' Comments (0)

$deep = $this->geeks->thoughts() – Episode 1.

How Comic Con made me love being a geek again.

ftlog_geek_podcast

Last week (July 23,24,25,26) was Comic Con and it was such an awesome, geek invigorating experience for me, that I had to share it as the first episode.

So I talk about Comic Con, the people, the Geek love, and the re-awakening of something that I thought died along time ago.

I also briefly talk about the maturation of Geek Culture and why some of that may not be a great thing.

I reference my Flickr Stream from Comic Con .. so if you want to check that out , it is here : [ Flickr ]

Hope you enjoy!

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Share

Read Users' Comments (2)

New Audio podcast coming to For The Love of Geeks

So, I have been wrapped up in so many projects that I have not been keeping up with the Geek blog, and for that I apologize, but in an effort to make up for that I am going to be launching a new audio podcast for the geek blog called $deep = this->geeks->thoughts();

ftlog_geek_podcast

If your not a programmer then the humor in title of the podcast will likely escape you, and maybe it will even if you are a programmer, but fear not, this cast will not be limited to programming, and most likely won’t focus on that much at all, since there is soon to be a PHP podcast coming to the site as well.. It really will be me talking about random geek topics.  Comics, movies, games, computers, tech, photography, whatever.

It may not even always be me.  I will open the cast up to Allen and Nick to do as well, whenever they feel the compulsion.

So you’re thinking, why in gods name would I want to sit and listen to you ramble on about geek stuff.  Well, you might not, and if not that’s cool, but truth be told the three of us are pretty knowledgable, and even have a decent sense of humor, so you might just find that we entertain and educate you, and you will more then likely share quite a few of our views, and when you don’t let us know, we love discussion.

So for what’s worth, it will be here on a indeterminate schedule with no real set length other then a guarantee that it won’t go more then 10 minutes or so.

You will be able to find the podcast here, and I will be pushing the feed to iTunes as well.

Share

Read Users' Comments (1)

CAPS LOCK VS SHIFT

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

Read Users' Comments (1)

Easy & Dynamic Keyword Highlighting With PHP

Say you are fetching news article data from a database and want to “highilight” (or in this example make bold) specific keywords in the article abstract. Once we have our news article data we need to fetch our keyword data which can also come from a database (recommended) or it could be stored locally in an array.


while($array = pg_fetch_assoc($result))
{
  while($array_key = pg_fetch_assoc($result_key))
  {
    foreach($akeywords as $sphrase)
      $sbody = str_replace($sphrase, "<strong>" . $sphrase . "< /strong >", $soverview);
  }
  pg_result_seek($result_key, 0);
}

Assuming $akeywords is your array of keywords and $sbody is the body of text you want to “highlight”. For each keyword you have the body of text is parsed and if a match is found, a starting <strong> tag is added before the keyword and a closing </strong> tag is added after.

This is a very simple piece of code but it can really come in handy in a number of projects.

- Nicholas

Share

Read Users' Comments (0)

A Geeky Super Bowl

So here I sit at a friends super bowl party, having just installed his wireless router and gotten all of us online I am here blogging. Yeah I know I am a total geek but then again this is For the Love of Geeks…


img_0717-small

Here I am wearing my 3D glasses! (Although, a bit early)


I am just goofing off on my Ubuntu laptop while the steak (for steak tacos) is cooking. We are just hanging out, having some drinks and watching Faith Hill sing the national anthem. Hopefully it will be an interesting game!

All of us at For The Love of Geeks hope that all of our readers are all having a wonderful and geeky Super Bowl!

- Nicholas

Share

Read Users' Comments (0)

Red Bull – It really does give you wings!

Yoshi claims the Red Bull.

Yoshi and Toad share a Red Bull.

Gotta be the Red Bull.

How did they get up there!?

Come on Nintendo fans, represent!

Gotta be the Red Bull..

- Nicholas

Share

Read Users' Comments (2)

SQL Indexing – A Basic Foundation

I recently watched the following video by Stephane Faroult in which he talks about the basics of SQL indexing.



Below is a brief summary of what he discusses in the video. This (in addition to the video) should give you a very basic fundamental understanding of what SQL indexing means and why it is important.

An index entry is the association of a key value with a physical address. All entries are stored in order of key value.

Do we need a full index or just a chapter list?
A composite index (i.e. year/country) is a concatenation of the two in which we call the result the key. So if the composite index is Country|Year the WHERE clause must be on country, and vice versa.

Indexes on performance:

100,000 Rows, 12 Columns
No Index: 100 inserts
Prim Key: 65 inserts
2 Indexes: 22 inserts
3 Indexes: 15 inserts
4 Indexes: 5 inserts

As you can see, by adding indexes we are taking a big hit in performance (not to mention storage as well). In the same time it takes to insert 100 records with no index, we can only insert 22 records when we have just 2 indexes.

Model for database architecture:

1 – Production
1b – Mirror
2 – Disaster Recovery Site
2b – Mirror
3 – Development
4 – Development
5 – User Acceptance Test bed
6 – Performance Testing

-Nicholas

Share

Read Users' Comments (0)

Create your own “Obamicon”

In the spirit of the now famous Hope Poster by Shepard Fairey you can create a poster with your own photo(s)! Visit Obamicon.Me to get started.

Geek Poster

- Nicholas

Share

Read Users' Comments (0)

We give a geeky welcome to Nicholas Kreidberg

For the Love of Geeks welcomes aboard our latest contributing geek, Nicholas Kreidberg.

A self-proclaimed geek, he has been involved with computers and technology for over 20 years.  Currently employed as an application developer and database administrator, Nick spends countless hours writing both web based and server based applications in addition to building databases to support the back end.

Apart from being an expert in PHP, PostgreSQL, and several other web technologies; Music, Photography, and fatherhood take up Nick’s time, and whatever is left is spent entertaining the world on social networks like twitter, plurk, and friendfeed.

For the Love of Geeks looks forward to insightful, and educational posts from Nick about PHP, Databasing concepts, and other web tech training.  Nick will also be co-producing a new podcast that will be released through For the Love of Geeks, centrally focused on PHP.

We hope you will enjoy the new flavor that he will bring to the site, and give him a good welcome. :)

If you wish to get a hold of Nick you can email him here niczak@gmail.com or for other ways to find him online view his profile page.

Share

Read Users' Comments (1)

 Page 1 of 2  1  2 »