JSFiddle Rocks!

MY NEWEST FAVORITE TOOL!

With jsFiddle, you can save, share, fork your css, scripts and html! It’s awesome!

I’ll be talking about this particular Javascript below soon as I begin a series on creating games using HTML5.

Spiritual Tailgating

So the other day, I made a quippy little remark on Facebook concerning tailgaters ( the people who ride to close to your bumper version).  It went something like ‘The proximity of your front bumper to my rear bumper DOES affect my speed… it slows me down!’.

Then I sat back, proud of myself for my astute observation concerning these most annoying people.

Funny thing about that is that the very next day, I was pressing God for the selling of my house and the desire to move into our missions work.  I was reminding Him how HE had ordained this and He had told me to go and He will reap the rewards of our work…  (I didn’t say it exactly in that way but I’m trying to brutally honest with myself here… it was the intent behind the prayers)

I suddenly realized that I was doing to God, exactly what the ‘gater’ people do to me!!!  I was ‘Spiritually Tailgating’ the Creator of the Universe!  YIKES!  (Good thing He has much more patience than I do)

REMINDER: We want all things to occur in HIS timing!  While I do not think there is anything wrong with calling forth things in our lives, I do believe that our heart has to be pure before God…mine wasn’t that day.

God bless and DON’T TAILGATE ANYONE (especially the one who can zap you right out of existence :-)  ).

‘SIC’ Latin phrases…

I’ve always loved cool sounding Latin phrases (especially those relating to Christ).  So I want to dedicate this post to any cool ones I can find.  (please feel free to help me out!):

  • sic transit gloria mundi  =  thus passes the glory of the world
  • Sic semper tyrannis! = thus always to tyrants (thought to have been said by John Wilkes Boothe after shooting President Lincoln)
  • crede quod habes, et habes = Believe that you have it, and you do 
  • Dei gratia = By the Grace of God
  • Christus Rex = Christ the King!

SQL NUGGETS: Basic debugging through SELECT statement.

In SQL, you can send back anything you would like using the SELECT statement. You CAN use this to your advantage in many ways.

Sometimes, if I am writing a complex stored procedure I will send back something like ‘SELECT “Branch 3″‘ which I can then test within SQL by executing the stored proc, alert in my javascript, write to console or just debug in my code to make sure everything is testing correctly.

Notice the multiple branches in my stored proc below…

Now I can execute my SP from with the management studio, changing variables on the fly to make sure the logic is working correctly!

Next time you want to make sure your SQL logic is working correctly, try just sending back a SELECT “some statement”!

Journaling… I’ve been ‘Borg’d.

For years, I have had to suffer through Christians blab on and on about this thing called ‘Journaling’.

And of course, not wanting to appear a backslider, I’ve dutifully pretended that I care.

Even worse, through phrases (i.e. ‘ya’, ‘oh ya’, ‘uh huh’ and ‘ummmm’) and minor head nods, I’ve allowed my viewer to believe that I even journal myself! *This is not the same as lying by the way – I never SPOKE, thus NO LIE/NO SIN… I looked it up*

A picture of NOT my journal

Ok, wait a second. It’s not that I NEVER journal — I have a journal. I HAVE ‘journaled’. But I am a computer geek by trade! It’s what I do! One of the very reasons, I am confident, that God made me to be that type of guy is because I LITERALLY cannot WRITE!

Oh, I can string beautiful prose together in a coherent manner. I mean, just read previous sentence… BRILLIANT! But I am talking PHYSICALLY! Somewhere along the way of my current 40 year journey on this planet I have forgotten HOW to write!

Don’t be mistaken, my handwriting has NEVER been pretty but in just the past few years I realized that now my hand works either QUICKER or MUCH SLOWER than my brain. I don’t even know which one it is! Sometimes, my hand just starts doing letter-like things that are not EVEN CLOSE to the word that is in my brain! (I usually can turn that random hand trip into a semblance of the letter it should have been through manipulation but there are lots of times when I just have to cold CROSS THE WHOLE THING OUT and start again! sad.)

It’s rather embarrassing/worrisome really since this journal’s main purpose is to be a gift to my children (a chronicle of our missions adventures and things I’ve learned on the Christian journey). I fear someday after I am gone, the future Vance’s will have to gather for a convention with the purpose of gleaning the meanings within the pages of this book! Or worse, my grandchildren and great-grandchildren will look upon my terrible scribbles with sadness and shame…thinking that their great-grandfather Todd must have been ‘touched’ in the brain. Or even worse, they will misconstrue my words and advice altogether and end up becoming a family that worships a tomato god named Bart! (a stretch you say? you haven’t seen the “handwriting”)

Alas, I’ve said all that to say this. I now see the error of my ways. All those years of listening to people go on and on about WHY we should journal. All those years of pretending to agree. All those times of thinking to myself, ‘shutup dude, my hand doesn’t work’… and I am now finally one of them!

You see about seven years ago, my wife and I went to Belize to look into doing missions work there. While there we experienced some great God moments. It was a great trip even if we did walk away not feeling like it was the right time.

Now however, is the right time. Our girls are old enough, they are adventurous like us and we all feel the call… LUCKILY, I wrote some stuff down from that first trip. Just the other night I pulled my journal out and read about this trip 7 years ago.

All I can say is, thank GOD I journaled what I did. Even though brief and incomplete, the few details were enough to bring so much back to my memory about this trip. I now see some things clearly because of my writings. (Right now you might be asking how I was able to read my own writing…trust me, it ain’t easy at parts)

Anyway, ALL KIDDING ASIDE, I now understand that as we go about our daily lives we have fantastic experiences even if they quickly fade from our memory! But if we have enough thought and make the time to put these things on paper, then they will be there for you and anyone else to come back too. This turned out to be such an important thing for me. I only wish I had journaled more.

IF ONLY SOMEONE HAD TOLD ME! :-) …. NOW seriously, you should Journal!

Are you journaling yet? You really should! God wants you too! (I told you I had become one of them)

HTML5 Canvas Breakout game with sound, music,power-ups and lives…but thats not the BEST part!

So I found this MOST EXCELLENT tutorial on how to build a simple Canvas game in HTML5 here: http://billmill.org/static/canvastutorial/

LISTEN.. I KNOW.. ENOUGH WITH BREAKOUT ALREADY. But I just had to do it because this guy laid out such a simple straightforward tute. By the end of his tutorial, you will have a nice little workable Breakout game (because the world REALLY needs just a few more of those!)

I loved it so much, I added lives, sound, power-ups, etc… this all can be accomplished so easily using the canvas tag – html5 – and javascript. See my awesome, earth-shattering, ground-breaking version of BREAKOUT here.

But the best thing I discovered (realized would be a better word) — is how you can manipulate the page elements AROUND the canvas based on occurrences from within the canvas! (insert evil laugh here)

Notice the image, see the green background? The div background was changed when the green power-up collided with my paddle… the score is also a standard div as well as the lives container.

This might seem obvious to most of you and it is obvious I suppose… but the ability to dynamically change the page based on events in the canvas (I know Flash could do this too) and with the ease it can be done makes me think of endless possibilities!

For games purposes, one could show a static div map and a different background image for each ‘level’ of a game.

For business purposes, a programmer could include a static div of help information based on whichever toolbar or location of the program that a user enters!

There really are endless ways that a developer could easily make a very dynamic user experience using NOT ONLY the canvas but the canvas in conjunction with the page around it.

Thoughts and/or ideas?

Visual Studio – auto-senses CSS class changes

OK… I can be pretty critical of Microsoft at times (especially .Net/Aspx’s handling of javascript) but I have to admit that ‘Visual Studio’ is the BEST IDE out there. And the fact that you can get a light version for free is really pretty amazing!

(Even if it was an evil plan to get developers to use their stuff over java…which is exactly what happened to me)

But all that aside, even after years of using VS, I still find little cool things that I like… for instance, today I just realized that VS actually picks up the classes you define in your stylesheets and will present them as options to you in your markup… see below:

HERE I DEFINE A CLASS IN A STYLESHEET:

BASIC CLASS DECLARATION IN CSS

AND OVER IN MARKUP – Intellisense immediately picks it up!

Intellisense picks up my newly defined CSS class!

Well done Microsoft, well done!

What if — Church 2.0

What if there was a church that cared more for impacting it’s community than the building it occupied?

And what if that church, in addition to having no building expenses also had no payroll?

And what if that same church, having no expenses gave 90% of all giving away each month!

If that church had ONLY 100 members who ONLY offered $100/month, then that church would be giving $9000 away each month!

What if that church decided to split that money between their local community and international needs? That small 100 member church would end up giving $54,000 to their community each year (as well as another $54,000 to international causes!)

What about the extra $1000/month? Well this church would believe in the original idea of christian family and Sabbath. This church would host a large feast after each Sunday service so the “family” could spend life actually getting to know each other. This church would build true christian bonds among it’s members.

Welcome to Church 2.0…

Get COUNT from a lookup table

Many times I need to know if the rows I am grabbing from a table are ‘In Use’ — which is generally signified by their being tied to something else in a lookup table.

Here is ONE way to bring back whether the item is in use or not… (this method would give you a number):

1
2
3
4
5
SELECT ID, COALESCE(d.IsInUse,0), linkName, linkTarget FROM ExternalLinks LEFT OUTER JOIN (
	SELECT COUNT(ExternalLinkID) AS IsInUse, ExternalLinkID FROM ExternalLinkWorkflowTemplate
	GROUP BY ExternalLinkID
	) d
	ON d.ExternalLinkID=ExternalLinks.ID

Just JESUS… the real quick fix.

To many Christians are out meeting with ‘Christian counselors’, pastors, friends… for their multitude of American Christian problems… when the solution is right in front of their face…. hanging on the Cross.

Got problems? When was the last time you just sought God on a personal and intimate level? Give it try!

As the old preacher once said… ‘You ain’t got problems friend, you just need Jesus!’