Programming

PHP and MySQL Reading

Recently I have been looking through the SAMS book Teach Yourself PHP, MySQL and Apache, by Julie C. Meloni, and from what I have seen it is most excellent. Then again, books published by SAMS tend to be.

I say “looking through” because, hey, who sits and reads a computer book cover to cover, in order, unless maybe it’s by Alan Cooper (speaking of Cooper, this homonym list is cool).

Well, strike that. I read Code Complete cover to cover. Rob, who is one of the so far mostly theoretical contributors to this site, recommended it to me way back when, and I certainly concur. It’s just not what you’d call light reading.

Anyway, I was interested in PHP programming and making it talk to MySQL so I could extend what I can do with blogs, maybe apply some of it to web site building in general, and possibly create online applications, if only for personal or internal business use. This blog uses PHP and a MySQL database.

As a relatively introductory text, there is no doubt much to know that it doesn’t cover, but there are tremendous resources online once you know where to start. The PHP prgramming parts flow in a logical order and are easy to follow. All the more so if you have knowledge of an existing programming language.

It also jumps right into practical applications; mailing list, online address book, discussion forum, storefront, shopping cart, and calendar. I find that kind of thing cool.

VB Tips Collection

As I mentioned in the blog intro, XTreme had a history of publishing Visual Basic tips as part of the main site. I recently decided to revamp entirely, as the stale odor coming from the site overwhelmed me. Went down to a bare bones main page and left nothing linked from it until I could update further (that is, got around to updating further). Outside of search engines that still show them, if not ranked as highly as they once were, they aren’t linked anywhere. If you’ve moved along to VB.NET, some may no longer apply, but they work for some or all of the older versions of VB from 3.0 (for some of the basics) through 6.0. They are all linked in this post, just to get them out there again. Some may yet be reproduced entirely in posts here. Any new tips, Visual Basic or otherwise, will go here in the blog. The beauty of blogging software is that it’s so much easier to have a tip idea, write it, post it, correct it if needed, and receive feedback. But this isn’t a post on why blogging is a great tool. Here they are:

Fun With Textboxes – a basic tip with code for doing this and that in a VB textbox, with a picture of the result and a link to the VB5 project. Simple as it is, this has been one of the most popular tips. This is going to take forever if I describe each one, so forgive me if I’m terse for some of it.

Using Control Arrays To Your Advantage – another super simple tip that has gotten some of the highest traffic of all the VB tips. It can be easy to lose sight of the need for beginner info to be available if you are not one yourself. The next four are also quite popular, each one a database tip oriented toward VB6.

Example of Updating a Foxpro Table Via ODBC Direct Returning Recordcount with ADO

Closing, Reopening and Rebinding with DataEnvironment Example of Opening and Closing Recordset, then Opening a Different Table with the DataEnvironment

More database-related tips:

How to open an ODBC Direct Work Space and create an updatable recordset

Generating Output of Database Structure

Other tips and code samples:

Automation of MSN Messenger from VB Code – This is obsolete, but may provide ideas. Microsoft upgraded Messenger shortly after this was posted, changed the object model and broke compatibility with this code.

The next one was the result of a tip request from someone who’d seen the other tips on the site. We eventually figured out it was probably a homework assignment, and the guy hassled us for more and more help so that it would match more precisely the specs of his assignment. Idea for a tip, good. Harassment and being lazy, bad. Example of Determining Change Denominations in Visual

VB Add-In to Close All Code Windows

The next two were the result of the entire concept of finding factors and testing primes sort of “coming to me” in a grokkish rush. The tip for primes is the crudest, slowest method, and I challenge people to go from there and determine the better ways. Thus it shows what it shows, but may not be exactly what you want in a program that matters.

How to Determine the Factors of a Specified Number in Visual Basic Code

How to Determine Whether a Specified Number is Prime Visual Basic Code

VB6 Bug Using Printer.Scale to Print a Graph

How To: Launch Windows Control Panel Extensions Using VB

How to Determine Drive Size and Available Space Even On Huge Drives

Restart App At Windows Startup

Reading the lines of a multiline textbox into the an array

One way to determine whether a specific year is a leap year…

Use Object Browser and Class Wizard

This next one was online for a couple years before I discovered the original code had a minor bug that kept it from working exactly as intended. Oops… How to to tile a picture on a form

On instancing and naming

There you have it, the original collection of XTreme Computing VB tips from days gone by.