C / C++ / C#

  1. Home
  2. Computing & Technology
  3. C / C++ / C#
photo of David Bolton

David's C / C++ / C# Blog

By David Bolton, About.com Guide to C / C++ / C#

What Use are Fractals?

Monday July 13, 2009
Fraqtive Screen shotI think they're great to look at, and the fact that they scale almost indefinitely is truly remarkable. But lets be honest, unless you are looking for some new deep mathematical insight then they are just a fascinating diversion.

That said, Fraqtive is one of the fastest not to mention cross platform and open source. Developed by Michał Męciński, it's in the early stages of development but is already producing very colorful images.

You can just download the binaries and view for yourself or download the sources, making sure you have QT 4.3 or higher. You can compile it with gcc (using MinGW ) or Microsoft Visual C++ 2005+. It may not have much uses but the world would be a duller place without fractals and so I've added it to the C++ Games code page.

Dabbling With Mono/DB2

Sunday July 12, 2009
It's not confirmed but I think I've got H1N1 which is a human virus, not a computer one! It's just a nasty flu bug and has left me a bit groggy. So I'm currently probably taking twice as long to do something as normal..

I installed the latest Ubuntu (9.04) and Webmin on my 64 bit AMD box and started to install the free IBM DB2-Express-C database. The advantage of Ubuntu is that Mono comes installed. There's a slight road bump as I wanted to try ASP.NET MVC but the Mono team accidentally left that out of 2.4. They did an intermediate release of 2.4.2.1 last week to include it. So I'll have to install that as well.

Installing DB2 was a little more problematic (or maybe it was the Flu clogging my brain) as Java wasn't installed by default on Ubuntu. I used the Synaptic software manager to install Sun Java 6 but the DB2 Download Director didn't seem to work with that and I ended up downloading the 440MB (AMD 64 Linux version) by http which takes about 5 times as long. Then my Ubuntu was missing a couple of files. It's not hard to get by but you have to know how to issue Bash commands like sudo apt-get install from a terminal. The db2setup needed libstdc++.so.5 and libaio-dev. You need to do sudo apt-get install db2exc to fetch db2 then these commands to get the missing bits.

sudo apt-get install libstdc++5
sudo apt-get install libaio-dev
sudo ./db2setup

I tracked down the dbstart command (it's in /sqllib/adm under your user directory so on my box its /home/david/sqllib/adm) but got this error: SQL1220N - The database manager shared memory set cannot be allocated. so I guess it's time to RTFM the IBM documents and the Redbook I mentioned before. If you know the answer, add a comment. My Linux box has 2GB of ram and 220 GB disk free so I doubt it's that!

Silverlight 3 Released

Saturday July 11, 2009
Earlier than expected (by one day), Silverlight was released a couple of days ago. This is almost as significant a release in itself as Silverlight 2 was over the original Silverlight.That added C# and a CLR running on Mac as well as Windows. This release provides hardware graphic acceleration putting work on the GPU and lessening the load on your CPU. it also now includes support for H264, AAC audio and MP4.

Graphic support includes perspective 3D plus you can now manipulate bitmaps at the pixel level. Add to this 100 UI controls that can all be styled on top of a navigation framework that allows linking to content; useful for search engines. Most relevant is the Visual Studio 2008 Tools for Silverlight (If you have Visual Studio 2008) and the Silverlight Toolkit.

I think Silverlight 3 is now on a par with Flash or possibly even better than it technically and once you get over the learning curve is easier to develop for than Flash. That said, I think Microsoft need to produce a free Microsoft Visual Silverlight Express to encourage take up amongst part-time and recreation developers. There are a lot of C# developers who could produce wonderful stuff if there's an easier path. Maybe the next Visual C# Express will have it when Visual Studio 2010 comes out. If not, I think Microsoft will struggle to beat Flash in the games market.

Microsoft .NET Micro network

Friday July 10, 2009
Thanks to Lennie de Villiers for the tip off. As well as Silverlight 3 which came out today, there's another .NET framework with a very small CLR; that's the .NET Micro Framework. The SDK for it (a whopping 10.8 MB in size!) SDK supports development of code, including device I/O, in the C# language using a subset of the .NET libraries, and is fully integrated with the Microsoft Visual Studio development environment. It's for developing small embedded systems.

This appears to work with Visual C# 2008 Express. I say appears because although I downloaded it, it wouldn't install as I don't have SP 1 for Visual C# 2008 Express. To be honest, my installs are in a state of flux as I have the Silverlight 3 Beta tools, SP 1 For Visual Studio 2008 etc. I need an hour or two to fix everything! I can't even install Silverlight 3 until the beta tools are removed!

I think sometimes it would be nice if all the development tools stayed stable and static for 2-3 years with no new versions of software but that's not the real world with competition and commercial pressure etc. I can dream!

Open Source Bug-Tracking Software

Wednesday July 8, 2009
Tracking bugs is one of those things that computers do very well. If you're developing software commercially, or even open source or for yourself then you should be using one. They do make managing the software, and improving the quality significantly easier, as you can usually prioritize the bugs and see what issues are outstanding.

There's a lot of bug-tracking software about, much of it web based using scripting languages such as php. However there are a couple of ASP.NET implementations that I know of plus the C based Fossil and the C++ Webissues. If you know of any other's (just the C, C++, C# and ASP.NET ones) that aren't listed on the new open source bug-tracking page, do let me know! Emails to cplus.guide@about.com.

Microsoft and Mono Now Playing Nicely

Tuesday July 7, 2009
Not that there's ever been acrimony but Mono of course is from the other side of the tracks and there's always been an assumed threat hanging over its head that it'll get run out of town if it gets too big for its boots. Given Microsoft's past with regard to open source that's understandable. Richard M Stallman said that much last week. But that was old Microsoft which didn't like Linux. Things have changed and this announcement shows they mean it.

It shows it in that the open source community at Microsoft have their own blog. In an entry posted yesterday, it was announced by the Microsoft community manager Peter Galli that Microsoft will be applying the Community Promise to the ECMA 334 (C#) and ECMA 335 (Common Language Infrastructure) specs.

What this means is that Microsoft will not sue you or your customers if you implement C# or the CLI or use Mono. The Community Promise legally binds Microsoft not to assert its patents against people who implement certain Microsoft standards and technologies. Though you should pay attention to the word certain. It doesn't cover certain proprietary Microsoft technologies such as Winforms, ADO.NET and ASP.NET. The founder of Mono, Miguel de Icaza said that Mono will be splitting into two source code downloads. ECMA stuff (C#, CLI) and the rest in the not too distant future.

Selling a Service Not a Product

Monday July 6, 2009
Software Piracy is a problem for software sellers though I doubt that the figures bandied about for revenues lost are that accurate. I've seen people copy software, games over the years and many applications are copied because it's easy. If it wasn't they wouldn't pay for it. That's not an excuse to pirate, just pointing out that a pirated copy doesn't equate to a lost sale.

But when you run software to provide a service; think of Facebook applications for example, there's nothing to pirate. That's not a great example as applications are generally free on Facebook. The Internet has made this possible but I'm not keen on purely web applications, even if they use a whizzy interface in Flash or Silverlight. I was without Internet access tonight until 20 minutes ago; it's most frustrating!

So I think that if applications are tailored to work locally but use a server for perhaps saving, or interaction with other users, you get away from it being a pure application that can be pirated. The hard bit is splitting the functionality between server and client so it can run off-line locally but not be easily pirated.

If you need Help

Sunday July 5, 2009
Quhelp tree structureFor your applications, you can go for a professional help system or roll your own. One example of the latter and made available for free or open source (license is unspecified) is Quhelp by developer Kostas Michalopoulos. Written in C, it parses html content files and merges them with a template.

There's an example of typical output using a tree directory which looks pretty good and that's also included with the source code. It's Linux compiled I think so you'll need Cygwin/Ming to build and run it on Windows unless someone cares to port it?

Atari 7800 Console Games Source Code

Saturday July 4, 2009
Atari 7800 PacmanAs it's July 4th here's something slightly off-topic. Back in the early 1980s, Atari ruled the roost in video games. They'd started in 1972 and Pong was the first creation followed the by the Atari VCS console (aka 2600). For a while Atari was the fastest growing company in the US but in 1983 the whole video game market crashed and Atari's consumer division was sold to Jack Tramiel, He was the founder of a typewriter import and repair company Commodore Business Machines that went into calculators and home computers. They were the company that produced the CBM-Vic, 64. He left them in 1984 and bought Atari.

Before the ST Atari had a couple of home computers the Atari 400 and 800. I did a game conversion on an 800 but that's another story. Just after the Atari ST was launched Atari launched the 7800 console. It was basically a souped up Atari VCS with a better 6502 CPU and a different graphic architecture. it suffered from a variety of problems, mainly lack of games and by 1992 it was dead.

Thanks to someone dumpster diving, commented source code was located and the Atari Museum website has made these available. games include Ms Pacman, Dig Dug, Joust and nearly a dozen more. Of course to run these you need an emulator. This site has some and there's also MESS listed in the C games code library.

Developing Peer to Peer Applications in C++

Friday July 3, 2009
Amazingly back about 1997, it was still possible to have PCs connected to the Internet without firewalls or proxy servers. However the bad guys soon got active and a year or two later it was becoming much too dangerous to connect without some form of protection. This had the side effect that writing software to connect to other computers on the Internet became a bit messier. NAT (Network Address Translation) is common and present problems of it's own,

Developing P2P applications to work with firewalls, NAT and proxies is somewhat challenging. Google think so too and that is why they've produced LibJingle which is open-source C++ code with sample applications for building a peer-to-peer applications. It handles creating network connections (through NAT and firewall devices, relay servers, and proxies), negotiating session details (codecs, formats, etc.), and exchanging data. Plus additional tasks such as parsing XML, and handling network proxies. It's licensed under a BSD type license so free for commercial or non-commercial and uses the Jabber (i.e XMPP protocol) for exchanging data.

Read Archives

Discuss

Community Forum

Explore C / C++ / C#

About.com Special Features

C / C++ / C#

  1. Home
  2. Computing & Technology
  3. C / C++ / C#

©2009 About.com, a part of The New York Times Company.

All rights reserved.