Feeds:
Posts
Comments

Archive for February, 2010

Back in the Habit

Lironah Daviau scripting a carousel Who’d have thought a week ago that I’d be back in Second Life again, scripting in lsl? Certainly not me. Today’s project is a rotating, bobbing carousel horse.

All I can say is that the Java textbook I’ve been reading has gotten to me. About 36 hours ago I watched my first lsl tutorial and shortly thereafter coded a clock with moving hands, mostly as per the lesson. I had to tweak it a little because he used a square clock, and I hate square clocks. It took some juggling to get the hands moving correctly on a rotated cylinder prim instead of a boring old wooden block. I even found a most awesome wolf clock texture in my freebies.

After my success with the clock, I must have been suffering from sleep-deprivation induced insanity, because I decided to keep going. I found an old, forgotten project in my inventory – a carousel model that…well, didn’t work so well. At a tip from my dear friend Ingeborg, I stepped over to the scripting college and took notes until 2am.

When I woke up, the bug was still with me. I dug out my notes and by lunchtime I had the bobbing problem pretty much licked. Crazy, huh? Two days ago I couldn’t so much as script a “Hello Avatar”. After lunch it was on to building a prim carousel horse. Pink with blue hair seemed appropriate.

Then, as dinnertime rolled around, it occurred to me that if I was going to make these and sell them in Second Life, I was going to need some appropriately candy-flavored music to play while the horses turned. So what did I do? Did I go digging through my inventory for something cute enough? Did I spend hours on a fruitless search through SL or the internet to find some nearly-free sound bytes?

Heck no. This called for some exercise of my new free trial midi writing software. An hour later, I’d turned a snippet of tune into 48 seconds of loopable sugary goodness which you can feel free to listen to. I call it Pink Carousel. Witty, I know.

(For anyone curious, my Second Life name is Lironah Daviau.)

Advertisements

Read Full Post »

Did I say easy?

Oh, goodness.

What is it, 3 days since I cracked the code of php? 4? Well, those last 4 days have been spent trying to expand upon my previous coding project and draw different products from the database. I hit a block when it came to drawing a single line from the database, and have been playing the elimination game ever since, trying to figure out what part of my code has been corrupted. The first 3 days gave me a pretty good run of the basics, and now I’m pretty sure I can spot most major syntax errors in the code I’ll be using. Finally, however, I discovered that my real problem was coming from an inherited .htaccess file in my root directory. (Burn you, FatCow!) Argh. So by the time I got that figured out, I’d apparently started using $ in my urls instead of ?, and that just doesn’t work. Hunting down that one took a good 2 hours of my day today. Now, however, my queries work as they should, and once I add in a little rewrite code to make those urls look static (yeah, you can laugh at me when that takes me a week to figure out), I can move on to coding an input page for my father-in-law to add products from. But for now…it’s quitting time.

Read Full Post »

Victory At Last!

I’ve been trying to wrap my brain around php for the longest time, and tonight everything finally clicked into place.

Ever since the first time I looked at Drupal’s source code and realized that I had yet another programming language to worry about, I’ve been trying to study the basics at W3Schools.  I must say, compared to their html and css tutorials, the php one leaves something to be desired.  Still, I persevered, and with some judicious use of google search I managed to find the answers to the basic questions it left unanswered – namely, how to use the include command and how to use it to interface with mysql.

Even with the most helpful tutorial from Codewalkers, it took a little bit of time for the fundamentals to sink in.  Finally the third time I looked at it (about 5 hours ago now) I started to understand which pieces did what and how to interpret the code I was looking at.  After that it was much easier to find what I was looking for.

Next thing I did was build a database (I used the shortcut built into my web host’s control panel – no use taking chances where a database is concerned) and started piling variables into it.  I started with a simple test to see if I could replace my navigation menu with a dynamically created one.  It worked!

My next step was to fill my husband’s webpage template with php variables drawn from the database.  I must say, I have never had a such smooth and easy to debug coding experience.  After fixing one small typo, the only thing I had to do was a teeny little math function and I was done!  If only Javascript were that easy.

Read Full Post »

Mmm, Doughnuts

Well, not doughnuts, actually.  Scones.  But the recipe I modified was originally for doughnuts.  They turned out so good, I think I’ll make them again the next time the guys come over, but for now, I’ll share my modified recipe.

  • 1 cup granulated sugar
  • 3 1/2 teaspoons baking powder
  • 1/2 teaspoon cinnamon
  • 1/2 teaspoon salt
  • 2 eggs
  • 1 cup milk
  • 3 tablespoons melted butter
  • 5 cups all-purpose flour
  • vegetable oil (or fat) for frying
  1. Sift together sugar, baking powder, cinnamon, and salt.
  2. Beat eggs thoroughly, then stir into dry ingredients.  (Note: I use powdered eggs in most recipes, and rather than mixing them up first, I add the powder with the dry ingredients and the water with the wet.)
  3. Add the milk and melted butter.
    • For doughnuts: Roll about 1/2 inch thick on a floured board and cut with a doughnut cutter.
    • For scones: Pinch off a ball and roll 1/4 inch thick, quarter if desired.
  4. Fill a large frying pan with oil until scones float and fry at 375 degrees F until nicely browned.  (Or use a deep fryer if you’re so inclined.)
  5. Drain on paper towels.
  6. Top as desired.   I recommend butter and cinnamon sugar.  Doughnuts can be dusted with powdered sugar.

The original recipe said that it makes about 24 doughnuts.  I used more flour than theirs, so probably closer to 30.  Feeds about 8-10 people.  They seem to freeze and toast well, but I don’t suggest using the microwave for reheating.

Read Full Post »