Please support the anti-patent petition. Thank you.



Hi. I'm a programmer. This is my web site. If you find something useful here, great. If not, c'est la vie.





CLINT - the library with no name
This C library contains a number of useful routines for C programmers. For example, it has (rudimentary support for) a stretchy string type, and some reasonable (and portable) allocation wrappers. Opaque types (more or less) throughout, for safe programming. Enjoy!



Other C Stuff
Some more C stuff, a sort of hotch-potch of code that I've written for the heck of it, with no particular theme to it. It includes an error message management library, a directory parser demo (Windows only), and a couple of routines for reading arbitrarily-sized words and lines from a text input stream. Oh yes - and a noughts-and-crosses game. :-)



The C Programming Language - Answers to Exercises
Last updated 12 March 2002.
In 1988, Kernighan (pronounced Kern'-i-han' - the 'g' is silent) and Ritchie wrote the second edition of "The C Programming Language" - the revised tutorial and reference for the C language, which Ritchie himself designed. In that book, 97 exercises were posed. Follow this link to find a list of answers to those questions, written partly by me and partly by people from all over the Net. This list of answers will slowly become definitive (I give it ten years), as more and more people from Usenet slag off the existing answers. Not all the exercises have answers yet (in fact, 79 of the 97 exercises in the book have so far been addressed).



Recommended C Books

If you'd like to know which are the good C books, check out this list. No dummies or men in a hurry need bother - you won't find "C for Dummies" or "Teach Yourself C in 2.06 nanoseconds" on this list...



"C Unleashed" Author List and Chapter Summary

I wrote a book. It's a good one. Lots of people helped me. It's called "C Unleashed" and it's available from all good bookshops. If it isn't available from your bookshop, I guess it can't be a very good shop. :-) Anyway, if you want to know more, click the link.


Cryptology stuff

This is the newest bit of the site, and is still quite raggedy. Still, if you're after some source code for key generation (Borland only) or monoalphabetic cipher cracking, here's some you can check out.


CDX-2 Encryption

The long-awaited update to CDX-1. This version incorporates S-boxes for added security, and is considerably quicker than CDX-1. In fact, it's so fast it's usable! Even if you're not interested in cryptography, you may find the bit rotation technique mildly diverting.

CDX-1 Encryption

After a couple of people sent me uncrackable encryption algorithms, neither of which took a particularly long time to crack, I decided to have a go at writing my own algorithm. CDX-1 uses a variable-length key and bit rotation with N rounds of encryption, where N is the key length. CDX-1 is quite slow, but nobody's managed to crack it yet and that's the main thing. If I find time, I'll have a go at speeding it up whilst retaining its security. At the above link, you'll find complete source code and a sample cipher. (Good luck cracking it...)

Update 19/4/2000: CDX-1 has a flaw. It still hasn't been cracked, but there's a possible attack on multiple messages of the same length encrypted using the same key (not terribly unlikely, if you consider network datagrams as the plaintext), because plaintexts which differ by only one bit produce ciphertexts which only differ by one bit.

As a result, I can no longer recommend CDX-1 to you unless you are going to use a one-time-pad for the key generation technique, in which case you probably don't need CDX anyway.

Chat application (client/server) in VB

I didn't write this. Some time ago, I was asked by four or five people in rapid succession how one would go about writing a chat application in Visual Basic. At the time, I was quite busy, so I asked Mark Pickering to write one for me; he very kindly did so, and gave me permission to publish it. I sent it to about a dozen people via email before I worked out that it would be a lot less hassle to simply post it on the Web. So here it is.

Accessing Access in VB - adding data to Access tables

Again, this one's by popular(ish) demand. I may add a second article on VB database programming if enough people express interest. So far, nobody has. ;-)

Yahoo! Programming Room FAQs

I spend far too much time in Yahoo! Chat, in the Programming room. I, and the other regulars in there, were getting sick of the same questions being asked over and over again, hence this FAQ. It's been described as "an FAQ with attitude". Enjoy!

Check this out :-)

This MIDI file is a rather bizarre version of a tune which anyone from the UK will recognise immediately. It's less well known in the States. (Update: apparently the Yanks do know this tune after all.) If you have a MIDI keyboard, you're much more likely to 'get' it - on a soundcard it sounds a bit tinny.

My bookshelf

I've put off this project for a long time. But enough people have asked me to provide a brief synopsis of the books on my shelf that I've decided to at least make a start. So far, only a few books have made it onto my virtual bookshelf. I will continue to add others from my collection as and when I find time to type in the information. I've included short reviews of each book. Update 11 September 2000: I've neglected this for far longer than I intended. I'm making no promises, but the intent is still to update, extend and improve this part of the site.

A small number of obfuscated C programs.

The links that follow are mainly here for my own convenience, as short-cuts to places I don't need quite often enough to remember where they are, but often enough that I'd otherwise have to look them up... Feel free to use them if you are curious, interested, on a mission, or just want to get anywhere but here!



Sarah Thompson's Home Page

Every now and again, you meet a really bright person. If you're bright enough to know you're not all that bright, you might even recognise it when it happens to you. Sarah is a really amazingly bright person. I had the good fortune to work with her on some parsing software for a UK bank, and I learned a huge amount from her. If you're lucky enough to hire her, pay her lots, tell her what industry you're in, and then leave her alone to get on with making you lots of brilliant market-leading software. If not, well, go say hi to her Web site instead. :-)

Loopy's Home Page

Loopy is a networking guy. A good one. The best I know, in fact. He has given me a massive amount of networking support, he co-wrote Yahello! (my C++ Builder chat client, which I may get back to work on soon), and he taught me CGI programming. At his site you'll find all kinds of useful information about networking.

Programmers who like beer, try here...

The lyrics to "99 bottles of beer on the wall" in over 200 different programming languages! Some of these programs are fiendishly clever. Worth a look.

comp.lang.c FAQs (official)
comp.lang.c FAQs (mirror)

This is the official FAQ list for comp.lang.c . If you have a question about C programming, check here first, before you try any other resource. This document is highly authoritative, mainly because some of the best C programmers in the world have been using it regularly as a resource for helping others - in the process, they've spent several years getting the bugs out of it. If there are any mistakes remaining in this FAQ list, I'd be astonished. No printed book can claim as much - not even K&R, and indeed not even the printed version of this FAQ!

C Programming - INfrequently Asked Questions!

If you visit Seebs' IAQ page, please think twice before emailing him with corrections. All is not as it seems.

The Jargon File

The Jargon File contains thousands of references to hacker jargon (for a start, look up "hacker" - you might be surprised); be careful if you visit this site - you can easily spend a couple of hours there without realising it; it's a fascinating lexicography and cultural statement.

Snippets

This is an amazing resource. Dozens of useful programs written in C, with full source code provided. Credit card number validation, julian date routines, binary coded decimal conversion, checksumming, ISBN validation, and much much more, courtesy of Bob Stout and his gang.

File Formats

www.wotsit.org has docs on just about every file format known to mankind. Well, not quite. But when you're looking for a file format, this is definitely the first place to check.




You are visitor number - call again soon!