Login

artiztik
 

The first diversion

uploaded image

With a very simple PHP script I created, I was able to add Madibs as my first activity under diversions.

You may remember Mad Libs. It's a word game where you provide a bunch of words that are integrated into a short blurb, like a story or article.

Three madlibs have been added here.

Enjoy.

- Buck

New site section: Diversions

artiztik

OK, I created a new section to the site I call Diversions.

I will add activities here to help distract your attention and hopefully amuse you. (Who needs to work anyway?)

- Buck

PHP rocks!

uploaded image

PHP is just a great, simple, and forgiving language. It's intuitive, especially for anybody that has coded in Java and has any experience with HTML. Unlike Java though, it is not as demanding or OO-dependent.

PHP is part scripting language and part sophisticated, object-oriented language. It's flexible enough to allow for speedy development in a top-down, loose style. But at the same time, it allows for the creation of classes and functions, allowing one to take a modular approach.

I've been coding in PHP for a couple of years now as a hobby and skill-building exercise, and now I've started getting paid for it.

At the Peppermill I am doing both sides of the applications I am writing, the client side (PHP) and the server side (RPG on i5). It's the best of both worlds.

- Buck

The Writing Exercise

the writing exercise

Just a way-too-revealing exercise.

The Writing Exercise is exactly that. I was having trouble with a story I was writing and took a break. What came out is a little scary.

Check it out here.

You can see more stuff I wrote here.

- Buck

The Crew of Starship Noah

the crew of starship noah

My latest short story.

The Crew of Starship Noah is a tale about five crew members who awaken from suspended animation to find their ship, and the resident machine intelligence, completely unresponsive. As they attempt to solve the puzzle, they find strange things have transpired while they slept.

Check it out here.

You can see more stuff I wrote here.

- Buck

Dream: Red Pain

uploaded image

A simple yet horrific dream.

The only thing I remember is being engulfed by a red flare, or energy. It was pure pain. I couldn't escape, couldn't shake the flare off me. I was all twisted and contorted. And hurting.

Then I woke up and it was one in the morning and I couldn't sleep for a while.

- Buck

Dream: Cookies

uploaded image

Cookies. Lots and lots of cookies. Yup. I dreamed of cookies.

I was in a big room full of cookies. All types of cookies. The room looked like an oven. And the oven door came down and a big face came into view and told me to have as many as I want.

Cookies. Go figure.

- Buck

Product Review: Firefox

uploaded image

Not sure what I can say about Firefox that hasn't already been said. It's the best web browser available? It greatly enhances the web browsing experience? It was the first tabbed browser? It's simple, intuitive, customizeable and absolutely free? Yes to all of the above. But that's nothing new.

I guess what I can say is GET IT NOW and try it for yourself. If you don't have it, get it. If you do have it, upgrade to 3.6. The new skinning feature, Personaes, is f'ing fantastic and the browser is faster than ever.

If you are new to Firefox, you'll need to know that some of Firefox's best features are not included by default. They are add-ons, called extensions, that are written by third parties. Below are some of the best extensions IMHO. So after you install Firefox, search for them from the help menu.

  • Adblock Plus - Suppress those annoying advertisments.
  • All-in-One sidebar - All bookmarks, extensions, etc in one simple panel.
  • CoLT - Copy link text.
  • Google Redesigned - Puts a sleek new face on Google Mail and Reader.
  • Google Shortcuts - A dropdown of your favorite Google links.
  • Facebook Toolbar - Update your status, upload photos, share links, all from the toolbar.
  • IE Tab - For when you must view that page with the IE renderer, but want to stay in Firefox.
  • MR Tech Toolkit - A great toolkit with lots of functionality.
  • PDF Download - Simplify and present choices for downloading PDF files.
  • Tab Mix Plus - A must. Tabbed browsing on steriods.
  • Update Notifier - Always know when a new version of an extension is available.

If you are still using Internet Explorer, you are inflecting pain on yourself for no reason. Make the switch today!

- Buck

RPG: Using a subprocedure as an indicator.

A friend of mine at work gave me the idea of posting coding tips and techniques, or "cheats" as she put it. ;) I liked the idea, so my first will be an RPG ILE tip for the System i: using a subprocedure as a indicator.

One of the great things about subprocedures in RPG ILE--and there are many--is being able to use its return value in an expression. This technique allows for some handsome code. In this post, I will demonstrate how to define and use a subprocedure which returns an indicator type variable.

First, the prototype. "Things_R_Good" is an example of a validation routine. Notice the "N" in the data type column, and the absence of any length.


      //-----------------------------------------------------
      //  Verify that things are good
      //-----------------------------------------------------
     D Things_R_Good   PR              N

Now, the subprocedure. The way this works is that normal validation will occur, and when there are any issues, the local variable "got_error" is set on. As we know that things are NOT good if we got an error, we return the opposite of "got_error" at the end of the subproc.


      //-----------------------------------------------------
      //  Things_R_Good - Verify that things are good
      //-----------------------------------------------------
     PThings_R_Good    B
     D                 PI              N

      // Local variables
     D got_error       S               N

      /Free

       // Do the validation
       ...

       Return not got_error;

      /End-free

     PThings_R_Good    E

What happens is when got_error = *ON, we return *OFF, and vice versa. Then we use the subprocedure in the mainline, or other subprocedure, as follows.



       // If everything is good, continue processing.
       If Things_R_Good();
         ...
       EndIf;

Notice that because the subprocedure was named as it was the code becomes extremely readable: "if things are good".

- Buck

I hate 3D! There I said it.

uploaded image

First off, yes it's been a year since my last post. I decided to start posting again. Not that anybody is actually reading this. :\ OK, now that that's out of the way....

I friggin' hate 3D movies and videos. Yes, amidst the biggest draw for a 3D movie in history--what up, James Cameron--I am saying that this is the worst move in entertainment technology that we could be making. Allow me to demonstrate.

3D is an old technology! 3D movies have been around for 50 years and coming up on 60! And although the technology has been improved somewhat, those improvements are not worthy of five decades of upgrades. This is the year 2010! We should be out near Jupiter haggling with HAL about how to save the Discovery but no we're stuck in terrestrial movie theaters awed by hot pokers coming out at us from the big screen.

Which brings me to my next point. 3D movies are typically--can't speak for Avatar yet because I haven't seen it--lame as the scripts are written to provide as many gimmicks as possible, thereby all but ensuring the story is shit.

And now 3D television?! Talk about impractical. Are all our guests for the big game or movie night going to have to bring their own glasses? Do manufacturers and content providers expect us to don glasses whenever we watch TV? WTF is going on here?

Speaking of glasses, can there be a less attractive and more nerdy facial accessory than a pair of 3D glasses? And what of our visually impaired friends and family? I can't believe wearing 3D glasses on top of prescription glasses is at all comfortable.

No, my friends, we truly missed the entertainment boat when it was decided to chase 3D tech over holographic. That's where we should be: in theaters watching holographic movies with our bare eyes! I say we boycott this trend now before it's too late and my wife has to purchase tiny 3D glasses so the damn dog can watch AFV in 3D!

- Buck

  beginning  next

top post tags

dreams [15]
site [13]
strangeness [9]
rant [9]
writing [8]
creative [8]
fear [8]
family [7]
php [7]
programming [7]

me elsewhere

Google