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



February 5, 2009

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



A Geeky Super Bowl

Author: Nicholas Kreidberg
February 1, 2009

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



Red Bull - It really does give you wings!

Author: Nicholas Kreidberg
January 26, 2009

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



SQL Indexing - A Basic Foundation

Author: Nicholas Kreidberg
January 23, 2009

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



Create your own “Obamicon”

Author: Nicholas Kreidberg
January 19, 2009

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



December 15, 2008

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.



June 5, 2008

So I got to thinking the other day .. I love blogging about the geekiness I find online, and after reviewing the traffic that I have gotten on the site over the last few months, it would seem that at least a few of you enjoy reading about the geekiness I find online.

Blog traffic is a very sought after commodity.  It establishes credibility, let’s face it, no one at i09.com is really all that knowledgable about sciFi, and could they be anymore negative about everything they see?  So why do we put faith in what they say??? becuase they get almost a million page views per month …

Same with any of the gawker media portals.  Wired, Reuters and other sites have “genuine” journalists who make the real content that ends up disected onto other blogs, so they kind of come with their own credibilty.

This all got me thinking though … who has more credibilty then all of them … WE do…

That’s right, we have the real credibility, becuase we are the unknown masses who give these sites the traffic they need to gain thier credibility.  We are the ones who have seen every Star Wars movie 400 times. We are the ones who can quote any episode of Star Trek.  We are the ones who can tear down and rebuild a computer in less time then a Green Beret can field strip his m-16.  We are the ones who make the geek news, so why shouldn’t we be the ones to report on it.

I want to form a coalition of Geeks.  UNKNOWN geeks.  Sorry Leo Laporte ..  Sorry Tom Merritt .. Sorry Rafe Needleman… I respect you all, but your views are now tainted by the man. I want geeks who answer to no one, who will tell it like it is, and who want to be apart of what could become the largest online geek community with a voice..

If you’re a geek (computer, scifi, science, art, whatever … ) and you want to start contributing to a whole new type of online blog, let me know.

Individually we are nobody, but as a mob… we are force to be reckoned with …



May 13, 2008

It used to be a way of slamming someone to call them a geek.  Then the underground geek community found a welcoming home on the internets, and over time we developed pretty well in the land of computers and chat rooms.  Of course, in real life, we were still teased, misunderstood, and generally marginalized.

Now, since we (yes us geeks) did such a good job building, massaging, fixing, tweaking, and geeking the internet the rest of the world has become addicted to the online culture.  With that addiction has come a bit of understanding and acceptance of geek culture.

That understanding, and acceptance has also led to the idea that being a geek is kinda cool.  This is good in some ways and bad in others.  An essential part of being a geek is that you are “outside the mainstream”, so if the mainstream becomes geek.. what does that mean?  How do you define geekiness when everyone claims geek status.

I hold to the idea that that question will be answered differently depending on what type of geek you ask.  For instance, a sci-fi geek will want to have you be able to answer obscure trivia questions about Hitchhikers Guide to the Galaxy, and a computer geek will want you to translate binary without looking online.  So, I guess on some levels, this transition to “geek being cool” may just lead to there being another type of geek. “The geek Geeks”.  Confused.  Yeah, so am I.  Let me see if I can explain.

Computer geeks are computer geeks because they obsess about computers.  So, a Geek geek, would obsess about geeks.  Trying to be one, talking about them, and generally jumping on the recent geek bandwagon.  That’s cool, I suppose.  As geeks, I have found that we are a fairly tolerant group, except when discussing Star Wars Vs. Star Trek, or which OS is better, so we welcome and embrace this new brand of geeks.  It is doubtful that they will hang around the clubhouse for long though.

Culture is a fickle mistress who grabs on hard and then quickly moves on.  The Geek geeks are really more of a pop culture phenomenon  and over time it will dwindle, leaving us to go back to our SciFi, Computers, Chemistry sets, algorithms and general world problem solving responsibilities.   Hopefully maintaining bit of understanding and acceptance from the mainstream culture.

In the end we geeks will always be here, and we will always be making the world a better place, so, embrace your inner geek!

When somebody calls you a geek, don’t quibble about stereotypes, but take it as a compliment.



Geek Love…

Author: stephen
January 30, 2008

A few months or so ago, I decided to completely re-embrace my geekness.. I have spent awhile hiding it in the shadows, forcing back shouts of glee when a really cool sci-fi show was advertised, or when a really sexy looking computer was in use at a coffee shop, but those days have come to a close.

I sit here now, with a geek card in my wallet (even though it is not laminated… ), a “work shirt” that has a patch on it that reads geek, and license plates that say ‘geek 2 u’ on them… Overkill, maybe, but I have a lot of geek love to make up for.

What is geek love you ask? Well, if you’re asking, I am not sure why or how you found this site, but in the interest of spreading the news I will explain. A geek, in the past, was considered a person who is odd or peculiar, and especially one who is perceived to be overly intellectual. Technically I would say that this is still true. Most geeks I knew are odd, but in a good way, and society is finally beginning to see that. Not that societies opinion is important, or even relevant for that matter, but is nice to know that we are not subjugated to the computer lab and forever deemed unlovable by the opposite sex anymore.

As a whole, no matter how hard I tried to hide it, most of my friends saw and referred to me as a geek. I am on the speed dial anytime their computer does anything they don’t like, I am the one who knows the date and time when they can watch some particular sci-fi show, and if you need someone who can name the title and season for any Star Trek episode (any spin-off), then yep, I am the one you call.

Now, I can almost hear some of you out there saying… “How did I get on this dorks website?” Well, remember its geek to you… ;) You should also remember that times are a changing… Geeks are the new jocks… women love us.. men want to be us .. and don’t even pretend your not jealous when I am sitting in the coffee bar next to you writing a new blog entry on my decked out MacBook Pro, listening to my 80 Gig iPod, and taking calls on my iPhone…

As proof of this change, I refer you to wiki :

The definition of geek has changed considerably over time, and there is no longer a definitive modern meaning. Here are some of the many definitions:

  • A person who is interested in technology, especially computing and new media. Most geeks are adept with computers, and treat the term hacker as a term of respect, but not all are hackers themselves.
  • A person who relates academic subjects to the real world outside of academic studies; for example, using multivariate calculus to determine how they should correctly optimize the dimensions of a pan to bake a cake.
  • A person who has chosen concentration rather than conformity; one who pursues skill (especially technical skill) and imagination, not mainstream social acceptance.
  • A person with a devotion to something in a way that places him or her outside the mainstream. This could be due to the intensity, depth, or subject of their interest. This definition is very broad but because many of these interests have mainstream endorsement and acceptance, the inclusion of some genres as “geeky” is heavily debated. Persons have been labelled as or chosen to identify as mathematics geeks, engineering geeks, sci-fi geeks, computer geeks, various science geeks, movie and film geeks (cinephile), comic book geeks, theatre geeks, history geeks, gamer geeks, music geeks, art geeks, philosophy geeks, and literature/rp geeks

Personally, I lump all us geeks together for the most part… except you band geeks… you have, over time become dweebs, and well, none of us want dweebs around. ;)

Realize that for the most part, I’m being a bit tongue in cheek, but the point is made.

Geeks are here, Geeks are cool, and Geeks aren’t going anywhere… (although we will be unavailable during episodes of Battlestar Galactica, new season starting in March )

So, knowing all of this, start showing your geek love !