Obscure, Dead Languages

A long, long time ago, fresh from churning out static pages using the still brand-new HTML language, I was offered the opportunity to forage even further into programming by my former company. At the time we were using a proprietary scripting language that worked somewhat like ColdFusion, at a very basic level. In my spare time, I noodled around with it.

I hate doing math, but much of knitting relies on math (for instance, a sweater that is knit at 5 inches per inch as opposed to 6 inches per stitch, with a circumference totaling 250 stitches will result in two very different sizes, one of which, should you pick the wrong gauge, will swim on your designated recipient and will be quietly designated to the darkest corner of his closet). And so does dyeing. Say you have liquid totaling 100% with which to dye yarn. And you want to use two different colors such as magenta and turquoise to get that nice blue shade. And you want to make sure it doesn't come out too light - somehow I don't think Cousin Jim would appreciate a pastel-blue sweater.

So, I developed a web-based dye calculator using that dead, proprietary language. Here's what the code that did the calculations on the back-end looks like:

   view plainprintabout
 \r\n##VAR.oz.declare(##PARAM.oz##)##\r\n##VAR.gram.declare("""")##\r\n\r\n##VAR.volume.declare(##PARAM.volume##)##\r\n##VAR.percent.declare(##PARAM.percent##)##\r\n##VAR.gdp.declare("""")##\r\n\r\n##VAR.fiber.declare(##PARAM.fiber##)##\r\n##VAR.dos.declare(##PARAM.dos##)##\r\n##VAR.strength.declare(##PARAM.strength##)##\r\n##VAR.TempFibdos.declare("""")##\r\n##VAR.totsol.declare("""")##\r\n\r\n##VAR.TempColper1.declare("""")##\r\n##VAR.TempColper2.declare("""")##\r\n##VAR.colper1.declare(##PARAM.colper1##)##\r\n##VAR.colper2.declare(##PARAM.colper2##)##\r\n##VAR.stocksol.declare(##PARAM.stocksol##)##\r\n##VAR.colora.declare("""")##\r\n##VAR.colorb.declare("""")##\r\n\r\n<!REM These two IF statements converts from ounces to grams>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Ounces to Grams"">\r\n <!IF ##PARAM.oz## .ne. NULL>\r\n ##VAR.gram.assign(##FUNC.math(""*"", ##VAR.oz##, 28, 1)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n\r\n<!REM These two IF statements calculate the stock solution formula>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Calculate Dye Powder"">\r\n <!IF ##PARAM.volume## .ne. NULL>\r\n ##VAR.volume.assign(##FUNC.math(""/"", ##VAR.volume##, 100, 2)##)##\r\n <!ENDIF>\r\n \r\n <!IF ##PARAM.percent## .ne. NULL>\r\n ##VAR.TempVar.declare(##VAR.volume##)##\r\n ##VAR.gdp.assign(##FUNC.math(""*"", ##VAR.TempVar##, ##VAR.percent##, 1)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n\r\n<!REM These two IF statements calculate the fiber/total stock solution formula>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Calculate Volume"">\r\n \r\n <!IF ##PARAM.fiber## .ne. NULL .and. ##PARAM.dos## .ne. NULL>\r\n ##VAR.TempFibdos.assign(##FUNC.math(""*"", ##VAR.fiber##, ##VAR.dos##, 2)##)##\r\n <!ENDIF>\r\n \r\n <!IF ##PARAM.strength## .ne. NULL>\r\n ##VAR.totsol.assign(##FUNC.math(""/"", ##VAR.TempFibdos##, ##VAR.strength##, 2)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n\r\n<!REM These two IF statements calculate the % for 2 colors>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Color Ratios"">\r\n <!IF ##PARAM.colper1## .ne. NULL .and. ##PARAM.colper2## .ne. NULL>\r\n ##VAR.TempColper1.assign(##FUNC.math(""/"", ##VAR.colper1##, 100, 1)##)##\r\n ##VAR.TempColper2.assign(##FUNC.math(""/"", ##VAR.colper2##, 100, 1)##)##\r\n ##VAR.colora.assign(##FUNC.math(""*"", ##VAR.TempColper1##, ##VAR.stocksol##, 1)##)##\r\n ##VAR.colorb.assign(##FUNC.math(""*"", ##VAR.TempColper2##, ##VAR.stocksol##, 1)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n

Well, as I said, this language is dead, consigned to the dustbin of Obscure Historical Facts.

Aliasing MySQL Startup

I've got MySQL installed, via binary download from MySQL.com, on my Leopard setup. Much of the time I access my databases through Terminal. It's really easy to set up an alias in your bash .profile so that all you need to do is type one word to start up MySQL, then type your password. Here's how I've set up my alias:

   view plainprintabout
 alias startmysql=""mysql -u name_of_user -p""

Note that ""name_of_user"" should be replaced with the name of the account that you use to access MySQL. You shouldn't be using root, in any case, even on your personal laptop.

CFUnited Presos on Connect

For those of us who were unable to attend the conference, it's wonderful that some of the keynotes and presos were recorded on Connect. Even more, you don't have to log in to view these.

If you've never attended the conference, you can now get a sense of what it is like by checking out these recordings. And then save up your pennies for next year and lobby your boss to send you to one of the ColdFusion conferences. Or start up your own conference . . .

Looking at CFUnited

I won't be attending CFUnited this year, unfortunately, for a variety of reasons, even though it's local. But what I'm looking forward to is hearing great announcements, and hopefully a bust of blogposts about the going-ons and what were covered in sessions (many of which I would have liked to attended).

Here's what I'm looking forward to:

  • What's going to be in CF9. Oh, I know it's still under development, and much will still be under wraps. But Forta is really good at picking out the juiciest tidbits to show off.
  • A ColdFusion IDE. I love CFEclipse. But I wish there were more support for it. It would be great if Adobe could throw more out for Mark Drew. And meanwhile, stop teasing us with ""we have something great for you developers"". It's unlikely that I'll move to DreamWeaver; I just want somehting that is like HomeSite/CF Studio where it lets me work directly with the code without interfering with my work flow.
  • Will Model-Glue 3 go final? There are interesting features that I'm looking forward to working with.
  • More open-source projects. The more quality projects, the better.

What about you?

A Little ecto Trick

Right now I'm setting up ecto (which is a sweet blogging application) to work with BlogCFC. I ran into a little quirk that has to do with the server time. When I posted a few test entries, I got a few error messages having to do with the time zone, and my posts didn't show up on the blog. Upon looking more closely, I discovered that the server time zone is one hour off from where I am. Now, in ecto, you can go in and adjust the default time zone, but this doesn't seem to work well with BlogCFC. Fortunately, there's another workaround - click on ""Adjust Time"" icon and change the time to, say, one hour prior is that's the case for where you are versus the server's location. And you should see your entry posted immediately.

Thanks to Justice!

I'd like to thank Justice for putting in a word for me and getting me set up here, so I can play around with ColdFusion. The ColdFusion community is full of generous, giving people, and I'm very appreciative of that. I'm still tweaking this blog a bit, and need to think up of stuff to post about but I'm sure I can find plenty of subjects!

Previous Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.5.003. Contact Blog Owner