Blogs I Read

January 13th, 2007

Blogs of friends and other people that I frequently read

Adodb is not going to be used in LogixClassifieds

August 3rd, 2006

Well, after some benchmarking and performance testing, I cannot justify inclusion of ADOdb database abstraction layer into my projects. The overhead is simply too much for applications that are going to be written exclusively for MySQL databases. I already have some existing database class code that I have done that is highly effective, and with proper indexing and table structure, Really cant get much more optimized that that.

In the future, we may build an additional development machine to port the applications to PostgreSQL and Oracle databases, however, for the time being everything will be in MySQL.

In the end, performance and speed will be the deciding factors in the projects we build and release.

Very little progress otherwise has been made on the project since the smarty benchmark testing and decision. However, it seems just wrong, that Smarty had such an impact on performance, so This decision will be revisited in the near future.

Right now, I am just mostly concerned with my re-location to a new apartment , getting my self moved in and settled, get organized, then I have to spend some time on the business - Candle Alternatives

Once I can get this settled down and get organized, I will be continuing development on Logic Classifieds, MailerMaster, FreeTribes, and the WebChess projects. I am also going to be taking on a semi-CMS project to build gallery pages, Sort of a pictorial forum, Geared towards Adult sites, but may also be excellent for a photo rating site- The biggest hurdle to overcome is the handling of file uploads. This, I suspect, will have to be written in Python or Perl to handle the images and various zip files. I dislike php for handling stuff like that.

Oh well. Til next time..

Bri!

OK. Finally got stuff set up a little better.

July 2nd, 2006

Added in another wordpress plugin, set up my yahoo ads, technorati links and set my links and stuff as you can see to the right. Now I can get back on track.

See, Ive been doing some work on the latest greatest project (Logix Classifieds) and have been doing a little benchmarking. When I took on this code, it was not great, performance wise.

For ease of development (and because I am just plain stubborn about using backends that I am intimately familiar with… (Pun intended too) I started by benchmarking a single page, to baseline it.

I fully expected that using Smary templates (http://smarty.php.net/) would have given me somewhat reduced performance.

Not only because it would use more memory, but because it would (theoretically) add processing time and page load times, which I didnt really want, but figured I could make improvements elsewhere to make up for the performance loss in using Smarty.

Much to my surprise, after converting this one page to Smarty templates, I saw an *increase* in performance.

OK so I take a look at my logs, and noted that memory use at selected points in the page was much more stable, and as expected, slightly more memory usage (about 8% more). However what surprised me was the fact that apachebench tests resulted in the Smarty templated pages nearly *DOUBLING* in performance!?

From serving 6.83 requests per second, the performance went up to 12.76 requests per second. Amazing!

But then I realized, of course, smarty writes a compiled template after the first page load, all else being equal, the page is then effectively cached. So, identical requests on the page will result in identical templates, and thus, smarty simply delivers the compiled template already cached the compiled templates directory.

Now things are starting to make some sense. :)

Ok, next project is to continue with this benchmark page and see how much performance will be affected when I add in ADOdb database library (I expect to see a 15% increase in memory usage, and little performance gain overall, so I likely will make use of some base classes I already have for database work)

The only other thing I really need to do is optimize the page designs and scripts to take the most advantage of Smarty’s caching.

So far so good.

I also made another sale today at my Incense and Feng-Shui store so things are looking real good now. It makes me feel like the investment in time and money and coding headaches was well worth it.

Well, til next time..

Catchya Laterz!

How to use TortoiseSVN with SubVersion at Gna.org on Windows

July 2nd, 2006

Moving some of my more useful posts from old blog—-

This article was originally written for BNT developers when the project was being hosted on GNA (cause SourceForge didnt have SubVersion at the time)

Heh.. Long title.. Could have just said “BNT Dev Tutorial”

OK. Lets get started..

Assuming a Windows XP Home PC ….
You will NEED the Following downloads (free)

Tortoise SVN http://tortoisesvn.sourceforge.net/ ( download 1.3.0.5416-svn)

PuTTY http://www.putty.nl/download.html
( I recommend using the “one shot” installer here:
http://www.putty.nl/latest/x86/putty-0.57-installer.exe )

OPTIONAL (but very much recommended)
WinMerge http://winmerge.sourceforge.net/ (2.4.4 installer)

Download and install all three , and just set up whatever they default to ..
(with winmerge, check the box to “integrate with tortoise CVS)

The first thing we need to do is set up PuTTY and generate our SSH key to paste to GNA
Step by Step:

1. Putty probably put an icon on your desktop, but this is *NOT* what we need..
we need to run puttygen.exe, so look for it in C:\Program Files\PuTTY\puttygen.exe via the
Start-Run-> process.. This will open a dialog box to work in.
There will be a large blank window that says “No Key” , below that are “actions”,
and at the bottom, Parameters.

In the Parameters, Type of Key to Generate: SSH2 RSA
(see https://gna.org/my/admin/ - go to the area to manage your keys)
make sure Number of bits is set to 1024 , and click on “Generate” button.

(Follow instructions to move mouse around, it helps to create randomness in the key)

It will generate a key and will now display “Public key for pasting into authorized keys file”
FIRST, in “Key Comment” enter your username that you use at GNA , and enter your key password
(carefully note the following distinction:
when I say “Key password” that is the password I refer to, as opposed to your GNA user password..
they do not need to be teh same thing, but can be…)

Now, click on the “Save Private Key” button, and **VERY IMPORTANT** remember exactly where it is
being stored in relation to C:\ (full path, you will need this information later).

I saved mine in C:\development\ and named the file gna.ppk (and save as type PuTTY private key
files - the .ppk filetype)

2. COPY , in its entireity, the “Public Key” window, starting with the ssh-rsa and including your
gna username after the == to your clipboard, and go to
https://gna.org/my/admin/editsshkeys.php (login first)
and PASTE the key into the first input box (Key #1:)
and click “Save” - Now in the next hour, we will spend some time setting up
PuTTY and Tortoise SVN, so we can kill time waiting for the cron update

3.Close the PuTTY Key Generator window (ensure you saved private key with password,
or review the above and do it over)

4. Find Tortoise SVN (Start->Programs->TortoiseSVN ->TortoiseSVN) and fire it up.
It will tell you that TortoiseSVN is a shell extension, integrated into Windows Explorer ,
click “OK” - I had you do this so you can see what it says :)
now, to REALLY use TortoiseSVN, we need to make a folder on desktop
(do this for practice until you get used to what to expect)

5. Right click on Desktop and make a folder named SVNtest, and then open the folder.
Right click in the blank window and mouseover the TortoiseSVN in the context menu ,
and click “Settings”

6. Choose your langauge and other settings, as you prefer. The *important stuff* is:
– under Network, make sure your SSH Client is set to C:\Program Files\TortoiseSVN\Tortoiseplink.exe
– Under Dialogs2 - check the box in “Status” to Recurse into unversioned folders
and “Contact the repository on startup” to check for modifications.
Click on “apply” and close it..

7. Now, we need to use SSH keys, in order to to this, since TortoiseSVN normally doesnt
come equipped for it, we will make use of PuTTY’s Pageant
- Go to Start->Run and enter C:\Program Files\PuTTY\pageant.exe
(or whatever path you installed PuTTY at- same place you found puttygen.exe)
You might think “Hey, Nothing happened!!??” but Wait!- now you have a little icon in your
system tray (bottom right) looking like a computer with a black hat on it.. :)
double click that icon to open Pageant.)

8. This opens a blank window with 4 buttons - click on “Add Key” now you can browse to where you
saved your private key (in my case- C:\development)
Click on the key you saved (gna.ppk Note, you can have many multiple keys loaded in pageant,
I have 8 keys for various projects and server logins)
click on Open, it will ask for your passphrase (what you set it to when you ran puttygen.exe)
Now it opens the “fingerprint” to your private key , with password already entered..
now you should be able to ssh to any key only authentication location..

9. Now we need to test and verify that ssh works via key authentication :)
Close Pageant (with your key loaded)

10. In the blank window that should be left open for the folder “SVNTest” created earlier,
right click in the window , and in the context menu
hover over the TortoiseSVN > , and click on Repo-Browser.

11. In the URL window that pops up, enter svn+ssh://{YOUR_GNA_USERNAME}@svn.gna.org/svn/blacknova/
and click on “OK”.
This contacts GNA server and gets the repo listing for you.
Now, click on the + box , this should connect you to GNA svn server - if all goes well,
it will show you a directory listing of ‘branches, tags and trunk folders. Our working copy of
BNT Classic is in branches , so click the + next to that.
You can see how to navigate now, and this proves your key works, If you get an error message ,
make sure it has been at *LEAST* one hour since you pasted your key to the GNA editkeys..
If all else fails, try verifying that you got *all* of your key pasted by checking there,
or generate a second key and paste that in one of the other boxes.

12. Now you can simply right click on the “Classic” folder and “Checkout” a working copy to
your local PC.
Make sure and enter the Checkout Directory (E.G. C:\Documents and Settings\brian\Desktop\SVNTest)
and click on “OK”.
This downloads everything to your local directory and once that is completed, you’re set ,
NOW you see all these files with a round green checkmark icon over it
This indicates the file is under SVN revision control.

Now I have files opened, for this example, I am going to take BUGLIST , and SVN delete it, and
rename it to KNOWN_BUGS, and add a bug
For the below generic instructions (and for practice for you),
I have created a new file in /docs named FILENAME - please use this to test and play around
with, so you really know what you will be doing before getting serious with the “real” code :)

open FILENAME in your editor (I recommend Crimson Editor, personally, it can be set to save
files with UNIX LF newlines instead of Windows CR/LF)
Edit it and SAVE AS any filename you want to give it (because we will be showing you how to
add, commit and delete too).
Now you will see this *new* file does *NOT* have a green circle with checkmark, indicating no
revision control.
What you want to do at this point is right click on it, and find “SVN ADD” and click that -
it will pop open a dialog with a list of *unversioned* files
that you can check - make sure you only add this *one* test file for testing /practice.
Now click on “OK”
Now you will se the dialog say “Adding (filename) ” - you can close it now ,
and, in the whole folder, click on “svn commit” and you will see your new file is ready
to be added in to subversion.
In the top window, you add your SVN comment it tells us why you made this commit and attaches
to all files that were changed.
For this one test , you can put something like “Practicing adding and committing a file” and
click “OK”.
Now you will see your new file now has the green circle with checkbox..
Open it again and edit something (add a space or a couple characters or even a newline) and save it.
Now you can see that the file has a red round circle with a ! exclamation point on it , meaning it
is a changed file.
You can commit it if you want, but keep in mind it again increments revision number
(doesnt matter really)
. Next up, we will use SVN DELETE to remove the file .. so right click on your test file name and
click on SVN delete.
*NOTICE* when you SVN delete a file, it removes it from YOUR copy, but doesnt actually delete
it from the repository - Do be careful about deleting files…
usually we only delete when absolutely necessary.
. Now to make the SVN changes stick , you must commit the delete action
(right click, svn commit comment “deleted test file” )

Now in regular work, here is what you will typically do:
BEFORE starting work or adding changes *ALWAYS* do an SVN UPDATE to get the latest working
revision of the files , and let us know via the mail list what files you plan to be working with
(it just make sit easier to avoid revision conflicts).
Then you can make your changes, test them , and *ALWAYS* before you are done (or preferrably
every couple hours or every so often),
COMMIT your work to date with a comment , for example:
“Working on Xenobe bugfix, partly done, still need to edit sched_whatever.php and bug test “.
Typically, working as a team (this is based on my experience at work, with more than 2 developers
potentially making commits at any time),
You will want to be in full communication with the rest of the team (mailing list, probably)
and explain what you’re up to, and let us know when you’re done, when you expect to dig back
into the code, etc.
It isnt a “LAW” , but it sure does make it easier on everybody - Merging and Diffing revision
conflicts are a royal pain in the patootie.

Now, lets handle a merge or diff of a revision conflict
Typically this happens when you change a file, and someone else changes it too, and whoever gets
the first commit in, on that file, “wins”. (wink, wink), and the second attempt to commit will make
Subversion scream bloody murder , and warn you about revision conflicts.
So now you have to Diff and Merge the differences. - If you set up subversion right earlier,
you will be able to automatically open WinMerge and it opens the two files side by side, and in
color coding shows you teh differences, so you can merge line by line (using the buttons up top)
and get the revision fixed, and then save it as the merged file.
(this is most often where nasty bugs happen, hehehe.. so make sure you TEST both fixes or
changes that were committed once you’ve done this , and also alert the person that made the
last modification
- this will show in the $Id$ part at the top of a file, *IF* that file was committed with the
//$Id$ property keyword at the top- about the situation , so they can check their fixes too.)
Take a look at KNOWN_BUGS for an example of this $Id$ property. I’ll explain in a bit how to get
Subversion to handle these automatically - it wont do so unless you tell it to…

Anyhow, a merge/diff can be simple, or it can be a royal pain, it may even be necessary to
SVN revert the file to an older version,
but if we communicate well, I expect issues like this to be an absolute minimum..

Now, with the Properties issues-

For iamsure and I, we use command line SVN , so we simply do :
svn propset svn:keywords Id ./filename.php
to get $Id$ to expand properly

But, as of this writing, I have not found a way to set the property using TortoiseSVN
However, if you ask nicely, I am sure either one of us can do that for you and commit it ;)
The *BIG* problem now- VERY VERY IMPORTANT - do not eveer commit your *WORKING* config -
if you have to add or remove a variable, do so in the generic config file , but dont commit a
file that contains sensitive password information (I am quite sure you are aware of this already
but it bears repeating anyway).

Troubleshooting:

Problem: I am getting the password dialog over and over again
Answer: TortoiseSVN (or better its SSH client TortoisePlink) cant find a key for the current user.
Run pageant and add your private key or define a putty session with a private key included.

About

June 28th, 2006

This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.

OK, so I’ve been lazy…

December 29th, 2005

Yeah, I know the last few months Ive been pretty lazy about getting stuff done. I’ve had moments when I wondered if I wasnt just burned out, but that’d be just a lame excuse. The truth is, I needed a break from trying to do everything at once, and sit back and just look at stuff, and re-evaluate my focus.

Other than work, (which I gotta do either way) my focus has narrowed somewhat - I believe what I am going to do is spend at least one hour every day studying a programming language of choice, and at least one hour every day just writing something - anything ..

I have always wanted to write a book, and I have several half done pieces, which I took a look at recently. I couldnt believe I wroite half this stuff I read- it was GOOD stuff (plenty of bad stuff mixed in, but that’s what editing is for) So, I am going to train myself to have a little discipline in these two areas- write more code, and write more words.

In addition, I’ve developed more of a focus on what I want to get done short term. I will be rebuilding my webhosting website and redesigning a second one, even though it’s sort of competition with work, it isnt really - the types of hosting offered, and services and structure are sufficiently different that I feel comfortable people looking for a specific type of hosting that buy from one, would reasonably probably not buy from the other. In addition, I do plan to add links to *work* website as an alternative.. A La “Didnt find what you want here? Try Colo-Cation”.

One thing that I really wanna develop over time is the website here where this blog is running - phplogix. Ive been meaning for at least a year to build a personal website where I can showcase some of my work and personal projects, and again, seeing as how I hate doing HTML markup, I kept putting it off.

I honestly dont know why I so dislike doing HTML, but it’s just such unbelivable tag soup, and really doesnt have any “logic” to it, it’s just repetitive tags and text, I guess, and I like order and structure taht are involved in php and python to name a couple of my favorite languages.

Either way, I’m working with a friend, and web designer, and maybe I can get them to do the HTML and templating, and I will merely need to write the code that drives my sites :)

Oh well.. Keep an eye out on http://phplogix.com/ Right now it is nothing more than a placeholder template, but soon I think it will become a nice, clean, solid website.

Of course, I have a half dozen current sites I want to re-design and re-code, and over 80 domains all told that I want to build something of them.. so I guess I would just call it a work in progress..

Anyhow, I think I am going to not even worry about those, or think about them, and just do one website at a time, starting with http://www.emceehosting.net, which will soon see a drastic change and re-design.

Of course, I have also started on the tribestrive restructuring plans, and have part of a database structure already posted over at the tribestrive wiki - http://phplogix.com/wiki/ Plenty more work to do, but I guess the thing I need to do most is develop some self discipline (code an hour a day and write an hour a day) and once I have that, the discipline I need to maintain my focus on one thing at a time should come much easier.

I should post my college paper on Procrastination too - Despite my learning and awareness of it and what it is, I still fall into that nasty old trap. Procrastination iss often the worst enemy of productivity. Maybe if I talk about it a bit, and write about it a bit, I can beat it.

Hmmm well, some other time, perhaps I will post it- It is a pretty sizable paper, so maybe I’ll post it as a series of articles here.

Just because I promise myself to write an h
our a day, doesnt mean I’ll be posting all of it here, so…

Catch ya laterz!
Bri!

Yup- ’tis worth every penny sometimes.

December 15th, 2005

I’m talking about Open Source code that is being taken to new levels by offering enhanced and improved versions *for pay* - It lends a firm truth to how they define Free Software as being Free as in source code, not Free as in Beer :)

I am a Linux PC user - running Fedora Core on my desktop system- I have long since quit using Windows- I still have my WinXP box nearby if I ever need to refer to something, but by and large, I am using my Linux PC 100%.

For my programming and editing work, I have always used Quanta Plus (Free from KDEWebDev) , however, a recent upgrade caused all my settings and icons to go Kaput. Rather than spend hours digging around my system to fix the problems piece by piece, I went looking for alternatives.

My Requirements list is pretty simple- any editor I use needs to have Built in syntac highlighting, line numbering and SFTP/FTP/SSH support for direct on remote machine editing. It must also allow me to configure the automated stuff (auto completion, bracket matching, custom syntax) to suit my own coding styles and standards.

Bluefish ( http://bluefish.openoffice.nl/index.html ) was out - since it doesnt currently support SFTP, last I could tell (as of version 1.0.4) There was one that looked nice- Anjuta ( http://anjuta.sourceforge.net/ ), however it is still a “new” editor for me that I would have to learn a whole new way of doing things.. And of course, I refuse to use EMACS or VIM , though I am sufficiently knowledgable in each to use them in a pinch ..

I also downloaded Screem ( http://www.screem.org/ ), however this appears ot be almost entirely dedicated to HTML development (I’ll probably use it a bit and see how I like it) and at long last, I finally found Quanta Gold http://www.thekompany.com/products/quanta/ , which, it turns out, is a version forked off the original Quanta from Version 2.0..

So.. I took a look at it, it has a feature set that *exactly* suits my needs, and it only cost $40 USD - Hot Damn! Yep, I bought it immediately, without even getting the Demo, rpm installed it, and boom - it works like a charm right out of the box, and needed precious little configuration to get it set up the way I am used to the original Quanta 3.2+ which I had used before-

I’m happy. I have a solid reliable editor, and I dont have to learn a whole new layout or way of doing stuff. I can just step right back into coding same as always, without putting a kink in my productivity.

So yeah- sometimes it really is worth every penny to pay a little extra for teh support and peace of mind that comes from having a company or developer essentially obligated to you to provide a certain amount of quality to the software you use. It has made me re-thing some of my original plans as far as software development. I can still keep it open source, I can still provide the source code *for pay* , and support that code, and yet keep my code under the auspices of the GPL license.

Oh well. Back to coding. :)

Ahh.. No More McDictator..

November 14th, 2005

Well after a frenzied weekend, the site owner, Jason came in and demoted McGruff, took back control of the hosting panel, and re-instated the key admins and mods for the http://forums.devnetwork.net/ discussion board..

At last, it appears all is right with the world once again. Just goes to show that a community that has experienced openness, freedom, and democracy, are loathe to give it up without a fight. Dictatorships just dont work - all they do is breed resentment and discontent.

I’m glad things worked out well, and the community did not have to split apart after all… It would have been such a shame.

Sometimes programmers and geeks just cant stand to admit that they are wrong, or that *their* way is not always the best way..

All of this over a simple matter of whether OOP php is the *right* way to code php…
and the simple answer is.. it all depends on the product and the programmer..

It’s possible to write OOP php that’s beautiful, elegant, structured, and secure.. but it is also possible to do the same thing in procedural PHP as well..

It is also possible to write buggy, broken, “it works for the developer, but not for anyone else in the real world” OOP code.. likewise with procedural..

So which is better? Neither.

The most important thing is going to be the person who writes the code.. writing OOP PHP doesnt make you a “master” any more than writing procedural php makes you an “amateur”..

Ive written both, I still do.. some places, it makes sense to build objects, some places it makes sense to write it out in procedural php (A.K.A. “spaghetti code” )

The bottom line is the answer to: “what is the fastest method to go from design to finished product, while maintaining application security and functionality” Often, it’s up to the programmer. some can write objects out faster than they write procedural, and some don’t , and even more often, it’s simply code re-use :).. just take what’s already been made.. Tweak it a bit, modify it here and there, and you save yourself hours of work..

Oh well.. Crisis averted, Things are right once again at php developers network, and everybody’s happy (except maybe McGruff and cronies)…

I’m just glad the community will stay together and be there when people need a place to turn to. :)

-Bri!

The Adolph Hitler of the internet?

November 12th, 2005

Sure seems like it to me- a power hungry megalomaniac who just cannot stand dissent or criticism, last night, locked down the devnetwork forums ( http://forums.devnetwork.net ), and in a very underhanded power grab, banned the majority of the moderation team, deposed his co-admin, and took complete control of the boards (he doesnt own the site or forums, he was just granted mod/admin powers by the owner).. all because a few people called him on breaking *HIS OWN FORUMS RULES* … sounds like a dictator to me…

Anyone who agrees that such a Hitler-istic move should not be tolerated in a free and open community, should contact the site owner in support, **Edit** Jason has now been notified and knows whats up, email removed. **/Edit** and post loud and long and openly at devnetwork.net forums (if you arent banned, and as long as you dont get banned for disagreeing) chastising McGruff for his power grab, and demanding he step down from his position and relinquish control of the board to the moderation team.

This situation should absolutely NOT be tolerated!

Python is pretty cool….

October 17th, 2005

Yet, it has it’s own set of irritating idiosyncracies. As a server level utility script to build useful tools, and even as a web environment, it’s great , it’s a strongly typed, defined language, makes you think a lot more carefully than php, and natively uses bind variables for mysql queries..

However.. it’s entirely frustrating (and incredibly easy to create a bug that causes you heartburn,hair loss, and bruises on your forehead from banging it on the keyboard… ) with the fact that python doesnt care a lot about whitespace between lines, but it sure is picky about indentation :)

Since the Python language doesnt use bracketing to offset blocks of code, we have to *precisely* indent code blocks to match. It’s not bad when you only have 2 blocks depth, but when you get more complex, it gets a bit trickier to keep track of where you are at… as I found out yesterday .. Whee!

I had a nice neat python log parser script (for some proprietary server software I wrote) which seeemd to work, never gave an error, and yet, only hit each unique identifier once (instead of the multiple results desired/expected) and after 2 hours of banging my head, dozens of lines of debug code, and extreme frustration, I got up took a short walk, came back, and left justified every line, and re-indented precisely again..

Voila! It worked!

In all this work and research, I came across another interesting blog that I’m adding to my reading list :) http://simon.incutio.com/

Pretty interesting stuff, and similar interests in php and python…

Ah well. On a side note, I think I’m going to build out on my regex page a little bit and add some more informative content, cause I keep finding this little helper tool to come in real handy..

Where Is It? You ask? Ahh.. http://www.phplogix.com/meta/
It needs a bit of cleanup work, and needs some handling of the magic_quotes problem, but still works great, and Ive found that the regexes also typically will work identically in python and perl, so it’s a pretty useful regex page…

I also need to build a little more into my code cabinet library at http://www.phplogix.com/codelocker/ and get some more of my stuff, like this handy little python function I wrote for parsing apache log files, and inserting data into mysql database- I needed a way to convert the apache CLF log format datestamp into a mysql compatible date stamp (cause I needed to do comparisions), and ended up with this nice bit:

def mreplace(s, chararray, newchararray):
    for a, b in zip(chararray, newchararray):
        s = s.replace(a, b)
    return s

olddatestring = (’Jan’,'Feb’,'Mar’,'Apr’,'May’,'Jun’,'Jul’,'Aug’,'Sep’,'Oct’,'Nov’,'Dec’)
newdatestring = (’01′,’02′,’03′,’04′,’05′,’06′,’07′,’08′,’09′,’10′,’11′,’12′)

def clftosql(date):
     ttime = date.split(”:”,1)
     time = ttime[1]
     datelist = ttime[0].split(’/')
     #should be , E.G DD,MM,YYYY we need YYYY-MM-DD for sql
     day = datelist[0]
     month = datelist[1]
     year = datelist[2]
     newdate = year+’-'+month+’-'+day+’ ‘+time
     return newdate

then you can take a date stamp from an Apache CLF log like this : 01/Oct/2000:00:00:00 (after you regex it out of the log with:

datechk = re.compile(’([0-9]+/…/[0-9][0-9][0-9][0-9]:[0-9][0-9]:[0-9][0-9]:[0-9][0-9])’) of course) 

and run the functions thus:

mydate = mreplace(dated,olddatestring,newdatestring)
mydate1 = clftosql(mydate)

and you end up with a nice, clean:
>>>print mydate1
2000-10-01 00:00:00

nicely formatted mysql datetime value ready to compare with yoru mysql table d
ata :)

I guess I better close this out now, next post, probably will discuss some of the progress on http://www.speedy-hits.com and discuss the result of my latest experiement at http://www.crazybri.net- after installing a new version of code, there appears to be a great deal of excitement over it, and It just might incentivize me to take it a little further and actually *work* on the code :)

We’ll see..
Catch Ya Laterz! I’m Audi Here.
Bri!