Saturday, June 25, 2005

Language Oriented Programming

I was browsing my RSS feeds and noted an update on Martin Fowler's bliki dealing with Language Workbenches for Language Oriented Programming (LOP). This entry led to an article by Sergey Dmitriev entitled, Language Oriented Programming: The Next Programming Paradigm. As I was reading through the article I came across the statment:


In mainstream programming, most of the time spent 'programming' is really just finding ways to express natural language concepts in terms of programming level abstractions, which is difficult, not very creative, and more or less a waste of time. For example, today a good deal of development time is spent on object-oriented design (OOD). This is actually a fairly creative process where the programmer expresses classes, hierarchies, relationships, and such. The purpose of this exercise is to express the program in object-oriented terms such as classes and methods. The process of OOD is necessary because these classes and methods are the only abstractions that object-oriented languages understand. It seems like it is necessary and creative, but with Language Oriented Programming, OOD is not needed at all.
Okay, now you have my undivided attention. Having just spent a week in RUP training which was about taking use cases and performing "use case realization" which is completed to translate the anticipated business line usage senarios of the application in question, I was really interested.

The article then discusses the aspects of LOP. Then following this an overview of LOP and a JetBrains' Meta Programming System overview dealing with LOP is provided. Most interesting.
Needless to say, I will be reading more on LOP.

Saturday, June 18, 2005

RUP Development Iterations and TDD together

I have spent most of this week in Rational Unified Process (RUP) training, presented by the Ivar Jacobson International company. The training was engaging in that there were several opportunities for group discussion and hands-on exercises.

During a class discussion it was stated by the teacher that within the old waterfall lifecycle approach, when the project was nearing the production release date, testing was the portion of the project that got squeezed out due to a looming deadline. The discussion then moved to the fact that within the phases of RUP, iterative style development insures that testing for that particular iteration is done and not affected by timeline pressures.

When the instructor stated that, I quickly considered past situations within development iterations where testing time still got "squeezed" because of the various pressures to move to the next iteration. Because I know the value of the Test Driven Development (TDD) methodology I thought, what if, within the RUP phase iterations, TDD was utilized?

First, the TDD methodology could ensure that the developer tests are passing and that code coverage is almost complete. In addition, TDD would make certain that the code is refactored and ready for the next development iteration. TDD could also provide a living artifact to demonstrate to the stakeholders of the project that the entire bank of developer tests is passing. (You TDDers know the warm, fuzzy feeling you get when you see the green bar of tools like JUnit or NUnit.) Finally, the tests provide a quick and automated regression testing mechanism when any changes are made to code base in future iterations.

Thursday, June 16, 2005

The Rational Unified Process and Test Driven Development

Since I have spent most of this week in RUP training, presented by the Ivar Jacobson International company, I was reading a blog from Mike Bosch concerning the Rational Unified Process (RUP) and Extreme Proramming (XP).

I agree with Mike concerning "Unless you have a LOT of authority you will find it very exhausting to try and influence a culture change without buy-in from your management." I work at a large financial institution which whole heartedly supports RUP. In addition to having one of the "three amigos" own consulting company contracted to provide detailed courses on the four phases of RUP and their various disciplines, Dr. Jacobson has often provided great lectures to the application development teams that are broadcast to the various corporate team locations within the United States. In my view that is great. However any corresponding and/or competing methodology is typically viewed with skepticism and then ignored.

I have found that within the corporate environment I have been able to introduce Test Driven Development as a programming methodology that our dev team can use internally. In fact I am finding that it is a relatively easy sale because TDD is so effective concerning both the quality of code and efficiency of the team production! Moreover, the artifact of the tests is a great source of "developer oriented documentation" for new team members that are already familiar with developer testing tools such as JUnit or NUnit.

All in all, RUP is a tried and tested methodology for an organization as large as the one that I am currently employed. Yet, it is greatly enhanced by agile processes.

Monday, June 13, 2005

My First C# DotNetNuke Module

Click here to see the ramblings of my first C# DotNetNuke custom module. In the normal tradition, its a Hello World module. What else could it be, right?

Initial DotNetNuke "gotchas" with Windows XP Pro

After reading for sometime the great reviews of the opensource portal, DotNetNuke, I decided to download it and give it a spin. Wonderful framework but a few "gotchas" when installing on a Windows XP Pro OS workstation.

Click here to find out more.

Sunday, May 08, 2005

PDF to byte array with TDD

At work, I was tasked with reviewing and prototyping a Windows Service that will monitor a file directory, and invoke a web service that utilizes FileNet to archive reports that will be FTPed to the directory in question.

From the sample API of the web service, the first task was to get the report, that is in a PDF format, to a byte array that will be passed to the web method.

Click here to see the how Test Driven Development (TDD) made this task much easier and quicker to complete.

Monday, April 18, 2005

What to do with complexity

I was pursuing the Creating Passionate Users blog and noted a link to a new, interesting product that the Head First folks are coming out with called Head First Design Meditations. This looks to be a deck of cards that is, Designed to be used as a brainstorming and inspiration tool, the card deck will contain small bits of software design wisdom, insights, idioms, inspiring quotes and perhaps even a chuckle or two.

What I quickly noted on the page was the following quote by Alan J. Perlis: Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it.

Wow! I must admit that when I have encountered complexity, in both code and in life in general, I have ignored it, suffered it, and avoided it. Rarely, if ever, have I removed it. What comes immediately to my mind concerning the removing of complexity is Refactoring. This I try to do regularly with code. What is Refactoring? According to the Wikipedia Refactoring is the process of rewriting written material to improve its readability or structure, with the explicit purpose of keeping its meaning or behavior. Wikipedia defines readability as, Readability is a measure of the comprehensibility or understandability of written text.

The main reason I refactor is indeed pragmatic. I find that further updates to the code is easier to do if the current code is as clear in its intent and as simplistic in its structure as possible.

Perhaps those who really are geniuses remove complexity out of altruistic reasons, for myself as a mere mortal, I remove it so I can better understand how and why.

For more quotes by Alan J. Perlis, click here.

Saturday, April 09, 2005

XHTML and CSS: a union made in....

Because I sit all day hammering out code, I have to make a real effort to get enough exercise. What I often like to do is download and listen to a great weekly podcast, that is offered in both MP3 and WMA format, that is a recording of a show called .Net Rocks while I am taking my daily jog. This week’s show featured Rory Blyth and Scott Hanselman who discussed at length a great site, csszengarden.com that demonstrates the use of XHTML and CSS for website design. To date, I have used CSS primarily for font formatting, but not much else. However, a combination of both the show and the csszengarden web site have caused me to take another look at CSS (Cascading Style Sheets) and a new look at XHTML (Extensible HyperText Markup Language).

Check out my latest learning spike about using XHTML and CSS to form a great web design toolset.

Monday, April 04, 2005

NMock 101

Recently a new member of the development team questioned me on how various dependent objects, that are part of an implementation of an app we are building, could be tested using NUnit and NUnitASP, a set of unit testing tools. I stated that the simplest way I understand would be to "mock" the objects that the view (or the UI) and controller tiers under test are dependent upon. The tool that I am most familiar with is NMock. Since it had been a while since I had utilized NMock for testing purposes, I thought it would be good to review the documentation for the tool.

Click here to see the step-by-step process I used to create a demo of NMock using a TDD methodology with NUnit.

CopySourceAsHtml

Loaded the great addin for VS.Net 2003, CopySourceAsHtml , version 1.2.3, last night. However, when I went to select some code to Copy As HTML I would get an interop exception. Unfortunately, I did not copy the exception message in the dialog box that was displayed.

Anyway, the solution was to take the source code and do a local build, creating the install file and installing from that .msi file. Then all worked swimmingly.

Saturday, April 02, 2005

Thursday, March 24, 2005

Head First Design Patterns in C# with NUnit

I recently read a great new software design patterns book entitled, Head First Design Patterns. Click here to go to the books web site.

Anyway, the book shows the code and exercises in Java. To better learn the patterns I implemented the code in C#. About halfway through the book I e-mailed the authors and let them know how much I enjoyed the teaching style of the book and informed them about the C# exercise code that I was creating. They were interested and asked me to post it to them when completed. I did and they, I say they as the book has four authors and I have been corresponding with one, suggested that I create a small web page to link too, that briefly shares my learning experience with a link to the C# code. I did and the author graciously stated that they will be linking to my page from their page (see link above) shortly. Meanwhile, click here to get to my page with the brief overview and code.

Sunday, February 13, 2005

Eating Elephants

You have heard the answer to the question, “How do you eat an elephant?” Of course, the answer is, “One bite at a time.” The purpose of question/answer is to help one realize that regardless of how large your problem, challenge, issue, goal may be, you solve or arrive at the desired result, the same way, one bite at a time.

The fact that is hard to remember is that the process of eating is the same for whatever size meal you may have before you. Whether you are eating a peanut-butter sandwich or an elephant, you take the food item, and bring it to your mouth, take a bite, and begin chewing. Since the process is the same regardless of the size of the meal, it is logical to deduce that the size of meal should not be a factor in the decision of one starting the process.

Now I understand that the size of the meal can be intimidating if you are expected to consume all that is set before you. However, since we are not using the analogy to discuss the eating of food, the goals we are trying to achieve or problems we are attempting to overcome typically do not require a solution be reached in one sitting. We may in fact want to have the goal met or issue dealt with quickly, but this does not mean that it has to be. More than often, that is simply our impatience forming our expectations and not a well informed understanding of the situation we are desiring to change.

Finally, both you and I will end up taking several bites as we sit at several meals throughout our lifetime. We might as well be taking bites out of those goals and issues that are before us. We all exist in time. We will use this time for something. This moment-by-moment time is the same for everyone regardless of how we use it. Therefore, start biting!!

Wednesday, February 02, 2005

...you who judge practice the same things.

I have been thinking about a particular passage of scripture lately. I have been thinking about it because the longer I live, the more I realize that the little things I note about others that annoy me are the same things that I do, maybe less or in a different form, but still I do them.

The passage that I am thinking of is Romans 2:1. The New American Standard translation states:
Therefore you have no excuse, everyone of you who passes judgment, for in that which you judge another, you condemn yourself; for you who judge practice the same things.

The Message paraphrase states the passage as:
Those people are on a dark spiral downward. But if you think that leaves you on the high ground where you can point your finger at others, think again. Every time you criticize someone, you condemn yourself. It takes one to know one. Judgmental criticism of others is a well-known way of escaping detection in your own crimes and misdemeanors.

Yes, at work, I hear the annoying laugh of the girl in the adjacent department and then realize just how silly my laugh can be at times. Or, I notice the peculiarities of others around me. Then I see that these are the same tendencies that I exhibit.

In fact, for quite some time I have thought that this passage was only speaking of the preceding section of Romans, chapter 1, that details how that even though mankind has a general revelation of God in nature, we have and do suppress that truth and spiral into all sorts of wickedness. Oh my!! You mean that as we see this taking place in our time, we are in fact doing the same things. Yes. Perhaps in less obvious forms, but still the same, we are actively at fault, just as those outside the family of Christ. Not just in the large things. But as time has shown me, the small, insignificant things also. Indeed, in my view, the Word of God is true.

Yet, what is different about us who name the name of Jesus? Do we deserve any less punishment than they? More on this later....

Great GoF Patterns site with C# examples

Here is a great site that defines, models, and provides demo code in C# of the Gang of Four (GoF) software design patterns.

Tuesday, February 01, 2005

First Post

Well, here is my first post. Stay tuned for "musings" on topics like software development, primarily on Microsoft's .Net platform, as that is what I do to pay the bills and what I love to do. I admit, I am blessed in that I like my job!

Also, and more importantly, stay tuned for thoughts on a Biblical Worldview.