Wednesday, September 07, 2005

Conditional Code Segments and JavaScript

...it was bound to happen, I'm writing a technology-related post...

Conditional coding is the backbone of all programming - but the manner in which you code a conditional statement can vary drastically, especially depending on it's application.

Traditionally, IF statements are used. IF statements are, by nature, simple, but of course any programming task can grow out of control easily. Thus, SWITCH blocks and CASE statements come in. But these are all topics that have been thrown around for years, in most every programming language in existence.

Additionally, the inline conditional values in JavaScript add much needed functionality. Assigning a value with an IF statement is lathargic, but assigning a value purely using brackets, with a question mark to dictate the TRUE condition, and a colon to dictate the FALSE condition. Even these have been around for a while.

Just recently, I found a new method to approach conditional assignments/function calls. In the form of:
[Conditional Expression]&&([Command [, Command...]])[||([Command [, Command...]])]

The conditional expression can be most anything that you would put in an IF statement, but the entire syntax after that is completely different. Using two ampersands, you can specify multiple expressions to be evaluated for the TRUE condition. The set of commands should reside within two brackets, and each command seperated by a comma.

The FALSE condition is dignified using double pipes. Following that, as with the TRUE condition, you can specify multiple commands to be executed when the conditional expression is FALSE. Again, these commands should reside within two brackets, and each command seperated by a comma.

In example, try the following:

bVal && (str = "The boolean value was TRUE", document.write(str))||(str = "The boolean value was FALSE",document.write(str));

If bVal was a BOOLEAN and set to TRUE, the string "The boolean value was TRUE" would be assigned to a variable and that variable would get printed to the document. Otherwise, the string "The boolean value was FALSE" would be assigned to a variable and that variable would get printed to the document.

This concept basically combines both the traditional IF statement as well as the conditional value statements.

Tuesday, September 06, 2005

Yoda and R2D2 at Tynan's party

Thanks to Mark for making these awesome styrofoam Star Wars figures - Yoda and R2D2.

Wednesday, August 24, 2005

The line between reality and obscurity

[SCENE FOUR]

(Enter slightly more angry, gradually tanned freak - looking around, he begins to growl - an all-encompassing growl that shakes from the bowels of the earth and slowly matures to a edgy snarl)

Distinguishing reality is more widely expressed as a common function of the brain - however, after the brain become altered - and everyone's brain is altered at a young age - it begins to inherit qualities more typical of a skill or talent. Determining what and where reality is, at this point, is not a notion readily available.

The concept of "vacation time" puts another spin on the whole process. Just as when you were younger, someone alots you a portion of time whereby you can do pretty much whatever you want. Only this time, it's your boss, and the boundaries are more rigid. You find yourself falling into older mindsets during vacation, and it's much easier to notice wasted potential.

Now I could ramble on with endless rhetoric forever - but I rather point out the good, and the couple of flaws I've found between Canada and the states. Let's start with the good things.

OzzFest. Single-handedly the best concert I have ever seen. A huge stage bordered with 6/7-storey tall stacks of amplifiers (YEAH!!) and an extremely complex lighting arrangement sprawling across the roof. A small section of bleachers, followed by a grass field slightly larger than a football field. Wow. That was nothing, compared to the raw talent of the bands of the bill.

Rob Zombie. Mudvayne. Shadows Fall. Iron Maiden. Black Sabbath. Mastodon. Soilwork. Trivium. As I Lay Dying. Not to take anything away from the other bands, but these are the bands that brought the 20,000-some people at the show slightly closer to hell. And OzzFest was only the beginning of the road trip. Continuing on, hung out in Mountain View for a day, went onto Santa Cruz to try surfing for the first time (YEAH!!), went to the Fisherman's Wharf for a while - it was all a lot of fun, and I wish that I didn't have to come back for a while. Hence the term "vacation" is used again.

On another note, musically I seem to have taken a more profound approach to both the writing and the playing processes. For my own music, I still write songs based of a heavy mindset, but much different than the bludgeoning hardcore/thrash styles that I had previously adopted.

In terms of DUI, the project that takes most of my effort and focus, we seem to have evolved even further - not neccessarily in style, but in songwriting complexity and forward thought. Looking onwards, a full album will ensue soon, with songs even more amazing and thought-provoking than the five tracks from the Shell of Solitude EP.

The drunken, drug-induced misfit that I once was is observing me from through the grave - only this time, he will not possess me as such a demon will be.

Tuesday, August 23, 2005

Google releases Messenger software Google Talk


Wow, how cool is this.

After all the rumours, it turns out to be true. Checked talk.google.com this evening, and found a piece of software available for download. In true google style, this first version of the software if simple and clean, and uses open standards.

I can't wait to play around with it.
Message me at brandner-at-gmail-dot-com!

Tony

The best Scrabble game ever!


While camping, Shawna had the best Scrabble game of her life! A nice long word on a triple word square got her 150+ points. Her final score was 420.

Good for her, woe is me.

Tony

Friday, July 22, 2005

Microsoft-Free Home - The Linux Home Theatre PC

Good article, and not too biased in terms of an anti-M$ stance.


Microsoft-Free Home Part 4: The Linux HTPC--ExtremeTech Build It: "Getting a Linux-based HTPC has probably never been easier"


Now I want one!


T