On ZDNet: Palm Pre: The good and the bad
13 Resources for

john torjo

  • Subscribe to this listing via:
  • RSS
  • Email

TechRepublic Resources

C++ Tip: Simplify your coding with user-friendly enumerations
Enumerations are a great idiom. They allow you to define atype that is composed of a predefined set of values. The code becomes easier towrite, and test, is more readable, and is easier to maintain--benefits you'relikely to love. For example, check out the listing below; by reading the code,you'll instantly...
Tags: Â Â Â Mon, C++, Code-completion, John Torjo, programmer
Technical articles 2004-12-01
C++: Implementing Design by Contract to reduce bugs
Designby Contract is a software paradigm that, when used, ensures that your codewill have fewer bugs. It does so by enforcing "contracts." A contractis made by a function based on what it expects when you enter it preconditionsand what it yields when it exits postconditions. For example, an int factorial(int...
Tags: C/C++, C++, John Torjo, DbyC, postcondition, precondition, Design by Contract
Technical articles 2004-07-29
Application Development: Persisting settings in C++
Users expect a lot of an application these days. The customer wants the application main window to be shown where he left it last time. He wants everything restored just the way it was when he last closed the application: the last documents opened, the last database reopened, the last...
Tags: John Torjo, application development, C++
Technical articles 2004-02-26
From compile-time constants to runtime constants and back
"Use constants in code!" Everybody tells you this, and they're right. The trouble starts when you realize that some constants are lost at compile time—they must be read at runtime after the program starts, from a file, registry, database, etc.Problems can also strike while you're testing and debugging your application,...
Tags: John Torjo, compile-time, runtime
Technical articles 2003-10-29
C++: In search of the perfect convert-to-string function
Software developers and programmers often want to convert objects to strings. For example, imagine printing a message box with the number of words in a document. There are several ways to do this, as Listing A shows: Use sprintf, use ecvt, or use the nonportable _itoa function (found in Win32).All...
Tags: C/C++, Programming languages, sprintf, C++, John Torjo
Technical articles 2003-10-07
Reduce complexity and boost readability using STL functors and predicates
The Standard Template Library STL contains many things that most C++ programmers can't live without. It also shows the power of C++ in its ability to program conceptually. STL concepts include containers, ranges, algorithms, and functors. In this article, I'll focus on the functor, which is a class that can...
Tags: John Torjo, Standard Template Library, functor, algorithm
Technical articles 2003-09-18
Use STL streams for easy C++ thread-safe logging
Streams offer a powerful abstraction for dealing with data, as they allow you to call generic read/write functions without caring where the data comes from or goes. With streams, you can use the same code for reading from console, file, sockets, etc.C++ combines this power with operator overloading and provides...
Tags: John Torjo, Standard Template Library, Standard Template Library stream, C++
Technical articles 2003-09-23
Get a handle on C++ templates with this book
As generic programming gains popularity and practitioners, the issue of templates comes up more and more these days. But templates are still tough to grasp and difficult to master. C++ Templates: The Complete Guide, by David Vandevoorde and Nicolai M. Josuttis, transforms generic programming with C++ from a nightmare into...
Tags: C/C++, Programming languages, John Torjo, C++ Templates, C++
Technical articles 2003-06-05
C++: Removing duplicates from a range
This article was originally published on Builder.com.The Standard Template Library STL shows us how to deal with the complexity of algorithms over structures: Separate them. That’s why we have containers (std::vector, std::deque, std::list, etc.) and algorithms. To be as generic as possible, algorithms operate on ranges—sequences of elements. That is,...
Tags: algorithm, C++, John Torjo, pointer, stable_unique, Standard Template Library
Technical articles 2003-02-28
C++: Removing duplicates from a range
The Standard Template Library STL shows us how to deal with the complexity of algorithms over structures: Separate them. That’s why we have containers (std::vector, std::deque, std::list, etc.) and algorithms. To be as generic as possible, algorithms operate on ranges—sequences of elements. That is, you can apply an algorithm to...
Tags: Engineering, John Torjo, C++, algorithm, pointer, Standard Template Library, stable_unique
Technical articles 2003-01-28
Automatically validate your data in C++
When you have to validate your input while coding, you usually do it in a set function, as shown in Listing A. However, this can become complicated to maintain, and it’s hard to have an overview of what’s validated and how. Now check out Listing B. When developing a class,...
Tags: C++, John Torjo, member variable, validator, set function
Technical articles 2003-01-10
Format C++ objects as you write them
The Standard Template Library allows you to write objects to streams. But what about custom formatting? Builder.com's C++ guru, John Torjo, walks you through sample code to demonstrate a solution.The C++ Standard Template Library STL provides an elegant way to write objects to streams: You have a class, and to...
Tags: C/C++, John Torjo, Standard Template Library, formatter, C++
Technical articles 2002-11-11
Easily write and format collections and collection ranges in C++
Writing and formatting collections can pose quite a challenge for the C++ developer. We'll walk you through the code and explain how you can make the task more manageable.In my previous article, I showed you how to easily format ranges and containers as you write them to Standard Template Library...
Tags: Word processors, Microsoft Office, John Torjo, C++, formatter, Microsoft Word, custom writer, custom transformation
Technical articles 2002-09-23

Additional Resources

Easily write and format ranges and containers in C++
The C++ Standard Template Library STL offers a handy way to write values to streams, but it doesn't work with arrays. Here's a simple approach that lets you write containers and ranges to streams using familiar syntax.By John TorjoThe Standard Template Library STL provides an elegant way to write values...
Tags: C++, Guest Contributor, Standard Template Library
Technical articles 2002-07-25
Implement these quick tips to make better use of the STL in C++
The Standard Template Library STL enables you to make your C++ code more reusable and efficient. This pair of tips will help you tweak the STL to avoid some common errors.By John TorjoThe Standard Template Library STL provides algorithms and containers that use templates to implement a reusable and extensible...
Tags: Programming languages, Guest Contributor, Standard Template Library, T ReturnValue, C++
Technical articles 2002-08-28
Builder Tools: C++ Persistence Library
The source code from John Torjo's article on persisting settings in C++.
Tags: C++, Tool, C/C++, Programming Languages, Software Development, Software/Web Development
Software downloads 2004-02-11
  • << Previous
  • page 1 of 1
  • Next >>


IT Help Desk Survival Guide, Third Edition
TechRepublic's IT Help Desk Survival Guide, Third Edition provides tools and recommendations to help you better manage help desk services, improve end-user support, troubleshoot frustrating hardware issues, identify quick fixes to vexing Windows problems, and help users make the most of Microsoft Office 2003.
Buy Now
500 Things Every Technology Professional Needs to Know
Did you know Microsoft's RegClean does not work with XP but you can use shareware to clean your registry? Did you know most wireless access points don't have encryption enabled by default? Did you know there are 500 tidbits of information contained in TechRepublic's 500 Things Every Technology Professional Needs to Know that will help you become a successful IT professional.
Buy Now

Product Spotlight