Programming

C++09 – The New C++ Standard

Contrary to popular opinion, C++ is still the most powerful general purpose programming language. It runs circles around other languages and today’s compilers have RAD capabilities that only belonged before to languages like Visual Basic and Delphi. Many people consider C++ to be a mid level language because it has both high and low level language features. This gives C++ a tremendous advantage over other languages which is why its used primarily by game developers and software developers who demand high performance computing.

C++ was developed in 1979 by Bjarne Stroustrup, and its still a work in progress. It was standardized in 1998 (ISO/IEC 14882), updated in 2003, and a new standard will soon be published. The name was originally planned to be C++0x, but it will be called C++09 if the C++ Standards Committee introduces it in 2009.

Recently, Stroustrup gave a presentation on C++0x at the University of Waterloo. You can view the presentation at C++0x – An Overview or download the presentation as an XViD, Ogg/Theora, MP4, or MPG.

Do You Really Want to Compile Source Code?

Are they serious at the Wired How To Wiki? They recently published the article, Compile Software From Source Code. This article is about the increasing number of open source applications that are becoming available. The idea here is that at times you’ll have to compile the code to have a working application. This is something the average user will be doing apparently.

Now I have a hard time believing that a hairdresser will download an open source program, download and install a compiler, and then compile the application. No problem. Of course, the source code will compile perfectly and will work flawlessly. Anyone who has tried to compile someone else’s program only knows what a fallacy this is.

A software developer who expects their users to compile their programs should take a reality check. Software should be easy to use and easy to set up. There should be one program, the setup application that you run to install the program. There should also be a program to completely uninstall the application if the user doesn’t want to keep it.

The article also claims that “the process is fairly simple” for compiling source code. It then goes on to recommend using a good command line compiler to do this. A command line compiler is easy to use? Has the author ever used one?

The article lists which compilers to use for Linux, Macintosh, and Windows. The amazing thing is that it claims that Cygwin is “more useful and user-friendly” than the Visual Studio Express compilers. I have a hard time believing a command line compiler is easier to use than a GUI compiler that has an integrated editor, debugger, and the .NET Framework.

If you create software and you want to get customers and retain them, the software needs to be easy to use and install. Well written documentation is also a must. You don’t want your customers phoning you and asking for help installing a compiler just to compile your program.

Is a Mac Better for Computer Science?

Back in the 1980′s, there was a battle between IBM and Apple over who will dominate the fledgling computer industry. It was the IBM PC series versus the Apple II and Macintosh. Apple’s line of thinking was to get their computers into schools. They believed that if kids learned how to use an Apple at an early age, they will continue using them into adulthood.

IBM took a different approach. They targeted their product line at the business community. Their machines didn’t have very impressive graphics and sound, but they had the applications that were essential for business.

The result of these two very different marketing strategies brought a clear victory for IBM. The children who grew up on Apple computers found IBM machines used in their jobs. This led to them buying their own PC’s so they can bring work home.

Apple is still targeting students. They recently published Why Mac for Computer Science. In this article, they give 10 reasons why a Mac is better choice for computer science students and for general use. The reasons they give are terse and rather weak.

The first point Apple makes is that you can program in virtually any language on a Mac. That’s true, but its also true on Windows and Linux machines. They go on by stating that you can use many languages for Windows computers, but this requires the purchases of Windows (not the home edition) and Parallels. This will cost around $400 for these two applications.

Another reason given to buy a Mac is that learning on a Mac prepares students for the “real world”. Apple claims that most of the leading software development is being done on a Mac. I have a hard time believing that a computer that has a 2-3% market share dominates software development.

They stress that skills are learned that can be used on any operating system. C++ on a Mac is also C++ in Windows. The difference is that businesses don’t hire just C++ programmers, they look for C++/CLI or MFC programmers. Visual C++ programmers are very valued in the computer industry, as well as C# and Visual Basic programmers. I don’t see that many job opening for Macintosh developers.

A Mac is a good computer system. Apple wants to sell more of them so they publish articles like this to convince people. I think that every computer science student needs to learn a Microsoft programming language (C++/CLI, C++/MFC, C#, or Visual Basic) for the skills that are in demand today. You can do this on a Mac, but it will cost less to do it on a Windows computer.

Focusing Your Coding Skills

Having the desire and ability to write software is a great gift. Not everyone can do this since it requires a certain type of person willing to spend long hours planning and debugging code. I won’t say its the greatest gift in the world because we all have skills that can be shared for the benefit of others.

The problem that software developers face is that many projects are never completed. While there are several factors that can cause this, one of them is a lack of focus. When you know how to program computers, there tends to be a desire when using bad software to want to write a better one instead.

For instance, the free Windows application, Notepad, may not meet all of your needs. You want to use it for editing PHP source code, view line numbers, edit HTML, preview web pages, and many other features that Notepad is missing. So, you decide to write your own editor that can do all of this.

Later, you realize that the Windows Movie Maker isn’t that great for video editing either. You decide to write own video editing software which has the long list of desired features that you just wrote down.

Next, the Calculator application in Windows is too basic for the advanced and very technical calculations you want to do. Its time to start Visual Studio and start coding a high end calculator application.

All of these applications are completely unrelated and could easily take an entire year to create and debug. Chances are that you won’t finish any of them because you’ll eventually think of another program that could use rewriting.

The key to success in any area is focus. If your working alone, or in a small team, you need to decide what kind of software you want to create and work solely on that. Concentrating all of your energy in one program will produce a high quality application which will probably be better than similar software on the market. If you try to write many unrelated programs, none of them will be very good and none will attain a large market share.

This applies to commercial and open source software. Writing a good program takes a long time. Its been said that programming is 1/4 of the work in a software business, the other 3/4 is marketing. You need to be focused on one application so you can better market it.

Once you’ve completed your award winning application and made significant profits, you’ll be able to hire programmers to work on this and any other ideas you may have.

Make Your Own Text Link Ads

I recently read a post on John Chow dot Com on a plugin for WordPress to sell your own text link ads without using the Text Link Ads service. I eventually want to use Text Link Ads, but I need to get more reciprocal links on other blogs before I’m accepted into their program. I have many more links on other web sites, but they only count links on blogs. I would imagine they check your link popularity on Technorati.

I’m determined to sell text link ads on my web sites, so until I qualify for the Text Link Ads service, I’ll make my own ads.

You can build text ads using the WP Text Ads plugin by Alex Choo. It comes in two versions. The free one supports a limited number of ads that can be placed on your site, and the $127 one gives you unlimited ads.

I really don’t want buy WP Text Ads to create these types of ads because I can create my own by modifying the PHP code in WordPress. The example I’ll use is for WordPress but you can use the same source code in any PHP blog or web site.

I added the ads in the sidebar of my blog. You can view the sidebar source code by logging into your blog as the administrator. Go to the Presentation tab and then go to Theme Editor. On the right side, you will see the pages that your theme is using. Select Sidebar and the source code will be displayed for editing.

Now you need to decide where you want to place your text ads. Your ads will be placed after the following PHP code:

<div id=”sidebar”>
<div align=”center”>

If you don’t know PHP, you can still find a position in the sidebar for your ads by entering the following bit of code.

<h1>test</h1>

The text, test, will appear in a large font in the sidebar. Test it in various places until you find the location where you want to place your ads.

After you’ve picked a spot, enter the following code:

<h2><?php _e(‘Featured Sites’); ?></h2>
<ul>
<li><a href=”
http://www.cyprich.com/featuredsites/seobook/”>SEO Book</a></li>
<li><a href=”
http://www.cyprich.com/featuredsites/1and1/”>Cheap Web Hosting</a></li>
<li><a href=”
http://www.cyprich.com/featuredsites/babytv/”>Baby TV</a></li>

<br/>
<a href=”
http://www.cyprich.com/advertise/”>Advertise Here</a>
</ul>

The text link ads will look like:

You can edit Feature Sites to any text you want, along with the Advertise Here text. The first two links, SEO Book and Cheap Web Hosting, are affiliate programs that I have joined. These affiliates gave me a URL which links to my account on their web site. I wanted to hide the URL, so I created a subfolder in my web site called featuredsites and each text ad has its own subfolder with a page linking to my account on the affiliate site. You can learn how to do this by reading Hiding Affiliate Links on my blog. If you don’t want to hide your links, you can use the URL given to you by your affiliate.

You add your links between the <ul></ul> tags with <li></li>. The href points to the URL for your affiliate, and the text before the </a> is what appears as the text link ad on your site.

As a side note, Baby TV isn’t an affiliate but after seeing it on John Chow dot Com, I thought it might be a good idea to share with other parents of babies.

Make sure that you create a Advertise page for the Advertise Here link. The Advertise Here link goes to a page on my blog which is a sales pitch page that gives excellent reasons why people should purchase advertising from me. :)

The procedure here for making your text link ads may seem complicated for the non-programmer, but it really isn’t. I recommend you first back up your blog by downloading it by FTP to your hard drive before making these changes, or test it on another theme that you’ve installed.