Archive

Archive for the ‘Tech Geek’ Category

Collision detection without physics.

December 14th, 2011 4 comments

A frequent question that comes up in the Corona SDK forums is how to detect when two images on a screen hit each other. This is known as a “Collision”. The ability to determine when two things have bumped into each other is called “Collision Detection”.

Within Corona SDK, being that its an event driven system, we like the idea that we can have the system tell us when things hit each other and we just have to write the code to handle the interaction of the two. This is a coo concept and it works, but . . .

It requires using the Physics engine to do so.

Corona SDK uses a wonderful 2D Box model for physics and that model supports this event driven model and it works well. But if you’re game does not need physics and many apps don’t, like a card game where you move a card to a stack, its kind of silly and wasteful to include the overhead of the physics engine. You don’t need all of those angular momentum floating point mathematics going on for your game.

So how do I detect collisions? I don’t see any API calls to do that?

We really can’t use an event driven model like the physics engine, but there is a very simple method (well there are two) that use other features of Corona SDK, in particular using an “enterFrame” event on the Runtime listener.

Basically we have to write the code that the physics engine is doing for us and it’s not all that complex.

In my personal model, I typically have a table/array of all of my on screen objects and then I have my player’s avatar object.

1
2
3
4
5
6
local objects = {}
for i=1, 20, do
objects[i] = spawnEnemy() -- spawnEnemy creates on display objects and returns it.
end
local player = display.newImageRect("avatar.png", 64, 64) -- create me.

At this point we have a table of enemies in the “objects” table and my player object.

For the Runtime enterFrame event, you need a function to process the collision detection.

1
2
3
4
5
6
7
local function testCollisions
for i=1, #objects do
if hasCollided(objects[i], player) then
-- do what you need to do if they hit each other
end
end
end

So we simply iterate over the list of objects and see if any have hit the player object using a function called hasCollided.

This is a function that you also have to write.

There are two main methods for doing this, one is based on rectangles overlapping each other. The other involves circle testing.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
-- rectangle based
local function hasCollided(obj1, obj2)
if obj1 == nil then
return false
end
if obj2 == nil then
return false
end
local left = obj1.contentBounds.xMin <= obj2.contentBounds.xMin and obj1.contentBounds.xMax >= obj2.contentBounds.xMin
local right = obj1.contentBounds.xMin >= obj2.contentBounds.xMin and obj1.contentBounds.xMin <= obj2.contentBounds.xMax
local up = obj1.contentBounds.yMin <= obj2.contentBounds.yMin and obj1.contentBounds.yMax >= obj2.contentBounds.yMin
local down = obj1.contentBounds.yMin >= obj2.contentBounds.yMin and obj1.contentBounds.yMin <= obj2.contentBounds.yMax
return (left or right) and (up or down)
end
-- circle based
local function hasCollidedCircle(obj1, obj2)
if obj1 == nil then
return false
end
if obj2 == nil then
return false
end
local sqrt = math.sqrt
local dx = obj1.x - obj2.x;
local dy = obj1.y - obj2.y;
local distance = sqrt(dx*dx + dy*dy);
local objectSize = (obj2.contentWidth/2) + (obj1.contentWidth/2)
if distance < objectSize then
return true
end
return false
end

Depending on the shape of your player and objects, you may find that circles work better or rectangles work better. In my game Omniblaster I used both methods depending on the objects. My space ship has rounded shields and my rocks were basically round, and my enemies were basically round, so using the hasCollidedCircle made more sense to use.

When I say rounded, the images have transparency that when using rectangles would cause the objects to hit before they looked like it.

Yet, when I fired my phasers or torpedoes, those graphics fit nicely into rectangles, so using the rectangle hasCollided method was a better choice.

One gotcha that you need to be aware of is that if your processing takes too long, (longer than 1/30th of a second or 1/60th depending on frame rate) then your collision detection will fire again before you finish, so I usually change my collision handler to something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
local isCheckingCollisions = false
local function testCollisions
    if isCheckingCollisions then
   return true
    end
    isCheckingCollisions = true
for i=1, #objects do
if hasCollided(objects[i], player) then
-- do what you need to do if they hit each other
end
end
isCheckingCollisions = false
return true
end

This should be a lighter weight collision detection system than the overhead of the physics engine. Though you don’t get filters, being able to define polygon shapes unless you roll you’re own!

Happy coding!

Understanding “SCOPE” for beginning programmers.

October 14th, 2011 1 comment

Scope is a term used to describe where a particular asset, be it a variable, object, array or function is available to be accessed. It’s an important concept that needs to be grasped to avoid bugs and reduce the amount of time you spend developing code.

Since the primary audience for this will be posting to the Corona SDK forums, we will be using the language “Lua” in our examples, but this holds true for almost every programming language in use today. Also, since scoping applies to different bits of your program, variables, objects, etc. We will be using the term variable in our code for simplicity, just keep in mind that all the above assets, even functions at the end of the day are variables.

There are a few key terms that we will be using:

  • Global – A global variable is available everywhere.
  • Local – A local variable only exists within the block or chunk of code where it’s defined.
  • Block – A generic term for a block of code. In Lua, these are sometimes referred to as chunks.
  • Namespace –namespace is a term applied to the area where a given variable’s name is active or in context.

Lets talk about blocks for a moment. When it comes to locality, the following programming constructs define blocks:

The file/module containing the code. Thus in lua, your “main.lua” file is one block. Any thing defined in that file is accessible to that file.

1
2
3
4
5
6
7
8
9
10
11
12
--
-- main.lua
--
local characters = {"Fred", "Barney", "Wilma", "Betty"}
local location = "Bedrock"
local function pickCharacter()
    return characters[math.random(#characters)]
end
local thisCharacter = pickCharacter()
print (thisCharacter)

In this example, our entire main.lua file is one block. It contains a function, which itself is a block. The variables, characters, location and thisCharacter along with the function pickCharacter are available to be accessed anywhere within main.lua.

Inside the function pickCharacter, I was able to see, access and modify the variable “characters” because it was defined within the main.lua chunk above me.

Functions though are also blocks. Variables created within functions are only available to that function. Lets expand our example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
--
-- main.lua
--
local characters = {"Fred", "Barney", "Wilma", "Betty"}
local location = "Bedrock"
local function pickCharacter()
    local choice = characters[math.random(#charaters)]
    return choice
end
local thisCharacter = pickCharacter()
print (thisCharacter)
print(choice) -- this will print nil, choice doesn't exist in this context.

I made a very subtitle change to the pickCharacter function. I’ve declared a variable inside it called “choice” and I’ve assigned it the value of the random character chosen. I then return the value of that variable to the caller.

The difference here is now “choice” is defined within the block “pickCharacter” so it only exists or is available to that block of code. From my main.lua chunk, if I try to print the value of choice, I will get “nil” because that variable has not been created and initialized within my main.lua block, but within the pickCharacter function block.

Other things that are considered blocks with regards to scope include “IF” statements, “SWITCH” statements (Lua doesn’t support switches, but many other languages do) and your looping statements, “WHILE”, “REPEAT”, “FOR”, “FOREACH”, etc. Again Lua doesn’t support all of these, but you will run into them in other languages.

Not all languages let you declare variables inside these blocks either. For instance in ‘C’, your variables all have to be declared at the top of a function block, yet in ‘C++’, you can define them in the middle of a FOR loop.

Declaring Variables

In a language like C or Objective C, you have to be very explicit with your variable declarations:

1
2
3
4
5
6
void main(int argc, char *argv[]) {
char *charaters[4] = {"Fred", "Barney", "Wilma", "Betty"};
char *location = "Bedrock";
char *thisCharacter = null;
...
}

If you do not declare a variable at the top of the function or in a valid place in C++/Objective C, the complier will give you an error and not build your program. When languages like JavaScript (which lead to Flash’s ActionScript) and PHP were developed (and Lua has this same behavior) variables no longer had a specific type and no longer had to be declared. You could just start using a variable:

1
2
3
// Javascript example.
characters = ["Fred","Barney","Wilma","Betty"];
var location = "Bedrock";

I no longer had to tell the system if it was a string, number, table etc. I could just assign values and go on. An “optional” “var” tag is allowed.

This is where paying attention to scope becomes critical. The “var” isn’t optional. It controls the scope of the variable. In Lua, this is the same as putting the word “local” before a variable. What is the difference?

In Javascript and Lua if you DO NOT put the var or local in front of the variable the first time you reference it, it becomes a “Global Variable”. It is accessible anywhere with in your program. Cool, that means I don’t have to worry about passing my variables around or worrying about scope, I can just make everything global…..

Not so fast, there young padwan learner. Globals are very bad things if you treat theme without caution and careful regard.

Lets look at an example using the infamous “I” index variable:

1
2
3
4
5
6
7
myTable = {} -- make an array
for i=1, 10 do -- populate it with numbers
myTable[i] = i
end
print(i) -- prints "10"
myResult = myFunction()
print(i) -- prints "12"

The variable I changed from 10 to 12. Why? Well lets look at the code for the function myFunction:

1
2
3
4
5
6
7
function myFunction()
count = 0
for i=1, 12 do
count = count + i
end
return count
end

The developer of myFunction didn’t localize the variable I (nor the variable count for that matter) and when myFunction runs, “I” is left at 12 when the for loop ends so you in your program expects “i” to still be 10, but its not because both your “i” and the function’s “i” are accessing the exact same variable. If you used a variable called count, it would get trashed too by the function.

Therefore it’s important that when you write functions that someone else may call later (if your working on a team) or for your own sanity, to make sure you localize variables and just not use globals because they are easy.

This problem would be solved by the function being written as:

1
2
3
4
5
6
7
8
function myFunction()
local count = 0
local i
for i=1, 12 do
count = count + i
end
return count
end

Specifically within Lua when using modules, global variables are available to all modules. Lets say I have a variable I define in main.lua as:

1
score = 100

and I’m in another module, say “level1.lua” and I print the value of “score”, I will get “100” printed. Lua supports a special table called _G which you can add member elements too for this purpose of passing around variables between modules. But don’t over use it. And its good to use _G instead of loose variables like the “score” example above since its visually intentional that you intended for that value to be globally available instead of just sloppy code.

Lua does you a favor and namespaces your variables for you behind the scenes. Lets look at this example:

1
2
3
4
5
6
7
8
9
local count = 10
print(count)
local function myFunction()
local count = 30
print(count)
end
print(count)

You will get the following output:

1
2
3
10
30
10

Within the scope of myFunction, “count” is a unique variable to that block of code. When it returns, my original “count” variable remains untouched. This is an important concept to understand if you are unsure of when to use the word “local” in front of a variable or not. Lets look at the same example without the word “local” in the function:

1
2
3
4
5
6
7
8
9
local count = 10
print(count)
local function myFunction()
count = 30
print(count)
end
print(count)

You will get the following output:

1
2
3
10
30
30

In this case, we didn’t localize “count” to the function, so when it looked to find the variable “count”, it went up to the next higher level and found a variable within that chunk’s scope which is available to my function and the higher level “count” variable changed.

Of course avoiding using the same name variable in different places helps avoid these problems, but in languages like Lua were we can use untyped, undeclared variables, it’s critical to understand when variables are in scope and when they are not.

Hopefully this will help you understand the “local” tag and when you need to use it and help you avoid unnecessary headaches. Happy Coding!

Categories: Tech Geek Tags:

Why my SEO sucks.

September 9th, 2011 1 comment

Search Engine Optimization or SEO is the tricks that webmasters and content producers do to get their websites and articles to rank as high as possible in sites like Google, Bing and Yahoo when people put in words and phrases to find content.   Some people consider it an art form, others voodoo, but its magical, its technical and its ever changing.

My photography site, http://www.robmiracle.com is one of my prides and joy.  My day job is building websites and the company I work for spends a lot of energy making sure our sites and content have great SEO.  I have the pleasure to work with people who know what they are doing; and as a trainer, its my responsibility to know this stuff so I an instruct the people who are producing content and sites.  So while I don’t want to label myself as an SEO expert, I know what needs done and how to produce content and code sites that should rank rather well.

Yet for my photography site, my SEO sucks.  I decided one day to search for “Raleigh Wedding Photographer”.  I didn’t expect to be on the first page or realistically the 2nd.  I don’t do weddings full time and I would hope those shooting full time should rank above be.  But I would hope to show up by page 3 or 4 or 5 or 10.  Nope, didn’t even make it there.  In fact, I gave up looking for my site after I got 20+ pages deep.  I just wasn’t there.

After doing a little research and using Google’s “Webmaster Tools“, I quickly isolated a few problems.  I have very few backlinks (where people link to me).  That’s something I will have to fix over time.  Not all backlinks are created equally.  Higher rated sites that link to you are more valuable than less rated sites.  In fact, having a very high ranking site like CNN link to you is more valuable than a dozen personal blogs that link back to you.  So if I want to be seen, I need to join more directories.   But that’s hardly the problem.

I’m being burned by “keyword density”.  Basically for good SEO, you need to have your keywords show up on your page, in your headers and in your content.  One of these pieces of information, your pages <title> tag (some hidden code in the header) is one of the most critical parts of the page.  My title was:  “Rob Miracle Professional Photographer”.  At no point does that title tell you where my area of focus is (Raleigh-Durham, NC) nor does it tell you the type of photographer I am (Wedding, Fashion, etc.).

Likewise there is a <meta description> tag also located in the page header provides a text description about your website or that particular page.  My description contained Raleigh and Wedding, but it wasn’t written all that well and didn’t have other important keywords in it.  Keep in mind, this is what shows up on Google as the text under the title, so it should be something people will read, just not a list of random key words!

After that, my home page had no text on it, well, the menu and footer links were there.  I’m a photography site, so my site is all about pictures.  Photo sites like this are going to have a harder time than sites with some text on the page because there is little the search engines can extract from the page.  I spent a weekend editing every photo to make sure there was a caption in the IPTC meta data and changed my site’s program code to extract that caption and add it as the “alt” attribute on each <img> tag which greatly increased the “keyword density” on my front page.  It was important while writing these captions to make sure I got the right keywords in the captions.

So after providing better titles, descriptions and text on my page, I would think I would fair better….

NOT!

My site still sucks.  Using the Webmaster Tools, I see that Google has seen the increase in keyword density.  Raleigh is however, still the 81st most popular keyword on my site occurring 29 times.  “Wedding” shows up 14 times and is the 166th most popular keyword.  Wedding shows up 8 times on my front page, which seems like a lot.  Until you discover that “Kentucky”, “Model”, “twitter” and “tutorials” all show up well over 500 times!!!!

I’m being killed by my blog and photo tutorials.  These posts make up a bulk of the content on the site.  They are things I feel that are important to my photography friends as its how I give back to the photography community.  So it looks like I will be moving my blog content to another domain.

 

Categories: Tech Geek Tags: , , ,

Implementing a Game Center button in your Corona SDK Game.

June 13th, 2011 6 comments

I’ve been trying to figure out how to do a Game Center button for my game and be able to link to the Game Center leaderboards and achievements directly from my Corona SDK based game.

I had not found much information on the Internet on how to do this. Most examples were involving Objective C using Xcode and adding the Game Center framework to the game, then calling relevant methods from the framework.

I basically gave up on the idea about connecting directly to the leaderboards and decided to just try and launch the Game Center app from my game.

Here is the code I used (mostly lifted from Jayant C Varma’s “rating.lua” file found on the Corona SDK site):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local function testNetworkConnection()
local netConn = require('socket').connect('www.apple.com', 80)
if netConn == nil then
return false
end
netConn:close()
return true
end
    
local function gotoGameCenter()
local device = system.getInfo ( "environment" )
local appURL = "gamecenter:"
if device == "simulator" then
print ( "Cannot spawn this URL in the simulator" )
else
if testNetworkConnection() then
system.openURL ( appURL )
end
end
end
local gameCenterButton = ui.newButton{defaultSrc="gamecenterbtn.png", defaultX = 164, defaultY = 32, onRelease=gotoGameCenter}
gameCenterButton.x = display.contentWidth / 2
gameCenterButton.y = 110
highScores:insert(gameCenterButton)

And much to my surprise, it works like a charm. Now to track down those pesky specific URL’s…. I should note, this is a new addition to my game and it has not been submitted to Apple yet. No warranties expressed or implied.

Implementing a Health Status Bar in Corona SDK

May 30th, 2011 No comments

Implementing a Health Status Bar in Corona SDK

Many games need a way to show the players how well they are doing. It could be a simple counter to show the number of lives left or a bar that decreases and increases as a players energy goes up and down.

There are as many different ways to do this as there are games but lets look at a couple of different ways.

The simplest may be simply using text to display the health status:

1
2
3
4
5
local lives = 5
local livesLabel = display.newText("Lives: ", 10, 30, native.systemFont, 16)
local livesValue = display.newText(string.format("%d", lives), livesLabel.contentWidth+20,30,native.systemFontBold, 16)
livesLabel:setTextColor(225,225,225)
livesValue:setTextColor(255,255,255)

Then later in your code when a player looses a life (or gains one back) simply change the text value of “livesValue” and Corona will magically update the value for you:

1
2
3
4
if lives &gt; 0 then
lives = lives - 1
end
livesValue.text = string.format("%d", lives)

Of course you might want to drop a graphic behind the text, set the colors accordingly, and possibly drop a duplicate text string underneath offset by a pixel to give a little stroke/shadow to the text.

But our players expect more from games and a simple text display won’t be accepted as high quality. Traditional arcade games have shown your lives as small versions of your player’s graphic. If your game involves a ship, perhaps you see a display of 5 little ships to show your life count.

With a display of say 5 small rockets, you will need one image and you will replicate it several times.

1
2
3
4
5
6
7
8
9
local lifeIcons = {}
local lives = 5
local maxLives = 5
local i
for i = 1, maxLives do
lifeIcons[i] = display.newImage("lifeicon.png")
lifeIcons[i].x = 10 + (lifeIcons[i].contentWidth * (i - 1))
lifeIcons[i].y = 30 -- start at 10,10
end

This will create a display of 5 little icons that shows your full life status. Later in your code when you need to change the display:

1
2
3
4
if lives &gt; 0 then
lifeIcons[lives].isVisible = false
lives = lives - 1
end

Later when you need to give a life back:

1
2
3
4
5
lives = lives + 1
if lives &gt; maxLives then
lives = maxLives
end
lifeIcons[lives].isVisible = true

But what if you want more of a bar-graph display. As long as you’re using discrete values, you can continue to use a similar method using different graphics for each value, in this example, there are 5 lives, so you can create 5 different graphics for each of the 5 life states.


Instead of using a loop to load in the same graphic, you would need to load in each of the separate five graphics in and position them all at the same location:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local lifeIcons = {}
local lives = 5
local maxLives = 5
lifeBar[0] = display.newImage("lifeicon0.png")
lifeBar[1] = display.newImage("lifeicon1.png")
lifeBar[2] = display.newImage("lifeicon2.png")
lifeBar[3] = display.newImage("lifeicon3.png")
lifeBar[4] = display.newImage("lifeicon4.png")
lifeBar[5] = display.newImage("lifeicon5.png")
local i
for i = 1, maxLives do
lifeBar[i].x = 10
lifeBar[i].y = 30
lifeBar[i].isVisible = false
end
lifeBar[lives].isVisible = true

Then to change the graphic:

1
2
3
4
5
if lives &gt; 0 then
lifeBar[lives].isVisible = false
lives = lives - 1
lifeBar[lives].isVisible = true
end

This same concept can be done with MovieClips.

1
2
3
4
healthSprites = movieclip.newAnim{"lifeicon1.png", "lifeicon2.png", "lifeicon3.png", "lifeicon4.png", "lifeicon5.png", "lifeicon0.png"}
healthSprites.x = 50
healthSprites.y = 10
healthSprites:play{startFrame=1, endFrame=lives, loop=1, remove=false}

Then to show the current health level:
[/crayon]

lives = lives – 1
if lives < 0 then
lives = 0
end
if lives == 0 then
healthSprites:play{startGrame=6, endFrame=6, loop=1, remove=false}
else
healthSprites:play{startFrame=1, endFrame=lives, loop=1, remove=false}
end
[/crayon]

This gives you the benefit of a little animation as well. Unlike the example above, we load in the “No life left” graphic in frame 6, because movieclip starts at frame 1. We could have put frame 0 first, and just done a “lives + 1″ to get the right offset.

Hope this is helpful!

 

CES: Understanding all these iRumors – new iPad, new iPhone blah blah blah… Real Predictions for Apple’s products.

January 5th, 2011 No comments

As with many in the tech and gadget industry, we depend on trade shows like the annual Consumer Electronics Show (CES) to provide us a hint of what we will be spending our money on over the next few months or even years.

While most vendors are happy to show their vaporware and even some things that are close to being reality, we are frequently more interested in what’s not there. For the 2011 CES, that absence is provided by Apple.

Apple historically does things their own way. Instead of using large trade shows to announce new things, they prefer to have their own show. Instead of releasing things for the Christmas shopping season, they release them on their own schedule and actually now has a schedule that fills out their year rather nicely.

Which of course gets us to the crux of the matter.

Today’s twitterverse has been filled with people hunting for any hint of what Apple has up its very closely guarded sleeve. Will there be an iPad 2. What will it be like? What about the CDMA “Verizon” iPhone? Is that new frame an iPhone 4/CDMA or an iPhone 5?

Well I’m here to tell you exactly what all that means. And how do I know? Because Apple is predictable.

Apple stunned the smart phone market with the release of the iPhone. Now almost 5 years and 5 iPhones later, we should by now fully know what the next iPhone will be. Perhaps we won’t know processor and memory specifications or even the form factor, but this is what you can plan on.

In May, Apple will hold one of its developer conferences in Silicon Valley. They will announce the iPhone 4G. Not a 5 but a 4G. They will at the same time announce not only an AT&T phone, but most likely a Verizon and Sprint versions and even possibly a T-Mobile version. The phones will be available at the end of June for $199 with a 2 year contract for the entry level phone and $299 for the higher end one.

Why? Well lets look at history. The iPhone 2 and 3 was an EDGE (2G phone). Once AT&T had their 3G network rolled out, then we got a 3G phone for a 3G network. The next revision was a 3GS then a 4. So clearly, the next higher phone with just a number indicates that its getting ready for the next big network. Then when the network is ready, we get a phone named for the network. Guess what? AT&T and Verizon’s LTE “4G” networks are launching or will be launched by the end of June (convenient eh?) Apple will be out of their 5 year exclusive deal with AT&T and instead of having a CDMA and a GSM phone on different schedules, it only makes sense for them to come out at the same time.
Then next year in May, they will announce the 4GS, and in 2013, the 5, 2014 the 5G etc. It’s a predictable repeatable pattern.

What will this new phone likely have for us? Who knows, but a 4G network will handle video better and with the phones divided over multiple carriers, the WiFi limits on FaceTime will likely go away. Higher quality video and streaming (things we are seeing in all these CES tablets) will likely be there. Count on it.

Now for all the iPad 2 rumors. The iPad was announced on Jan 27, 2010 and went on sale in April 2010. Now since we know Apple to run on a schedule these rumors about an iPad 2 coming in January or February are not rumors. You can expect Steve Jobs and Company to put on a show in the San Francisco Bay area that will herald in the iPad 2 and guess what…. It will go on sell in April. It might even be called the iPad 4/4G since Apple would be silly to not prepare it to run on the LTE networks once they become available, though they may not want to tip their hand on the iPhone 4G yet.

Yea, we are getting cameras and a smaller form factor and longer battery life and better connectivity. It will be faster with more memory and have some other cool features that we haven’t thought about. Clearly all the other tablet makers have upped the ante on what hardware and features are going into their iPad killers (that amazingly won’t ship until the next gen iPad does). Apple won’t lower the price, but you can bet the next iPad’s guts are going to be a bit better than all these vaporware tablets that are being announced at CES. Will it be greatly better? No. Will ASUS or Toshiba build an iPad killer? No, but they will get their share of sales. Apple won by getting it out a year ahead of everyone else.

So there. No more rumors. No more needing to look for any hint of a piece of hardware. No more speculating on when we will see these. Oh and towards the fall, we will get new MacBooks and iMac’s as well.

Categories: Tech Geek Tags: , , , , , , ,

Review of the RIM BlackBerry Twitter App

April 9th, 2010 1 comment

My life as a BlackBerry owner has seen me through three handsets. I started with a Verizon 8703e, a reasonably functional handset. The browser was terrible and there were not a lot of apps for it. TwitterBerry was my app of choice early in its infancy. But as the developer’s added features (including fetching 200 tweets) it became unusable.

A short term acquaintance with a Pearl 8130 allowed me to browse the Internet better yet TwitterBerry didn’t seem to run well. I switched to TwiXtreme, which seemed to run better. I never got into hand held tweeting with that handset, partially because of the half-keyboard, the other part was the small screen and the apps still did not perform well.

In January of this year, I inherited a Curve 8900 on the AT&T network. I installed TwiXtreme, but again, just couldn’t get into twittering from my hand-held, though it was a nice “cute” app.

Today, I installed the office Research In Motion Twitter Application available from the BlackBerry App World. It installed quickly. I added my twitter login and password, said to remember me and it was off an running.

The app has all the usual features, see your mentions, direct messages and lets you reply to messages, set your status and so on. It does it fast and elegantly. Though it only shows two tweets at a time, it very easily scrolls to older tweets and if its fetching older tweets in the background you don’t see any delay.

It also supports lists, popular topics and search, something not seen in the other apps I’ve tried. And like any good Twitter app, it counts down your available number of characters as you compose your tweets.

Where the RIM Twitter client has impressed me is how it fits in with the Blackberry. You are notified when new tweets arrive (a feature I turned off), when new mentions and direct messages show up along with the rest of your messages. Now, e-mail, FaceBook messages, gTalk notifications, and important Twitter notifications all flow through a single messaging interface.

It also interfaces well with the camera and stored photos. I can initiate a photo from the Twitter app or I can grab an existing photo from my memory card and tweet it out using TwitPic in a very seamless manner.

It is supposed to shorten URL’s, but I’ve not had a chance to test it yet. We will also have to see what the impact on the battery will be with it running in the background all the time.

Pending the battery tests, this looks like one very well done application and its supposedly an open Beta. My version is 1.0.0.37.

At this point, I’d have to give it a thumbs up and recommend others give it a go. Twitter on the hand-held might become fun again.

Categories: Tech Geek Tags: , , , , ,

Odd MacBook Restarts — Maybe I’m trying to create Higgs Bosons

November 4th, 2009 2 comments

Over the past couple of days, I’ve been working on a PowerPoint presentation for an upcoming training session for my day job. I’m using Microsoft Office 2005′s PowerPoint on a recently upgraded to Snow Leopard (10.6.1) MacBook Pro and I’ve had a couple of odd crashes that I’ve not experienced before.

Both times the OS-X window manager blue screened, brought up the Mac “Plasma” login screen and I was able to log back in and continue work. Now while this may be some Snow Leopard vs. M$OFT quirk causing the window manager to die, I’d rather consider other options.

Higgs Bosons

So just what do these sub-atomic particles have to do with this? Well this article explains why some
reputable scientists believe that the Higgs Bosons (I’m not responsible for the headaches from reading that Wikipedia article) are themselves travelling back in time, sabotaging the Large Hadron Collider to prevent it from creating them.


Time-travelling Higgs sabotages the LHC. No, really

from Newscientist.com. The article quotes the New York Times where it humanized the physics writing:

“the hypothesized Higgs boson… might be so abhorrent to nature that its creation would ripple backward through time and stop the collider before it could make one, like a time traveler who goes back in time to kill his grandfather.”

In my case, I’m going to be teaching a subject that the customers want to learn, but I fear the
Pandora’s Box (slightly NSFW image on the page) that I may be opening by teaching it. The topic is about a templating language we use within our tools.

Both of these quasi-reboots (it only rebooted the Window Manager, not the whole OS!!!) happend as I
was putting together one particular slide on “Lists and Hashes”. Something is telling me to not include this slide. Perhaps I’m going to let people know they can wield more power. Is it karma? An omen? An act from the programmer gods? or Higgs Bosons?

Is what I’m about to teach so abhorrent to nature that its instruction is rippling backwards
through time and stopping my PowerPoint slide before I can create it?

Of course, being a science geek, I should point out Occam’s'Razor would suggest I look for a simpler, more logical explanation. In this case, “Microsoft Sucks”.

I’m at a paradox with this. Should I continue? Should I take it as a sign to back off?What are your thoughts? Leave your comments below.

Cool New Plugin — Freebie Images

October 13th, 2009 1 comment
two people on horse back riding on wet sandy b...

Horses Sunset from Stock Photo

 

Today I learned about a new WordPress Plugin called “Freebie Images” from http://www.freebieimages.com/.

The plugin is provided by Crestock.com, an online photo stock agency that normally sells its stock photos for use. But they make some good high quality images available for free to bloggers.The plugin shows up when you write a new post or page and gives you a search box to look for images for your blog.Once you find a photo you are interested in, just click the photo and its inserted into your blog. 

You have to be patient and it doesn’t look like it lets you use more than one a post, but this looks like it could be interesting.

Categories: Tech Geek Tags:

6 Reasons to upgrade to TweetDeck 0.30

September 10th, 2009 2 comments

and 4 reasons you should be using TweetDeck anyway.

The newest release of TweetDeck came out yesterday, September 9th and it included a lot of new features.

For those that do not know what TweetDeck is, it is a Twitter “client” that runs as an application on your computer rather than using Twitter through their website. Clients are a popular way to use Twitter rather than using their Website.

Here are some of the highlights in TweetDeck 0.30 that makes it worth upgrading.

1. Better bit.ly integration.

Prior to this release, Tweetdeck used bit.ly as its URL shortener. It also would expand bit.ly URL’s to their full URL in a preview window so you could see the URL you were really clicking on. But bit.ly is more than just a URL shortening service. It provides analytics on your tweets. They can track click thru’s on URL’s that you shortened through their website. This gives you an idea of how popular your links are based on click through rate. Now TweetDeck 0.30 allows you to enter your bit.ly account ID and API key and URL’s shortened in TweetDeck will now show up on your bit.ly account.

2. Better handling of multiple accounts.

This may seem like a minor thing, but it was quite a major feature for me. It better serve my Twitter followers, I decided I should separate my Geek tweets from my Photography tweets. So I now have two twitter accounts that I post from. For some of my followers, I follow them from both accounts.

Previously, if I clicked on a Reply or Retweet and I followed that person from multiple twitter accounts, it would sent the tweet for each account, meaning for those people, it double posted unless you were careful and turned off one of the two accounts. Now TweetDeck is smart. If I reply from a column that is for my @OmniGeek account, it picks that account to tweet from. If I click from a column setup for @MiracleMan then it uses only that ID to tweet. I’m sure my followers will greatly appreciate this feature.

3. Better Facebook support.

I pretty much ignored Facebook from TweetDeck. Most of the people I follow on twitter I have as friends on Facebook, so I ended up reading their status updates twice.

Now you can get a full feed complete with Wall posts, photo uploads, and those annoying app updates. I’ll now know when you iced Don Bunko in Mafia Wars. Okay, maybe that’s not a good feature.

In addition to the enhanced feeds (and you have always been able to update your status from TweetDeck versions that supported Facebook) you can now also favorite (Like) a post and you can leave Facebook comments on posts directly from TweetDeck. It shows you the Like and Comment counts and clicking on the comment balloon or the thumbs up icon lets you activate those items.

4. MySpace support.

MySpace has kind of become irrelevant with Facebook’s rapid growth. But people still use MySpace. Now from TweetDeck I can update my status as well as my mood. I can also see my friends activities, their statuses and comments left for me. These are different columns. I would have liked to have seen a combined Status/Activities column since column space is precious in TweetDeck.

5. Photo uploading is now drag and drop.

Instead of clicking on the photo icon (which you can still do) you can drag a photo to the update bar and it will upload it to your photo sharing service of choice. Previously this was limited to yFrog and TwitPic. Now TweetPhoto has been added and its the default unless you change it. Now if it just did Flickr!

You can upload 5 photos at a time with this service. Oh and you can upload photos to Facebook as well.

Now 4 reasons you should be using TweetDeck anyway!

TweetDeck included a lot of changes in 0.30. I’ve highlighted what I think are the big changes. You can see the full list of what changed a the TweetDeck ChangeLog which has lots of information about each of the new features.

6. Automatic URL shortening.

Previously you had a separate box to enter a URL and had to click a button to shorten a URL. Now just entering the URL as you type your update will cause it to shorten once the URL is complete. Of course this is optional if you want to do it the old way.

If you’re not using TweetDeck you should. Its an incredible tool for managing your Twitter, Facebook and now Myspace accounts.

7. Its an Adobe AIR application.

This is a turn off for some people since you have to install Adobe AIR to being with. Of course people with IT locked down computers will struggle with their IT departments to get it added, but its so worth the fight. When a new version of TweetDeck comes out, it can install itself with nothing more than a click and perhaps entering your password. No ugly installers throwing pages of legalese at you. No techno-scary questions about where to install it and problems it might case. It just works.

8. Automatic Updates

If you are using twitter.com you have to refresh your page to get new updates. Tweetdeck checks every few minutes for you automatically updating your feed showing you what is new.

9. You can have multiple feeds going at once.

You can watch for mentions where you are referenced in a reply. You can have a column of your direct messages. You can have columns of search based replies. You can have a column that shows you currently hot or trending topics. You can even create columns to group your followers by. Do you want to separate your friends from your activities? You can. I’m follow four groups of people: Photographers, Programmer Geeks, Sports People and my Co-workers. I can group my followers and give each one their own column.

10. TweetDeck has awesome multiple-account support.

In addition to letting you manage your FaceBook and MySpace accounts in 3.0, TweetDeck has long supported multiple twitter accounts. Perhaps you have a personal account and a work account you need to use. TweetDeck will let you do that.

Go get TweetDeck Today. You won’t be sorry.

Comments? Have a favorite TweetDeck feature? Lets us know by posting a comment below.

WordPress Plugins: A Love – Hate Relationship

September 2nd, 2009 3 comments

wp-blue-1024x768Everyone who’s worked with WordPress falls in love with this free, open source blogging / content management system. The engineers who created WordPress gave it the ability to be skinned with themes and you can now find a million themes for your blog. Or with a little effort you can write your own theme as I did for http://www.robmiracle.com. But the engineers gave us something more: Plugins.

Plugins are ways to add additional functionality to your website using WordPress. Like themes it seems like there are a million plugins available. As with any community contributed add on: themes, plugins etc., some are better than others. Some are rock stars and some are lemons. For plugins, WordPress maintains an “app store” for the lack of a better term, where you can find and download (and starting with 2.7 of WordPress install automatically).

Adding a plugin is so easy:

  1. Login to your admin interface
  2. Click on Plugins in the left hand menu
  3. Click on Add New
  4. Enter what you are interested in finding in the Search field
  5. Browse the results. The 5 star rating system is pretty good!
  6. Click on the plugin you are interested in
  7. Click on Install
  8. Click on Activate
  9. Make any preference changes, most likely under Settings

And just like that, you have added features to your blog. The process is so easy you may find yourself adding and adding plugins because there is so much good stuff out there.

Use the 5 star rating to help determine the lemons from the rock stars!

Do you want random quotes in your sidebar? You can have them. Do you want to have quote marks turned into fancy quote marks without you doing any work? You can have that too. Fancy animated tag cloud? Easy forms? Show your latest tweets? Its all there for you.

But there’s a price to pay

Plugins are crack. You get addicted to them and before you know it you’ve sold your blog soul to the plugin devil.

Plugins kill your page load time

There are multiple studies on how people view web sites. But basically for every 10 seconds it takes your page to load, you loose 20% of your audience. Some studies say you have 7 seconds to get a readers attention and try to hold it. 5-10 seconds doesn’t sound like a long time, but its an eternity when someone is waiting to hear your message.

On both this blog and my photo portfolio site, I had installed a plugin recently called wp-Typography. It converted boring quotes to fancy quotes, figured out the right size dashs, managed wrapping text, hypenation and so on. It had a fairly high rating, 5 stars no less.

The plugin works by wrapping your page in some code and then it filters the text based on rules that you setup.

I recently switched hosting providers and I started seeing some long page load times in the 10-15 second range. A couple of viewers complained about the load time as well. I started to try and track down the problem and I opened a trouble ticket with the hosting company. Naturally I blamed them, they were “new” in the system.

Using FireBug’s Net panel, I was able to analyze where my delays were happening. The index.php file which is only 50K was taking over 10 seconds to load. The images, css and javascript were loading quickly. FireBug breaks down not only how long each request takes, but where that time is being spent. In my case it was “Waiting on Response”. This means that the web server was taking time to deliver the page.

So it was either an Apache (the web server) issue or a database issue (MySQL) since WordPress uses the database quite heavily. My tests showed that even a non-Wordpress page that accessed the same database was very fast, so I ruled out both Apache and MySQL as the cause.

What was left? WordPress. A friend suggested that it may be a recently installed plugin causing the issues. I took a few moments and went through all of the plugins that I really didn’t have to have, deactivating them, reloading the page measuring the time. wp-Typography was the first one I turned off. The 10+ second load on the index.php file dropped to 4 seconds.

This great 5 star, recommended plugin makes a lot of database queries and then filters the output file before letting Apache deliver it to your browser. Six to eight seconds for automatic M-Dashes is too high of a price to pay. I turned off a few more that I wasn’t using or were not essential and got the times down in the 2 second range. This morning I was still seeing some longer times for the whole page to load. I’ve temporarily turned off the e-Commerce plugin since it loads a bunch of unnecessary CSS and Javascript and is a database heavy plugin. Hopefully it will be faster.

I clearly need to find a way to only have plugins load on certain pages. For instance, I use the highly recommended “Contact 7″ for my contact form. It only needs to load on the contact page. There should be no DB queries or any CSS or JS injection on pages I’m not using it on, but with the WordPress architecture its a problem and there are no good solutions at the moment.

The moral of the story: Install only the plugins you need. Make sure you have caching on.

Categories: Tech Geek Tags: , ,

Why do you still run Internet Explorer 6?

August 22nd, 2009 2 comments

dieIE6die
There is a growing movement on the Internet. That movement is to bring to an end an era. That era is known as Internet Explorer 6. For those who don’t know what Internet Explorer 6 is, its called a Web Browser or a program that you use to visit web pages like this. Surprisingly many people don’t know what a web browser is, they just know you click on the Blue E to get on the Internet. This program is more commonly known as IE6

“Why is this a problem?” you ask.

IE6 is nine years old. In computer terms this is ancient. It is buggy, prone to hackers and others who want to do ill-will to your computer.

Internet standards have evolved considerably and there are many new features that web developers could use to make your Internet experience much better. Today’s browsers are hundreds of times faster when working with sites like Facebook and YouTube. And IE6 is filled with quirks that take web developers considerably longer to work around.

With the new features available to web developers, we can produce some extraordinary experiences for you. Making them work in IE6 seriously limits our ability to make your Internet time the best that it can be. For the betterment of the Internet we need everyone who can upgrade do so. Several major sites have announced that they will no longer be supporting IE6.

IE6 users represent around 20% of web users, so most people have upgraded. However for this blog, around 50% of you are still using IE6.

We know that there are several reasons why you cannot upgrade to a more modern browser. Perhaps your computer is running an operating system older than Windows 2000. Perhaps you are accessing this site from a computer at work where your IT department has it locked down. Those reasons are hard to deal with. The other reasons you might not is you fear change or you feel you lack the skill to install new software.

In the latter case, Microsoft certainly has not built Windows as a platform to make that easy. Its full of technical mumbo-jumbo and scary, multiple step processes that are indeed frightening. For your benefit, you should not let these two reasons from keeping you from a better Internet.

Leave a comment below about what browser you use and why? Also take the poll in the sidebar!

Categories: Tech Geek Tags: , , , ,

Tech Geek — Upgrading to WordPress 2.8 – Well that was easy.

June 11th, 2009 1 comment

2 Clicks.

Okay it was a few more.  I had to click the link on my start page to connect to this blog.  Then I had to click on the login link, then the Okay button to login.  But when connecting to a blog under WordPress 2.7 you get a link at the top “WordPress 2.8 is available! Please update now.”  The ensuing screen has a confirmation click, then sit back.

A couple of minutes later you have a shiny new <a href=”http://www.wordpress.com”>Wordpress 2.8</a> setup.  Now I was bad.  I didn’t backup my database before updating.  And you pretty much have to login afterwards to see the new setup.

But it doesn’t get much easier.   If you’re not running WordPress and you’re hosting your own blog software, this software should get a serious look.  Click <a href=”http://www.wordpress.org”>here to learn about WordPress</a>!

Tech Geek — Why You Should Be Twittering

April 18th, 2009 No comments

Twitter. Tweets. Tweeple twittering. Its all over the place like the yellow pollen covering every inch of your car and house. You can’t escape from it. Twitter (wikipedia) hit the mainstream and is no longer just some silly geek toy with a silly name.

In the past couple of months, Twitter has gone from geek-stream to main-stream in a big way. It literally has exploded into its own mass-media.

Get used to it folks. Twitter is here. And you need to join in!

WTF are you talking about? What is this “Twitter” you speak of?

Have you been under a rock? Okay, perhaps you have so here is a little background. Back in the day when you had to walk to school in the snow uphill in both directions, if you wanted to be heard on the Internet you had to play on mailing-lists or forums. You used sites that other people owned and managed.

Then the blogs came.

You now had the ability to have your own site and deliver your own content rather easily and others were permitted to comment on your content telling you how much they love your work or how stupid you really are. The later part, called “Trolling” has been around since there was anonymous Internet communication.

But blogs were still a bit of to setup and maintain and they didn’t handle the mobile world very well. So we needed something new. So in 2006 the world was gifted the wonder’s of Twitter. But it was obscure and people used it to connect friends together and let them share what they were doing using messages that worked with cell phone text messages, which means they are limited to 140 characters (plus overhead to make it into a 160 character SMS message).

Now you could blog, albeit short posts, in a very simple to setup and manage service. So now anyone can share their thoughts and read everyone elses going ons.

Well 140 characters doesn’t let you say much and its early utility was for friends to keep up with what they were doing:

Bill: I’m at the Coffee Shop, come on down!
John: I’ll be there around 10am!
Jill: I wish I could make it

Well it served a niche, but it was of limited utility. But people started using it to share real information and eventually breaking news:

jkrums: There’s a plane in the Hudson. I’m on the ferry going to pick up the people. Crazy. http://twitpic.com/135xa

And its utility to report breaking news came to fruition. So now every one is using it to get news, tell news, share information and with the addition of good search features, its now a strong research tool.

Thats a Nice History, but why do I want to be involved?

Frankly, if you’re not into using the Internet for socializing, you probably won’t get the maximum benfit from it, but if you have found MySpace or FaceBook, then Twitter is an obvious expansion of your resources.

Twitter is very similar to Facebook Status updates and in fact many people use utilities to post their twitter posts to FaceBook. But the utility of Twitter over FaceBook is that FaceBook updates are limited to your friends. Twitter status updates go into the public where anyone can see and search for them.

FaceBook is driven about finding people you know personally, friends, workmates, your high school crush, etc. Twitter of course lets you network with friends and such, but Twitter makes it eash to network with strangers who share common interests.

I’m not into social networking

Well don’t run away yet! Twitter can be useful in other ways. You don’t even have to participate either. Its more fun if you do, but twitter as become a great resource for finding things. You can go to http://search.twitter.com and put in something you’re looking for like say “coupon“. You will get a list everyone who has twittered about coupons lately. Many will have links to coupon sites or great deals. Just as we would use Google to find things, Twitter becomes another resource.

Now if your into a hobby like couponing, you can then use this search to find people who are posting things you like and then you “follow” those people. You don’t have to contribute (its better if you do). You can just be a consumer.

Twitter is a great resource for news too. Your local newspaper or TV stations likely has an account that they publish breaking news to, so you can follow your newspaper and keep up with that’s going on. Maybe you are not interested in news so much, but you want to keep up with your favorite sports team? You can find people who post news stories and commentary about your team or the enemy team!

Some sites even create specific twitter accounts for special events, such as Myrtle Beach’s Bike Rallies

And a natural extention from this is the Celeberty traffic. What to know what’s going on with Coldplay? Brittany Spears? You can follow them and read about their day to day musings, concert information, etc. Even Oprah is now twittering.

So there is plenty of content being produced on Twitter waiting to be consumed.

Still twitter wouldn’t be as powerful as it is with out its members creating content.

Okay, I need to check this out. Where do I start?

Thats easy. Go to Twitter’s Web site and click on the green “Get Started – Join!” button. You will need to enter just a little bit of information: Your real name, a “Twitter” username, a password and an e-mail address and you’re all set.

Next, you can explore around Twitter’s “Find People” option to find friends who might already be on twitter, find the popular celeberty and information accounts, etc. Then to find people who post things your interested in, go to http://search.twitter.com and find people saying things your interested in and follow them.

You follow people by going to their twitter page, by clicking on their photo associate with each tweet, then read about them in their profile, and click on the “Follow” button to add them to the list of people who you are interested in.

Then you visit Twitter’s Web site, login (or stay logged in) to visit your profile page. There you will see a list of messages your followers have produced and you can read to your heart’s content.

Getting Involved

At 140 characters, some messages will be a little terse and maybe your have a question or want to get more details. Maybe someone says something you know to be wrong or that you have better information on. Its very easy for you to contribute. You can reply to someone easily. When you move your mouse over a tweet you will see a small curved arrow. Click on that and your status bar the top will have the person’s name with an @ sign in front of it. This is called a “Reply”. Type what you want to say to them and click the “Reply” button.

Twitter replies are public. They are searchable and anyone can see them. Think of it as standing around the water cooler at work and replying to something somemone said.

Twitter allows you to send private messages directly to someone. You do that by typing the letter “d” and their name at the beginning of the status, then your reply, and click reply:

d MiracleMan Thanks for this blog post, its really helpful

would send that message to me and me alone. My twitter is also setup so that direct messages also come to my Cell Phone as text messages.

Eventually, you may want to say something of your own and you use the status block to post your own message.

The power of Re-tweets

Lets say you follow me and I return follow you. You will have a group of followers and I will have a group of followers, but they are likely to be very different and not have a lot of overlap. Lets say for instance that I have 200 followers and you have 100 followers. You post something I think is of value to my followers, I can “Re-Tweet” it and now my 200 followers will see your message as well, so its now going to be seen by 300 people. Then if one of my followers passes it on to their 500 followers, in two actions, you’ve communicated your thoughts to 800 people.

To Re-Tweet, you type RT in the status bar and cut and paste the message into the status form and click reply.

RT @MiracleMan Thanks for this blog post, its really helpful

The RT doesn’t do anything magical, its just a short “code” for people to recognize it. You always want to give the original poster credit for their tweet.

Stepping it up

When you first create your twitter account, it is very basic. You provide a name and nickname that’s publicly visible. They provide you with a colorful twitter blue bird themed background and you have an “Avatar” or small icon/picture that you can use to represent yourself. At a minimum you should upload your avatar photo. The default brown block with light blue circles is a signal to people who would follow you that your a “n00b” (newbie or new user) and can be a turn off. It doesn’t have to be a photo of you, though many people do use pics of themselves.

Secondly, you can visit your “Settings” and fill out the rest of your profile. There is a place to put in a web site address. This could be your FaceBook page, your personal blog or any other online presence that you have. If you don’t have one, you can leave it blank. There is also a “One line Bio” where you have 160 characters to let the world know who you are. It could be something as simple as “Coupon Queen” if your into couponing. Or you could put “Father of 2, Hockey Addict” or whatever describes you to those who would want to follow you.

Enjoy!

Twitter is a fun, educational and informational environment that you can take advantage of regardless of technical ability or experience in social networking. Go try it and ave fun!

You can follow me at http://twitter.com/MiracleMan.

Tech Geek — Infinitely Useful Tools

April 4th, 2009 2 comments

Geek’s are notorious for “hacking”. In their defense the terms “Hacker”, “Hacked”, etc. have gotten a bad rap because its been associated with people who do bad things using “Hacks”. Its like the old saying “Guns don’t kill people, people kill people”. The truth is, hacking isn’t bad, its bad people who use them that give it the negative connotation that the mainstream stream media uses.

Lets look at what the term “Hack” and its related terms mean.

A “Hack” is simply using something in a way that it wasn’t intended,  to achieve a desirable outcome. Outside of computing, the most famous “Hacker” that you probably know is the TV Character MacGyver. He was notorious for taking a paper-clip and a belt and a french-fry to save the day.

In computing, telephony, and other electronic arts, there are plenty of opportunities to use programs and code libraries in ways they were not intended, to create something new.  A lot of times you hack out of necessity because you have to solve a problem and the tools don’t do what you need.

Now most geeks’s electronic toolkit is packed with all the right tools. Much like when you go to the autoshop, you can expect the mechanic to have all the right tools. However when it comes to geeks and the non-electronic world, generally you won’t find well stocked tool kits and frequently they have to make do with what they have. Its a term we like to call:

Field Engineering

Traditionally field engineers are the MacGyvers of the real world. They carry the parts most likely to be the problem but will resort to non-standard techniques to solve a problem. I remember clearly my freshman year in college and our heater wasn’t working. The gentleman from the Physical Plant Division came in, whacked it with a hammer and it started working. Over the past couple of weeks, my son’s car’s starter is starting to go. A whack with a hammer restarts his car. So our first infinitely useful tool is:

A Hammer

Hammer’s come in many varieties, but the most common is a claw hammer. It has a flat “hitting” head on one side, and a curved set of forked teeth on the other. You can hit things. You can hook and pull things. You can dig with it. It can even be used to cut items and poke holes. It can strip wires and of course be used for self defense.

There are a lot of claw hammers. They come in a variety of weights and handle materials. A medium weight hammer is the most flexible as you can balance the need of mass and velocity for optimum force. As for the handle material you will find fiberglass, wood and steel. There are probably high tech composite handles available today as well. Fiberglass seems to be the best handle choice as wood will break and the steel handles are hollow and subject to bending.

But regardless of what hammer you get, you need to get one that is well balanced. Take it and sit it on a flat surface upside down. The hammer should stand up with the handle near vertical (say 90-75 degree’s from the surface). It shouldn’t lean to either side, or rock too far from vertical. A well balanced hammer is your friend.

Drop Cords

A good, heavy duty “drop cord” is also vital to getting things done. These are the industrial weight electrical “extension cords”. They come in a variety of colors and lengths and are rated either in “gauge” or “amperage”. Gauge is how thick the wires are.  The smaller the number, the bigger the wire.  Most drop cords are in a 12-16 gauge range. However, the amperage rating is probably more important as it tells you how much electricity can pass through. A medium to heavy duty drop cord (or cords) can be real life savers. You want a long one (50′ or more) and perhaps a shorter 25′ footer.

How can they be used? Well mostly they are used to deliver electricity to some place you don’t have it and that itself can be useful. But lets not stop there. It can be used to tie things up. You need to hold a couple of pieces of fence together? Bind it up with the drop cord, affix your repairs and you’re done. You can tow with it. Someone falls overboard on a boat? Throw them a life line. At the end of the day, its about power: to your tools; to your computers; anything that needs juice a long drop cord saves the day.

Wire

Drop Cords above are a class of wire, but due to their thickness, it limits their utility overall, but a nice spool of wire can do wonders. My honey-do list today has me raising a lamp suspended by a decorative chain. I’ll go grab a short run of wire, make a loop and tie it off, creating a way to tie two chain links together. Wire can come in many sources that you don’t commonly think about like bread ties.

Your wire should be sufficiently large enough gauge to be strong enough to not break under reasonable stress and it needs to be small enough to fit into small holes. It shouldn’t be so thick that you can’t reasonably bend it into shape. It can be used for binding, poking and connecting things.

Gaffer’s Tape

Most people know the utility of duct tape. There is even a book that has nothing but projects to do with duct tape. It is probably the penultimate infinitely useful tool. Have a table with a short leg? Fold up several layers of tape and put it under the leg. But a better all purpose tape that few people don’t know much about is Gaffer’s Tape. Gaffers and Duct Tape share many common properties and almost all duct tape projects can be done with Gaffers. So why Gaffers?

Duct tape’s non-sticky side is glossy. Gaffer’s is more of a cloth which can give it a different resistance to movement. Duct is kind of sticky on its non sticky side. And sometimes having a less tackiness is useful. Gaffers tape also tends to leave less glue residue after use, yet its almost as sticky. With its cloth base, it can tear into easier to manage strips that have smoother edges. Duct tape is more water resistant. Your tool box can’t go wrong with either or both.

Flat bladed Screw Driver

Referred to as a flat-tip or slotted screw driver is a great tool that when combined with a hammer and pliers creates the base trifecta of minimal tools. A screwdriver is useful for turning screws, its purpose, but its useful for poking, creating holes. It can act as a lever. You can use it for gardening in place of a trowel for planing plants. In a pinch it can be used for cutting as well. It can be a wedge or a chisel. Its a beautiful must have tool.

What about pointy screw drivers (they are called “Phillips” BTW!)? Most screws that need a Phillips head screw driver can be turned by a flat tip as well. The big problem with a screw driver is you need a variety of sizes to cover the range of possible screws. But looking for a medium length, medium head can cover most uses.

Pliers

There are a billion variety of pliers. This tool is highly customized for a specific usage. There are two more general use pliers that will work in many circumstances. Both are called “Channel Lock” pliers. The one in the photo to the left has the grip perpendicular to the handles and the other has it parallel to the handles (more like scissors).

Pliers can be used for gripping, pulling and twisting things. Don’t have your screwdriver handy? Use your pliers to turn the screw. Need to beat on something and don’t have your hammer? Pliers can make a great make-shift hammer. Many pliers will also include wire cutters and stripers built in.

Hockey Sticks

This is my personal favorite. Being around 5′ long with a curved blade on the end has many utility uses around the house and elsewhere. We had a large snow fall which had turned into an ice pack on the roof. I used the hockey stick, opened the windows in the bonus room and used it to push the ice off the roof. I’ve used a hockey stick to clean the gutters. With a small notch cut in the tip of the blade, its great for hanging Christmas lights on the trees. Any time you need to reach something, like the hanger that fell behind the dryer.

Need to kill a spider on the ceiling? Use some wire and a paper towel, wrap it around the butt-end of the stick. Poke the bug, getting the goo on the paper towel, then remove your towel and dead bug and away you go. It can be used as a rake, a hoe, or an extension to your hammer or screw driver.

Summary

You can always find utility in the strangest of locations. But when you need to so something and you don’t have the tool, perhaps you can find something around the house that will get your job done for you. Of course you could always go to the tool store and pick up your specialty tool.  You can never have enough tools.

What are some of your tools?

Leave a comment below and let us know about a tool you use in a way not intended?

Tech Geek — Adventures in Objective C Land

April 2nd, 2009 1 comment

Thank you for your patience with all the Sports-Geek posts of late, but its a subject near and dear to my heart. To make up for it, lets go really geek and deal with computer programming.

I am a programmer. It’s what I do. It’s what I’m good at.

Now I’m old school and its really hard for old programmers to learn new tricks. As you age in this field, it becomes harder and harder to adapt to new concepts. I first observed this phenomena early in my career as I watched my boss, who grew up in the punch card / batch processing world have trouble adapting to a world of PCs and interactive systems. He was eventually promoted out of the way. I now see the same thing happening to me. Though I pursued moving from a Support Developer to a Product Trainer, I’m now in a similar position where I’m letting the young’en’s do the programming, letting the new technology pass me by.

I can clearly identify where my downfall began. Object Oriented Programming.

I learned programming in the days of procedural programming. That is we designed our programs using sub-routines and functions. These blocks of code performed specific functions. Data was kept separate for most parts and in things called structures. Life was easy.

A new model developed where code and data kind of merged into things called “objects”. So instead of having a string data type and having functions to get the length, find a chunk (substring), etc. as separate parts, you now have a string object and not only does it have the data for the string, it has the different methods of manipulating it. The object contains the length method or substring method. It was a different way of thinking.

Now I fully understand the idea behind object oriented programming. And I can work comfortably with objects in JavaScript, Perl, C++, though I feel I would be hard pressed to build a major project in an object oriented environment.

One of the big limitations for me is the terminology. There are so many new terms and this old brain doesn’t want to learn them. Which leads me to where I am today.

This week I had a chance to participate in an iPhone application discussion. I’ve had a Mac for almost two years, and beyond some web code, I’ve not written a single Apple app. Not a drop of Applescript. I had Xcode, the Apple Development environment loaded all most the entire time. But real life has kept me from getting down to learning this new environment.

So with this opportunity to mess with an iPhone app, I decided this was a good time to get in and wrap my hands around this and try to upgrade my skills a bit. This is where I hit a major brick wall:

Objective C

Now I can write in the programming language ‘C’ in my sleep, even though I’ve not had a serious project in it in years. ‘C’ is an old language that came out of Bell Labs in the late ’60′s as part of their Unix environment. It became the most dominate language throughout the mid ’80-s through early the 2000′s. Its cryptic. Its powerful. It produces great machine code.

With ‘C’ being so popular, many of the modern languages are derived from it. ‘C’ had a major short coming. Its a procedural language. It knows squat about objects. The Object oriented programming crowd had some languages to use, like Smalltalk.

With ‘C’ being so popular, there were several attempts to objectify it. This produced ‘C++’ which is ‘C’ with objects. Java, is a very ‘C’ like language but it was constructed with Object oriented programming in mind. As web browsers needed a scripting language, we got JavaScript, not that related to Java, but its more of a scriptable ‘C’ with objects. We got PHP for webside scripting which had objects rammed into it later in its life. Flash apps use a ‘C’ / JavaScript like language, ActionScript as its scripting language and is fully object oriented today.

Around the same time that C++ was being worked on, another group was creating Objective C which involved adding some key features from SmallTalk into C. Steve Jobs after he left Apple to Form NeXT, licensed Objective C as the native language for NeXT. Apple ended up acquiring NeXT which lead to the modern OS X operating system. Objective C is tightly embedded to anything Apple today.

I know ‘C’. I don’t know Smalltalk. Objective C is ‘C’ for most stuff, Smalltalk for the objects. So when I went to learn how to write an iPhone App, I was immediately thrown for a loop. What was this alien syntax? I thought my head was going to explode.

Now this project was part of a monthly development practice where everyone takes an idea and tries to produce something that day. It gives developers a chance to work on things that normally wouldn’t get a chance to work on; a chance to make proof-of-concept; etc.

As a product trainer, I would not normally participate in this practice, but we wanted to see if there was anything that could benefit us in the training department. So I took this opportunity to participate. I went and got the iPhone SDK and installed it and dove in.

The first thing any good programmer is going to do is build the traditional “Hello World” program. After about an hour of struggling with a tutorial to build “Hello World” and dealing with this strange syntax I was running around screaming:

“I long for the days of
10 PRINT “Hello World”
20 END”

No, this huge project was loading in all kinds of framework and was creating models, views, and controllers and passing messages. While the code I had to create wasn’t that much, it was quite a bit to see the words “Hello World” show up on the iPhone simulator.

I didn’t quite understand everything. There was a lot of new terminology: Bundles and Delegates to name a couple. Now I was feeling pretty good about things because I managed to get one of our website’s mobile sites loaded into a compiled iPhone app after an hour of modifying “Hello World” without a lot help. Then it tanked. My next task was to determine my current location from the GPS and find the nearest business unit to the phone and show it.

By the time I left, I was still having it crash trying to get it to connect to my webserver to request the location information. Most of the day was spent trying simply construct the URL by converting the Latitude and Longitude to a string. Hours. Oh, yea, the String object can’t be changed, you have to use a Mutable String if you want to change it. Why can’t I simply call sprintf() and be done. The simple task of appending two strings together is a pain in the rear.

Now to put this in perspective, I developed a simple web service that when passed your current location, it returns you the business name and website URL, written in PHP in about 30 minutes. For this simple service I didn’t need to make it database driven, just an array of values, but it was working, tested and debugged in a very short time.

Admittedly my biggest hurdle was the Smalltalk syntax. I’d eventually get delegates and views and such figured out. But the square bracket syntax and variable passing was really confusing to read.

Well today, I spent a few minutes, going back to square one were I was reading the Objective C beginner’s guide when I came across a passage.

Objective C supports “dotted” notation.

Dotted notation is probably the most common way, ‘C’ like languages deal with objects. Wanna work in Java? C++? JavaScript? They all use the standard “dotted” notation. That is:

object.instancevariable = value;

or

value = object.method(parameter);

instead of:

[object instancevariable:value]

or

value = [object instancevariable]

So what the frak are people doing using this non ‘C’ syntax in a ‘C’ language.

Alas, if I’m going to write Apple code, I’m going to have to conform since all examples are in square bracket syntax.

I have to admit after spending some time with the beginner’s guide today, the square bracket syntax isn’t that hard and I think if I spend some time with it, it will be a quite capable language. But that shouldn’t surprise any one who’s used a Mac with OS X.

Maybe this old dog can learn something new!

Sports Geek — Who should Kentucky get for their next coach?

March 27th, 2009 8 comments

Today the University of Kentucky athletic department and the men’s basketball head coach, Billy Gillispie separated ways. The separation was announced at a 4:30pm press conference after several days of speculation. You can follow the Lexington Herald-Leader’s coverage here!

There are numerous reasons why they needed to part ways but they can all be summed up with the fact that the program was going in a direction that Kentucky did not like and Gillispie was not the right coach to change that direction. Tubby Smith drilled a hole in the bottom of the ship and started it sinking. Gillispie was brought in to try and plug that hole, but the ship was still sinking. Now Kentucky needs to find someone who can save things.

But who will that be?

Florida’s head coach, Billy Donovan has been mentioned. He has built a strong program at Florida, a football school. Donovan is a Rick Pitino protege having been his assistant at Kentucky during their magical run. Is he interested? Would he fit in at Kentucky? Even with his National Championship, he is high profile enough? Can he be consistent? Florida didn’t make it into the NCAA tournament this year. That folks is a huge red flag. If Billy G’s failure to make the dance got him chased out of town, why do we think Billy D will be any different? He does come with strong UK cred having been a well respected assistant.

On the subject of assistants, does Kentucky court Leonard Hamilton, the current head coach at Florida State? He was Joe B. Hall‘s long time assistant at Kentucky? He’s partially responsible for one of the banner’s hanging at Rupp Arena with the 1978 National Championship. On the other hand, 1979 was an NIT year (though in fairness, it was a 40 team field, not a 64 team field, so it was harder to get to the big dance. Again, Hamilton doesn’t have the name power to bring in the McDonald’s All American’s needed to be a consistent Top-10 team. Also a major Geek negative, Hamilton’s Wikipedia page is abysmal. If a coach doesn’t have a decent Wikipedia page, how good can he be anyway?

How about convincing Rick Pitino to come home? Joanne will never go for it. So he would have to commute the one hour drive from Louisville to Lexington. I’m sure a private helicopter would be ponied up to make it happen. Arizona is reported to be chasing Pitino, but I doubt Joanne would put up with Tuscon if she couldn’t handle Lexington. But with Pitino just getting Louisville back to national prominence (sure Louisville wants to be a Football School!!!) he would be a fool to win and run.

Pat Riley? He could do the job, but has no interest in college basketball. He’s too used to life in Hollywood East, er. Miami. Lexington would be too simple for him.

Coach K? He would be met at the border with loaded shotguns. Roy Williams? He is the new evil overload of college basketball (though you have to respect him. He is a very good guy to be the arch-devil…..) but he is so happy at UNC, he wouldn’t give it consideration.

Jim Calhoun? The NCAA is looking at his program at UCONN for rules violations. Kentucky can’t risk that route.

John Calipari? He certainly puts together winning teams. He’s yet to win the big one, and in each of his coaching stints, he’s needed two to three years to get the teams to the NCAA. He has the most wins behind Roy Williams among active coaches. His two college jobs lasted 8 and 9 years respectfully, so based on his history, he may be ready to move on.

Bring Bobby Knight out of retirement?

Who ever it is, it can’t be someone who has built a low pressure school to making the dance. He has to be a proven winner. Someone who consistently, year-in and year-out produces a champion. It has to be someone who can thrive under the extreme pressure that is the Kentucky Basketball faithful yet not mind living in a small farm town. Kentucky doesn’t need a builder, it needs a star and those are few and far in between.

What do you think? Chime in by posting a comment on the blog.

Sports Geek — Carolina v. Duke who to cheer for (or against)

March 8th, 2009 No comments

We’ve all heard the description of this basketball rivalry.  Two teams who in recent years seem to stay at the top of the college basketball pack live a mere 9 miles apart and is considered to be the best rivalry in all of college basketball.  They play each other twice during the year with a potential 3rd meeting in the ACC playoffs and a possible 4th run-in during the NCAA championship.

Explain this?

North Carolina is your classic Bible Belt state. So why do we have Blue Devils? Demon Deacons? Even Cary’s High school and middle school’s are the “Imps”. Even UNC’s mascot is a curly horned goatish beast which.

But today at the Dean Dome (Dean Smith Center named after the Evil Overlord himself — remember I’m a Kentucky fan!) the powder blue clad Tar Heels host the Blue Devils or as they are known affectionately as the “dookies”.   Today’s game will determine who wins the ACC regular season title.  This title doesn’t mean much other than seeding for the ACC tournament later this week.

In an interesting twist, because of the ACC’s quest to be a football conference and the growth to accommodate their BCS dreams, all basketball teams do not play each other twice during the season.  This has created some very interesting scenarios for the sports geek to ponder with the ACC Tie breaking system.

If UNC wins today, they win out right, two games head of Duke.  Duke is a game behind UNC going into today’s contest and if Duke wins, they will be tied since they have split their head-to-head match ups.  The tie breaking scheme is basically one of looking at head-to-head match-ups until one of the teams has an advantage.

The process is complex and given that I don’t give a squat about the ACC or its member teams, I’m not going to delve into it any further than saying today’s game should be a good one with the title on the line. If you’re interested in more details go see this forum post.

Now Kentucky has struggled and as much as I like Billy Gillespie, the coach, they are on the outside looking in at the moment and may not make the NCAA tournament.   If I were writing the contract for the coach as Kentucky, this would be a reason to fire clause.  The other two are never loose to Tennessee or Vanderbilt.  But I’m not the AD, so I don’t get my say in these matters.

At the end of the day, UNC will probably gain another 4-6 wins on Kentucky before the season is out, halving the lead the Wildcats have.    Therefore I need Duke to win today.

So why for the life of me, when I went to get a glass for ice water this morning and I was looking at a plastic cup did I make the conscious decision to choose a baby blue cup from a UNC game over one from a Carolina Hurricanes game?

Am I loosing it?  Could I actually start liking UNC?  Or is it a case that I really loath Duke and UNC is the lesser of the two evils?  Why am I so tortured by this? I swore when I moved to NC that I would not become a NASCAR fan and well hell would freeze over before I ever cheered for an ACC school.

I’m going to watch NASCAR and ponder this….

Like what you’ve read? Subscribe to this site.

Stalk me! The Fine Art of Following People on Twitter!

March 1st, 2009 1 comment

You know the routine, you open your email in the morning and there is a message that “BillyJean is now following you on Twitter!“. You open up the message and click on the link and a Twitter profile page pops up in your browser followed by that inevitable questions “Should I follow them back?”

I know I ask myself that question several times a day as seemingly random people want to now stalk me and do I really want to stalk them back.

It seems that people who want to follow you fall into several categories:

1. Your real friends (or at least people who think they are your friend)
2. People who find you based on things you’ve posted.
3. Businesses or News sources that your interested in.
4. People who are trying to inflate their follow count.
5. People who are trying to spam you

Obviously you should be excited when your real friends find you and in most cases you will probably follow them back. More on that later. You should be able to recognize your friends and this is really the core of what Twitter is about.

The next group of people are those who watch the public feed or use search.twitter.com or hashtags.org to find tweets that are important to them. For instance during the Daytona 500 a couple of weeks ago, I posted several NASCAR tweets and used the #NASCAR hashtag and within a few hours, I had several new followers. I chose to follow them back.

There are some very good businesses who are taking advantage of Twitter to reach their customers. I once complained about a problem I was having with FireFox and shortly, I got a reply from someone at Mozilla.org with a suggestion on how to solve my problem. Generally, these people may reach out to follow you first in hopes your interested in their information. For example, the pro photo lab that I use is on Twitter, mpix.com. They are good about responding to customer issues and announcing new products, upgraded software, or in a recent case, their 50% off 8×10 prints promotion.

In addition to those hawking a product, there are other useful information sources. I follow several news organizations who post breaking news and others that just want to share information. During the NFL football season I followed @nflscore which posts scores to Twitter as they happen so you can stay up on your favorite team. You can expect that these people probably won’t follow you back or at least they are not reading your tweets.

Then there are people I just don’t get. Its all about getting more followers. Its a popularity game and they will follow just about anyone and hope you follow them back so when they reach 2,000 followers they have reached some level of importance. I personally don’t get these people. Following 3,000 or 4,000 people means you get so many tweets there is no way you can possibly be reading them all, unless that’s all you do, so these people are producing content and not absorbing it, much like the businesses, but their content is generally of low value, other than to say, “I need 10 more follower’s to break a thousand”.

The final class are spammers. These people are clearly there to sell you something and have very little to offer you as far as information or value other than their product.

Now for me, I’m at around 260 followers and I’m following around 260 people and there is a difference of about 40 each way. So I’m following around 40 people who are not following me. Sadly, I found that a bulk of them are co-workers and friends who I thought would reciprocate. A few were not a surprise. I was initially bummed, but given my interests its only logical that they may not be interested in the same thing. Then the other direction, there are about 40 people following me that I don’t follow back and those are mostly people trying to inflate their follow counts or businesses that I may not be interested in, but it doesn’t bother me that they follow me.

So how do you decide who to follow?

Well real friends, you probably should follow. People of shared interest can be worth following and you probably should give them a chance. Of course, the business clients that interest you should follow.

Next, I look to see how frequent someone posts. If I see someone with 3,000 posts, they are probably generating way too much noise.

Next, I look for a huge difference in the number of followers to friends. If someone is following a lot of people and very few are following them, its a good indicator of a spammer. If they don’t have an avatar or if their avatar is bikini-clad and their screen name doesn’t match their URL, you can bet that its a spam account. Not only do I not follow these back, but I block them from seeing my posts as well. Generally Twitter’s spam detectors will pick up on these accounts and cancel them.

If I see a large number of followers and friends, I will look at their posts and see if they are of interest before I decide to follow back. Post frequency is really the determining factor if I’m going to follow back.

Finally, I recently went through my followers and friends to determine who was not reciprocating. I made a decision to unfollow any one who I didn’t know personally who I was following. This helped cut down the noise in my twitter stream.

Thoughts? What decisions to you make when deciding who to follow?

Categories: Social Networking, Tech Geek Tags:

Technology is sometimes “Too Good”.

January 10th, 2009 1 comment

I’m sitting in the family room, MacBook Pro on my lapboard, tweeting and plurking while I wait on gPartd to repartition the desktop in my office so I can install Windows 7 Beta.  Well we’ve got the Ravens-Titans game on the big screen and about 5 minutes to go in the game.  I’m a sports geek too.

I notice “Spaz”, my Twitter client of choice (http://funkatron.com/spaz) refresh and there was a tweet:  “Oh the Ravens won” from @wandren.  For just a brief moment, I was confused by this.  There was 5 minutes left.  Then it clicked.  I turned to my wife and said “We are not live, are we?”  She responded “No. Why?”.  I sighed.  “I know the outcome”.  We were not “Live” because we have a DVR or Digital Video Recorder.

DVR’s are one of the greatest things since sliced bread, but for me, my DirecTV High Definition DVR is a bane in my life. It’s setup to be able to watch one thing while recording another or record two things at once and its even cool enough to let me watch something already recorded while recording the other two things.

With three people in the house, I will frequently be watching something live when I get a notification that it has to change to another channel to record a program.  I check to see what’s recording and it will be something like “The Bachelor” for my wife and “Ultimate Fighting” for my son, neither of which I want to watch nor do I dare cancel one and face their wrath.  So much for finishing what I was watching…

The constant information stream that is Twitter (http://www.twitter.com) did a great job of informing me of what is happening but at the same time a great close football game that went down to the wire was waiting on me to watch, ignorant of its quantum placement, I was happy watching the delayed game.

My wife wanted to know the result. I told her and we ended up not watching the end of the game.  The battling technology of instant information vs. time shifting went head to head.  This time the instant information won.  We flipped over to the other game and the Carolina Panthers were driving down the field.

Spaz updates.  @nflscore says “NFL score update CAR 7 – ARI 0 (Q1 11:56)” and @RealtorLiz says “TOUCHDOWN #PANTHERS”.  I look at my wife.

“We’re not live, are we?”

Sigh.

Categories: Sports Geek, Tech Geek Tags: