April 27, 2004 CodeGuru Newsletter

==========================================================

CodeGuru Newsletter
April 27, 2004
http://www.CodeGuru.com

This newsletter is part of the Developer.com, EarthWeb, and internet.com networks.
Jupitermedia Corporation

___________________________ Sponsors ________________________________
Microsoft
Merant www.merant.com
____________________________________________________________________

==========================================================
All newsletters are sent from the domain "internet.com."
If configuring e-mail or Spam filter rules, please use this
domain name (not the entire "from" address, which varies).
==========================================================

/-------------------------------------------------------------------\
Microsoft(R) Developer Network (MSDN) Webcasts offer essential
knowledge and expertise, at no cost. From live code demos
to in-depth Q & A with industry leaders, tap in to practical tips
that can help you do your job and advance your career. Access
hundreds of webcasts on relevant topics that can prepare you
to design and build effective solutions with Microsoft tools and
technologies. Live or on-demand events. 24/7. Register to attend a
free MSDN Webcast today!

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,2j2u,40ym,jorm,i5r0
\--------------------------------------------------------------adv.-/

TOPICS:

--> Editorial -
... The Personal Computer of 2006
... Last Week's Quiz Question

--> New Articles on CodeGuru:
==> Algorithms
- Five Cents on Arithmetic Encoding
==> Book Review
- Building Solution with Microsoft Commerce Server 2002
==> Book Review
- Database Access with Visual Basic .Net
==> C#
- How to Use Attributes in C#
==> Database (.NET)
- A Practical Guide to a Post-Relational Database for .NET: Matisse - Part 2
==> Forums
- Hottest Forum Q&A on CodeGuru for the Week of April 18th, 2004
==> Mobile Development
- Flexible Access, Powerful Subtleties
==> .NET General
- Differential Development, Part 1
- Forcing Garbage Collection in .NET
==> OpenGL
- [Updated] OpenGL Output Class
==> Speech
- The Longhorn Speech API, an Initial Glance
==> Status Bar
- [Updated] Showing Tooltips/Icons for Status Bar Panes
==> Visual Basic
- Creating Translucent/Transparent Windows in VB (1)
==> Visual Basic
- Creating Partially Translucent/Transparent Windows in VB (2)
==> Web Services
- Advanced Asynchronous Web Services

--> Discussion Groups

--> Highlighted new articles on Developer.com

    1. Fun with Java: Biomorphs and Artificial Life
    2. Implementing Patterns within PHP
    3. What's New in XPath 2.0?
    4. Alternative Problem Solving

/-------------------------------------------------------------------\
Download a free trial of Merant Professional 8, the most
significantly enhanced release ever of the world's most popular
version control, issue tracking and build software. See for yourself
how Merant Professional supports
* Dynamic, fast-paced software development projects
* Rapid start-up of a team-centric SCM solution
* Distributed teams via the web

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,2ov,4yvs,jorm,i5r0

\--------------------------------------------------------------adv.-/

==========================================================
Comments from the Editor
==========================================================

... The Personal Computer of 2006

2006 is only a year and a half away. At VSLive! last month, Bill Gates mentioned the personal computer of 2006. Do you know what the projected specification is for a PC in 2006? The CPU isn't surprising with a speed expected to be in the 4-6 GHz range (with two cores). Some of the other specs, however, may surprise you. Expected memory is 2 GB or more. Hard drives should be breaking the 1 Terabyte mark. Most importantly, graphics processors on PCs should be three times the speed and power they are today. Finally, and  least surprising, network access should be 1 GB or 54 Mb wirelessly.

That is a lot of power. With Microsoft listing this as the expected PC for 2006, it makes me wonder if this is also going to be close to the specification for running Windows Longhorn.....

... Last Week's Quiz Question!

As stated, last week's question should have been easy for everyone. If you didn't find it easy, then you will want to check out the answer. The following is a modified version of the listing I provided last week:

#include "stdafx.h"
// This listing has the same issue as the original....
#include "stdafx.h"

bool Even( int );

int main()
{
   if( !(Even(21)) ) {
      bool Even = false;
   }
   
   if (Even) {
      std::cout << "Number is even!\n";
   }
   return 0;
}

bool Even( int nbr )
{
   bool answer;
   if ((nbr % 2) == 0)
      answer = true;
   else 
      answer = false;
   return answer;
}

This may make it more obvious as to why the listing has an issue. Regardless of whether the number passed to Even() is even or flase, the main method always prints that the number is even. Even the odd value of 21 is stated to be even. The issue in this listing is one of scope. The Boolean variable, Even is set within the if statement within main(). Its scope is only within the block of the if statement.

When if(Even) is checked, then it is not the Boolean variable being checked. Rather, the only Even found in scope at that time is the Even() method. Because this method exists, a positive value is returned for Even in the if(Even) statement. This this if statement always evaluates to true.

For more discussion on this simple question, check out the thread in the discussion forums:

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,91a,logz,jorm,i5r0

Next week I'll present and equally easy quiz question for you.

Until next week!

Brad!

---------------------------
Brad Jones
www.CodeGuru.com
webmaster@codeguru.com
---------------------------

 

... Recently Published Books

For those of you keeping up by reading books. The following are just a few of the new books that have been recently released. If you've read any of these, feel free to write a review to be posted on CodeGuru. See http://www.codeguru.com/review-guidelines.php for submission guidelines.

--> Beginning ASP.NET in VB .NET

From Novice to Professional
By Matthew MacDonald for Apress
1000 pages for $49.99
http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,dust,4z49,jorm,i5r0
This book is considered a starting point for those serious about learning Visual Basic .NET

--> UML Applied
A .NET Perspective
By Martin L. Shoemaker for Apress
550 pages for $49.99
http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,cdmb,4hy8,jorm,i5r0

==========================================================
New & Updated Articles on CodeGuru
==========================================================

Following are short descriptions of new articles on CodeGuru. If you are interested in submitting your own article for inclusion on the site, then you will find guidelines located at http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,fka1,909i,jorm,i5r0

This week's posted CodeGuru articles:

==> Algorithms

- Five Cents on Arithmetic Encoding
By Aliaksei Sanko
Classical arithmetic compression implementation (CACM) optimization.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,9ibs,gx3d,jorm,i5r0

==> Book Review

- Building Solution with Microsoft Commerce Server 2002
By Clayton C. Peddy, Derek Armentrout
Reviewed by Prashant Agrawal

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,fi4w,i9fq,jorm,i5r0

- Database Access with Visual Basic .Net
By Jeffrey P. McManus, Jackie Goldstein
Reviewed by Sue Vegors

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,fq7j,8ctn,jorm,i5r0

==> C#

- How to Use Attributes in C#
By Ali Sufyan
Learn about the usage of attributes in C# and calling it from assemblies. It covers the whole scenario of all types of custom attributes.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,6b97,m1bo,jorm,i5r0

==> Database (.NET)

- A Practical Guide to a Post-Relational Database for .NET: Matisse - Part 2
By johnssk
This is the second article in a series of articles that provides a step-by-step guide to a post-relational database for .NET. The second one covers schema definition with the database and demonstrates how it can be simplified.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,g3tc,9l0k,jorm,i5r0

==> Forums

- Hottest Forum Q&A on CodeGuru for the Week of April 18th, 2004
By Sonu Kapoor
Topics this week include learning the difference between ASSERT and VERIFY, implementing a popup menu that opens on a mousemove when the cursor is on a specific region of a client window, using WaitForSingleObject on windows rather than processes, and why this constructor-usage does not compile.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,3zho,7p5h,jorm,i5r0

==> Mobile Development

- Flexible Access, Powerful Subtleties
By Nancy Nicolaisen
When it comes to data management in Windows CE and PocketPC applications, real power has more to do with precision of access than just about anything else.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,i6bc,ieog,jorm,i5r0

==> .NET General

- Differential Development, Part 1
By Eric Litovsky
Make changes to any part of your application design at any point of your development lifecycle without breaking the build or re-writing the application.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,377g,ecw5,jorm,i5r0

==> .NET General

- Forcing Garbage Collection in .NET
By Tom Archer - Archer Consulting Group
Discover the methods for forcing the Garbage Collector (GC) to go into action!

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,k9fd,mcd1,jorm,i5r0

==> OpenGL

- [Updated] OpenGL Output Class
By Aviram Cohen
This class makes it easy to print output in OpenGL. Made for WindowsAPI.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,91g9,7djg,jorm,i5r0

==> Speech

- The Longhorn Speech API, an Initial Glance
By Jason Nadal
The Longhorn speech API offers baked-in functionality for voice commands inside the operating system.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,er4y,js72,jorm,i5r0

==> Status Bar

- [Updated] Showing Tooltips/Icons for Status Bar Panes
By kirants
Class to show tooltips and icons for individual panes and to allow changing of text and background color of individual panes. (The article, demo project, and source code were updated.)

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,2f5k,lakj,jorm,i5r0

==> Visual Basic

- Creating Translucent/Transparent Windows in VB (1)
By awni
Make your VB Forms transparent or translucent with just three API calls.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,9ovw,m7vx,jorm,i5r0

==> Visual Basic

- Creating Partially Translucent/Transparent Windows in VB (2)
By awni
Shows how to make 'holes' in a window by using a color key and three API functions.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,7ret,l7bm,jorm,i5r0

 ==> Web Services

- Advanced Asynchronous Web Services
By Shail Srivastav
Learn how to use asynchronous Web services in your application and how you can use the callback method to make your application.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,blz3,k18b,jorm,i5r0

==========================================================
New Articles on Developer.com
==========================================================

Below are some of the new articles that have been posted to Developer.com (http://www.developer.com ).

1. Fun with Java: Biomorphs and Artificial Life
By Richard G. Baldwin -
Baldwin shows you how to write an artificial life program  that models selective breeding, sometimes referred to as artificial  selection.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,cdx0,5xn9,jorm,i5r0

2. Implementing Patterns within PHP
By W. Jason Gilmore -
Jason Gilmore provides a general introduction to design patterns, then introduces two patterns, the Singleton and the Factory, and offers a PHP-based implementation in the form of an applicable example.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,3qei,5b12,jorm,i5r0

3. What's New in XPath 2.0?
By Steven Holzner -
Get a head start on XPath 2.0 by reviewing the new features.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,46oc,ac19,jorm,i5r0

4. Alternative Problem Solving
By Robert Bogue -
Often times finding answers requires attempts at multiple solutions and combinations of solutions until an acceptable answer is found.

http://nl.internet.com/ct.html?rtr=on&s=1,v35,1,a39s,5bil,jorm,i5r0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Advertising: If you are interested in advertising in our newsletters, call
Claudia at 1-203-662-2863 or send email to mailto:nsladsales@internet.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For information about advertising opportunities, visit our media kit
http://www.internet.com/mediakit/salescontacts.html

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For details on becoming a Commerce Partner, contact David Arganbright
on 1-203-662-2858 or mailto:commerce-licensing@internet.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To learn about other free newsletters offered by internet.com or
to change your subscription visit http://e-newsletters.internet.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internet.com's network of more than 160 Web sites is organized into 16 channels:
Developer http://www.internet.com/sections/webdev.html
DevX http://www.internet.com/sections/devx.html
Downloads http://www.internet.com/sections/downloads.html
EarthWeb http://www.internet.com/sections/earthweb.html
Graphics http://www.internet.com/sections/graphics.html
Interactive Marketing http://www.internet.com/sections/marketing.html
International http://www.internet.com/sections/international.html
Internet Lists http://www.internet.com/sections/lists.html
Internet News http://www.internet.com/sections/news.html
Internet Resources http://www.internet.com/sections/resources.html
IT http://www.internet.com/sections/it.html
Linux/Open Source http://www.internet.com/sections/linux.html
Small Business http://www.internet.com/sections/sb.html
Windows Technology http://www.internet.com/sections/win.html
Wireless Internet http://www.internet.com/sections/wireless.html
xSP Resources http://www.internet.com/sections/xsp.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Looking for a job? Filling an opening? - http://jobs.internet.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This newsletter is published by Jupitermedia Corporation
http://internet.com - The Internet & IT Network
Copyright (c) 2004 Jupitermedia Corporation. All rights reserved.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For information on reprinting or linking to internet.com content:
http://internet.com/corporate/permissions.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



About the Author

Bradley L. Jones

bjones@jupitermedia.com

Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • Relying on outside companies to manage your network and server environments for your business and applications to meet the needs and demands of your users can be stressful. This is especially true as many Managed Hosting organizations fail to meet their service level agreements. Read this Forrester total economic impact report and learn what makes INetU different and how they exceed their customers' managed hosting expectations.

Most Popular Programming Stories

More for Developers

RSS Feeds