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

Latest Programming Tutorials

About C, C++ and C# brings you the latest programming tutorials, a part work built up week by week. Choose C, C++ or C# or all three.

Latest Programming Tutorials

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

Programming Challenge 30 Published

Tuesday December 1, 2009

You get to zap the surface of a planet from your orbiting spacecraft but the targeting system is broken and so you must define the targeting locations according to the challenge's rules. With five different sizes of targeting areas possible your program must reach every location as economically as possible while not zapping settlers.

It just needs a file of settler locations (that your zapping must avoid) and that will be uploaded tomorrow. You can start coding without it, or just make your own file up for now. Put in 10 settler locations, consisting of 10 pairs of numbers separated by a comma, each pair on a single line and each value in the range 0-99.

Eg 12,34
45,87
etc etc
Good luck! Challenge 29 will be finished marking in a day or two.

A Reader Writes

Monday November 30, 2009

Today I had an email from, well let's call him Arun as that's his name. He wanted to know about using C for web apps and mentioned Wt that I had written about. It's a fair question- the old saying about there being no stupid questions only stupid answers springs to mind. Wt is actually used with C++ not C but that's not the issue here.

My main philosophy with programming is use the best tool for the job though obviously I am constrained to write about C, C++ and C# here. It may come as a shock but I also do use other technologies and languages. These include sql for databases, Flash, JavaScript, PHP and even Delphi but I mention them only to highlight my point.

I replied to Arun that as a beginner he should really use something like PHP for web apps as it's far easier to start down that path and getting access to a web server to run PHP rather than Wt is also likely to easier. PHP is closer to C than many other languages. If you have access to your own web server and are experienced with C++ then you might consider Wt but otherwise I would still recommend PHP.

Fighting Wars With Plastic Bricks

Sunday November 29, 2009

BrikWars ScreenshotMy parents were convinced I would become an architect when I was younger as I had a Lego set and just made houses with it. It's kind of ironic because I used to play wargames and now Lego + wargames = BrikWars! Clearly it's just an excuse for grown men to play with Lego!

BrikWars is a set of rules for fighting tabletop wargames using Lego and Minifigs. This has been coded in the last year in C# for Windows and you can download the GPL'd open source code built using XNA and fight against the computer or other players. No bricks to tidy up afterwards!

PS Latest entries are now being marked for Programming Challenge 29, still one day to submit late entries!

An Unsung Hero - PuTTY

Friday November 27, 2009

The telnet protocol allows you to log onto a remote computer but you should never ever use it (unless protected by a secure session/ VPN etc) because it sends passwords in clear text. That said, FTP also does the same but it's still used widely and email!

The Secure Shell (SSH) alternative to telnet was created in 1995 by Tatu Ylönen, a researcher at Helsinki University of Technology, Finland after a password sniffing attack at his university. This lead to the creation of PuTTY; one of those rare open source utilities that was created for Windows and ported to Linux/Unix systems by Simon Tatham, an English developer who created NASM, the Netwide Assembler. The C games source code library has some of his puzzles.

The PuTTY suite consists of

  • PuTTY (the Telnet and SSH client itself)
  • PSCP (an SCP client, i.e. command-line secure file copy)
  • PSFTP (an SFTP client, i.e. general file transfer sessions much like FTP)
  • PuTTYtel (a Telnet-only client)
  • Plink (a command-line interface to the PuTTY back ends)
  • Pageant (an SSH authentication agent for PuTTY, PSCP and Plink)
  • PuTTYgen (an RSA and DSA key generation utility).
It's a handy and very secure way to remotely connect to another computer that is running a SSH server (typically Unix/Linux boxes) and very popular. For Windows there is also WinSCP which does the sftp/scp with a GUI which I used to use a lot but according to Wikipedia the installer now sends information back to a remote website.
Explore C / C++ / C#
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

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

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

All rights reserved.