mdavidx5's blog

Solving FizzBuzz in XSLT 2.0

I recently posted the following to the good folks who subscribe and contribute to XSL-List, a group of folks who are responsible for teaching both myself, and *MANY* others all we know about the XSLT language. Here's the text of my post,

Hey All,

Building upon the theme provided by Dr. Kay a while back[1], I recently wrote a post that showcased how one could not only use XSLT to solve the problem, but do so in a way that provides for dynamic data evaluation in regards to the variables used, and what those variables should print out when the test evaluates to true.

Solving FizzBuzz in XSLT 1.0

The problem:
Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

While many have showcased how they would go about it in their language of choice, each one of them seems to have overlooked the fact that each of their solutions is about as dynamic, and therefore reusable, as static cling. Once the "cling" has gone: Forget it, it ain't coming back without a recharge. So then this leads me to the following,

The Power of an Apple

And no, not of the Macintosh brand, though I do own a Mac laptop, and enjoy using it from time to time. The "apple" I am referring to in this case is none other than the fruit. I realize this is an odd post, but I am one who finds joy in simple things, and one of the more simple things I enjoy as part of my daily diet is apples: Three a day on average, sometimes more, sometimes less.

Today started off to look like one of the "less" days, and it was beginning to show. I should note that I am not one who believes in the usage of alarm clocks. I believe they are evil, evil, evil, and furthermore should be banned from existence all together. What's this got to do with apples? Nothing. But it does have to do with my "awakening" a few years back that brought me to the realization that your body doesn't like to be abruptly brought from sleep to awake. In the same way the sun rises and brightens each of our days gradually, I believe that our bodies have been trained for millions of years worth of evolution by this same process to gradually come back into the world of wakened conscience. Why do I have a smile on my face *most* of the time? Because I don't own an alarm clock! I go to sleep when I'm tired, and wake up *gradually* when my body is ready to get its day started.

The Latest Release of Ruby, Version 1.8.6, Now Available

So, *WOW*! It's been a bit of time since I last wrote an entry on this blog. Lack of interest? Nope! In fact, the exact opposite is true, something in which you will be learning about in the *VERY* near future in regards to what I have been spending my time developing for all of y'alls development pleasure.

In the mean time, just noticed the following @ http://www.ruby-lang.org/en/news/2007/03/12/ruby-1-8-6-released/ and thought I would quickly bring it to your attention,

"Hi, I'm an iPod", "and I'm a Zune"

In follow-up to my previous post, I've written an "Hi, I'm a Mac", "and I'm a PC" parody and posted it to my blog on XML.com. While meant in fun, hopefully this will help provide greater clarity as to why I feel the Zune has taken mobile-media to *WHOLE NEW LEVEL*, and is truly on to something big.

Enjoy!

Week 1 : The Zune Experience

So here I am at the end of my first full week of owning a new Zune, and I have to admit that I stand all amazed at what the folks in Redmond have brought to the mobile-media table in their first offering. Of course, its in no way perfect: I have a few gripes here in there, but mostly to do with the lack of an SDK more than anything else. Of course, digging around through the various DLL's that ship as part of the Zune player/marketplace software suggests that,

1) I can't seem to find any reason why working through the Windows Media Player SDK wouldn't allow at least some level of interop.

More On Ruby and Microsoft

A super-quick post regarding a report from InfoWorld posted earlier today,

"Microsoft is "very interested" in the Ruby programming language and also plans to expand its Expression design tools line, a Microsoft official said this week.

More @ http://www.infoworld.com/article/07/02/23/HNexpressionruby_1.html

Ruby on Rails and the .NET Platform: Sometimes To Embrace Means You Must First Be Willing To Let Go

Ruby, and in particular, Ruby on Rails has caught the development world by storm. So much so that Sun Microsystems, through the encouragement and assistance of Tim Bray (amongst others), broke away from their traditional "Java is all you need" campaign, hiring Charles Nutter and Thomas Enebo, the developers of the JRuby project, encouraging them to continue forward with their quest to bring the Ruby language to the Java platform.

Of course, never ones to miss a "me too" opportunity ;-), Microsoft followed suit by hiring John Lam, the developer of RubyCLR, a .NET <-> Ruby compatibility bridge. As he describes,
I’ve decided to stage a friendly takeover of Microsoft. As of January, 2007 my new work address will be Building 42 at Microsoft. I’ll be working in the CLR team to help bring the love of dynamic languages out to the statically typed heathens :)
That said, Ruby is not the only dynamic language to catch the corner of the Redmond-based Giant's eye, who had several years prior hired Jim Hugunin the developer of both JPython (Python runtime for the Java platform) as well as IronPython (Python runtime for the .NET platform.)  In addition, he was the primary developer and architect of AspectJ, something in which my good friend and partner in hacking (the good, *legal* kind) crimes, Russ Miles both (quite literally ;) wrote the book on, to then find inspiration in other areas of Aspect-Oriented Programming, something that would ultimately lead to us teaming up to develop AspectXML (Russ developing the Java integration engine, myself, the XSLT weaving engine) which now sits as the foundation of the AtomicXML project in which I wrote about recently.

Of course, while there are plenty of other languages and people driving things forward, in many ways, you might suggest that the creations of Jim Hugunin (and therefore, Jim himself) sit at the very foundation of the future Microsoft language and platform development. As was reported by eWeek in August,
Microsoft is working on a phased approach to enhancing its support for dynamic languages on the company's .Net platform.

Jim Hugunin, creator of the IronPython language and a development leader on Microsoft's CLR (Common Language Runtime) team, told eWEEK that Microsoft is working to help usher in support for dynamic languages on top of the CLR in a variety of levels or phases.

Web Feeds, Mashups, AtomicXML, AIM Pages and ModuleT: Which of these things is not like the other?

Answer: Every single one of them (but that's a *GOOD* thing!)

What follows is a reprint of a post to my blog on XML.com that will hopefully help make more sense as to why I believe you folks here in the land of Dev.AOL might find interest in making the connections in a way that will (hopefully!) make more sense.

NOTE: Why not just link to the original post? That's a good question, and the answer is simple: Because of the *love* I have in my heart for each and every one of you, I would rather save you the time, effort, and energy *wasted* by having to make Yet Another Click just to read something I could have just as easily copy/pasted into the body of this post.

On Good and Bad Software Patents

This has to be one of the better interviews/opinions I have ever heard in regards to Software Patents,

I don't think there is a fundamental problem with the concept of patents. The purpose of patents is to recognize the value of intellectual property. The intent of patents is to encourage inventors to share their discoveries with the world: in exchange for documenting and making available publicly their discoveries, they are granted a protection, limited in time, by the government. It seems like a fair bargain, in principle. I think there are several points worthy of discussion about software patents, though. First, is the scope of their protection appropriate? While a protection of 20 years may be reasonable for an industrial application, does the same scope make sense in a field that is barely 50 years old and evolving so quickly? One can reasonably argue that a shorter protection period would be more appropriate.

The above comes from Arno Gourdol, formerly with Apple, now with Adobe, and inventor of several patented techologies.

Syndicate content