Sunday, March 02, 2008
Want to be influenced?
Saturday, February 16, 2008
Narrative Thinking
Login Test
Current Steps Planned:
I would describe the steps/tasks that I planned on taking for this date. It could include a list of items, a brief description of what is planned, etc. Actual steps:
- Here I would describe actual steps that I took, thoughts in the process, rationale for decisions, etc.
- I added a check to the Customer.Authenticate method.
if (customer.ID[0].Status != Customer.Validated){
throw new CustomerException(CustomerExceptionType.NotValidated, "Customer Not Validated");
}
- This resulted in an error when attempting to login with the userid and password.
- ......
Here I would describe the steps/tasks that I planned on taking the time.
What I found was this forced me to be more precise in my thinking which naturally resulted in a more precise research and coding process. I have always known that writing makes one organize their thoughts more orderly in order to communicate more clearly. However, I must say I enjoyed the controlling aspect of thinking in a narrative format. It somewhat reminded me of the Test Driven Development in which you are controlled by getting the current test you are working on to pass with the simplest code. You do not have the opportunity to thrash around or run down this rabbit trail or that. You record your processes, organizing and analyzing your thoughts as you go, making sure you are focused and productive.
Tuesday, January 08, 2008
Dynamic and Domain Specific Languages in a Language Tiered Structure?
For example, in an n-tiered layered architecture you would have a presentation tier on top of a business logic tier which is over a data layer. Bini states:
The first layer is what I called the stable layer. It's not a very large part of the application in terms of functionality. But it's the part that everything else builds on top off, and is as such a very important part of it. This layer is the layer where static type safety will really help. Currently, Java is really the only choice for this layer.This layer corresponds to the data layer mentioned above.
The next tier Bini mentions is the dynamic language layer:
This is where maybe half the application code resides. The language types here are predominantly dynamic, strongly typed languages running on the JVM, like JRuby, Rhino and Jython. This is also the layer where I have spent most of my time lately, with JRuby and so on. It's a nice and productive place to be, and obviously, with my fascination for JVM languages, I believe that it's the interplay between this layer and the stable layer that is really powerful.In my paper that I referenced above, I discussed that Groovy has great potential given it is designed for the JVM. Here I see this corresponding to the business logic layer.
The last tier mentioned is the Domain Specific Language (DSL) layer. For a discussion on that, go here. Bini states:
The third layer is the domain layer. It should be implemented in DSL's, one or many depending on the needs of the system. In most cases it's probably enough to implement it as an internal DSL within the dynamic layer, and in those cases the second and third layer are not as easily distinguishable.Finally, in my view, this tier corresponds to the presentation layer. In a similar manner, the business logic and presentation tiers in many applications are often tightly coupled and "are not as easily distinguishable" as they should be. In any event, Bini’s post is an interesting perspective on the use and place for both dynamic and DSL languages.
Saturday, January 05, 2008
MIT’s new Open Courseware (OWC) web site
Of late, I have been diving into the business aspects of development. I must say to my shame I should have had this perspective much earlier in my career. Do not misunderstand me, I have always developed to solve a business need, but I am looking further up the value chain to explore how software applications in particular and technology in general can enhance innovation. With that said, I find OWC’s link to the Sloan School of Management providing helpful resources. For example, the reading list from the Management Information Systems: Generating Business Value from Information Technology provides a list of resources to read. One of the resources listed is an article from Harvard Business Review, October 2002, entitled Six IT Decisions Your IT People Shouldn't Make. A quote from the article states:
Our center runs a seminar called "IT for the Non-IT Executive," and the refrain among the more than 1,000 senior managers who have taken the course runs something like this: "What can I do? I don't understand IT well enough to manage it in detail. And my IT people - although they work hard - don't seem to understand the very real business problems I face."
I want to better understand real business problems and more effectively utilize software to solve them.
Finally, while this does not present an MIT education, it does provide supplemental materials for one’s academic and professional pursuits.
Friday, December 28, 2007
Dynamic Languages and Increasing the Quality of Software and Velocity in the Software Development Lifecycle
My project was entitled Dynamic Languages and Increasing the Quality of Software and Velocity in the Software Development Lifecycle. Within this project I attempted to see if the current literature showed empirical evidence that dynamic languages, particularly Ruby and Groovy, shorted the development lifecycle and increased the quality of the software application.
Click here for the paper from the project.
Thursday, December 27, 2007
General Unification Theorem Proof Concerning Functional Dependencies in Relational Databases
Click here to see the proof.
Tuesday, October 16, 2007
Selenium IDE HTML Compare Pattern
First, get the string values to compare. Then, compare the values. You may need to parse the value as a float via the JavaScript parseFloat() function if working with decimals such as currency. If you use the eval() function (see below), you are good on comparing numbers such as integers. Finally, verify the expected outcome of the comparison.
As stated above the first thing is to get the values to compare:
<!-- get the first account number in the listcontrol -->
<tr>
<td>storeEval</td>
<td>var Account1 = ""; var
accountOptionList =
selenium.browserbot.getCurrentWindow().document.getElementsByName('accountList');Account1
= accountOptionList.item(0)[1].value</td>
<td>Account1</td>
</tr>
<!-- get the second account number in the listcontrol -->
<tr>
<td>storeEval</td>
<td>var Account2 = ""; var
accountOptionList =
selenium.browserbot.getCurrentWindow().document.getElementsByName('accountList');Account1
= accountOptionList.item(0)[2].value</td>
<td>Account2</td>
</tr>
Next, compare the values and place the comparison value into a variable:
<tr>
<td>storeEval</td>
<td>var isLess = false; isLess =
eval(${Account1} < ${ Account2});</td>
<td>isLess</td>
</tr>
Finally, verify that the comparison value evaluated as expected (that
the first numeric value is less than the second if sorted correctly):
<tr>
<td>verifyExpression</td>
<td>${isLess}</td>
<td>true</td>
</tr>
Monday, October 15, 2007
JQuery Demos
For the documentation go here. I have some basic demos here that cover very basic AJAX and drag and drop functionality.
Sunday, October 14, 2007
JavaScript Functions in Selenium IDE HTML Tests
First, declare the JavaScript function.
<tr>
<td>storeEval</td>
<td>
function(input) {var output =""; output = input.replace",","");
return output.replace("$","");}
</td>
<td>replaceText</td>
</tr>
To call the replaceText function do something like this:
<tr>
<td>storeEval</td>
<td>var parsedTotal = 0; parsedTotal =
parseFloat(storedVars['replaceText']('${Amount}')).toFixed(2);
</td>
<td>parsedTotal</td>
</tr>
Now I can use the parsedTotal value later in the test:
<tr>
<td>verifyExpression</td>
<td>${parsedTotal}</td>
<td>SomeValueHere</td>
</tr>
Saturday, October 13, 2007
Adobe's Integrated Runtime - Heavenly
It was at the Bell Event Centre at the Verdin Bell & Clock Museum in downtown Cincinnati. The museum is an old church. What was cool was the majestic atmosphere that the building provided for Adobe’s informative outing. Moreover, as I sat there listening to the content of the presentation and looking up at the interior structure of the church, I could not resist the irony of the situation given the evangelism (of glad tidings for all developers) that was taking place.
As the faithful, seekers of inspiration, and the skeptical gathered the Adobe AIR clergy (team) was prepared to deliver a message of hope. The sermons (presentations) consisted of building an AIR application with Adobe Flex, HTML and JavaScript, and utilizing JavaScript frameworks in AIR applications.
The content was inspiring (informative) and Adobe’s integrated runtime shows much promise (potential). In addition to the miraculous (cool) features such as ability for JavaScript developers to utilize ActionScript objects via script bridging, the sermons (presentations) contained the occasional rebuke (pokes) at Microsoft for their heretical ways (.Net platform), at which the congregation (those in attendance) responded with various utterances of “amen” (chuckles and head nods).
Although I left the service (event) unconverted from my agnosticism (the belief that no one technology can meet every business need), I was inspired to look to the holy city (Adobe) for more revelation (documentation) to see how AIR could potentially be the way (an answer to a business need).
Confession: You know I have to admit that I had fun with this one.
HTML ListBox Quick Item Select JavaScript
A coworker and I came up with the following. The referenced JavaScript file is here.
The trick here was utilizing the onkeyup event. The entered text is appended to a string that is compared to the listbox content. If there is a match, it is added to an array of matched items. On each onkeyup event, the first matched element in the array is selected in the listbox control. If the listbox loses focus, then entered string is set to an empty string.
Wednesday, August 01, 2007
Polyglot Programming?
When discussing using multiple languages many would say, "That's crazy talk!" However, Ford points out that we are already polyglot programming. We are using Java, XML, SQL, and JavaScript. Moreover, the learning of different languages help us think more broad about business problems.
Will have more coming on dynamic languages such as Groovy, which runs on the JVM. In a recent post I show a test drive of pre-alpha release of IronRuby (Ruby on the .Net CLR).
If we can dispel the delusion that learning about computers should be an activity of fiddling with array indexes and worrying whether X is an integer or a real number, we can begin to focus on programming as a source of ideas.
Harold Abelson
Sunday, July 29, 2007
Test Drive with IronRuby and System.Windows.Forms
After building the IronRuby solution, I took the rbx.exe, along with the related assemblies, and dropped them into a new folder. Here is a look at the folder content.
I then created a file named example.ir.
Next, I ran the IronRuby exe with the new file.
This resulted in the window below.
After clicking the Click Me button:
On a side note, the shot above of the example.ir file is from Notepad2. The syntax highlighting, even with an .ir extension, is from changing the custom scheme in Notepad2. Look at a previous post to see how to change the schemes for syntax highlighting. If you want a build of Notepad2 with Ruby syntax highlighting, go to Scott Hanselman's blog for the build and source code.
Saturday, June 23, 2007
Notepad 2 for MXML and ActionScript 3
I was looking for a way to get color coding, for my favorite lightweight code editor for Windows, Notepad2, for Flex 2’s MXML files when I came upon Josh Tynjala’s blog entry on how to enable color coding support for ActionScript 3 files.
Since MXML files are XML they can use the same color coding syntax information. Here’s what you need to do to enable support for MXML files (or any other file type for that matter).
- Click on the View menu and choose Customize Schemes….
- Choose the XML Document type.
- In the input that contains xml;xsl;svg;xul;xsd;xslt;axl;rdf;vcproj;manifest, add ;mxml to the end. Note the semi-colon.
- Open an *.mxml file to see the wonderful color coding.
Friday, June 15, 2007
CAPTCHA (a.k.a Are you man or machine?) to reCAPTCHA
We have all been to sites where we have to type in a word or phrase that demonstrates that we are not a spider or spam bot but a human attempting to access a page or purchase an item. When you look at the word or phrase it looks like a warped rendering with distorted letters. The program that provides the fuzzy looking words is called CAPTCHA. According to recaptcha.net, “The term CAPTCHA (for Completely Automated Turing Test To Tell Computers and Humans Apart) was coined in 2000 by Luis von Ahn, Manuel Blum, Nicholas Hopper and John Langford of
I always understood the funky phrase or word was to stop Optical Character Recognition systems from deciphering them, submitting the words back, and falsely validating itself to as a human being. While it does that, recaptcha.net wants to use that few seconds of human effort of typing in the words into a textbox for noble purposes.
About 60 million CAPTCHAs are solved by humans around the world every day. In each case, roughly ten seconds of human time are being spent. Individually, that's not a lot of time, but in aggregate these little puzzles consume more than 150,000 hours of work each day. What if we could make positive use of this human effort? reCAPTCHA does exactly that by channeling the effort spent solving CAPTCHAs online into "reading" books.
reCAPTCHA improves the process of digitizing books by sending words that cannot be read by computers to the Web in the form of CAPTCHAs for humans to decipher. More specifically, each word that cannot be read correctly by OCR is placed on an image and used as a CAPTCHA. This is possible because most OCR programs alert you when a word cannot be read correctly.
To help with this go to http://recaptcha.net/learnmore.html. Moreover there is an API at http://recaptcha.net/apidocs/captcha/.
Hey, in about 30 seconds I helped digitized five words!
Thursday, May 24, 2007
There's a new, well kinda new, user group in town
Wednesday, May 09, 2007
The Selenium storEval Method in Action
A little digging on the OpenQA site in the reference for Selenium and I found the storEval method. According to the reference this method, "Gets the result of evaluating the specified JavaScript snippet. The snippet may have multiple lines, but only the result of the last line will be returned." That was just what I needed.
Here is where the method is used in the test that is stored in an HTML file:
<tr>
<td>storeEval</td>
<td>var d = new Date(); var mday = d.getDate();
var mmonth = d.getMonth() + 1; var myear; if (navigator.appName == 'Microsoft
Internet Explorer') {myear = d.getYear();} else {myear = d.getYear() + 1900;}
if (mday.toString().length == 1) { mday = '0' + mday; } if
(mmonth.toString().length == 1) { mmonth = '0' + mmonth; } todaysDate = mmonth
+ '/' + mday + '/' + myear;</td>
<td>todaysDate</td>
</tr>
<tr>
Note that the todaysDate variable above is passed the formatted current date. I then use it later in the test to assert that this is what is entered into the beginning and end date text boxes.
<tr>
<td>verifyValue</td>
<td>searchBeginDate</td>
<td>${todaysDate}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>searchEndDate</td>
<td>${todaysDate}</td>
</tr>
Wednesday, April 18, 2007
Selenium IDE with an XPath Locator
Here is how I did it.
Tuesday, April 10, 2007
Dreaming in Code Book Review
Unlike other tech related books this was composed by a journalist that kept the book moving and informative, all the while viewing software development from an entertaining, fresh perspective.
I highly recommend this book for not only software developers, but for those who work with them. Project managers, software testers, program managers and the like will benefit from the view point of a man who watched the unfolding of the Chandler open source project for a three year period.
As the book details, software is hard:
Why is good software so hard to make? Since no one seems to have a definitive answer even now, at the start of the twenty-first century, fifty years deep into the computer era, I offer, by way of exploration, the tale of the making of one piece of software -- a story about a group of people setting their shoulders once more to the boulder of code and heaving it up the hill, stymied by obstacles old and new, struggling to make something useful and rich and lasting.
Saturday, March 24, 2007
Ubuntu Desktop in Microsoft's Virtual PC 2007
I setup the VPC machine with Vista and then created a copy of the VPC to test drive. This enables me to play with it, and even break it with no issues. If I mess it up I just make another copy of my master VPC and go at it again. This is great for development and testing.
I even got the Ubuntu Desktop on a VPC machine thanks to a blog post from Arcane entitled Installing Ubuntu 6.10 on Virtual PC 2007 Step by Step.