Archive for August 2008

A Word of Encouragement

Every Sunday morning at our church, an usher is always ready to welcome members and guests with a smile and also a weekly newsletter in its hand for us.  I like reading it during the "weekly announcements" part of the service because there’s always a funny joke and also inspiring words.  I want to share with you what my pastor wrote in this week’s newsletter.  I hope that it’ll be a word of encouragement and also a blessing to you for this week.

"As the massive Boeing 777 jet accelerated down the runway, then lifted into the air, I was again in awe at the magnificent power that would lift such immense weight to a cruising altitude of more than 43,000 feet.   As the plane entered an area of turbulence and the giant machine was tossed about as though it weighed nothing, I was reminded of the tremendous, awe-inspiring force of the One who is the source of all power. 

We witness God’s power in so many areas and ways as we journey through this world: in the roaring of mighty waterfalls, the glories of a sunrise, the churning of the seas, the birth of our babies.  We witness His ultimate power in our own lives — in our own personal experiences as we come to know Him as the One who cares for and loves us individually and unconditionally

He knows and cares about every difficulty we face and each heartbreak we suffer. It is difficult to understand how such a powerful God, who rules the universe, would care for us on a personal basisWe must come to understand that God does not allow His work of keeping all things in the universe in its proper place to divert His attention from us personally, nor does it interfere with His working in our individual lives!"

Amen.

How to recursively traverse a DOM element in JavaScript

Suppose you want to traverse all the child nodes of a DOM element in order to do something with them, such as disabling them for example.  Here’s one way to do it.


In this example, the function that is responsible to traverse the DOM element’s child nodes and disable them is the recursive function EnableDisableDOMElement.  You have no choice but to use a while loop because you don’t know exactly the depth of each child nodes of every DOM element. 

You can use this code by calling the DisableDOMElementTree function (feel free to name it according to your intention) and pass it a DOM element as a parameter. For instance, in the onload event of the body element, you can call DisableDOMElementTree and pass it a valid DOM element which is the root of the elements tree. You can use document.getElementById with the name of a DOM element as a parameter to the function.

Hope it helps!

God’s Pharmacy Is Simply Amazing!

My wife sent me this email today.  I thought that it might be a good idea to share it.  Here goes.

God first separated the salt water from the fresh, made dry land, planted a garden, made animals and fish… all before making a human. He made and provided what we’d need before we were born. These are best & more powerful when eaten raw. We’re such slow learners…

God left us a great clue as to what foods help what part of our body!

God’s Pharmacy! Amazing!

imageA sliced Carrot looks like the human eye. The pupil, iris and radiating lines look just like the human eye… and YES, science now shows carrots greatly enhance blood flow to and function of the eyes.
imageA Tomato has four chambers and is red. The heart has four chambers and is red. All of the research shows tomatoes are loaded with lycopine and are indeed pure heart and blood food.
image
Grapes hang in a cluster that has the shape of the heart. Each grape looks like a blood cell and all of the research today shows grapes are also profound heart and blood vitalizing food.
imageA Walnut looks like a little brain, a left and right hemisphere, upper cerebrums and lower cerebellums. Even the wrinkles or folds on the nut are just like the neo-cortex. We now know walnuts help develop more than three (3) dozen neuron-transmitters for brain function.
imageKidney Beans actually heal and help maintain kidney function and yes, they look exactly like the human kidneys.
imageCelery, Bok Choy, Rhubarb and many more look just like bones. These foods specifically target bone strength. Bones are 23% sodium and these foods are 23% sodium. If you don’t have enough sodium in your diet, the body pulls it from the bones, thus making them weak. These foods replenish the skeletal needs of the body.
imageAvocadoes, Eggplant and Pears target the health and function of the womb and cervix of the female – they look just like these organs. Today’s research shows that when a woman eats one avocado a week, it balances hormones, sheds unwanted birth weight, and prevents cervical cancers. And how profound is this? It takes exactly nine (9) months to grow an avocado from blossom to ripened fruit. There are over 14,000 photolytic chemical constituents of nutrition in each one of these foods (modern science has only studied and named about 141 of them).
imageFigs are full of seeds and hang in twos when they grow. Figs increase the mobility of male sperm and increase the numbers of Sperm as well to overcome male sterility.
imageSweet Potatoes look like the pancreas and actually balance the glycemic index of diabetics.
imageOlives assist the health and function of the ovaries
imageOranges, Grapefruits, and other Citrus fruits look just like the mammary glands of the female and actually assist the health of the breasts and the movement of lymph in and out of the breasts.
imageOnions look like the body’s cells. Today’s research shows onions help clear waste materials from all of the body cells. They even produce tears which wash the epithelial layers of the eyes. A working companion, Garlic, also helps eliminate waste materials and dangerous free radicals from the body.

Null Coalescing Operator

I learned something new about C# 2.0 today while using ReSharper: the null coalescing operator which is represented by the ?? keyword.  According to the C# ECMA standard (p.63-64),

The result of a ?? b is a if a is non-null; otherwise the result is b.  Intuitively, b supplies the value to use when a is null.  When a is of a nullable type and b is of a non-nullable type, a ?? b returns a non-nullable value, provided the appropriate implicit conversions exist between the operand types.

In practice, the null coalescing operator can be achieved through the following refactoring (a simple ALT+ENTER which ReSharper will do this automatically for you.  It’ll ask you whether you want to “Replace ‘?:’-operator with ‘??’”).

object Foo()
{
  object someObject = getObject();
  return someObject == null ? “Object is null” : someObject; // <--- This statement will be refactored to use the null coalescing operator

  // Prefer the ternary operator over using conditionals for easy readability.
  // In other words, avoid writing the following statements:

  // if (someObject == null)
  //   return “Object is null”;
  // else return someObject;
}

This is how we can refactor the above method to use the null coalescing operator:

object Foo()
{
  object someObject = getObject();
  return someObject ?? “Object is null”; // <--- This is it.
}

In other words, if the left-side operand is null, the value of the right-side operand will be returned; otherwise the value of the left-side operand will be returned.

How to retrieve your ISP credentials from a DLink DIR-615 router (or any other router for that matter)

NOTE: This trick might or might not work for all routers.  I currently have a DLink DIR-615 and this trick works just fine.  My guess is that it should work on your router too even though it might be a different model than mine…but then again I’m just guessing.

Requirements for this trick to work:

If you do not want to install these applications in your machine just to do this trick, simply download Altiris SVS which is a free software virtualization tool that allows you to install Windows applications in a virtual layer.  It’s a safer and more practical way to install Windows applications for temporary usage.

Here are the steps to follow in order to retrieve your ISP credentials from a DLink DIR-615 router (or other routers for that matter):

  1. Log in the router’s configuration page as an administrator.  In my case, I just have to launch a Web browser and point it to http://192.168.0.1.  This IP address might be different for you.  In order to know your own gateway IP address, open a command prompt window (DOS), type ipconfig and press enter.  The IP address corresponding to your router is the one associated with “Default Gateway“.
  2. Go to the Setup section and click on Manual Internet Connection Setup (refer to Figure 1 and Figure 2). It’s okay if you have a different router than mine.   Just try to find the page where you can configure your ISP account information.
  3. In the page where you can see your login name (see Figure 2), right-click on it and then click on View Page Source.  Here, we just want to view the HTML source of the page.  If the page doesn’t allow you to right-click on it, then you can either disable javascript on the browser and try again, or from your browser’s menu try to find the command that allows you to view the HTML code for the page.  If that still doesn’t work, then we’re going to be more brutal: copy the page’s URL in the clipboard (Ctrl+C), then launch Notepad++ and paste (Ctrl+V) the URL as a file path in the Open File window dialog.  That should do it.
  4. Now that you can see the HTML code for that page, make a search for your username as it will be a faster way to find the location where your ISP credentials are located.  For example, in my case I will search for “Brian”.
  5. Look around that search area for your password.  It should be displayed as clear text (refer to Figure 3).

Figure 1. Go to the Internet connection options page
image

Figure 2. This is the ISP connection page for my DLink DIR-615 router (you should be able to find a similar page in your router)
image

Figure 3. Make a search for your ISP username to easily locate the ISP account information area in the HTML code.  Then look around for your ISP password.
image

Virtual PC Console window doesn’t show up when launching

At Avanade, we tend to develop all of our projects in controlled virtual environments for obvious reasons.  I am a big fan of VMWare products, notably VMWare Workstation, but at work we use Microsoft Virtual PC 2007.  Something annoying happened with Virtual PC this week.  For some obscure reason, the Virtual PC Console simply didn’t show up or disappeared from the screen every time I clicked on it via the taskbar.  At first, I thought the application crashed, but Process Explorer showed me otherwise, as I could clearly see that the Virtual PC process was running.  The problem seems to be that the screen position of the Virtual PC Console window was modified in the configuration file used by it.  I don’t know why that happened, but I do know how to fix it.

Here are the steps to follow if the Virtual PC Console window doesn’t show up or tends to disappear every time you click on it via the taskbar:

  1. Make sure none of the virtual machines are currently running.  If they are, save their sessions or shut them down.  Also, kill the Virtual PC process if it’s still running.  Have no mercy.
  2. If you’re using Windows XP, go to the Documents and Settings\$USER$\Application Data\Microsoft\Virtual PC folder.  If you’re using Windows Vista, go to the Users\$USER$\AppData\Roaming\Microsoft\Virtual PC folder.  Both of these root directories should be located in your system drive (C:\ for most users).
  3. Edit the Options.xml file with your favorite text editor (Notepad++ of course!)
  4. Search for the <window> element because it holds the location information for the console window (in my case, the <window> element was located at the end of the file).  Refer to Figure 1 for an example of what the <window> element looks like.
  5. Take a look at the values for both the <left_position> and <top_position> elements.  These values (4294935296) seem way out of proportion for our current monitors and screen resolutions don’t you think?  Change the value of these elements to something more realistic, such as 100.  Take a look at Figure 2 to see what I mean by that.
  6. Save the file and launch Virtual PC again.  This time you should see the Console window in the top and left part of the screen.

Figure 1. We can clearly see that the values for the left (<left_position>) and top (<top_position>) don’t make sense.
image

Figure 2. We simply changed the values for the left and top position to something more realistic.
image

Microsoft releases .NET 3.5 SP1, SQL Server 2008 RTM and Entity Framework/Data Services

Microsoft released tons of good stuff (the kind your parents will let you have) today.

First of all, you can now download Microsoft .NET Framework 3.5 Service Pack 1.  According to Microsoft,

Microsoft .NET Framework 3.5 Service Pack 1 is a full cumulative update that contains many new features building incrementally upon .NET Framework 2.0, 3.0, 3.5, and includes cumulative servicing updates to the .NET Framework 2.0 and .NET Framework 3.0 subcomponents.

Also as stated by Microsoft,

.NET Framework version 3.5 Service Pack 1 provides the following new features and improvements:

  • ASP.NET Dynamic Data, which provides a rich scaffolding framework that enables rapid data driven development without writing code, and a new addition to ASP.NET AJAX that provides support for managing browser history (back button support). For more information, see What’s New in ASP.NET and Web Development.
  • Core improvements to the CLR (common language runtime) that include better layout of .NET Framework native images, opting out of strong-name verification for fully trusted assemblies, improved application startup performance, better generated code that improves end-to-end application execution time, and opting managed code to run in ASLR (Address Space Layout Randomization) mode if supported by the operating system. Additionally, managed applications that are opened from network shares have the same behavior as native applications by running with full trust.
  • Performance improvements to WPF (Windows Presentation Foundation), including a faster startup time and improved performance for Bitmap effects. Additional functionality for WPF includes better support for line of business applications, native splash screen support, DirectX pixel shader support, and the new WebBrowser control.
  • ClickOnce application publishers can decide to opt out of signing and hashing as appropriate for their scenarios, developers can programmatically install ClickOnce applications that display a customized branding, and ClickOnce error dialog boxes support links to application-specific support sites on the Web.
  • The Entity Framework is an evolution of the existing suite of ADO.NET data access technologies. The Entity Framework enables developers to program against relational databases in according to application-specific domain models instead of the underlying database models. For more information, see Getting Started with the Entity Framework. The Entity Framework introduces some additional features, including support for new SQL Server 2008 types, default graph serialization of Entities, and the Entity Data Source. This release of the Entity Framework supports the new date and file stream capabilities in SQL Server 2008. The graph serialization work helps developers who want to build Windows Communication Foundation (WCF) services that model full graphs as data contracts. The Entity Data Source provides a traditional data source experience for ASP.NET Web application builders who want to work with the Entity Framework.
  • LINQ to SQL includes new support for the new date and file stream capabilities in SQL Server 2008.
  • The ADO.NET Data Services Framework consists of a combination of patterns and libraries, which enable data to be exposed as a flexible REST (Representational State Transfer)-based data service that can be consumed by Web clients in a corporate network or across the Internet. The ADO.NET Data Services Framework makes data service creation over any data source. A conceptual view model of the underlying storage schema can easily be exposed through rich integration with the ADO.NET Entity Framework. Services created by using the ADO.NET Data Services Framework, and also compatible Windows Live (dev.live.com) services, can be easily accessed from any platform. For client applications that are running on Microsoft platforms, a set of client libraries are provided to make interaction with data services simple. For example, .NET Framework-based clients can use LINQ to query data services and a simple .NET Framework object layer to update data in the service.
  • Windows Communication Foundation now makes the DataContract Serializer easier to use by providing improved interoperability support, enhancing the debugging experience in partial trust scenarios, and extending syndication protocol support for wider usage in Web 2.0 applications.
  • The .NET Framework Data Provider for SQL Server (SqlClient) adds new support for file stream and sparse column capabilities in SQL Server 2008.

Second of all, if you have an MSDN Subscription account, you can also download SQL Server 2008 which is fully supported by Visual Studio 2008 and .NET 3.5 upon installing .NET 3.5 SP1.

Here are some links that might be of interest for you if you want to get up and running with SQL Server 2008:

Finally, the ADO.NET Team at Microsoft has also released Entity Framework and Data Services.  According to today’s blog post on their site,

The Entity Framework and Data Services raise the level of abstraction for database programming and supply both a new model-based paradigm and a rich, standards-based framework for creating data-oriented Web services. Powered by rich and integrated tooling, the new ADO.NET Entity Designer lets users instantly leverage the new model-based paradigm in their applications. With the ADO.NET Entity Designer, users can generate models & mappings from an existing database and also create models with complex inheritance hierarchies & mappings in an intuitive, easy to use graphical user interface well integrated with Visual Studio 2008 SP1. The new Entity Data Source Control lets users consume models in their web applications with ease.

Check out the Data Platform site to get the latest bits and information on Entity Framework and Data Services.

Computing Now: an initiative of the IEEE Computer Society

If you’ve been reading my blog for a while, you no doubt know that I’m a fan of the IEEE Computer Society

I like working with .NET development tools and other technologies, but what I really, truly love in this profession is the engineering aspect of software development, such as requirements gathering, process analysis and assessment, software analysis and architecture, software quality, testing, project management, agile methods, etc. 

I think that in order to become a valuable software engineer for any organization, an individual in this profession should focus 80% on those core areas and 20% on technological areas (such as .NET or Java development, design patterns, SOA, web-oriented technologies, development and productivity tools, etc.).  In other words, you should try to become a generalizing specialist on core areas (the 80%) that I’ve mentioned in the second paragraph and a specialist on one or many of the technological areas (the 20%) mentioned in this paragraph.  For obvious reasons such as outsourcing and open competition amongst employees, having this kind of profile is key to ensure opportunities growth and career development at a minimum.

That being said, the IEEE Computer Society is a great source of information that does its best to focus on the core areas as previously mentioned.  But in case you weren’t aware, the IEEE Computer Society is big…really big.  In fact, it groups over more than a dozen other branches related to computer technology and engineering.  As such, it has recently launched a cool website which publicly offers great content on software engineering core areas.  This new initiative is Computing Now which is, in a nutshell, a public repository which aggregates content of all IEEE Computer Society magazines (IEEE Software, IEEE Multimedia, IEEE Internet Computing, etc.) and more!  According to their site,

Computing Now aggregates new print and online content from the IEEE Computer Society’s 14 peer-reviewed magazines into one website. Each month, we highlight cross-magazine coverage of hot topics such as robotics, green computing, and social networking. Check back often, because we’ll also be posting free articles and departments as each magazine goes to press. Participate in our From the Editors blog, and discover or subscribe to magazine-related multimedia content, such as news, podcasts, audio interviews, code snippets, and video demonstrations.

Is that software project stressing you?

In last week’s Bible study at my church, a scripture came into my mind that I felt like sharing with you.  I think it fits well with our profession in software development.  But just before I jump into it, I’ll tell you the reason that pushed me to write this post.  If you’ve been involved in a software project for some time you’ve probably noticed that it’s a pretty stressful profession.  Whether you’re a lone wolf or part of a team, the goal is the same: delivering a product or a service to a client.  The product can be either a component, a system, API documentation, tests, samples, installers, etc.  The service can be playing the role of an auditor or a consultant inside an organization.  The client in both instances often share the same characteristics: they don’t often know what they want or expect from the product or service, and  they somehow seem to be determined on a date as if saying "I don’t know exactly what I want, but I definitively know when I want it".  In my little head, this just doesn’t make sense.  This reminds me of an instance where one of our managers sent an email to the team with the deliverables for the next iteration.  It pretty much went like this:

Manager: All right Team.  Here are your next deliverables.  Please tell me immediately if you’ll have a problem meeting these dates:

=> Joe, you will be working with Susan on component A.  This is due on August 25.

=> Alice, you will be responsible for component B and C.  You will also produce the documentation.  This is also due on August 25.

The problem with the last scenario was that no one knew what components A, B and C were suppose to be or do.  There was no functional design whatsoever.  The only thing that was certain was the date.  And even then, we had no idea how that date came to be.  And we had to agree on whether we were able to deliver unknown variables in a definitive point in time.  That’s like a chief builder telling his subordinates to build a bridge (a product) but without fully understanding or knowing what’s at stake (the specifications), except for that date…that magic date where nor science nor common sense can help us to derive its reason.  Sad…very sad.

I remember once reading an article which described the work conditions and environment of the Window NT 4.0 team at Microsoft while working towards that operating system.  Apparently, it was so bad that some individuals ended up developing health problems, other went through divorce because their project was so demanding that they had to sleep over at the office on many occasions, some decided to quit and completely change professions, etc.  My gosh…now that’s sad too.  I mean who’s actually using Windows NT 4.0 nowadays?  No doubt Windows NT 4.0 served as the basis of the Windows operating systems that we know today (XP, Vista, Server 2003, etc.), but was it really worth the health and lives of those human beings?  I certainly don’t think so.  I don’t doubt that there was some poor management decisions and weak estimations that went with the project, but that doesn’t change the fact that some lives were ruined by it.  Twelve years later since the release of that product, information technology as we know it has changed dramatically and the way that software is being built has morphed into a more sophisticated discipline, but it still seems that team members are stressing more than before.  It seems like their health and their lives are still on the brink of destruction.

In my experience, I’ve learned long ago not to stress for anything in life.  When I was 15 years old, I was diagnosed with a bleeding ulcerative colitis.  I still have it inside of me and if I stress too much, I’m quickly reminded to calm down.  One reason why I certainly don’t stress in software development is twofold.  First of all, software development is a passion.  Fred Brooks said it well in The Mythical Man-Month:

Why is programming fun?  What delights may it practitioner expect as his reward?

  1. First is the sheer joy of making things.  As the child delights in his mud pie, so the adult enjoys building things, especially things of his own design.  I think this delight must be an image of God’s delight in making things, a delight shown in the distinctness and newness of each leaf and each snowflake.
  2. Second is the pleasure of making things that are useful to other people [...].
  3. Third is the fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work in subtle cycles, playing out the consequences of principles built in from the beginning [...].
  4. Fourth is the joy of always learning, which springs from the nonrepeating nature of the task [...].
  5. Finally, there is the delight of working in such a tractable medium.  The programmer, like the poet, works only slightly removed from pure though-stuff.  He builds his castles in the air, from air, creating by exertion of the imagination [...].

Second of all, software products tend to have a very short life.  I don’t have the exact numbers, but I can confidently say that systems are changed or rebuilt every 36-48 months in average.  So that means that the system you worked on so hard for so many hours, that system that made your body ache because of those long sitting periods, that system that made you swear multiple times, that system that built and destroyed human relationships, that system that made you doubt whether or not you were made for this profession, that system that replaced your family…where is that system now?  Was it really worth your health and your life?

The scripture that was in my heart since last week can be found in the Book of Ecclesiastes 2:18-26.  It’s a wake up call that really hits hard because it opens our eyes and helps us to realize that there is more to life than sacrificing our health, our lives and our soul to meeting a stupid date and building something that’s so temporary that it is sometimes not worth our intelligence and effort.  I’ll end the post with the scripture in two versions to help you better understand what the writer is saying.

Ecclesiastes 2:18-26 (The Message)

18-19 And I hated everything I’d accomplished and accumulated on this earth. I can’t take it with me—no, I have to leave it to whoever comes after me. Whether they’re worthy or worthless—and who’s to tell?—they’ll take over the earthly results of my intense thinking and hard work. Smoke.

20-23 That’s when I called it quits, gave up on anything that could be hoped for on this earth. What’s the point of working your fingers to the bone if you hand over what you worked for to someone who never lifted a finger for it? Smoke, that’s what it is. A bad business from start to finish. So what do you get from a life of hard labor? Pain and grief from dawn to dusk. Never a decent night’s rest. Nothing but smoke.

24-26 The best you can do with your life is have a good time and get by the best you can. The way I see it, that’s it—divine fate. Whether we feast or fast, it’s up to God. God may give wisdom and knowledge and joy to his favorites, but sinners are assigned a life of hard labor, and end up turning their wages over to God’s favorites. Nothing but smoke—and spitting into the wind.

Ecclesiastes 2:18-26 (New Living Translation)

The Futility of Work
18 I came to hate all my hard work here on earth, for I must leave to others everything I have earned. 19 And who can tell whether my successors will be wise or foolish? Yet they will control everything I have gained by my skill and hard work under the sun. How meaningless! 20 So I gave up in despair, questioning the value of all my hard work in this world.

21 Some people work wisely with knowledge and skill, then must leave the fruit of their efforts to someone who hasn’t worked for it. This, too, is meaningless, a great tragedy. 22 So what do people get in this life for all their hard work and anxiety? 23 Their days of labor are filled with pain and grief; even at night their minds cannot rest. It is all meaningless.

24 So I decided there is nothing better than to enjoy food and drink and to find satisfaction in work. Then I realized that these pleasures are from the hand of God. 25 For who can eat or enjoy anything apart from him?[a] 26 God gives wisdom, knowledge, and joy to those who please him. But if a sinner becomes wealthy, God takes the wealth away and gives it to those who please him. This, too, is meaningless—like chasing the wind.

By the way, if you’re looking for a better way to estimate your software projects, please by all means (legally of course…) read Steve McConnell’s book on software estimation: Software Estimation: Demystifying the Black Art from Microsoft Press.  In my opinion, bad estimation is the major source of project failures and broken lives in software development.

The Management Survivor Guide

I was reading an interesting article in The Globe And Mail this week about how more and more managers are getting laid off their positions in the corporation due to the economic situation we’re currently in.  This affliction doesn’t affect the IT industry alone; it’s striking almost every companies in every sector in every country.  In order for workers in management to increase their stakes at keeping their current job or getting more attention for further opportunities, there are a few key points that should be considered.

In the Management Survivor Guide, Monika Morrow of Right Management points out a few ideas to make yourself more profitable and valuable.  Since this article pretty much goes in hands with my post on how to become a more valuable software professional, I thought that Morrow’s article would be a good complement to it.  So, without further a due, here’s the “Management survivor guide” which aside from targeting managers can actually benefit software professionals alike.

The Management Survivor Guide by Monika Morrow of Right Management:

  • Position Yourself
    Scan the organization and the industry and make sure you are involved in an area that is hot and growing.
  • Think Strategically
    Discuss the organization’s strategy with senior executives and point out how you fit their coming needs.
  • Be Multitalented
    If two operations are being combined, a manager who knows both parts will be more valuable than one who has experience in only one part.
  • Get Advice
    Ask trusted colleagues or a coach to critique your management style and experience for areas where you might need development.
  • Market Yourself
    Develop and tell stories of your successes.  You want to be known as the problem solver too valuable to let go.  (I highly recommend reading Jean-Paul Boodhoo’s blog to get an example of this point.  JP clearly nails this one as he constantly shares his successes publicly on his blog)
  • Be Seen As An Authority
    Offer to mentor, organize training and speak at industry functions.
  • Don’t Rush
    If it becomes clear you are facing the axe, don’t just take the first job that comes along without assessing whether it meets your interests and long-term goals. (This one is very important in my opinion.  Don’t waste your time on a job that isn’t compatible with your values and dreams.  If you are in such a situation, I also recommend you to read The Dip by Seth Godin.  Seth gives you some key points to consider in such situations)

C# Search: The .NET developer search engine

As a software developer, you’ve probably heard on more than one occasion that "Google is your friend" when it comes down to searching for a solution to a problem, an algorithm, a tool, etc.  As a .NET developer, I cherish very much my friendship with Google’s powerful search engine.  It’s true that I love working with .NET, but sometimes trying to search for a specific thing for it on Google can seem like a daunting task when millions of search results are generated.  Unless you’ve mastered the power of the Google search engine, trying to find exactly what you need is pretty much like trying to look for a needle in a haystack.  And until Google’s search intelligence evolves to a state that it’ll know exactly what we’re thinking, we might as well know how to properly and easily search for things, especially when it comes down to .NET development.  And you know what?  There’s a new site that offers a better and easier way to search for .NET related material.  And you know what else?  It’s powered by Google’s search engine and filters.

C# Search filtersA former co-worker of mine, David Hervieux, was kind enough to use his time and smarts to put together the best .NET-oriented search site powered by Google: C# Search, also known as "The .NET developer search engine".  This search engine is really revolutionary because it helps us to narrow our .NET related search through well-defined sources: sites (like CodeProject, MSDN, DotNetSlackers, etc.), newsgroups, forums, etc. (take a look at the picture on right).  And with the power of Google behind it, you can expect the search results to not only be precise, but super fast!  If you’re accustomed with using SearchDotNet, you can think of C# Search as being version 2.0 of SearchDotNet.

A neat thing about this customized search engine is that when you choose the "Everywhere" item as the source, the search will be done in the same way as if you were performing a regular search on Google.  So what does this means?  Well, first of all, it means that you can set C# Search as your homepage if you’ve already set Google as your homepage since you’ll get the same functionality and more. Second of all, it means that you can use C# Search as the default search page within Visual Studio.  To do this, follow these simple instructions:

  1. Launch Visual Studio
  2. Go to Tools -> Options
  3. Expand the Environment node, then click on Web Browser
  4. Under the Search page replace whatever link is there for "http://csharpsearch.com/default.aspx "
  5. Press on the OK buton

The image below shows you the end result.

Setting C# Search as the default search page in Visual Studio

Firefox and Internet Explorer users can be more productive with C# Search by installing the search toolbars, as shown in the images below.

 
The Internet Explorer C# Search Toolbar

 

The Firefox C# Search Toolbar

Mmmmm…..I’m lovin’ it!

Take control of your system with Windows Sysinternals

I recently purchased a Lenovo Thinkpad T61 (sorry Dell) and after performing a clean install of Windows XP SP3 (sorry Vista), as well as a full image backup with DriveImage XML (sorry Norton), I decided to search for those tools that will help me take a deeper control of my system and avoid chaos in the long run.  If you’re a Linux user, you might not know what I’m talking about.

Windows Sysinternals is Microsoft’s solution for Windows users to download advanced system utilities and technical information for free.  I don’t know about you, but when I see those four word (’advanced‘, ‘system‘, ‘utilities‘ and ‘free‘) in the same sentence, an interrupt gets triggered in my brain.  Seriously, these tools are a great asset for any Windows developers’ toolbox as some of the tools help in pinpointing memory usage information, manage processes and threads, etc.  In case you weren’t aware, Visual Studio doesn’t always ship with all the tools you might need.

As quoted in Windows Systinternals‘ home page:

The Sysinternals web site was created in 1996 by Mark Russinovich and Bryce Cogswell to host their advanced system utilities and technical information. Microsoft acquired Sysinternals in July, 2006. Whether you’re an IT Pro or a developer, you’ll find Sysinternals utilities to help you manage, troubleshoot and diagnose your Windows systems and applications.

Windows Sysinternals utilities are grouped into the following six groups:

  1. File and Disk Utilities: Utilities for viewing and monitoring file and disk access and usage.
  2. Networking Utilities: Networking tools that range from connection monitors to resource security analyzers.
  3. Process Utilities: Utilities for looking under the hood to see what processes are doing and the resources they are consuming.
  4. Security Utilities: Security configuration and management utilities, including rootkit and spyware hunting programs.
  5. System Information: Utilities for looking at system resource usage and configuration.
  6. Miscellaneous Utilities: A collection of diverse utilities that includes a screen saver, presentation aid, and debugging tool.

Here is a complete list of the tools being offered by Windows Sysinternals for each group as well as their description (you can find all these categories here).

File and Disk Utilities
AccessChk
This tool shows you the accesses the user or group you specify has to files, Registry keys or Windows services.

AccessEnum
This simple yet powerful security tool shows you who has what access to directories, files and Registry keys on your systems. Use it to find holes in your permissions.

CacheSet
CacheSet is a program that allows you to control the Cache Manager’s working set size using functions provided by NT. It’s compatible with all versions of NT.

Contig
Wish you could quickly defragment your frequently used files? Use Contig to optimize individual files, or to create new files that are contiguous.

DiskExt
Display volume disk-mappings.

DiskMon
This utility captures all hard disk activity or acts like a software disk activity light in your system tray.

DiskView
Graphical disk sector utility.

Disk Usage (DU)
View disk usage by directory.

EFSDump
View information for encrypted files.

FileMon
This monitoring tool lets you see all file system activity in real-time.

Junction
Create Win2K NTFS symbolic links.

LDMDump
Dump the contents of the Logical Disk Manager"s on-disk database, which describes the partitioning of Windows 2000 Dynamic disks.

MoveFile
Schedule file rename and delete commands for the next reboot. This can be useful for cleaning stubborn or in-use malware files.

NTFSInfo
Use NTFSInfo to see detailed information about NTFS volumes, including the size and location of the Master File Table (MFT) and MFT-zone, as well as the sizes of the NTFS meta-data files.

PageDefrag
Defragment your paging files and Registry hives!

PendMoves
See what files are scheduled for delete or rename the next time the system boots.

Process Monitor
Monitor file system, Registry, process, thread and DLL activity in real-time.

PsFile
See what files are opened remotely.

PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.

SDelete
Securely overwrite your sensitive files and cleanse your free space of previously deleted files using this DoD-compliant secure delete program.

ShareEnum
Scan file shares on your network and view their security settings to close security holes.

Sigcheck
Dump file version information and verify that images on your system are digitally signed.

Streams
Reveal NTFS alternate streams.

Sync
Flush cached data to disk.

VolumeID
Set Volume ID of FAT or NTFS drives.

 

image Network Utilities
AD Explorer
Active Directory Explorer is an advanced Active Directory (AD) viewer and editor.

AD Insight
AD Insight is an LDAP (Light-weight Directory Access Protocol) real-time monitoring tool aimed at troubleshooting Active Directory client applications.

AdRestore
Undelete Server 2003 Active Directory objects.

PsFile
See what files are opened remotely.

PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.

ShareEnum
Scan file shares on your network and view their security settings to close security holes.

TCPView
Active socket command-line viewer.

Whois
See who owns an Internet address.

 

image Process Utilities
Autoruns
See what programs are configured to startup automatically when your system boots and you login. Autoruns also shows you the full list of Registry and file locations where applications can configure auto-start settings.

FileMon
This monitoring tool lets you see all file system activity in real-time.

Handle
This handy command-line utility will show you what files are open by which processes, and much more.

ListDLLs
List all the DLLs that are currently loaded, including where they are loaded and their version numbers. Version 2.0 prints the full path names of loaded modules.

PortMon
Monitor serial and parallel port activity with this advanced monitoring tool. It knows about all standard serial and parallel IOCTLs and even shows you a portion of the data being sent and received. Version 3.x has powerful new UI enhancements and advanced filtering capabilities.

Process Explorer
Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. This uniquely powerful utility will even show you who owns each process.

Process Monitor
Monitor file system, Registry, process, thread and DLL activity in real-time.

PsExec
Execute processes remotely.

PsGetSid
Displays the SID of a computer or a user.

PsKill
Terminate local or remote processes.

PsList
Show information about processes and threads.

PsService
View and control services.

PsSuspend
Suspend and resume processes.

PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.

RegMon
This monitoring tool lets you see all Registry activity in real-time.

ShellRunas
Launch programs as a different user via a convenient shell context-menu entry.

 

image Security Utilities
AccessChk
This tool shows you the accesses the user or group you specify has to files, Registry keys or Windows services.

AccessEnum
This simple yet powerful security tool shows you who has what access to directories, files and Registry keys on your systems. Use it to find holes in your permissions.

Autologon
Bypass password screen during logon.

Autoruns
See what programs are configured to startup automatically when your system boots and you login. Autoruns also shows you the full list of Registry and file locations where applications can configure auto-start settings.

LogonSessions
List active logon sessions

NewSID
Learn about the computer SID problem everybody has been talking about and get a free computer SID changer, NewSID.

Process Explorer
Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. This uniquely powerful utility will even show you who owns each process.

PsExec
Execute processes with limited-user rights.

PsLoggedOn
Show users logged on to a system.

PsLogList
Dump event log records.

PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.

RootkitRevealer
Scan your system for rootkit-based malware

SDelete
Securely overwrite your sensitive files and cleanse your free space of previously deleted files using this DoD-compliant secure delete program.

ShareEnum
Scan file shares on your network and view their security settings to close security holes.

ShellRunas
Launch programs as a different user via a convenient shell context-menu entry.

Sigcheck
Dump file version information and verify that images on your system are digitally signed.

 

image System Information
Autoruns
See what programs are configured to startup automatically when your system boots and you login. Autoruns also shows you the full list of Registry and file locations where applications can configure auto-start settings.

ClockRes
View the resolution of the system clock, which is also the maximum timer resolution.

Filemon
This monitoring tool lets you see all file system activity in real-time.

Handle
This handy command-line utility will show you what files are open by which processes, and much more.

LiveKd
Use Microsoft kernel debuggers to examine a live system.

LoadOrder
See the order in which devices are loaded on your WinNT/2K system.

LogonSessions
List the active logon sessions on a system.

PendMoves
Enumerate the list of file rename and delete commands that will be executed the next boot.

Process Explorer
Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more. This uniquely powerful utility will even show you who owns each process.

Process Monitor
Monitor file system, Registry, process, thread and DLL activity in real-time.

ProcFeatures
This applet reports processor and Windows support for Physical Address Extensions and No Execute buffer overflow protection.

PsInfo
Obtain information about a system.

PsLoggedOn
Show users logged on to a system

PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.

RegMon
This monitoring tool lets you see all Registry activity in real-time.

WinObj
The ultimate Object Manager namespace viewer is here.

 

image Miscellaneous Utilities
AD Explorer
Active Directory Explorer is an advanced Active Directory (AD) viewer and editor.

AdRestore
Restore tombstoned Active Directory objects in Server 2003 domains.

Autologon
Bypass password screen during logon.

BgInfo
This fully-configurable program automatically generates desktop backgrounds that include important information about the system including IP addresses, computer name, network adapters, and more.

BlueScreen
This screen saver not only accurately simulates Blue Screens, but simulated reboots as well (complete with CHKDSK), and works on Windows NT 4, Windows 2000, Windows XP, Server 2003 and Windows 9x.

Ctrl2cap
This is a kernel-mode driver that demonstrates keyboard input filtering just above the keyboard class driver in order to turn caps-locks into control keys. Filtering at this level allows conversion and hiding of keys before NT even "sees" them. Ctrl2cap also shows how to use NtDisplayString() to print messages to the initialization blue-screen.

DebugView
Another first from Sysinternals: This program intercepts calls made to DbgPrint by device drivers and OutputDebugString made by Win32 programs. It allows for viewing and recording of debug session output on your local machine or across the Internet without an active debugger.

Hex2dec
Convert hex numbers to decimal and vice versa.

PsLogList
Dump event log records.

PsTools
The PsTools suite includes command-line utilities for listing the processes running on local or remote computers, running processes remotely, rebooting computers, dumping event logs, and more.

RegDelNull
Scan for and delete Registry keys that contain embedded null-characters that are otherwise undeleteable by standard Registry-editing tools.

RegJump
Jump to the registry path you specify in Regedit.

Strings
Search for ANSI and UNICODE strings in binary images.

ZoomIt
Presentation utility for zooming and drawing on the screen.

If you don’t feel like downloading each tool individually, feel free to download Sysinternals Suite which contains the entire set of utilities as a single file download.