Thursday, June 29, 2006
Re-writing and copying HTML files with Ruby Refactoring
Here are the goodies.
Wednesday, June 28, 2006
Php 4 Quick and Dirty Model and View Separation Example
See how I, at least somewhat, did this here.
Monday, June 26, 2006
Re-writing and copying HTML files with Ruby
I thought about just rewriting the HTML but having to create 12 separate files, one for each month, was not what I wanted to do. Why not, as I am learning to use Ruby, use it to parse the existing HTML into a new file, a txt file in this case and then run script to rename the new into the old files, with links that use the traditional target attribute to open a new browser.
Click here to see what I did to parse the existing HTML files into TXT files.
Click here to see the copy of the TXT into HTML files.
Saturday, June 10, 2006
What are we thinking?
What got me thinking about this was an article that I ran across by Dave Hunt and Andy Thomas entitled, Software Archaeology. In it the authors state:
Archaeologists generally don’t make wisecracks about how stupid a particular culture was (even if they did throw dead bodies into the only good drinking well). In our industry, we generally don’t show such restraint.
As stated above, it has been my experience that in the software development field, we are too quick to criticize. They then go on to write:
But it’s important when reading code to realize that apparently bone-headed decisions that appear to be straight out of a "Dilbert" cartoon seemed perfectly reasonable to the developers at the time. Understanding "what they were thinking" is critical to understanding how and why they wrote the code the way they did. If you discover they misunderstood something, you’ll likely find that mistake in more than one place. But rather than simply "flipping the bozo bit" on the original authors, try to evaluate their strengths as well as weaknesses. You might find lost treasure—buried domain expertise that’s been forgotten.
Therefore instead of just asking, "What were they thinking?” we need to consider “What and how are we thinking?" to get the most out of the code that we sometimes unearth and/or must excavate.
Sunday, May 21, 2006
Ego is not your friend
It has been my experience that my ego, if not monitored, can cause me to view my present lack of understanding in an incorrect way. The reality is not that I lack the ability to understand the information, but rather I lack exposure to the information. From that aspect, I am now informed about what I need to learn. Moreover, if I do understand a topic better than someone else, this does not mean that my level of intelligence is greater. It simply means that I have been made aware of the topic and have taken the time to learn. Otherwise, my ego could falsely cause me to think that I am more adept than I am in reality and cause me to not consider various aspects of a topic, since I think I understand more than I do in reality.
In summary, either by causing one to think they can not improve or that they have no need to better their understanding, ego is not your friend.
Thursday, April 13, 2006
msquaredweb.com now on linux
I will still have sites on asp.net just to keep my .Net skills current, but since I have moved to the J2EE team at my real job, I thought it best to make this move with msquaredweb.com.
Saturday, March 18, 2006
Installing Rails on Windows XP Pro
Wednesday, March 15, 2006
Installing Ruby on Windows XP Pro
Here are the steps.
Tuesday, February 21, 2006
Truthiness?? Alrighty then!
In a blog from Brian Marick I saw this: The American Dialect Society voted "truthiness" the 2005 word of the year. It "refers to the quality of preferring concepts or facts one wishes to be true, rather than concepts or facts known to be true." On a private level that may be well and good. However, the older I get the more that I am aware that “no man is an island.” In other words, in some small way we affect on another.
Therefore, if you are my family doctor, don’t use that in your medical practice. If you are my employer, do not use “truthiness” when you calculate my pay. If you are a civil engineer, do not go about “preferring concepts or facts one wishes to be true” when engineering the bridges I drive over.
Brian goes on to show that in the development of code, more tests are the answer to “preferring concepts or facts one wishes to be true, rather than concepts or facts known to be true”, not ignoring the facts.
And yes, when designing software, more tests please, and less "truthiness."
Thursday, February 16, 2006
The Scandal of Prediction (a.k.a We think we're purty smart)
What I gathered from the program is that the overall problem with accuracy in predictions and forecasting is systemic arrogance. We fail to acknowledge what we do not know and inflate the little we do know. We should not stop attempting to utilize our forecast models and systems , but let us do it with an honest look at the vast amount of knowledge we are yet to discover.
An interesting note is that Taleb refers to the concept of Yesterdays Weather with which agile developers should be familiar. Simply put, this concept is based on the understanding that there is a 70% chance that today’s weather patterns will be a repeat of yesterdays. Statistically, we know this but still we employ vast machinery to "predict" what the weather will be like in the future. Admittedly, there is more value in the use of models and formulas the further out one attempts to predict. In any event, I humbly predict (without any meteorological training or know how) a 70% chance that tomorrows weather is like today’s.
Tuesday, January 10, 2006
Learning Ruby
I must say that Ruby looks intriguing. In fact, I have registered for the Dayton-Cincinnati Code Camp and am looking forward to Jim's talk. Moreover, I ordered the Agile Web Development with Rails: A Pragmatic Guide book. I can not wait to dig in!!
Thursday, January 05, 2006
Output Parameters from C# Method
Here is an example using a NUnit test and the method returning two values via output parameters.
[Test]
public void TestParseAndReturnTwoSeperateStrings()
{
string toParse = "00050000999";
string strOne;
string strTwo;
ParseAndReturnTwoSeperateStrings (toParse, out strOne, out strTwo);
Console.WriteLine("String 1: {0}", strOne);
Console.WriteLine("String 2: {0}", strTwo);
Assert.AreEqual("000", strOne);
Assert.AreEqual("50000999", strTwo);
}
private void ParseAndReturnTwoSeperateStrings (string input,
out string strOne, out string strTwo)
{
strOne = input.Substring(0, 3);
strTwo = input.Substring(3, input.Length - 3);
}
Saturday, December 17, 2005
NUnit 2.2.4 Released!!
If you haven't followed the development releases, here are a few highlights of what's new, as compared to NUnit 2.2:
* NUnit 2.2.4 runs under .Net 2.0 and works with VS2005. If you work exclusively with .Net 2.0, you can download a version that is actually built with that framework version, which eliminates dealing with the config file.
* You can run tests built against older versions - 2.0 or later - of NUnit without recompiling. As a bonus, you can run tests built against CSUnit without recompiling.
* A number of new Asserts and Attributes have been added. It is now much easier to create your own custom Asserts while still taking advantage of NUnit's built-in error message formatting.
* An extensibility mechanism allows you to define your own attributes for test fixtures and cases that behave in non-standard ways. [This feature is Still a bit experimental, and will appear in final form in the 2.4 release.
* Documentation is substantially improved and is provided as a set of html files. The packaged documentation includes only version-specific details, with info that may change over time, such as contacts, kept on the web site.
You can read the full release notes at http://nunit.com/testweb/index.php?p=releaseNotes&r=2.2.4. Note that the nunit.org site has not yet been updated to reflect this release.
You can download NUnit 2.2.4 at http://sourceforge.net/project/showfiles.php?group_id=10749
Friday, November 25, 2005
A thought experiment, just for fun
The central character in God’s Debris knows everything. Literally everything. This presented a challenge to me as a writer. When you consider all of the things that can be known, I don’t know much. My solution was to create smart-sounding answers using the skeptic’s creed:
The simplest explanation is usually right.
My experience tells me that in this complicated world the simplest explanation is usually dead wrong. But I’ve noticed that the simplest explanation usually sounds right and is far more convincing than any complicated explanation could hope to be. That’s good enough for my purposes here.
The simplest-explanation approach turned out to be more provocative than I expected. The simplest explanations for the Big Questions ended up connecting paths that don’t normally get connected. The description of reality in God’s Debris isn’t true, as far as I know, but it’s oddly compelling. Therein lies the thought experiment:
Try to figure out what’s wrong with the simplest explanations.
What I found interesting is that, at least, sounds very much like the "simple design principle" that is advocated, correctly in my view, by the Agile Extreme Programming methodology.
In addition to this, I also found of interest related to software development was a discussion of pattern recognition and usage. In the chapter, Science, the central character states:
Computers and rocket ships are examples of inventions, not of understanding," he said. "All that is needed to build machines is the knowledge that when one thing happens, another thing happens as a result. It’s an accumulation of simple patterns. A dog can learn patterns. There is no 'why' in those examples. We don’t understand why electricity travels. We don’t know why light travels at a constant speed forever. All we can do is observe and record patterns." (P. 22)In any event, instead of getting my daily fix of humor I got much more, a jolt to my thinking about fundamental questions. That, in my possibly warped view of entertainment, is for more enjoyable. Moreover, perhaps the joke is on me since I do not know nearly as much as I foolishly thought.
Thursday, November 17, 2005
Agile Amigo?
Check this potential Agile Amigo out here. This will be interesting to follow.
Tuesday, November 15, 2005
Microsoft released guidelines for converting ASP.Net 2002/2003 projects to Visual Studio.Net 2005
Microsoft released guidelines for converting ASP.Net2002/2003 projects to Visual Studio.Net 2005 at Step-By-Step Guide to Converting Web Projects fromVisual Studio .NET 2002/2003 to Visual Studio 2005.
The article states:
The primary benefit of converting a Web application project to Visual Studio 2005 is the ability to use many new features in ASP.NET 2.0 (e.g., master pages,etc.) in your existing application. If you are looking to enhance an existing Web application built using Visual Studio .NET 2003, then upgrading to Visual Studio 2005 is most likely the right decision.As expected, simple projects will be easier to convert:
For relatively simple Web projects where a Webproject is the only project in your Visual Studio .NET 2003 solution, conversion should be a relatively automatic process requiring little time or problem resolution.
However, not all ASP.Net 2002/2003 project conversions will be easy:
If the application you are converting is of reasonable size and has several Web projects and additional projects, such as class libraries, in a single Visual Studio solution, it is possible to encounter issues during migration. Be prepared to spend the better part of a day completing the entire process. The steps and guidance provided in this article can help an informed user to migrate most applications of medium complexity.
Thank you Web Platform and Tools Team for your honest assessment. I must admit that I am very skeptical when someone says, "it’s really pretty straight forward." Yea....right. In any event, I am looking forward to moving some of my small-sized projects to VS 2005.
Monday, November 14, 2005
Webservice Account Permissions "Gotcha"
The “gotcha” that we encountered was that the accounts that the web services were utilizing needed modify permissions on the server <WindowsFolder>/temp folder in order to generate serialization proxies.
Click here to see what was done to remedy the issue.
Monday, November 07, 2005
It's in the wild!!
Also, DotNetNuke, an Open Source Web Application Framework, is releasing its 3.2 framework, built on the 1.1 .Net, and its 4.0 framework, built on .Net 2.0.
I can see that I am not going to get much sleep.
Friday, November 04, 2005
New from Yahoo! and still in beta - Instant Search
Thursday, November 03, 2005
Covariance and Delegates in .Net 2
Very nice code re-use construct!