Tuesday, April 20, 2010

LinkedHashMap, dynamic int Array, and an ArrayList in Java

Needing to build some dynamic items today and threw together: LinkedHashMap, dynamic int Array, and an ArrayList in Java. Perhaps they might help. The first class is TestHashMap.java code:



Here is the TestHashMap.java output:



Here is the TestDynamicIntArray.java class code:



Here is the TestDynamicIntArray class output:



Finally, here is the TestArrayList.java class code:



And the TestArrayList output:



Saturday, April 17, 2010

Pulling the Core to the Edge

In a recent post I discussed a few aspects of the book The Power of Pull: How Small Moves, Smartly Made, Can Set Big Things in Motion that I heard of during a Entrepreneurial Thought Leaders Lecture Series talk by John Seely Brown. Within the talk Brown uses the substantial and rapid knowledge growth and distribution among World of Warcraft gamers as an example of the efficiencies and scale of ideas that can be obtained in a pull based knowledge economy. Brown states “Look at the knowledge economy on the edge of this game.” According to Brown, the World of Warcraft gamers produce 12,000 ideas on average every night. The gamers have dashboards of data informing them and keeping them updated on new data and ideas, they review and critique submissions from other gamers, and they review game actions to improve performance! This was not in the actual core of the game but rather on the organized periphery where gamers interact.
Within the talk Brown also mentioned how that organizations need to “pull their core to the edge.” I thought, wow! Now that is interesting! Poking around on Google I found an article in the Harvard Business Review Blog entitled “How to Bring the Core to the Edge.” http://blogs.hbr.org/bigshift/2009/02/how-to-bring-the-edge-to-the-c.html by John Hagel III, John Seely Brown, and Lang Davison.

In short, the article states the:
Edges within firms represent early stage business initiatives with high growth potential, whether new market-oriented initiatives or new work practices, often generated by the born-digital generation entering the workforce…. The ‘core,’ by contrast, is where the money and resources are today, whether we are talking geographically about the developed economies of the US, Western Europe, and Japan, demographically about the older generations with greater income and assets or technologically about mature technologies driving today's revenue and profitability. At the firm level, the core symbolizes the inside of the enterprise, its principal capabilities and primary revenue streams…. Edges spawn significant growth opportunities but, to scale this growth, it is essential for edge participants to gain access to the resources and markets of the core. At the same time, core participants experience margin pressures as competition intensifies and become increasingly desperate for new growth platforms to continue to create economic value…. Disruption theory suggests it's by bringing the edge to the core.


The article then states, "The approach we suggest is to instead bring the core to the edge, to expose your company to institutional innovations and new management practices that emerge on the edge."


Now this is good stuff! Imagine bringing the creative edge of your organization into a symbiotic relationship with the company core. This would result in positive disruption for the organization in general and individuals in the company in particular.

Social Media and the Big Shift to a 21st Century "Pull" Economy

During a morning jog, I listened to a talk from John Seely Brown where he discussed what he calls the "big shift" from the 20th century "push" economy to the 21st century "pull" economy. In summary, the "push" paradigm is largely the traditional command and control model while the "pull" based structure is a more dynamic interaction with what Brown calls "knowledge flows." Upon further investigation, I found an excerpt from a new book, of which Brown is one of the authors, entitled The Power of Pull: How Small Moves, Smartly Made, Can Set Big Things in Motion at www.edgeperspectives.com. Here is what I see as the essential elements pulled directly from the text:
At the most basic level, pull helps us to find and access people and resources when we need them. At a second level, pull is the ability to attract people and resources to us that are relevant and valuable, even if we were not even aware before that they existed. Think here of serendipity rather than search. Finally, in a world of mounting pressure and unforeseen opportunities, we need to cultivate a third level of pull the ability to pull from within ourselves the insight and performance required to more effectively achieve our potential.

The first level of pull, access, is very powerful. But in a world of near-constant disruption, its value is finite. Many of us are increasingly finding that we no longer even know what to seek, even with the growing power of search. While it’s great that all sorts of information is indexed and sorted on the web, even a daily tour through ones Facebook newsfeed reveals many new people and resources that could be relevant.

How do we find out which ones? How do we specify, when we go to Ask.com, Bing, or Google, the areas of knowledge and expertise that would be most valuable? Show me the stuff that I really need that I don't even know exists, isn’t much of a search string. Access only truly works when we know what were looking for. At times like these, the cursor blinks in the search engines textbox, mocking us, asking the existential question: Do you even know what you are looking for? And even if we think we do, it’s guaranteed that unknown unknowns, as Donald Rumsfeld memorably called them, are waiting for us, both as opportunities and as barriers.

We must supplement search engines and their equivalents by exploring additional ways of pulling people and their knowledge to us. To address this challenge, we will need to master the techniques of attraction in both our personal and professional lives and learn to harness the power of serendipity, which is the faculty of finding people and things that we did not know we were looking for.

We need serendipitous encounters with people because of the importance of the ideas that these people carry with them and the connections they have. People carry tacit knowledge. You can’t learn brain surgery just from a text. You've got to stand next to someone who already knows and learn by doing. Tacit knowledge exists only in people’s heads. That means we must not only find the people who carry this new knowledge but get to know them well enough (and provide them with sufficient reciprocal value) that they’re comfortable trying to share it with us.

All of this might make attraction an effective form of discovering the things we didn't know we didn't know, but it also brings up a problem: How can we possibly have enough time to put this into practice? There are only twenty-four hours in the day.

To master attraction, we need two elements to come together in a powerful and reinforcing way. First, we need amplifiers that can help us reach and connect to large groups of people around the globe that we do not yet know (and may not even be aware exist). These amplifiers relate to our choice of where to live, what gatherings we attend, how we conduct ourselves online, and what we do to draw the attention of others. Second, we need filters that can help us to increase the quality as well as the number of unexpected encounters and ensuing relationships that are truly the most relevant and valuable. These filtering techniques help separate the wheat from the chaff in our interactions with others and become ever more crucial as we begin serendipitously drawing more people toward us. By simultaneously amplifying (to increase the sheer number of unexpected encounters) while filtering (to spend time only on those interactions that yield value to us and to others), we can shape serendipity in order to attract from the edges of our fast-moving world the people and knowledge we need in order to thrive.

The third level of pull: Achieve. Accessing and attracting in fact have diminished value unless they are coupled with a third set of practices that focus on driving performance rapidly to new levels. These practices involve participation in, and sometimes orchestration of, something we call creation spaces--environments that effectively integrate teams within a broader learning ecology so that performance improvement accelerates as more participants join.

Creation spaces differ in at least two ways from the learning organization approaches pioneered a couple of decades ago. First, they emerge as ecosystems across institutions rather than within a single institution, so they reach a much more diverse set of participants. Second, they are not primarily focused on learning their goal is to drive more rapid performance improvement, and learning occurs as a byproduct of these efforts.

The moral of the story? To get better faster at whatever it is you do, you've got to be supported by a broad array of complementary people and resources from which you can pull what you need to raise your rate of performance improvement.
This, in my view, is the goal of each of us. What I found of most interest was the concept of amplifiers and filters in the "attraction" step. Your social media tool(s) of choice can function as the tool to see these concepts become a reality. In the midst of your busy days of family, work, and various interactions please remember that social media tools enable us to both scale and sift our knowledge base to make us more informed and productive.

Thursday, April 15, 2010

Organic...Better than Artificial

I recently noted an blog submission from a co-worker discussing the Technology Adoption Lifecycle utilizing Everett Rogers' Bell Curve (below).


Within her post she discussed how that the curve demonstrates that technology users adopt technologies and tools at differing rates. Therefore, allowing the statistical rate of adoption to take place in an organization was better given that it was organic. She then stated that one would need to, "Trust that organic structures are stronger than artificially forced ones...." After reading her insightful, well written post I realized that she was correct. Anything that is "artificial" has a high probability of not working within an organizational ecosystem, just as it would not in a natural ecosystem. I then replied to the post with this comment, hoping to increase that trust by providing a quick look at, at least in my view, why organic structures are stronger. In short, I took a page from nature itself.


First, organic structures emerge by leveraging the objects in its environment and therefore better suit the environment. This is dramatically different than an imposed, artificial structure that attempts to change the existing DNA matrix and kills existing organisms (existing ideas and business competitiveness) in the environment.

Secondly, organic structures are more adaptive. Because it is built upon the attributes of its environment, when change in the environment happens it contains the elasticity to "bend without breaking" and can gain an advantage over competing entities.

Finally, because organic structures are more adaptive, more fit organisms (ideas/products/services) emerge more quickly. Artificial structures must first remove competing organisms and then take root in the ecosystem before it can produce the fittest organisms.

Therefore, in my humble opinion, we can rationally and confidently trust that organic structures are stronger than artificially forced ones.

Thursday, April 08, 2010

html:checkbox gotcha

Was in the midst of testing a JSP that utilized the html:checkbox form input and what I quickly noted was that the checkbox values that were unchecked were not calling the settter methods in the JSP's corresponding Action. Upon inquiring with the finer brains in my area, Ahmed, co-worker in the next cube, helped by pointing out that his experience was that unchecked checkboxes are ignored and to handle the default settings in the Form's reset method. Sure enough he was right. Here is an excerpt from Apache's Struts site here:
A problem with a checkbox is that the browser will only include it in the request when it is checked. If it is not checked, the HTML specification suggests that it not be sent (i.e. omitted from the request). If the value of the checkbox is being persisted, either in a session bean or in the model, a checked box can never unchecked by a HTML form — because the form can never send a signal to uncheck the box. The application must somehow ascertain that since the element was not sent that the corresponding value is unchecked.

The recommended approach for Struts applications is to use the reset method in the ActionForm? to set all properties represented by checkboxes to null or false. The checked boxes submitted by the form will then set those properties to true. The omitted properties will remain false. Another solution is to use radio buttons instead, which always submit a value.

It is important to note that the HTML specification recommends this same behavior whenever a control is not "successful". Any blank element in a HTML form is not guaranteed to submitted. It is therefor very important to set the default values for an ActionForm? correctly, and to implement the reset method when the ActionForm? might kept in session scope.

Thursday, March 11, 2010

What Level Are You?

With the advent of personal computer technology in general and social media specifically, everyone is a potential “media mogul.” The question becomes, what level of intimacy do you want with your audience? The graphic below, from http://loichay.tumblr.com/post/178728159/10-levels-of-intimacy-in-todays-communication, shows us 10 levels of intimacy using various forms of media available to us. Let’s look at each level starting with 1 and working up to level 10.


Levels 1 and 2 – These levels enable us to communicate with large amounts of people. In a nutshell, social media has made mass communication the purview of the individual. What was once the domain of traditional broadcast media, the common person can now take part and “social-media cast” to thousands. While this level allows one to scale to more people, obviously it is not intimate. The value here is casual contact with the masses. In this venue, clubs and civic organizations can make meeting announcements at virtually no cost.

Another value of levels 1 and 2 is the amount of either positive or negative“buzz” that tools such as Facebook and Twitter provide. For example, you purchased a product and it is not working correctly. You contact customer service but they are apathetic to your plight and give you the normal spiel that, “You can only return the product on the third Tuesday of each month between 1:35 and 1:40 PM with the receipt and a notarized statement promising both your right arm and first born child.” However, because of Twitter and Facebook you now have additional channels and leverage. You tweet (on Twitter) and post a status (on Facebook) about your less than satisfactory experience with the vendor. Others read of your situation and enter the fray. If the vendor is smart, they monitor the “twitterverse” and “facebookdom” looking to remedy what could be a potential run-away PR problem.

Levels 3 and 4 – I put these levels together given that both a Facebook message and traditional email are “push” technologies that do not require real-time interaction. The idea here is that you to not require an immediate response and can send or push the message to the intended recipient(s) and wait for the response at the convenience of the responder(s).

Levels 5 and 6 – Real-time communication is of a higher level of intimacy in that it requires your attention “then and there” and is therefore more intimate. The only difference in these levels is the media. Level 5 is with a mobile hand-held device and level 6 with a device (desktop or laptop computer) that provides a larger form-factor of view and keyboard input. While some would argue that the form-factor size is of no barrier, the larger form-factor, in my view, allows for a more intimate experience.

Level 7 – Here—the handwritten letter—appears to be a dying media. The fact that effort must be made to handwrite the message, the time it takes in forethought to prepare (given that editing a handwritten letter is not easy, especially with a pen), and the tangible properties of the letter (texture and smell of the paper) make this a more personal media.

Level 8 – While this level is difficult to scale, unless you are conferenced into a group or on a speaker phone with a group, this one-on-one media is real-time and auditory. You hear the person which provides a level of intimacy not achieved in the previous levels.

Level 9 – This level is considered more intimate than the lower levels given that the person or persons that you are speaking with are able to be viewed. With technologies such as Skype and an inexpensive webcam, we can achieve a high level of intimacy in spite of geographic location.

Level 10 – The most initiate level is face-to-face, physical presence. Here you have visual and an auditory exchange of signals as well as tactile contact. This results in a more direct attention to the person(s) with which you are communicating.

In summary, humanity has always operated on different levels of intimacy in various environments and settings. With the internet and social media, we have more avenues to operate within these levels of intimacy. More opportunities means learning which media is appropriate for which situation, is it good for personal or professional use, or what are the emerging social norms for the media. Again, what level are you?

Sunday, March 07, 2010

Your Consumed Information--Useful and Valuable?

With the torrent of information coming at us it is useful to ask, "Is the information I ingest beneficial?" Below is hopefully a helpful quadrant to assist in the determination of the use and value of your information:

Sunday, February 14, 2010

Every Garage or Computer--an Industrial Player

This month's Wired magazine has an interesting article, In the Next Industrial Revolution, Atoms Are the New Bits. In this piece the magazine's editor Chris Anderson discusses how with the availability of free or affordable software tools and outsourcing, a home garage or wannabe inventor has the potential to be a viable industrial manufacturer. Good stuff!

Wednesday, February 03, 2010

Dynamic Java String Array

A business needed to split data elements in the display to it's customers via a report. Since the data was returned from the Java Data Access Object layer as a String array, the quickest way was to detect an existing data item and then insert what the business wanted to display in the report for that data item.

Here is an example of what I did to dynamically insert items into a Java String array:

public class DynamicStringArray {
public static void main(String[] args){
String[] originalArray = {"a","b","d"};

System.out.println("----- Original String Array ----");
for(int i = 0; originalArray.length > i; i++){
System.out.println(originalArray[i]);
}

//create a fixed-size ArrayList from the String array.
ArrayList oldList = new ArrayList(Arrays.asList(originalArray));
//create an ArrayList to hold the inserted items.
ArrayList newList = new ArrayList();

//assume no "b" in the array
boolean hasB = false;

//check if the array has a "b"
for(int i = 0; originalArray.length > i; i++){
if(originalArray[i].equalsIgnoreCase("b")){
hasB = true;//we have a "b" Houston
}
}

if(hasB){//the array has a "b"
for(int i = 0; oldList.size() > i; i++){
if(oldList.get(i) == "b"){//found "b"
newList.add(i,"newB");//replace "b" with "NewB"
newList.add(i + 1,"c");//add "c"
}else{//not "b"
newList.add(oldList.get(i));
}
}
}

//create new String array
String[] newArray = new String[newList.size()];
newList.toArray(newArray);
//pass new String array to old String array
originalArray = newArray;

System.out.println("----- Updated String Array -----");
for(int i = 0; originalArray.length > i; i++){
System.out.println(originalArray[i]);
}

}
}

The above code results in the following:

Sunday, January 03, 2010

Security Management - Better to be loved or feared?

Recently I created a fictional case study that discussed management styles when dealing with internal security threats.

Click here to read and then let me know your thoughts.

Friday, September 25, 2009

5 exabytes in the last 2 days. We better get busy!

Eric Schmidt, Google CEO, at a talk given at a forum jointly hosted by Google and the Pittsburgh Technology Council, stated that the amount of data generated from the birth of humanity to the year 2003 was 5 exabytes (point 8:30 of the talk). The date of the presentation was September 23, 2009. Schmidt, then stated that given the connectivity we now have the amount of data generated the last 2 days was equal to these 5 exabytes. What!!!???!??!?! An exabyte is one quintillion bytes. Just within the last year could you buy a 1 to 4 terabyte hard drive. An exabyte is 1,048,576 terabytes or 1,073,741,824 gigabytes, i.e a lot of data!

OK. We may have generated that amount of data the last few days. And do not misunderstand me. I realize there is intelligence in that data. And yes, let it instruct and assist us. But my thinking is that the 5 exabytes in the last several thousand years is of much better quality and substance that the 5 exabytes in the last 2 days, right? If not, then the quality and substance is hidden therein and let us get busy and mine it out!

Wednesday, August 19, 2009

Digital Utopia--Free?

Was considering purchasing the Kindle version of the new book by Chris Anderson, Free: The Future of a Radical Price and looked for reviews (An ironic note is that I fully understood that I would have to pay for the digital version of the book). In my search of reviews, I did find the "free" review by Malcolm Gladwell at The New Yorker.

Gladwell discusses that Lewis Strauss, the former head of the Atomic Energy Commission, famously predicted in the mid-nineteen-fifties, due to the advent of nuclear energy, that “our children will enjoy in their homes electrical energy too cheap to meter.” Gladwell then states, "It is pointless to wonder what would have happened if Strauss’s prediction had come true while rushing past the reasons that it could not have come true."

Strauss appeared not to consider the cost of the infrastructure of energy distribution. In a similar way, with the phenomenum of YouTube, "A recent report by Credit Suisse estimates that YouTube’s bandwidth costs in 2009 will be three hundred and sixty million dollars."

Time will tell but the Achilles' heel, at least for now, that I see for a Digital Utopia of "Free" is the "cost" of distribution. Bandwidth, batteries, e-readers all cost money.

Monday, August 03, 2009

@Erlanger911 offers a nice twitter service for Erlanger, KY residents

@Erlanger911 offers a nice twitter service for Erlanger, KY residents in that it provides traffic and emergency service based tweets.

Posted via email from m2web's posterous

Thursday, June 18, 2009

Look mom I sent this from Posterous.com!

Here is a sweet service. Posterous.com. Send to Facebook, Twitter, and your Blogger blog from e-mail.

I uploaded the Sisyphus the Software Developer image via an attachment!

Posted via email from m2web's posterous

Saturday, May 02, 2009

IBM's Many Eyes Data Visualization Project

Per a previous post where I show my Facebook friend social graph, I mention that the social graph displays "more" information than a grid of your Facebook friends' pictures. In short, data visualization can help us analyze data and more easily notice patterns. IBM's Center for Social Software is doing this with their Many Eyes Project. Here is a blurb:
It is that magical moment we live for: an unwieldy, unyielding data set is transformed into an image on the screen, and suddenly the user can perceive an unexpected pattern. As visualization designers we have witnessed and experienced many of those wondrous sparks. But in recent years, we have become acutely aware that the visualizations and the sparks they generate, take on new value in a social setting. Visualization is a catalyst for discussion and collective insight about data.
Check it out

Monday, April 27, 2009

Twitter - knowledge or data?

In a blog post entitled, Dull Networks? How microblogging might turn the wisdom pyramid upside down, Miguel Encarnação presents concerns that the brevity of microblog messages such as Twitter may circumvent the way we process data into more useful forms of knowledge. He provides examples:

  • Data represents a fact or statement of event without relation to other things.
    Ex: It is raining.
  • Information embodies the understanding of a relationship of some sort, possibly cause and effect.
    Ex: The temperature dropped 15 degrees and then it started raining.
  • Knowledge represents a pattern that connects and generally provides a high level of predictability as to what is described or what will happen next.
    Ex: If the humidity is very high and the temperature drops substantially the atmosphere is often unlikely to be able to hold the moisture so it rains.
  • Wisdom embodies more of an understanding of fundamental principles embodied within the knowledge and is essentially systemic.
In my view, even with the 140 character limit, tweets can be and often are more than bits of data. In my view, they are bytes of knowledge. The example of knowledge in Miguel's post is: "If the humidity is very high and the temperature drops substantially the atmosphere is often unlikely to be able to hold the moisture so it rains" This is 146 characters. This can easily be shortened to: "If the humidity is very high and the temp drops substantially the atmosphere is often unable to hold the moisture so it rains" which is 130 characters and can be tweeted. Moreover, tweets can and often do contain links to other websites that contain full explanations on the topics referenced.

In fairness, Miguel is correct that information received on microblogs such as Twitter, as all information sources, need to be closely examined and
verified.

In summary, tweets, if used properly can augment both knowledge and wisdom.

Sunday, April 05, 2009

Facebook GreaseMonkey Scripts for a better view in Firefox

Was scoping out my Twitter feed when I noted a tweet that I follow from Atul Arora. The link went to a Jeff Smith’s blog that discussed Facebook tweaks with GreaseMonkey. GreaseMonkey allows you to customize the way a web page displays using JavaScript. Via the highlighted scripts I was able to get a more desirable viewing experience on Facebook.

Click here for the full article with screen shots and links.

Thursday, April 02, 2009

Fittest CMOs and Business Intelligence from Social Media

Recently, in my Marketing Management class for the Master's in Business Informatics program at NKU I had to write two short research papers that were part of the course's two initial exams. In each of the papers, we were given three to five days to research and complete. Here is an excerpt from the first paper entitled Survival of the Fittest CMOs:
Given the rapidly "evolving" role of the Chief Marketing Officer (CMO), one paradigm to consider when surveying the swiftly changing CMO phenomenon is to look at natural ecosystems and how ever changing environment pressures facilitate the change or evolution of the organisms in those ecosystems. In this paper, we examine the characteristics of the "primitive" CMO, the new environmental pressures challenging the CMO, and finally the fitness factors that are involved in the survival of the fittest CMOs.
Here is Survival of the Fittest CMOs.

Here is a section of the second paper, Business Intelligence from Social Media:
Given the need for understanding the trends and patterns exhibited in data, utilizing the data in a way that can provide a competitive edge is vital. Three particular products or opportunities for this need are systems to store the data, systems to warehouse the data, and systems to mine the data for analysis and decision making. Data storage is a well understood concept of the use of computer systems to store customer information and transactions as well as other business related data. However, data in a data warehouse is different that the data stored by point-of-sale systems.
Here is Business Intelligence from Social Media.

Wednesday, April 01, 2009

Favorite Software Dev April Fools Joke

Here is my favorite April Fools software developer related joke: The "Phails" Web Framework at http://phails.com/ . Released on April 1st of course!

Saturday, March 21, 2009

Visual Facebook Social Graph

Was reading about social networks in the NKU project management course textbook that I am currently taking and thought to myself there has got to be an application that you can use to login to Facebook and have it gather your social graph or "Friend" data and produce a visual social graph. A few minutes on Google and what I found was the Curl Rich Internet Application (RIA) platform from Curl along with a sample application called CurlGraph.

Long story short, after downloading their Run Time Environment (RTE) and pasting a URL into the address field of my browser, I installed the CurlGraph application on my system. Then after logging into Facebook with the app, it collected my Friends network info and then produced the following social graph visualization.


Click on the pic to get the larger image.

The neat thing about the app is that I could select anyone represented on the graph and they would then move to the center of the display. You could drag your friends around on the display and sort your social graph by alphabet or by popularity. Note that your Facebook friends are represented as circles. Also the popularity, or size of the circle, is based on the intersection set of friends that you have in common with each friend not on their total set of friends. That is why my wife's circle is large as we have nearly the same set of Facebook friends. Also note that while the bold lines connect my friends to me, the web of relationships that exist from all the friends is visible. This changes when you select a friend with your mouse as the connecting lines from them to your other friends then become bold.

In summary, I find it interesting when finding different ways to visualize data. This certainly tells you more about your Facebook Friend network than a grid of pictures.

Here is Curl's press:
Using Curl, developers can implement a new class of complex, business-critical, Web-based applications that cannot easily be developed with Ajax or other smart client technologies.

Curl allows organizations with legacy client-server applications to move to Web-based delivery, increasing reach, improving processes, accelerating productivity and reducing cost.



Customer driven #marketing? Now that's an #idea! for #social products.

Social computing as an interface between the business and their customers as a mechanism for product ideas and input? Go to http://ping.fm/f3ujg.
From Bill Taylor's Practically Radical Blog at HarvardBusiness.org. In lean times, there's nothing more valuable than a great new product idea. Why not invite your customers to share their creativity with your company -- and turn the best ideas into actual products! That's what legendary shoe designer John Fluevog has done, with a project he calls open-source footwear.

Wednesday, February 25, 2009

Status Last 10 List for Facebook

Just finished the final touches on a new Facebook application I entitled, "Status Last 10."

In a nutshell, the app displays a list of your last ten status messages that you entered into Facebook. You can display the list on your Wall or Boxes Tab. Much of the blogoshpere speculates that Facebook opened their status API to compete with Twitter.

In any event, the app is coded in PHP. The next step will be to show the code once I get the refactorings completed and share the discoveries. More to come once I get the time.

Thursday, February 12, 2009

People are not shapes on a diagram....they're people

Was listening to the Manager Tools Podcast in which they were discussing the fact that while we may plan and plan we must, the aspect of managing a project is really about the people involved. Moreover, the various diagrams that we create during the project inception and elaboration may be neat and pretty, the reality of working the steps are anything but that.

During the discussion they cited a poem from Stephen Vincent Benét entitled John Brown's Body dealing with the U.S. Civil War. Here is the relevant section:
If you take a flat map
And move wooden blocks upon it strategically,
The thing looks well, the blocks behave as they should.
The science of war is moving live men like blocks.
And getting the blocks into place at a fixed moment.
But it takes time to mold your men into blocks
And flat maps turn into country where creeks and gullies
Hamper your wooden squares. They stick in the brush,
They are tired and rest, they straggle after ripe blackberries,
And you cannot lift them up in your hand and move them.
--A string of blocks curling smoothly around the left
Of another string of blocks and crunching it up--
It is all so clear in the maps, so clear in the mind,
But the orders are slow, the men in the blocks are slow
To move, when they start they take too long on the way--
The General loses his stars and the block-men die
In unstrategic defiance of martial law
Because still used to just being men, not block-parts.

Monday, January 19, 2009

Stifling Technological Innovation?

A straight forward post from Dave Hatter on the effects of corporate taxation on small business.

It would appear given the present political fervor of a new administration coupled with the current financial crisis that a perfect storm of over-regulation is on the horizon.

Saturday, January 17, 2009

Value of Shorter Iterations in Project Management

Now with the start of the Spring 2009 term in the Business Informatics Graduate Program at Northern Kentucky University, I am taking Marketing Management and Project Management classes.

In the initial readings in the Project Management course deal with Work Breakdown Schedules, Organizations Breakdown Schedules, and Work Packages and how to best organize, monitor, and measure each step. As I read I am thinking of the value of shorter iterations within the cycles of a project.

Here is a discussion on the value of shorter iterations within software development that are in my view applicable to project management. Aspects such as more frequent feedback and a better understanding of the work package status makes shorter iterations attractive. With that said, I am sure that as the term progresses I will learn both the advantages and disadvantages to shorter iterations in project life cycles.

Thursday, January 01, 2009

Simple Facebook Application

While I was off on vacation through the holidays I took an afternoon to put together a simple Facebook application in which Facebook users can display on their profile wall or box tab an English Standard Version (ESV) Bible Verse of the Day.

The application utilizes the ESV API.

Tuesday, December 23, 2008

Resizing an image on mouseover with Flex 2

I was updating my personal site created from Flex 2 MXML and ActionScript and needed to create hyperlinks from thumbnail images. The html markup for the image is created from content from an XML file. In the past, one had to escape html markup contained in XML elements and create a link to a larger size of the same image. In short, I was hoping to avoid that unpleasantness.

Enter the mx.effects.Resize class. Using this object you can control the resizing of an image when the user passes their mouse over the image. For example, you have a thumbnail image that you are displaying that is 150 by 150 pixels in your MXML file:
<mx:Image source="yourImgPath/imgName.jpg"
height="150"
width="150"
/>
You want to enlarge the image to a size of 450 by 450 pixels based on the action of a user. Instead of a link to a larger image, we will enlarge the image when the user passes their mouse over the image. To do this you can utilize the mx.effects.Resize class. Enter the following into your MXML file:
<mx:Resize id="resizeBig"
widthFrom="150" widthTo="450"
heightFrom="150" heightTo="450"
/>
<mx:Resize id="resizeSmall"
widthFrom="450" widthTo="150"
heightFrom="450" heightTo="150"
/>
Then, within the Image instance, modify it with the following:
<mx:Image source="yourImgPath/imgName.jpg"
height="150"
width="150"
rollOverEffect="{resizeBig}"
rollOutEffect="{resizeSmall}"
/>
Finally, recompile and you will see that when the user passes their mouse over the image it enlarges without the use of links to the larger image.

Thursday, November 20, 2008

Genetic Algorithm for Network Intrusion Detection Rule Sets

This term (Fall 2008) at Northern Kentucky University (NKU), in the Data Communications & Networking class, I conducted some research for a project dealing with the use of machine learning applications for network security. Specifically, I created a genetic algorithm (GA), with the JGAP Framework, which can be used to produce Network Intrusion Detection Rule Sets.

Special thanks to Dr. Frank Braun, class professor, Dr. Richard Fox, Professor and Graduate Program Director in the Department of Computer Science at NKU, and Mr. Klaus Meffert (soon to be Dr. Klaus Meffert) the primary author of the JGAP framework, for their assistance.

Here are the paper, presentation, and related files:
Paper
Presentation
GA Output
XML Output

Thursday, November 06, 2008

Graffiti CMS C# Extended Link List

I have setup a site for a customer that utilizes the free version of Graffiti Content Management System (CMS ). The framework is great and runs pretty much out of the box on Microsoft's ASP.NET 2.0 framework software and runs on Windows Server with Internet Information Services (IIS). In fact, Intelligent, the creators of Graffiti state that their goal was to create an environment where users would not have to understand programming, design, and or system administration. I think they have come pretty close to achieving it.

What it meant for this client was that the setup and intial labor of the site was greatly reduced, thereby saving them money. In any event, I setup an account for the client and placed then in a manager role (which were setup and ready to go), that allows them to publish content via a handy WYSIWYG editor. One thing that the role is not able to do is to use the many widgets that are available for the site.

I posted a question on the Graffiti forum that asked is there a way to allow users in the manager role access to the Link widget where they could create links in a special area of the site where the widget is placed. I found that to date you can not. While looking I did find a widget that extends Graffiti's Widget class called an Extended Link List, that was developed in VB.Net. To better learn how to create extended widgets I ported the project to C# and posted it on CodePlex, Microsoft's open source project hosting web site.

If interested, here it is.

Friday, August 22, 2008

IT's About Business Objectives Stupid

Last term I was contacted by a professor, Dr. Kevin Gallagher, as he was questioned by a reporter who was working on a story about IT (Information Technology) programs, their variations, and how and why students pick their chosen degree program. Upon his request, I provided a short list of answers and that was that. Dr. Gallagher recently notified me about the article.

In short, the article is spot on concerning IT programs and the need of those enrolling in them to consider broader aspects of business objectives and not just technical knowledge.

Check it out.

Saturday, August 02, 2008

Please skim this.

In a recent IT Conversations Interviews with Innovators podcast, the discussion centered on removing clutter from the visual field of students when training. That same morning I also listened to Scott Hanselmans’s podcast which dealt with micro-blogging. Here, the discussion utilized the metaphor of information as a river and how one deals with the torrent of news and data, specifically how one organizes it to be useful with tools such as twitter and RSS Feeds.

In both podcasts the talk touched on the issue of how possibly this instant information has made us less tolerant to large amounts of text in mediums such as books. There was also a mention of an excellent article in Atlantic Monthly by Nicholas Carr that asked the question, "Is Google making us stupid?" The question in my mind, along the same thought, is, "Does micro-blogging technologies such as twitter, IM clients, or text messaging foster a culture that lacks the ability to maintain a sustained period of attention to the formation of ideas and thoughts?"

Ironically, I used Google to find more information on the topic searching with the words, "google learning sustained thought." What I found an interesting article from the New York Times by Motoko Rich entitled, "Literacy Debate: Online, R U Really Reading?"

For those with diminishing attention spans I will get to the crux: some purport that digital text is read by those who otherwise would turn to the television or electronic gaming, and is therefore a gateway to more sustained reading. While that may be true, my concern is along the lines of Rich’s article:

Critics of reading on the Internet say they see no evidence that increased Web activity improves reading achievement. "What we are losing in this country and presumably around the world is the sustained, focused, linear attention developed by reading," said Mr. Gioia of the N.E.A. "I would believe people who tell me that the Internet develops reading if I did not see such a universal decline in reading ability and reading comprehension on virtually all tests."

Then, Rich’s article refers to Carr’s Atlantic Monthly piece:

Nicholas Carr sounded a similar note in "Is Google Making Us Stupid?" in the current issue of the Atlantic magazine. Warning that the Web was changing the way he — and others — think, he suggested that the effects of Internet reading extended beyond the falling test scores of adolescence. "What the Net seems to be doing is chipping away my capacity for concentration and contemplation," he wrote, confessing that he now found it difficult to read long books.

In summary, I think that any technology that helps present, streamline, and make information accessible is good. However, what are the side effects? Good question, but now my attention is distracted and I must move on to something else.

Tuesday, July 29, 2008

Programming: A Social Activity

I have been listening to a weekly podcast, Stackoverflow with Joel Spolsky and Jeff Atwood. Podcast 15 features a question that asks what the most effective code review methods are. On the podcast site, the show notes state,
Joel and I both agree: one of the most effective coding practices you can adopt on your team is interactive, sit-down-with-your-coworker code review. 90% of the things you will learn have nothing to do with the code. I believe programming is a far more social activity than most realize. If you write code, and nobody but you ever sees that code — did you really extract all the benefit from writing that code?
HEAR, HEAR!

Friday, July 25, 2008

Notepad2: A light-weight ABAP external editor

(a.k.a. Look Dr. Raghavan, no SAP environment!)

OK. It has been awhile since I have posted anything. Reason: I am heavily involved in church and family, working full-time, and going to school part-time. Enough said. Anyway, I have been taking a few SAP classes this summer as part of the Business Informatics graduate program I am in at NKU. One of the classes is an ABAP programming class.

I have to admit that after being skeptical at first, I like ABAP and its development environment. However, while still in the course, I want an external editor that I could use that color codes the syntax to make it easier to read and edit. Granted I will not be able to debug the code but it is nice to have an editor to drop code into, as I do not have to login to SAP, for a quick look.

My favorite light-weight editor is Notepad2 from Florian Balmer. Since it is open source, and I saw where others have added different language-syntax highlighting capabilities, I thought I would give it a go.

First, I downloaded the Notepad2 source from Flo’s Freeware Page and opened the C++ project in Visual Studio 2005. Then, after bombing on my first build, I read the readme file which stated to include the source from the editor that inspired notepad2, Scintilla and tweak one of the source files. After another bomb on the rebuild I set the project property to NOT embed the manifest. Then, it built.

Next, I wanted to get an ABAP lexer working for Notepad2. A quick look on Google and I found another build of Scintilla, SciTE Ru-Board Edition. Now is when the fun begins. What I essentially did was to dig into the SciTE Ru-Board source code, grab what I thought was the needed to implement the Notepad2 ABAP lexer, and then attempt a rebuild. With each attempted build I find various sections that I needed to modify within the Scintilla source code. Finally after about a dozen attempts, I had the Notepad2 project building.

Then, I wanted to update the Notepad2 Styles header and program files (Styles.h and Styles.c ) so that the color coding will work for ABAP files in Notepad2. Once this was completed, I had a light-weight ABAP editor that provided syntax highlighting for files with an ".abap" or ."abp" extension.

Finally, if you pull down the Notepad2 source from Flo’s Freeware Page, do a "diff" on the /src/Styles.c and /src/Styles.h files to see the updates. Also, to see where the Scintilla source was modified diffs should be done comparing the following files: /include/PropSet.h, /include/SciLexer.h, /src/KeyWords.cxx, /src/PropSet.cxx, and /src/StyleContext.h. I also added the /src/LexABAP.cxx file to the Scintilla source (thanks to VladVro [one of the SciTE Ru-Board Edition project owners]) as that is needed by Notepad2.

NOTE: The Visual Studio 2005 Notepad2 project and binary downloads were updated 9/18/2008 with more Object Oriented ABAP keywords.
Click here to get the Visual Studio 2005 Notepad2 project.
Click here to get the binary Notepad2 files.

NOTE: By the way, I added Scott Hanselman’s Ruby lexer to this project for Ruby file edits.

Wednesday, April 23, 2008

JavaScript HashMap

Okay, this is not new nor exciting but I was looking to create something like a Java HashMap or a C# Dictionary object in JavaScript. What I did find was that you can use a JavaScript Array to function as a hashmap or dictionary object. I would then use it to iterate through to do some quick client-side validation for a web page. Here is the code:

function formFieldArray(){
var myArray = new Array(10);
myArray['myname'] = "Name";
myArray['myaddress'] = "Address";
myArray['mycity'] = "City";
myArray['mystate'] = "State";
myArray['myzip'] = "Zip Code";
myArray['myPhone'] = "Phone Number";
myArray['myEmail'] = "Email Address";
myArray['cardname'] = "Name as it appears on the Card";
myArray['cardNumber'] = "Card Number";
myArray['expDate'] = "Expiration Date";
myArray['cardCode'] = "Card Security Code";

return myArray;
}

function validateForm(){
var theFormFieldArray = formFieldArray();

//iterate thru array and clear values
for (key in theFormFieldArray) {
if(eval('document.myForm.' + key + '.value.length == 0')){
alert('Please enter the value for the ' + theFormFieldArray[key] + ' field.');
eval('document.myForm.' + key + '.focus()');
return false;
}
}

document.myForm.action = "yourNextPage.php";
document.myForm.submit();
}

Sunday, March 02, 2008

Want to be influenced?

Caught this interesting post by Valdis Krebs on social networks and how ideas are spread within them. There has been much discussion about the "influential elite" and how, if they champion an idea, it is more probable that it will grow and gain acceptance. However, this post points to the thought that it is not so much the influencing elite who control what ideas gain intellectual and social traction, but rather the willingness to be influenced by those adjacent, in the social network graph, to the elite.

Saturday, February 16, 2008

Narrative Thinking

I was doing a few days coding for a client and informed them that I only had a few more free days before starting back into a new term at grad school and that I would probably not get much done given I was still learning the e-commerce package that they were using. But in order to provide them with a deliverable I decided to record my steps and thoughts in a document in narrative form for their future information and use.

There is much discussion about narrative verses symbolic code and moving computer languages more toward a natural language. Such is the discussion about Domain Specific Languages. However, when I say narrative form I am not speaking of actually writing code but rather simple prose mixed with code as needed, to record thought processes, research findings, and general steps in a discovery process.

Here is an example layout of what I did:

Saturday, January 05, 2008
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:
  1. Here I would describe actual steps that I took, thoughts in the process, rationale for decisions, etc.
  2. I added a check to the Customer.Authenticate method.
if (customer.ID[0].Status != Customer.Validated){
throw new CustomerException(CustomerExceptionType.NotValidated, "Customer Not Validated");
}
  1. This resulted in an error when attempting to login with the userid and password.
  2. ......
Next Steps:
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?

In a recent post I linked to a paper that I composed for a graduate class on Dynamic Languages in software development. Today, at InfoQ there was an interesting review of a post by JRuby developer Ola Bini. In a similar view to n-tier layered architecture, Bini describes language types of static, dynamic, and domain specific in a layered fashion.

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

I was listening to IT Conversations earlier this week while jogging and heard the mention of MIT’s new Open Courseware (OWC) web site. After checking it out I found that OCW is a free publication of course materials used at MIT. The site provides access to course lecture notes and audio and video files, labs, and resources on a variety of subjects.

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

This last semester in my Systems Analysis and Design graduate class, we were assigned to present the results of a brief research project. We were to decide the topic and then provide a written paper and presentation.

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

For a problem that was to be solved in my database systems graduate class this last semester, we were asked to prove a theorem by Hugh Darwen that is known as the General Unification Theorem concerning Functional Dependencies within Relational Databases.

Click here to see the proof.

Tuesday, October 16, 2007

Selenium IDE HTML Compare Pattern

I was needing to test sorting for a web-based application UI this last week. What I needed to do was check that a listbox control’s account numbers were sorted in ascending order. What quickly emerged was a pattern of steps when using Selenium IDE HTML scripts to compare values.

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} &lt; ${ 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

Considering that most JavaScript development deals with Document Object Model (DOM) Element collections, JQuery provides a framework that results in cleaner and more concise code.

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

I wanted to run a JavaScript function in my Selenium IDE HTML test. Specifically, I wanted to remove any currency symbols and commas from currency values. Here is the best way that I have found to do it.

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

Back in August I attended an event sponsored by Adobe that highlighted their new AIR (Adobe Integrated Runtime) product. The new runtime looks great but what was of particular interest at this event was the venue in which the event was held.

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.

Ryan Stewart giving the keynote

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

It has been awhile given that I have been busy at work and also started a graduate business informatics program. Anywho, a customer recently requested a way to select an HTML Listbox control and key in an account number and have that number be selected as they were entering the perspective number.

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?

Neal Ford argues for understanding and utilizing various languages based on business need. a.k.a. Use the right tool for the job!

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

Per Scott Guthrie’s blog I was inspired to take a look at IronRuby. Even though it is in pre-alpha, I could not resist given the appeal of Ruby with the rich libraries available in the .Net framework.

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).

  1. Click on the View menu and choose Customize Schemes….
  2. Choose the XML Document type.
  3. In the input that contains xml;xsl;svg;xul;xsd;xslt;axl;rdf;vcproj;manifest, add ;mxml to the end. Note the semi-colon.
  4. 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 Carnegie Mellon University. At the time, they developed the first CAPTCHA to be used by Yahoo.”

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!

Wednesday, May 09, 2007

The Selenium storEval Method in Action

I was creating Selenium tests for the module on a J2EE app at work and noted that the requirements wanted the beginning and end dates in the search text boxes to be the current date. I then thought, "Hmmm, these tests will be run on various dates. How can I get the current date to validate that the current date, in a specified format, is entered into the beginning and end date textbox entries for a search query?"

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

We are beginning to use the Selenium IDE at work to do some UI based testing. One thing that I wanted to test is the sorting of columns in a table.

Here is how I did it.

Tuesday, April 10, 2007

Dreaming in Code Book Review

Just finished Scott Rosenberg's book entitled, Dreaming in Code. The subtitle: Two Dozen Programmers, Three Years, 4,732 Bugs, and One Quest for Transcendent Software summarizes this interesting work.

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 pulled down Microsoft's VPC 2007, which is free, a few weeks ago and have been using it on my Windows XP workstation and laptop. I even have a VPC machine with Vista and Office 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.

Saturday, February 10, 2007

OpenID - open, decentralized, free

I was listening to Scott Hanselman's podcast where he featured OpenID - an open, decentralized, free framework for user-centric digital identity.

In a previous show he discussed identity and Microsoft's CardSpace and in this podcast, mentioned that Microsoft is collaborating with OpenID.

All I can say is get your's today!! Open, decentralized, free--why not!

Sunday, February 04, 2007

NSpec: .Net's Behavior Driven Development Tool

I had stated in a previous post about the advantageous of Behavior Driven Development with Ruby and RSpec. Here I am looking at NSpec, an open source tool from Tigris.

Go here to find out more about NSpec.

Monday, November 20, 2006

Setting up menu items in Ubuntu's Edgy Eft build

Have I said lately that I really like Ubuntu!?! What a great Linux distro that makes it easy enough so that the Linux novice can now use Linux on the desktop.

Anyway, I have a brief article on how to setup a menu item in the Edgy Eft build of Ubuntu.

Wednesday, October 18, 2006

An Open Source Team

As I have moved from the .Net team (yet I still have .Net apps I am modifying in my own small business) to the J2EE team at work (day job), I have been busy learning more about the commercial financial software we sell and the inner workings of J2EE.

One thing I am thankful for is a group of co-workers who do not hold their knowledge close to themselves but are ready and willing to share and teach. When I have a question, they are helpful and provide the needed information. Moreover, they have an array of tips and tricks that they provide.

That is the core of a successful team. When members understand that by sharing information, they open themselves up to receive more knowledge. It has been my experience that the more knowledge I share the more I learn.

Wednesday, October 04, 2006

A GoDaddy Ready MySql.Data.dll for .Net 2.0

In a previous post, I discussed how to build a MySql assembly to use with .Net 2.0 hosting on GoDaddy.com.

A blog reader, Bill Clark, recently asked me if I could post the assembly that I created for others to use.

Here you go.

The file includes the compiled (specifically for GoDaddy) MySql.Data.dll assembly that you will reference. Also included in the zip is ICSharpCode.SharpZipLib.dll assembly that is referenced by the MySql.Data.dll assembly.

Thursday, August 17, 2006

Dynamic vs. Compiled Languages

I was doing my usual run this morning listening to my IPod shuffle when on came a particular podcast that I enjoy called Hanselminutes. The host of the show, Scott Hanselman typically has great discussions on all things ASP.Net and sundry other topics.

This show dealt with a discussion on Dynamic vs. Compiled Languages with a particular emphasis on the advantages of Ruby.

The show also details the values of Test-Driven Development and the next rev of C# with more potential dynamic language features.

Sunday, August 06, 2006

Is Untested Code the Dark Matter of Software?

According to Cedric Beust's blog, untested code is the dark matter of software. I like this analogy. Just what is dark matter? Wikipedia states:
In cosmology, dark matter refers to matter particles, of unknown composition, that do not emit or reflect enough electromagnetic radiation (light) to be detected directly, but whose presence may be inferred from gravitational effects on visible matter such as stars and galaxies.
I find it interesting that just like untested software, dark matter has observational evidences such as gravitational effects on galactic motion but we really do not fully know what it is. Our calculations detect its presence, but due to obvious limitations, we lack the current ability to conduct extensive empirical investigations. Similarly, in software development, (not because we can't do extensive test but because we won't) we will run limited tests on a module and observe a small scope of expected behaviors. In essence, like the observable effects of dark matter on stellar objects, we infer that the software is coded correctly because of its observable outcomes. However, if not properly tested with the array of possible circumstances the module may not function as planned.

I understand that the limitations for software programming are different than cosmological research. Shear distance and inconclusive understandings of gravitation hinder a fuller understanding of dark matter. With software development, customer expectations, unmitigated risks, and changing requirements can hinder proper developer testing and confidence. However, if we really want to, unlike the astrophysicist, we have the ability to test and empirically understand most of the potential effects of the software we write.

What do you think would become of an astronomer who had the opportunity to more closely research dark matter and did not because of time pressures at best, and laziness at worst? Now that matter is dark.

Wednesday, August 02, 2006

Microsoft's Port 25 - their Open Source Software Lab

I came across this site today. Of interest is an interview with Tim O'Reilly at OSCON 2006.

My hope is that Microsoft will support cross-platform efforts in the open source community. I am already fond of DotNetNuke, NUnit, and other open source tools that are, at least in part, supported my Microsoft for the Windows platforms. We shall see if they support Mono and the like.