Monday, December 31, 2007

Happy New Year, 2008 here we come

I wanted to wish all my readers and passersby a Happy New Year. I am very excited on where 2007 has taken me and I hope 2008 will be a strong and positive continuation.

This will be my last post for 2007 but don't worry, lots of fun technical content is already planned for the new year!

Thank you friends for all your support.

Google Earth has Flight Simulator?

Today I discovered a very interesting fact, Google Earth v4.2 and above has a built-in mini flight simulator. Here is the user guide link:

http://earth.google.com/intl/en/userguide/v4/flightsim/index.html

GoogleFlightSim

While this is far from a full-featured flight simulator its still a nice free toy and an interesting way to experience Google Earth.

As a Software Engineer it always fascinates me when a product is extended in this fashion since it shows a good level of code reusability and dedication by the development team. Great job Google Earth Team!

google-earth-flight-simulator

Note: Even though the users guide says you need to press CTRL-ALT-A to start the simulator I found that CTRL-A works instead. Try it for yourself.

Wednesday, December 26, 2007

Did you know... Gmail allows email forwarding

Our email address has become as critical as our postal address, if not more important to those of who have embraced the Internet. Unfortunately many people still use the email addresses provided by their ISP (such as optonline or aol) as their primary address, which causes major problems when switching providers.

Until email addresses become as portable as cell phone numbers have the loss of an email address should be expected. The best tactical approach to avoid this potential headache is to use one of the three predominant free services such as GMAIL, Microsoft Live Mail, or Yahoo mail.

One nice feature of using GMAIL is the ability to create the new account (example: FirstName.Lastname@gmail.com) and forward it to your existing email account. This will allow you to continue to use the email system you are comfortable with while slowly migrating to an account not tied to your Internet Service Provider.

image

GMAIL allows you to do this by using the following steps:

  • Create a free GMAIL account
  • Login to your new account, and go into Settings (top right) screen
  • Click on Forwarding and POP/IMAP link and then setup Forwarding section of the settings tab

Personally I am a big fan of GMAIL and have honestly not used Live or Yahoo mail recently even though i have accounts with both. Due to this I am not aware if they have a similar feature but if you prefer one of them I recommend you check their settings tab and see for yourself.

Tuesday, December 25, 2007

Visual Studio 2005/2008 Code Search Options

Ctrl-F is not your only option

image

I cannot speak for everyone but I am a person of habit, CTRL-F is one of those habits.

After using hundreds of windows applications the CTRL-F shortcut to find information in any document dominates how I search. Unfortunately this is not a good strategy if I want to use the full power of the Visual Studio development environment.

In an effort to finally break the habit I put together a list of search options in Visual Studio. Here is a summary of the four main options I am now familiar with:

Quick Find (Quick Search)

Shortcut: CTRL-F
"Item by item forward looking" search for strings using literals or regular expressions
Find In Files (Full Search)

Shortcut: CTRL-SHIFT-F
"All items in scope" search for strings using literals or regular expressions
Find Symbol (Object and Member search)

Shortcut: ALT-F12
You can use this dialog to locate Objects and Members as detailed below.

Objects: Namespaces, types, interfaces, enumerations, and other containers

Members: Classes, properties, methods, events, constants, variables, and other contained items

(Above taken directly from MSDN article on the subject)
Incremental Search (Search as You Type)

Shortcut: CTRL-I
Searches the current document for a string literal and locates matches as you type, providing even partial matches in the beginning

Only works on the currently open document and will not extend to additional physical locations.

Next lets look at these options in more detail and provide examples.

Quick, Files, Symbols?

image

Before we go into the individual features of these three search option lets review the commonalities:

Search Option Commonalities

First lets define the purpose of the various search options: "a way to find a text in project resources". Once a match is found the main difference is how each option display it.

Second lets review the common options available in the search:

1. You can define the scope of your search by using the "Look In" field. This option various depending of the search type by providing the appropriate selection options for that type, example: Solution level vs Open Document level search scope

2. You can use string literals or regular expression strings to conduct your search

3. You can match for the whole world, substring and/or define a case sensitive search (Warning: many times people enable case sensitive search and are therefore unable to find the information they seek, use this option with care)

Differences

Now that we have defined the common features of the different searches lets talk about each in more detail.

Quick Find Quick Find provides an interface to do exactly what it says, to quickly find something inside of the documents in your solution. It does this by looking through the file or files your scope selection covers and highlighting the first instance of the found text. You can then move to the next location this text is found by hitting enter Find Next button.

Each time you move "forward" the search continues to look for the next matching case. This is therefore quick to find at least one reference as it does not require the search mechanism to look through every file covered in the searches scope before returning the results.

This search is used very often since just like me many people find it by pressing CTRL-F. This is by no means an out-dated search mechanism as it meet a specific need: to find at least one match quickly. This works great especially when searching through a small document.

Find In Files Find In Files works by looking through the entire scope of the search and displaying a combined output of every location where your target text is found. The output itself is nicer then Quick Find as it provides a summary that when clicked takes you to the location of the found text while still displaying the other possible locations.

Unfortunately this option can be very slow depending on the scope and/or size of your solution. The search simply takes time, it has to look at each file in your scope, find the matching text, note it and continue to iterate until all the files are processed.

Find Symbols is best described by what it will not search compared to Quick Find or Find In Files: Will not find comments, specific code, or other arbitrary strings within your code files.

Instead it searches for various type of Symbols such as Classes, Namespace, events, and other items at the same level. For a complete list see this MSDN article.

Here is an example of when this search is a good fit: To find every overload of a particular class by searching for the class in the scope of the .NET Framework. Depending on the scope selected using the Look In option the results will take you to either all the file locations using the string you search for and/or the Object Browser view that provides valuable information on the item in question.

Search as You Type

Search As You Type (or Incremental Search as its known in the documentation) provides no pop-up dialog, instead it lets you search by pressing the CTRL-I sequence to start the search then start typing the desired string value. As you type and matches are found the cursor will jump to the location of the match. As you continue to type, the cursor will continue to jump until it has searched the entire document and can no longer find additional locations to jump to based on your last type character.

If multiple matches exist for the string you entered you can use F3 (forward) or SHIFT-F3 (back) to jump between the matches.

As with the other search options you have certain advantages, and certain disadvantages. The following are two limitations of this feature:

1. Regular expression are not supported, only string literals

2. Search scope is limited to the open document and cannot be extended beyond this to other files (no Look In option)

What About Replace?

"Replace in Files" vs "Quick Replace" has the same fundamental difference as "Quick Search" vs "Find in Files": The way the results are displayed after a replace operation. Covering this feature is an article in itself and wont be covered here.

Visual Studio 2005 vs 2008: Search Compared

The search features between the two IDE's seem fairly consistent with no large differences. While a difference might exist, I am simply not aware of it at the time of this post. (Please feel free to correct me by posting a comment to this thread)

3rd Party Search Options

As one can imagine there are many 3rd party plug-ins available to make search in Visual Studio even more powerful. One good example is Koders.com Code Search. Koders has a great product line for web-based and IDE plug-in enabled code search across your entire source tree, I definitely recommend checking them out.

(You can also listen to Koders.com Product Manager Phil Haack interview on .Net Rocks! in show #261)

Search Bug?

Error: "Find in files" says : "No files were found to look in. Find was stopped"

During my research for this post I came across references to a bug in search with the error above. For more information about it please see the Visual Studio feedback thread listed below.

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=105511

I honestly do not have time to see if this bug is still even applicable but I decided it was worth mentioning (Personally, I never encountered it).

Closing Thoughts

Search is a powerful tool that can enhance your abilities to develop code quickly and at higher quality. Use the right-tool, for the right-job and you will do well.

I look forward to your comments.

Friday, December 21, 2007

ShowBalloonTip Problem in notifyIcon Control (Visual Studio 2008)

image

Today I thought I found a bug in Visual Studio 2008 while coding a Windows Application. Using the NotifyIcon control I displayed a Balloon Tip using the ShowBalloonTip method. The Balloon displayed without issue but did not vanish after 2 seconds (2000 milliseconds, as show below).

Code Sample:

notifyIconMain.ShowBalloonTip(2000, "My Text", MyVariable, ToolTipIcon.Info);

Reason:

Googling this problem shows various posts talking about this as a known issue. Unfortunately the link that talked about this issue on MSDN Forum was for some reason unavailable with an IIS error but Google saved the day with the cached version.

To summarize this seems to be due to operation system "features" and not a Visual Studio 2008 issue. These features include:

  • Notifications don't vanish if no user interface actions are detected to prevent the user from missing notifications when they are away from the machine
  • Depending on your OS there might will be a minimum display time enforced on the balloon tip

If I move my mouse around after the notification appears my Windows XP SP2 is confirmed set at about 10 seconds (courtesy of iPhone Stopwatch) as the minimum and therefore any setting lower seems to do nothing

Additional Notes: Trying to do more tests and time the amount of time the balloon took to vanish results in inconsistent time-to-vanish durations... odd... more on this later

Computers + Services: Extending the Desktop

Computers + Services..? Don't you mean Software + Services?

Before I discuss Computers + Services it is first important to understand part of the inspiration and software equivalent of my idea.

Disclaimer: The focus of this posting is on the average User Desktop, not professional server environments. Some of this is already becoming available for servers, but as far as I know not yet being leveraged  for the average users home machine.

Software + Services

Software + Services is not a new paradigm and is best summarized by Microsoft:

The future is a combination of local software and Internet services interacting with one another. Software makes services better and services make software better. And by bringing together the best of both worlds, we maximize choice, flexibility and capabilities for our customers. We describe this evolutionary path in our industry as Software + Services.

This vision can be realized in many variations, but at the end aims for a common result: To use the power of desktop Software while taking advantage of services to extend beyond local capabilities.

To me this is the most logical evolution of the current technology driven by many factors, including:

  • The Internet is now a fairly reliable 24/7 communication medium
  • Web Services and other remote API's provide easy access to remote services for developers
  • For better or worse people and organizations have started to trust remote services more then they used to, especially those provided by well known companies such as Amazon, Google, Microsoft, Etc (the Banks of our generation)
  • Server Farm technology has evolved significantly to power distributed computing

Enter ... Computers + Services

Wither people like it or not Cloud Computing has arrived driven in part by S+S concepts, but its only the beginning. My belief is that in the near future Computers + Services will be yet another natural extension of our computing into the cloud.

This is not another attempt to build a better mainframe, instead the desktop and its raw power will not fade. To join the cloud i envision hardware consuming remote hardware services and extending beyond its out-of-the-box capabilities. Lets look at my definition for Computers + Services:

Computers + Services (C+S) is a combination of local hardware and hardware exposed to the local machine through a remote API, typically across the Internet. The remote hardware has to provide services that would otherwise be made available by local hardware and not replace but instead enhance the local versions.

In an optimal setup local Hardware would be "C+S aware" and able to self coordinate with the remote hardware to complete assigned tasks. This would allow for transparency to the application lawyer whenever possible.

In certain cases C+S can be made available to the application layer for implementing specific scenarios but should not be a prerequisite for using C+S by most software.

This concept directly leverages all the technology and trust that makes Software + Services a possibility and I believe the core technologies needed are either here already or up-and-coming in the very near future.

Lets look at C+S in more detail, including an example of how it can be implemented.

CPU Offloading through C+S

Example

To best illustrate this concept lets look at an example:

Lets assume that John Doe purchased a computer to do video editing of his home movies after the Holidays. The machine has a dual core AMD processor, lots of ram and disk space, plus of course video editing software.

John records 30 hours of movies and transfers all of them in their raw format onto his computer and begins editing. Soon he realizes that doing any manipulation or encoding of the videos into different formats is taking a very long time, time he does not want to waste. Lucky for John it is the future, John signs up to a website that offers CPU Offloading and leases 10 additional CPU cores for the next 15 days. The website automatically connects to windows and with his permission adds the needed configuration settings to enable 10 virtual cores on his machine.

John restarts his video editing and its blazing fast compared before. His machine is now hardwired over the Internet into a powerful local data-center where 10 cores are now dedicated to him. As his hardware requires additional parallel processing which it already supported with the 2 local cores, it is able to hook into these remote cores and pass instructions as if his machine was physically upgraded.

John finishes editing the videos and at the end of the 15 days his core lease expires, which is exactly what he wants. During his normal routine of playing COD 4 or surfing the Internet his local resources are more then enough. In-fact his computer is smart enough not to use the additional virtual cores for processing that is required at a very real-time speed like gaming, so it was no help anyway.

image

Core Principles

The core principles that make C+S work in my example are:

  • The ability to extend local resources
  • Transparent to the software layer
  • Available to the software layer through concepts like Managed Code Libraries in .NET to allow software to take even more advantage of these services or avoid them if latency is an issue
  • Paying only for what you use, allowing the lease to be a reasonable amount of time and money
  • Leaving the desktop as the interface, participant, contributor and coordinator for any remote activities

Challenges

Today's technology would pose many barriers to implementing this concept including hardware architecture, Internet latency/connectivity, and many other factors. Luckily these are not limitations but instead challenges that can be overcome with enough dedication and funding. As with all innovation once someone finds a business case to pursue it, it will happen.

And now to the good news...

C+S: Its already here

Amazon S3 + JungleDisk

In the area of storage C+S is already being realized by Amazon through its S3 program and plug-in's like JungleDisk. This combination of Service (S3) and Software (JungleDisk) creates a virtual hard drive on a machine that acts and looks like a normal drive yet lives in the cloud. You pay Amazon only for the space that you use (at a very low rate) and are therefore free from investing into various hardware like:

  1. Additional local disk drives for extra storage space
  2. Backup solutions for file recovery
  3. Redundant RAID arrays for stability

Overall this is the exact software-transparent model that had made me exciting about this idea in the first place. I was somewhat shocked to realize it already existed (without my fancy C+S terminology) while writing this posting. I am so excited about the technology that not only am I an advocate of the concept but now a user as I have subscribed to S3 and use JungleDisk to help backup my data.

Amazon in general seems to be embracing this concept as its other services also want to distribute physical resources into the cloud. I definitely encourage people to review their web service offerings if you have not done so already.

Nothing in Life is Free (unless it has ads in it)

The one major downside to this model is that it will most likely cost you money for things you will lease as opposed to own.

While many services on the Internet are free in my vision the deep integration required would not allow for easy ad-integration to make the free model work. (Though not impossible, people are very creative!)

If this concept does come to reality in various incarnations the benefits will most likely be worth the leasing cost regardless of the way that cost is presented. If Amazon is any indicator it seems that a model of micro-cost based on usage is already a viable business model.

Conclusion

Thanks for reading!

In closing I want to stress that as with most "new" ideas, there is not a lot new about what I am proposing. My intentions are to simply communicate one way of looking at the concept of cloud computing (formed from my limited perspective on this complex topic).

The only new concept I can try to claim is the verbiage "Computers + Services" as a buzz-term that as far as I know, no one has used before.

Your Feedback

Please accept this commentary for what it is and I look forward to your feedback.

Thursday, December 20, 2007

Over 200 Megs of Windows XP Updates post SP2

Today I re-installed Windows XP with service pack 2 built-in on my home machine and went to Windows Update as part of my standard post-installation process (as it should be with everyone).

To my surprise (I have not re-installed windows in a while) the update size has reached over 200 megabytes. While this number does include a few other updates like IE 7 and Windows Media Player 11 its still a large download package.

image

Luckily as reported on many podcasts and blogs Microsoft is releasing Windows XP SP3 that will consolidate all of these updates into a single service pack. This is a smart move as installing a large number of individual updates is a long and painful process compared to a unified package.

Wednesday, December 19, 2007

Windows without Internet Explorer

During lunch I was listening to Windows Weekly, a podcast from twit. One of the topics in show #44 (100 Million w00ts!) touched on the point that Opera is suing Microsoft in Europe for including Internet Explorer with windows. This made me think, what would the world be like if Windows didn't have Internet Explorer right out of the box for the average user?

Lets take this argument at the very fundamental level, what upsets most people is that by including Internet Explorer with Windows it gets installed on PC's by default, hence giving them a competitive advantage. I will grant this point validity, but find one flaw with the concept of no default browser in Windows: It would make the machines (for average users) cut-off from the Internet. They would boot up their brand new machine and have no way of even downloading (for example) Firefox, since what most people do is use IE to get Firefox from the download website. (Is IE FireFox's #1 delivery system? funny thought, but im not sure if it is a true statistic).

Of course there's ping, tracert, and other fun DOS commands, but im not sure if its the Internet experience people are hoping for when they buy a computer. One could argue they can always get a CD, but to me that is a fairly crazy concept for such a core piece of technology.

Now lets take my very pureistic and silly argument and turn it around, lets say instead of not including any browser Microsoft is forced to include competitors browsers. How would this list be selected? What if I decided to make a browser tomorrow, can i then sue Microsoft and also argue that they must include my software as well? Should we force Microsoft to build a browser selection, download and installation portal (B.S.DIP for short)  so that everyone has a fair chance?

This is an endless argument that I am sure will be plagued by many more lawsuits, commentaries, and debates. In the end, the best platform will win its that simple.

firefox logo IE opera logo

What's your browser?

Tuesday, December 18, 2007

SkyDrive and Live.com Blog Feedback Frustrations

image

Today I accidentally discovered SkyDrive, a new Microsoft Live.com service for data storage in the "Cloud". I was very excited and finally had a good reason to create a live.com ID to try it out. (1 gig of free storage!)

After 10 minutes of playing with SkyDrive I came to some opinions and feedback for the time as to key features id love to see as this heads out of BETA. When time allowed later in the afternoon I wrote-up a quick response to the team using the "send message" feature of their LiveSpaces blog, only to hit a wall of bad UI design.

Once the message was ready I tried to find the button which would send it. Unfortunately and to my surprise all I could see was a Cancel link. It quickly hit me (see screenshots below) that the Blog had its feedback feature disabled, but the interface allowed me to enter the feedback screen, type up the message and only then to discover I could only Cancel.

image

Sure there was a warning at the top the whole time i was typing, but honestly I never even thought of looking for it since the feedback textbox was open for input. In my opinion, this is simply a bad design that needs to be refactored.

image

This experience reminded me of a recent post on Ron Jacob's blog focusing on UI design. In his post Ron talks about Windows Media Player 11 and some of its interface issues. I always had these opinions of WMP 11 and am glad someone is finally bringing them up for discussion and consideration. Click here to check out Ron's post on this subject for yourself.

User Interface design is key to keep users coming back and while Live.com services and products are a great step forward they still have panty of room for improvement (and i'm sure it will happen).

Note: Overall Live.com team is doing a great job and this is not intended to bash them. I simply want to point out one badly designed screen and the importance of good UI design. I am guilty of this type of mistake myself as things go wrong in large projects. Keep up the good work guys!

Friday, December 14, 2007

Visual Basic.NET, #1 .NET Language?

In a recent Hanselminutes episode Scott chats with Paul Vick, Principal VB Architect, and Paul Yuknewicz, a Senior Program Manager on the VB Team about the past, present and future of Visual Basic.

During the interview they talked about a statistic which indicates Visual Basic.NET is the #1 .NET language, based on the various internally ran Microsoft surveys and analysis. This surprises me, I really expected C# to win compared to VB.NET, but perhaps it is true (though sometimes statistics can be misleading and I have not seen them with my own eyes)

The other interesting claim from the same interview is again surprising, the #2 language in .NET platform is C++, only then followed by C#.

Originally I come from a VB6 background and spent many years on the language. Even with its problems I have always been a defender of VB6 as a comparatively productive business solution platform when evaluated against other languages and tools of the same era. When .NET 1.1 came out I as many others saw VB.NET as a very different animal and learning something new like C# was very attractive. I have not regret this decision and now use C# almost exclusively. (not to say I cant code in VB.NET, I just choose not to)

With Visual Studio 2008's version of VB.NET adding in-line XML enhancement while C# stays "poor" this decision has finally started to mean a real difference based on my language decision. Overall I think its a big mistake for Microsoft to allow such a split as the true interoperability between the two languages outside of syntax (with previously minor exceptions) has been a very effective selling-point of the .NET Framework.

Now adding this statistic to the mix I really question where the competition is going between the two languages. Will there be a point when using VB.NET vs. C# means a large difference in productivity? Is VS 2008 already that time? Only time will tell.

Source Podcast

Overall it was a wonderful interview Podcast, so check it out: Visual Basic Yesterday, Today and Tomorrow with Paul Vick and Paul Yuknewicz

Wednesday, December 12, 2007

IPhone Vibrate Alert bug during Dock

When the IPhone is set to vibrate and then connected to the USB PC connector it vibrates one time as an alert of a successful dock. During a normal day I dock the phone once or twice to update my podcasts and never had an issue until today.

When I connected the IPhone it vibrated once as normal.. then twice... then a third time. I soon realized it wouldn't stop, it was vibrating over and over, at a much quicker pace then even the vibration of an incoming phone call.

I tried to undock the phone, didn't help. I tried to re-dock the phone, didn't help. At this point my hand was getting a free but unwanted massage. I decided to reboot the phone which did stop the vibration. I then docked the phone and updated my podcasts without issue.

I have the latest firmware version (1.1.2) installed so this must be an active bug. Hopefully 1.1.3 will resolve the problem as anything that requires a reboot to resolve is in my opinion high priority.

Note: While this phone is NOT bug free, it really does a great job for what I need it to do. For me the IPhone has been a very worthwhile purchase.

What is your technical reading list?

While on the train today I noticed someone reading "Design Patterns: Elements of Reusable Object-Oriented Software", a favorite book of mine for studying and referencing Design Patterns. Striking up a conversation with the reader we both agreed that this was a great book worth studying but hard to apply without practical experience. We also agreed that using this book to "know what's out there" is a powerful tool regardless of the implementation challenges (No one said patterns were easy).

This chance encounter made me think about my own essential reference/study list of technical books, so here are the core items:

This list is only the beginning but does represent the core of what I would recommend to others without hesitation. Unfortunately it is not common to find other engineers who even know of these books and therefore I hope this posting can help bring attention to them. Below is more information about each book, I hope you find it useful.

Disclosure: All book links posted on this site are associated with my Amazon associate id and will make me money if your purchase them using these links.

Code Complete

code complete Code Complete (second edition) by Steve McConnell is an excellent and very comprehensive guide on many facets of Software Engineering. This book covers coding techniques, construction practices, software design, and other topics. Many Software Engineers including myself consider this book required reading and reference. Its wide-range of topics also makes it a really ideal starting point for beginners+.

You can hear more about how this book came into existence by listening to .NET Rocks! Show #215 were Steve McConnell is the guest being interviewed.

Design Patterns - Elements of Reusable Object-Oriented Software

design patterns book Design Patterns is a book by Erich Gamma, Richard Helm, Ralph Johnson, and John M. Vlissides. This book describes 23 patterns in the context of Object Oriented Design, along with some general concepts important to get you started with patterns.

Patterns make software engineering much easier and consistent when the right pattern is applied to the right problem. Getting an insight into a large number of pattern is the best way to get on track towards actually using them and gaining the added coding efficiency.

To put it simply: don't reinvent the wheel. Use patterns correctly and you will leverage proven approaches to common software engineering problems.

21OLKCbooch_booch_secondary As an extra bonus this book starts with a forward by a Software Engineer, Architect and technical book writer Grady Booch. Mr. Booch has done a lot in the field of Design Patterns to help evangelize the concepts this book covers and deserves recognition.

Refactoring - Improving the Design of Existing Code

refactoring improving the design of existing code Refactoring - Improving the Design of Existing Code is a book by Martin Fowler, Kent Beck, John Brant, William Opdyke, and Don Roberts. As with the Design Patterns book it is very beneficial to include multiple authors under one cover. This provides a variety of insights into a complex topic that one person would have a hard time covering comprehensively.

If you consider yourself a true Software Engineer then Refactoring should already be a concept your familiar with. Luckily this is not a new concept and this book provides before and after code demonstrations of over 70 techniques, helping open the readers eyes to much more then one person can achieve starting from scratch.

As Software gets more and more complex I believe the skill of Refactoring will become critical. The likelihood of design-flaws in first-iteration coding and architecture due to the increased complexity of technology and business expectations will mean Refactoring is the primary, if not the only avenue of increasing code quality and even meeting the final business requirements. Getting it right the first time around is simply not an option in most cases.

Commonality - Not just a training book, but also your reference

One common theme stretches across all of the above books: The ability to read them in a fairly disconnected manner, choosing the topics which apply to you and even using them as a reference for an active project. This is perhaps the reusability/easy access factors that makes these books so successful.

Special Thanks to Robert

One of my former bosses named Robert (my former CTO) deserves a lot of credit as he encouraged me to read and provided me the first copies of these books.

Robert strongly believed that we were not programmers but Software Engineers and therefore must have access and study how to develop software at a professionally level. I hope to post more on my time working for him at a later time.

(Last name not used above to protect Robert's privacy)

Tuesday, December 11, 2007

Domain Driven Development

Yesterday one of my co-workers pointed out an upcoming meeting in NYC focused on Domain Driven Development. While I have heard of this term before I must be honest, i never gave it much attention. Being curious if I should attend the meeting I Googled the concept and found a very interesting presentation by Eric Evans on the subject. If anyone is interested in DDD but needs an introduction, this is a great place to start.

Domain Driven Design Presentations and Interview

DDD: putting the model to work (Presentation, part 1)
http://www.infoq.com/presentations/model-to-work-evans

Eric Evans on DDD: Strategic Design (Presentation, part 2)
http://www.infoq.com/presentations/strategic-design-evans

Eric Evans on Domain Driven Design (Interview at Conf) 
http://www.infoq.com/interviews/domain-driven-design-eric-evans

Eric Evans on Domain Driven Design (Interview at .Net Rocks!)
http://www.dotnetrocks.com/default.aspx?showNum=236

Note: While watching the videos from infoq.com the feed would occasionally and indefinitely get stuck in "buffering" mode. To resolve this I was forced forced to restart the browser and skip to my last time-frame spot in order to resume...strange.

Monday, December 10, 2007

.NET Framework Redistributable Reference

.NET Framework Redistributable Summary

Today a good friend asked me "I downloaded the .NET 2.0 framework and this application is still asking me for the .NET 1.1 framework, doesn't 2.0 include it?"

Unfortunately the answer is no, he still needed to download the 1.1 package separately. Also I knew of no easy way to get a reference to all the latest service-packed version of .NET. Hopefully this list will be a good and helpful reference for him and others who stumble upon it.

Enjoy!

Framework Redistributables: 1.1, 2.0, 3.0 and 3.5

Below is an easy reference of all the latest service-packed run-time distributions for .NET 1.1 through 3.5. I also included the description summary from the download packages to expose what's included with each Redistributable.

.NET Framework 1.1

Download details- .NET Framework Version 1.1 Redistributable Package

The .NET Framework version 1.1 redistributable package includes everything you need to run applications developed using the .NET Framework.

.NET Framework 2.0

Download details- .NET 2.0 SP1 (x86)

Microsoft .NET Framework 2.0 Service Pack 1 provides cumulative roll-up updates for customer reported issues found after the release of Microsoft .NET Framework 2.0. In addition, this release provides security improvements, and prerequisite feature support for .NET Framework 3.0 Service Pack 1, and .NET Framework 3.5.

  • Microsoft .NET Framework 2.0 Service Pack 1 (x64)
  • Microsoft .NET Framework 2.0 Service Pack 1 (IA64)

    .NET Framework 3.0

    Microsoft .NET Framework 3.0 Service Pack 1

    Microsoft .NET Framework 3.0 Service Pack 1 provides cumulative roll-up updates for customer reported issues found after the release of Microsoft .NET Framework 3.0. In addition, this release provides security improvements, and prerequisite feature support for Microsoft .NET Framework 3.5.

    .NET Framework 3.5

    Download details- .NET Framework 3.5

    Microsoft .NET Framework 3.5 contains many new features building incrementally upon .NET Framework 2.0 and 3.0, and includes .NET Framework 2.0 service pack 1 and .NET Framework 3.0 service pack 1.

    (Finally released from BETA on 11/16/2007)

  • Thursday, December 6, 2007

    My First bug found in Visual Studio 2008 (well not really)

    An error occurred while processing this command.

    The file c:\... cannot be modified in the designer while building or debugging.

    image

    Today I was finally trying out Visual Studio 2008 RTM and discovered my first semi-bug (or really a bad way to communicate)

    Steps that lead to "bug":

    1. Created a Windows Application (not WPF, regular)
    2. Added a Toolstrip and WebBrowser Control
    3. Started adding some .NET 3.5 code to test various new features, nothing major and not related to the error (As you will see)

    Then I decided I really didn't need thee WebBrower control and tried to remove it by selecting it in the designed and hitting DELETE. This to my surprise caused the error above to appear.

    The part of the error that really stood out was "An error occurred while processing this command" and then a long path to my class file. I was shocked that such a basic thing would error out but at the same time I have seen various similar errors in 2005 that really did mean something was broken.

    A few minutes later it hit me, I should have read the entire message "cannot be modified in the designer while building or debugging" was at the end of the message and was the critical part that I missed! Now I understood the problem, I had my test application running, so I shut down debug mode and deleted the browser control without issue.

    You can almost say that this was my fault, I should have read the message (and you're partially right). At the same time I think there could have been a better way to handle such an "error" other then a standard error dialog box. In reality this should have been an "Information" style box, perhaps even asking if I wanted to shut down my running application in order to complete this request.

    I hope this posting helps the next person who gets this "Error" but does not bother to read the whole message.

    Red Lines / Dots all over LCD Monitor - Found a solution

    Problem

    At home my main workstation is a machine I put together myself and features a Leadtek WinFast PX7800 GTX TDH Extreme video card that outputs to a Westinghouse wide-screen LCD.

    The monitor was the most recent purchase as before I had a standard 19" LCD. Unfortunately a few months after getting the new monitor I started noticing small red dots appearing in games that used higher resolution, while back at the desktop everything seemed normal.

    While very frustrating nothing seemed to fix it. I switched my video card drivers to multiple versions, updated my machine, switched which video card output port I was using, nothing helped.

    At this point I feared either the Video card or monitor was the problem and began Googling to see if anyone else had this issue. Unfortunately I found very minimal information on this subject, others were experiencing the problem but no exact solution seemed to be recommended. Next I decided to email LeadTek support, but a month and two emails later still had no response. (Thanks LeadTek!)

    Being a bit frustrated and low on time I gave up and simply accepted the small amount of red dots while playing games.

    As with most problems though, there is only one direction, and that's to get worse. About six months later I started to experience much more sever problems including red dots and lines even when using windows outside of gaming, something had to be done.

    Replacing the video card seemed like the most logical and likely resolution but I decided to try and avoid it, as this card was still sufficient for my needs. (I hate wasting money)

    Power Supply Replacement - No Luck

    Continuing my research I found mention on some forums that sometimes when a power supply was failing or insufficient for the systems need it wouldn't provide enough/clean power to the video card causing red lines or dots.

    To test this theory I purchased a power supply at a store with a return policy and was soon standing in the return line as it did not resolve my problem.

    DVI Cable Replacement - Resolution

    Next I found a posting on the Tech Guy forum that had someone nicknamed Frank4d comment "If you are using a DVI cable, try a VGA cable. A bad DVI cable will cause spots and lines". While my monitor supports both DVI and VGA cable inputs my video card only has two DVI outputs, to work around this issue and try Frank's suggestion I purchased a $12 adapter at BestBuy to make a VGA cable work with a DVI video card. I got home, connected the adapter to my old VGA cable and wow, the problems were gone. All red lines and dots in both windows desktop mode and while in games went away.

    Thanks Frank for the tip!

    While I still have not had a chance to try a different DVI cable to see if its the cable or the DVI interface on my monitor at least my immediate problems are resolved. If your having this issue I highly recommend you try a VGA cable!

    Windows Live Writer for your blog

    imageI recently started blogging for the first time in a serious way. All my previous attempts to do so were ended in frustration or time constraints that simply didn't allow me to produce enough content to make it worthwhile.

    This time around I was dedicated and wanted to see it through, so I setup a few ground rules:

    • Try to post at least one serious entry a week
    • Don't focus on perfection, instead focus on getting content out
    • Make the process of posting as simple and stress-free as possible

    Make the process of posting as simple and stress-free as possible

    As I started to blog I quickly realize how horrible the web-based WYSIWG editors were and soon I spent many hours fighting to format my text correctly in even simple postings (you hit preview, then edit again and everything has a white space between it?? <sigh>). This problem directly went against my principle of making this an easy process so I started looking for a solution.

    Since the concept of blogging has been around for a long time I knew there must be some sort of Windows Blog editors and found various websites listing options. BlogJet seemed interesting, but version 2.0.0.10 didn't seem to work with Blogger correctly (Cannot connect to server error). Next I looked at wbloggar which seemed very feature rich, but I quickly realized that it did not seem to support Blogger at all, my frustration mounted!

    After doing additional research on other tools I was still not finding anything that really made me feel comfortable, so I decided to do a little more research on BlogJet, maybe there was some workaround for the error I was getting?

    imageGoogling various keywords I stumbled on a blog called  Missionary Geek which had an entry titled: Out with BlogJet, in with Live Writer. This immediately caught my attention as I knew of Live Writer, in fact I had it installed on my machine, but simply assumed it only worked with Live Spaces (which I really didn't want to use as my blog host). After reading the post I fired up live writer and immediately realized that it did in fact support other weblog services.

    I have been using Live Writer for a few days now and am extremely impressed. This is a first generation tool and definitely has room to grow but considering its clean interface, easy support for images, tables, inline spell-checker and its price tag of FREE should make most people very happy. There are other great features so check it out for yourself.

    Wednesday, December 5, 2007

    Software Engineer Productivity

    Today someone asked me a question that that I feel is worth a discussion: "What makes some software engineers ten-times more efficient then others?"

    While without context it is very difficult to answer this question my gut response was these three main points:

    • A good direction (What am I delivering?)
    • Learning the business, not just the technology
    • Time-management

    The person asking the question probably wanted to hear something else, but I really feel that the above three items are extremely key aspects in an engineers efficiency.

    First and forthmost everyone making or implementing IT systems needs to understand what the end-users expect to have delivered and this is best accomplished by having a good direction. You can be the most efficient engineer in the world but if you deliver the wrong solution you simply wasted less time then the inefficient engineer would have.

    Read the requirements, talk to the end-users, try to understand what people are expecting to get in the end. Sometimes we are lucky enough to get formal requirements and many times to our great disappointment they will be misleading or incomplete. "Questioning everything and taking nothing for granted" is an excellent motto.

    Learning the business and not just the technology is a powerful fundamental that many times helps you see through the confusion and noise to set a good direction in the first place. Lets face it, unless we are making video games for a living we are solving business, social or other kinds of problems. No matter if its a new way for people to get data into Excel, do calculations or even make simple GUI changes, in all cases some business problem is being solved. Understanding the business you work in will help lessen your dependency on others and instead allow you to leverage technology (and many times "cool" technology") to complete your goal successfully.

    Time-management is not about watching the clock or even your due date, time-management for engineers needs to be a mind-set. One great example of this is being in an "Executive, and not an Admin" state of mind (Thanks Greg!). This implies that choosing what to work on, what to ignore and what to delegate allows the engineer to best use their time.

    One way to accomplish this is to create a plan and prioritize what you need to accomplish. Sometimes we meet great managers who help us plan tasks and deliverables, but most of the time it will depend primarily on our own organizational abilities. Look at everything you need to accomplish and try to figure out what exact day you will be focusing on any given specific task. By making it a concrete moment in-time and not just words on paper will help you avoid distraction as you will have a clear daily direction. Doing this keep priority in mind, do the things you cant avoid first even if they are not fun, leave the features people can live without or workaround as last, stay focused on the main object .

    Someone might wonder why being a good programmer is not on this list and the answer is simple, that is already expected of you if you're a software engineer. Learning the technology specifics of your platform and/or language, keeping up with the new concepts and evolving your technical knowledge should never even be a question.

    Being a Software Engineer is a challenging and exciting profession with a fairly unique opportunity to approach problems from many different directions. Self-improvement is no different and everyone must find what works for them. What is written here is merely one persons view on the subject, so what works for you? I look forward to your comments.

    Tuesday, December 4, 2007

    Team Hanselman: Donate to a good cause, help fight Diabetes

    Why Care?

    Diabetes is endemic, 20.8 million people—7 percent of the population—have diabetes.

    Some get Diabetes from birth while others through bad diet, typically associated with large sugar intake. This can happen to anyone, especially us stationary computer geeks!

    Scott Hanselman's goal is to raise $50,000 to help find a cure for this horrible disease, and you can help. Please see the links below to find out more about Scott's campaign and to donate.

    I personally am a big supporter of defeating Diabetes and have already contributed to Scott's cause and so should you.

    Information and Donation Link

    For more information on Scott's Campaign:
    http://www.hanselman.com/fightdiabetes

    To donate:
    http://www.hanselman.com/fightdiabetes/donate

    Thank you for your support community!