Thinking Through Indentation and IDE Automation

I’ve been asked a number of times about code indentation in my books by publishers, editors, and readers alike, so I thought it might be a good idea to talk about the matter in a blog post. It’s important to indent your code to help make the code more readable—to help make the flow of your code easier to see. Each indentation represents another code level. The application is at one level, classes at another, methods within the class at another, loops within a method at still another, and so on. By viewing the various levels of code within an application, you see an outline of application functionality and can better understand how each application element works. Because indentation is so important to the understanding of code, I spend considerable time working through indentation in my books so that you can better understand the examples I present.

Indentation is there for the developer to use as an aid to understanding. A few early computer languages, such as COBOL, were positional and depended on coding elements appearing in certain positions on each line. Most languages today don’t require that you use any sort of indentation. In fact, more than a few languages would let you write the entire application on a single line without any indentation at all (as long as you supplied a space between statements and expressions as needed). The compiler doesn’t care whether you indent using spaces or tabs, whether there are three or four spaces per indent, or whether you provide an indent for continued lines. The fact is that all of these characteristics are controlled by the developer to meet the developer’s needs.

Modern IDEs make it easy to indent your code as needed by performing the task automatically in some cases. For example, given an example of a Java method, you could begin by typing:

public void MyProc()
{

The moment you press Enter after the curly bracket (}), most IDEs will add an indented line and a closing curly bracket. Your cursor will end up on the indented line, ready for you to type a statement. You see something like this in your IDE:

public void MyProc()
{
 
}

The developer hasn’t done anything so far to provide indentations for the code, yet the code is already indented. Let’s say you create a variable like this:

boolean MyVar = true;

You then type a statement like this:

if (MyVar == true)

It’s at this point where some IDEs continue to provide an automatic indent and others don’t. For example, if I press Enter at the end of this line in Eclipse, the IDE automatically indents the next line for me. However, when I’m working with CodeBlocks, pressing Enter leaves the code at the same indention level as before. Neither approach is wrong or right—simply different. If I were to add a curly bracket on the next line to hold multiple lines of code within a block, CodeBlocks will already have the cursor in the right position and Eclipse will have to outdent the curly bracket to position it correctly.

Let’s say that this if statement has just one line of code following it, so I don’t use a curly bracket. When working with Eclipse, the cursor is already at the correct position and I simply type the next statement. However, when working with CodeBlocks, I must now press Tab in order to indent the line of code to show that this line (and only this line) is associated with the if statement. In this case, the example simply outputs a statement telling the value of MyVar like this.

System.out.println("MyVar == true");

Pressing Enter automatically outdents the line when using Eclipse because the next statement is automatically at the same level as the if statement. However, when working with CodeBlocks, I must press the Backspace to outdent the line manually. The resulting method could end up looking like this:

void MyProc()
{
    boolean MyVar = true;
    if (MyVar == true)
        System.out.println("MyVar == true");
     
}

Of course, a good developer will add some comments to this code as a reminder of what task the code performs and why the developer chose this particular technique to perform the task. The point of this post is that indentation is an essential part of working with most languages in order to make the resulting application easier to understand.

A final thought on IDEs is that most of them make it possible to configure the editor to indent or not indent to meet the requirements of your organization or personal tasks. IDEs commonly allow the use of tabs or spaces for indents (spaces are better when you want to write documentation). You can also choose the right amount of indentation (three spaces is optimal for books where space is limited). Let me know your thoughts on indentation and how you use it at John@JohnMuellerBooks.com.

 

Debugging As an Educational Tool

One of the questions I get asked quite often is how I learn new programming techniques. After all, I work with a broad range of languages and IDEs in my pursuit of new programming environments. Let’s face it—I like to play with code. For me, it’s not really a job to write application code. I like to see how different things work and what’s possible with a given language. In order to accomplish my goals, however, I need to learn techniques quickly. The debugger is my secret to learning how to code quickly and easily. In fact, I’ve written an article on the topic, “Improve Your Coding Skill by Listening to the Debugger.” You also see this technique emphasized in a number of my books, especially LINQ for Dummies and Start Here! Learn Microsoft Visual C# 2010 Programming.

The main reason that I use the debugger as an educational tool is that I can see the code in action. It’s possible to see how the code actually works, rather than envision what the code is supposed to do. The difference is important. For me, seeing the code actually work demonstrates that the theory behind the code is sound. Many theories sound good until you actually try to use them—using the debugger proves the theory as you work through the code.

From a personal perspective, the biggest hindrance that I face in using the debugger as an educational tool is the lack of good comments. In fact, comments are such a problem that I write about them in Creating Useful Comments. When the code lacks comments, I need to look up the calls myself and then determine how the developer is using them. It’s time consuming and a somewhat painful way to learn at times because I can see the code work, but I don’t know how it works or why the developer chose a particular approach. Even worse is when the code contains misleading comments. Worse still are comments that are outright incorrect because they reflect a previous state of the code or the developer didn’t actually understand why a technique works (the sheer dumb luck approach to coding).

Make sure you check out my article on the topic and get back to me about it. I’d like to hear your views on using the debugger as an educational aid. For that matter, I’d like to hear your viewpoint on debuggers as a class of application. Do you feel they need work or are debuggers as useful as they need to be? You may even feel that debuggers have become encumbered by way too many features. Whatever your viewpoint, let me know at John@JohnMuellerBooks.com.

 

Updates in the .NET Framework 4.5

I try hard to follow the latest developments in all of the technologies that interest me. Since my range of interests is large, sometimes it proves nearly impossible to track it all. So, like you, I rely on summaries of information at times. I’ve been working with Visual Studio 2012 quite a lot lately. Not only is it the tool of choice for other authors and the tool I’ll use to write books myself, but I also need to verify that the source code for my currently supported books still works. The new features in the associated .NET Framework 4.5 are of great interest to me, so I checked out an article about it entitled, “What’s New in the .NET 4.5 Base Class Library” by Immo Landwerth.

There are a lot of welcome updates. For example, asynchronous programming won’t be as difficult in the future because Microsoft has taken measures to simplify things. You can read the article yourself to see how much better the new technique is. I’m sure that many developers will welcome the change because it will make it possible for developers to create asynchronous routines with greater ease, which should make applications considerably more responsive. Given that one of the five tenets of Metro programming is to be fast and fluid, it doesn’t surprise me that .NET 4.5 contains this sort of change. I worked through the example and even tried a few of my own and the new asynchronous support works great! However, I have to wonder what the cost of this new support is. It isn’t often that you get simplicity without the loss of flexibility. As I explore this new feature, I’ll let you know if I do come up with reasons to use the old approach (as nice as the new approach is).

The new ZIP file support strikes me as something Microsoft added because everyone else already has it. Microsoft was late to the party with this one. However, the new support is quite welcome because ZIP files have proven to be a problem in the past. Not many applications can get by without this particular archive today. What I had hoped would happen is that Microsoft would build an extensible archive support feature that would support ZIP files, but would also make it incredibly easy to add support for other archive file types, such as JAR and TAR. Unfortunately, it looks like we’ll see one new archive file format supported at a time.

I’ll need to play with the read-only collections to determine how I’ll use them. Right now, it appears that this new feature will see limited use in my applications (if I use it at all). The first two improvements mentioned in this post have a definite use in my applications and I’m welcoming them with open arms. What I’d like to hear from you is how you’d use this new feature. Let me know what you think about it at John@JohnMuellerBooks.com.

Articles are problematic at times because the author often doesn’t have sufficient space to cover all of the details. I know that I’ve encountered this issue myself. The editor assigning the article might not have sufficient grasp of the material to make a good decision about it either. I wish that this article had been split into several parts because the author lists a number of miscellaneous improvements at the end of the article. If you read the article, make sure you check this list carefully because some of the improvements, such as Console.IsInputRedirected, Console.IsOutputRedirected, and Console.IsErrorRedirected properties, are quite interesting. I write a lot of console applications and utility application that provide a console interface. Having these properties available will make it possible for me to code applications that are more responsive to user needs.

I’ve noticed that Microsoft didn’t provide a full number update to the revision number in this case and the minor upgrade number is warranted. There are some nice changes to the .NET Framework 4.5, but nothing so exciting that you should rush out right now and start implementing it in your applications. It would be wise to carefully add this update to your applications to determine when it provides a true advantage and when there is potentially a loss of functionality or flexibility that makes the update a bad idea.

 

Visual Studio 2012 Express Products Include Desktop Support

Visual Studio 2012 is still a work in progress, but many developers learn about the latest version of Visual Studio using the Express Edition because it’s a free download. You can use the Express Edition to learn a new language, get a basic idea of Visual Studio functionality, or simply to play around. The Express Edition is also lightweight, which makes it possible to use with an older machine that might not support one of the other editions. So, it was with regret that I read that the Express Edition was only going to support Metro applications. Obviously, a lot of other people regretted Microsoft’s decision because there has been quite an outcry about the lack of support for desktop and console applications in the Express Edition. Fortunately, Microsoft has heard developers and according to Mary Jo Foley, has added desktop support back in.

Microsoft is still trying to push its Metro agenda, however. The desktop and console application support come in a separate product named Visual Studio Express 2012 for Windows Desktop. This product won’t ship at the same time as the other products—it’ll ship later. I wasn’t able to find out how much later, but there is going to be a delay. The product is mentioned at the bottom of the page on the Visual Studio Express 2012 products site, but when you click the link to download it, you’ll find it missing. The June 8th blog post doesn’t mention a delivery date either.

There are a lot of new features in Visual Studio 2012 and its associated .NET Framework 4.5. If you haven’t tried these features, an Express Edition product could be precisely what you need for experimentation. Of course, you can also obtain a beta version of Microsoft top of the line Visual Studio 2012 Ultimate for experimentation purposes for the time being as well, but it does have some hefty system requirements.

Have you had a chance to look at the new version of Visual Studio? Let me know your thoughts about it at John@JohnMuellerBooks.com.

 

Source Code Support

Sometimes I need to make really tough decisions.  It isn’t a matter of wanting to make the decision—the need to make the decision is thrust upon me. The topic of this post is source code support in the form of reader uploads. The topic of just how far I need to support book source code has come up before in conversations with readers. For example, in the Source Code Download Issues post, I discuss problems that readers have had in obtaining source code for my books in the past. The issue addressed in this post is files that are removed from archive (.ZIP) files by applications such as firewalls. In some rare cases, files are missing from the download and the reader looks to me to solve the problem. A few readers have gone so far as to say that I really need to provide CDs with the source code on them and mail those disks out free of charge as part of supporting the book. Unfortunately, supporting the books in this way is well beyond my ability. I could easily go bankrupt providing this level of support.

Up until now, I’ve been willing to send source code to a reader who needs it using e-mail unless the book is on my unsupported list. This past month has been especially hectic with reader requests for source code uploads (well over a hundred of them). In some cases, the books in question are ten or more years old, which means I must look the book up in my archives and determine whether the source code is even available. Once I make that determination, I copy the source from the archive and send it to the reader in one or more e-mails. Some of the source code files are 20 MB or so in size and many reader e-mail accounts won’t accept a file that size, so I have to break the file down into pieces and send multiple e-mails to the reader—a time-consuming and error prone task. This past week I went through several problematic uploads and finally gave up trying to support the reader in a number of cases. Nothing I would do would allow the reader to receive the file using e-mail.

I’ve thought about making the source available on my Web site, but that approach hasn’t worked well in the past because readers will often complain they can’t find the source or that the source on the Web site is corrupted (or any number of other issues). Of course, there are also costs associated with online storage for source code for 89 books. After a lot of thought, I have decided that trying to support a book’s source code in this manner won’t work either.

With this in mind, I’ve decided that you’ll need to rely on the publisher’s site for downloading any source code associated with a book, unless the publisher provides a CD for the book. If there is a source code CD, then you need to follow the procedure described in my Obtaining Replacements for Broken Media post to obtain a new CD. I didn’t come to this decision easily because I prefer to provide the fullest possible level of support for my books whenever possible. The issue is the time required to provide the support. On some days it has gotten to the point where a good part of my day is spent looking for resources that readers need and not getting much else accomplished.

When a publisher decides that it’s no longer feasible to provide download support for a book, the source code for that book will become unavailable. In fact, I’ll likely add the book to my unsupported list. It wasn’t an easy decision, but I had to make it because the e-mail support has gotten to the point of affecting the support I can provide to readers for other needs. Please let me know about any concerns you have about this new policy at John@JohnMuellerBooks.com. If someone has a really good solution for this problem—one in which I can provide long term source code support without incurring huge monetary or time issues, I’ll provide an updated post. Thank you for your continued support of my books.

 

Visual Studio 11 Updates

Microsoft plans to release the next update for Windows 8 during the first week in June. Most developers are also looking forward to an update of Visual Studio 11 about the same time. Visual Studio 11 contains a number of modest, but important, feature updates. As a result, I’ve been reading everything I can find on these new features and doing a little testing myself. So far, I haven’t seen much mention of the new debugging features or the new/updated tools provided with the new release. These changes are important nonetheless.

Of course, the most important of these updates is the ability to create Metro applications. Visual Studio 11 provides a complete set of templates you can use to create Metro applications using a combination of HTML5 and JavaScript. From the confusing assortment of posts that I’ve read, I’m not really clear as to whether the main download site provides you with a copy of Visual Studio 11 that includes full support for developing Metro applications. It turns out that you need the SDK in order to build these applications. In order to play with Metro applications, I downloaded the Visual Studio 11 beta from the Metro-style applications site, which definitely includes the SDK. This download only installs on a Windows 8 system. The Metro-style applications site also includes a number of other helpful downloads.

The feature that seems to be garnering the most attention though is the appearance of the new IDE. Many developers find the new IDE incredibly depressing to use. According to a number of sources, the beta team has heard the pleas of testers and decided to do something about it. Essentially, the changes are limited to a difference in colors. The updated IDE will be lighter gray and use some brighter colors in the icons. Of course, having a tool that’s fun, or at least interesting, to use is a requirement. No one wants to work with a depressingly dark gray tool all day. Still, I have to wonder why this particular feature is receiving so much press.

Of the features I’ve tried so far, I’m finding the C++ language additions the most tempting. For example, the IDE now makes it a lot easier to see various C++ elements through the use of color coding. A feature called Reference Highlighting is also interesting because it makes it easy to move between instances of a keyword within a source code file with greater ease. There is also built-in support now for the C++ 11 specification version of the Standard Template Library (STL). If you want, you can even build Metro-style applications using C++. The IDE also makes it a whole lot easier to work with code snippets. These new additions do make the IDE faster and more efficient, but also add complexity. Readers of C++ All-In-One Desk Reference For Dummies will be happy to know that I’ll continue using the GNU C++ compiler for the reasons stated in my Choosing the GNU C++ Compiler post.

Because I know I’ll eventually need to provide some level of Metro application support, I have been playing around with the Metro functionality. As part of my reading, I checked out the information on the Metro-Style Design Applications site. From a developer perspective, there are some pros and cons about these new requirements. For example, some developers see them as actually limiting application functionality and making applications less useful. I’m sure that what will happen is that developers will find new ways of adding functionality to applications that fit within the Microsoft guidelines and still offer a great application experience. Undoubtedly, Microsoft will also be tweaking those Metro design documents.

Have you done anything with Visual Studio 11? If so, let me know about the features you like best and which features you wish Microsoft would change. One of the most important questions for me is whether you see yourself using Visual Studio 11 for serious application development anytime soon. Knowing these answers will help me create better blog posts for you in the future. Contact me at John@JohnMuellerBooks.com.

 

Considering the Performance Triangle

It has been at least ten years ago now that I was reading an article and considering its ramifications in light of my current book. The name of the article has fallen by the wayside over the years, but the book was entitled, “.NET Development Security Solutions.” I was considering two important questions in the creation of my book:

 

  • Is it possible to create a truly secure application?
  • What is the actual cost of a secure application?


They’re essential questions and the answers to them continue to have an effect on my book writing efforts. The answer to the first question is yes—it’s possible to write a truly secure application. However, in order to obtain such an application, it can’t have any connectivity to anything. The second that an application has any connectivity, whatsoever, with anything else, it becomes contaminated by that connection. Don’t just think about users entering incorrect data here. The data on a hard drive can be corrupted, as can the memory used to hold the application. For that matter, someone could probably make the argument that it’s possible to create serious problems in the processor. My readers are a truly ingenious lot, so I’m sure if I gave you enough time, you could come up with an application that has no connectivity whatsoever with anything, but the usefulness of such an application is debatable. What good is an application with no inputs or outputs? I came to the conclusion, after quite a few hours of thought, that the most secure application in the world does nothing at all, interacts with nothing at all, and is pretty much worthless.

As I considered this security dilemma, it occurred to me that a truly secure application has no speed and is completely unreliable, given that it doesn’t do anything at all. As I worked through this book, I eventually came up with a performance triangle, where these sides are based on:

 

  • Security: The ability of the application to prevent damage to the application data, application code, the host system, and any connected systems.
  • Reliability: The accessibility of the application by the user. A reliable application is available for use at all times and makes every possible feature available to the user in a manner that precludes damage to the data or the system.
  • Speed: The pace at which an application can accept input, perform tasks, and provide output.


In order to increase speed, you must remove code that provides security and reliability. (I’m assuming here that the code is already as efficient as you can make it.) Likewise, when adding security features, you decrease
application availability in some situations and also add code that affects application speed. Making code reliable (which infers accessibility) reduces security and speed. The performance triangle has worked out for me for many years now as the basis for thinking about how application code actually works and the tradeoffs I must consider while writing it.

The use of the performance triangle isn’t based on language or platform. Whether you work on a Macintosh, Linux system, or Windows, you need to consider the effects of the performance triangle on your application irregardless of the host system. Likewise, language choice doesn’t affect the performance triangle, except that some languages provide more features that enhance a particular triangle element more than others. For example, C++ provides a significant speed advantage over many applications, but at a known cost to both security and reliability because the programmer is made responsible to adding the required safeguards. C# provides more safeguards, which enhances reliability, but at the cost of speed.

A problem in the current application design environment is that developers often focus on one element of the triangle (normally speed or security) at the cost of the other two. In order to build an application that performs well in a specific situation, the developer must consider the ramifications of all three triangle elements—an incredibly difficult task in some situations.

Even the questions that developers ask about the three elements of the performance triangle are often flawed. For example, many developers equate reliability with up time, but up time is only part of the reliability picture. An application that produces inconsistent results, denies required access to the user, or damages data in some way is unreliable. Robust applications explore all of the elements fully.

In the end, developers are usually faced with an imperfect scenario. Conflicting requirements and real world necessities often serve to weaken a good application design so that the developer must carefully craft the application to meet the maximum number of these requirements with the fewest possible faults. The situation comes down to one of weighing risk. A developer needs to ask which issue is most likely to cause the most harm and then write code that addresses that issue.

What sorts of design issues are you facing when developing applications? Do you use something like the performance triangle to help you consider the risks incurred when choosing one course over another in application development? Let me know your thoughts at John@JohnMuellerBooks.com.

 

Web Service Examples in Books

A number of my books include Web service examples. It’s hard to write a book about any sort of development today and not include one or two Web service examples in it. In fact, some of my books, such as Start Here! Learn Microsoft Visual C# 2010 Programming contain a number of these examples. The reason is simple. Online services provide access to a wealth of information and can also reduce the programming burden on developers. Learning to use Web services provides a significant competitive advantage, so I need to discuss them in my books.

Creating a useful and interesting Web service example in a book is a lot harder than you might think. It’s not as if my book is for a particular kind of reader or someone who is looking for a specific type of information. In addition, I need to consider the overall learning experience that the reader will receive from the example. With these criteria in mind, I ask myself the following questions when choosing a Web service for a book.

 

  • Is the service free?
  • Is it general enough to be appealing to my reader?
  • Will the service be around tomorrow so that the reader doesn’t find a blank site?
  • Does the service include a well-designed API that will make it easy for my reader to learn?
  • Will the service be easy enough to use that the examples won’t become too complex?


There are often other questions I must ask, but you get the general idea from these questions. It isn’t simply a matter of choosing something, anything, online. Even though I’m particular about which Web service I choose, readers often encounter problems. Just this past week at least one reader complained about the REST example in Chapter 6 of Start Here! Learn Microsoft Visual C# 2010. It was a frustrating problem to troubleshoot because the example continued to work just fine for me. However, here are some things to consider when working through the Web service examples in one of my books:

 

  • Use the book’s source code, rather than type the source in yourself.
  • Look on my blog for updates for your book that show how to use any Web service updates.
  • Check your Internet connection to ensure it’s active.
  • Verify that the Web service is actually functional (and try back a few times, just in case).
  • Contact the Web service owner with questions you have about it.
  • Contact me at John@JohnMuellerBooks.com about example code that you simply can’t get to work.


I want you to have a great experience using my books. When I do encounter a Web service that has changed or is no longer in service (it does happen), I’ll try to update my example code so you can continue using the book, as long as the book is still supported (please check the unsupported book list on my Web site).

 

Sending Comments on My Books

I regularly receive a stack of e-mail about my books. Readers question everything and it makes me happy to see that they’re reviewing my books so closely. It means that I’m accomplishing my principle goal, helping you understand computers in every possible way so that you can be more productive and accomplish tasks with less effort. When I make something easier for someone and they tell me about it, the grin extends from one side of my face to another. It really makes my day.

Some readers are still asking me if it’s OK to send me comments. I definitely want to see any constructive comment that you have. Anything that helps me understand your needs better or corrects errors in my writing makes it possible for me to write better books. As I mentioned in my Contact Me, Please!, I really do want to hear from you. The main element that I need to obtain a usable comment is that it’s constructive. A comment that says, “This book really stinks!” doesn’t tell me anything. Here are some of the things you can do to create a constructive comment:

 

  • What book are you reading?
  • Which page contains the error?
  • What do you view as an error on that page?
  • How would you fix the error?
  • What sort of system are you running?
  • Are you using the correct version of the software (the same version that appears in the book)?
  • When did you encounter the problem?


The more information you provide, the easier it is for me to understand the issue and provide you with feedback. In many cases, I’ll upload the fix to my blog so that everyone can benefit from the response (so be sure you keep an eye on my blog for new entries). I work hard to ensure that my books are as error free as possible, but everyone makes mistakes. Also remember that sometimes mitigating factors, such as differences in software versions or anticipated hardware, make it appear that there is an error in the book when you’re really looking at a different in environment. Help me provide you with better books—send me comments!

There are a few things that I won’t do for you. I won’t help you pass an exam at school. Your learning experience is important to me, which means that I want you to continue your education by working through the instruction on your own. I also don’t provide free consulting. This means I won’t check the code that you created on your own for errors. I’ll help you with any book-specific question, but I draw the line at that point. Let me know if you have any input or insights on my books at John@JohnMuellerBooks.com.

 

Understanding the LINQ Question

A few readers have written to ask me about the question I keep discussing when talking about LINQ. I use the idea of a question in both LINQ for Dummies and Start Here! Learn Microsoft Visual C# 2010 Programming to describe the concept behind LINQ. In fact, if you have problems understanding this concept, you’re not alone. Many people have trouble understanding just how it is that declarative languages such as LINQ and SQL perform their job. The idea that you can describe what you want and let the computer decide how to do it is foreign to many people because most people rely on procedures to understand many issues. LINQ and SQL don’t offer procedures. At the root of the problem is the word “how.” We want to know how things work and how to do things.

Imagine for a moment that someone tells you to go to 123 Anywhere Street and pick up a widget for them from the grocery store. They don’t tell you how to get to 123 Anywhere Street or anything else about the request—they simply assume that you’ll figure it out on your own. Most people would eventually get a map, work out a route, and get to 123 Anywhere Street. Once there, they’d go to the grocery store and ask for a widget from the owner. This sequence of events is akin to what is happening with both LINQ and SQL. You tell the computer to get the widget from the grocery store at 123 Anywhere Street. The “how” is unimportant and you truly don’t care how the computer accomplishes the task.

So, where does the question part of this discussion come into play? Developers want data to manipulate within their applications, not widgets. When a developer requests data from the computer using a language such a LINQ, the developer does so in the form of a question or a query. In fact, declarative languages often use the word query as part of their nomenclature: Language INtegrated Query (LINQ) and Structured Query Language (SQL). These languages specialize in asking questions and telling the computer to use any means necessary to answer them. The developer doesn’t care how the language does its work—all the developer cares about is the data.

Declarative languages free the developer from having to think about how to perform tasks. A developer can spend more time thinking about data manipulations and less time thinking about the mechanics of language. This means that the developer can become a lot more productive and write applications significantly faster. The use of declarative languages also makes application development easier. A less skilled developer can write a more complex application.

Don’t get the idea that LINQ is a wimpy language that limits what you can do in the interest of simplicity. In fact, LINQ users can create extremely complex scenarios that would require considerable time to figure out without LINQ. For example, I wrote an article about using LINQ Extensions some type past. You’ll want to review this article if you need to see one of the more technical ways to use LINQ (and even this article doesn’t discuss the topic in depth). While you’re at it, check my other articles on using LINQ Expression Trees and using LINQ with Resource Description Framework (RDF) files.

The bottom line is that LINQ is about queries, or questions. You ask the computer to supply data based on some criteria. The computer decides how best to obtain the data for you, so you can concentrate on issues that the computer can’t decide, such as data manipulation and presentation. If you have additional questions about why someone would use LINQ or why I explain LINQ as answering questions, please let me know at John@JohnMuellerBooks.com.