Hi there,

The content on this blog is all archival, it's no longer active and you won't be able to post comments or trackbacks. If you're looking for active content from the same source, you should check out Nick's Vox blog.

« Get Well Steve! | Main | The MTStats Entry »

Coding, a day and MTStats

August 6, 2004

MTStatsToday was a day where only one thing went right. Nothing went wrong, really, but there was surely not much to be had overall. Yesterday, on the other hand, was mostly a 'right' day. Funny how these things jump from day to day. And all these 'rights' and 'wrongs' can be attributed to code. Coding is actually a lot more stressful than it seems. At least, under certain conditions.

I've been working on some code for a MovableType plugin called MTStats which is exactly what it sounds like, page stats for every page that is served from MovableType, assuming you've placed a simple MT Tag within the page. The project itself seems almost simple at first glance. You need some code to tell the plugin that you've visited, some code to create that visit in a database and some more code to read the database entries as per user requests and organize them in to neat rows. This project is different from any other because it's under certain time restrictions under which I don't have to complete the project but I have to include the code I think best represents my skill as a coder. I started by planning the big picture out on paper and then creating a basic structure in code. Normally, I'd tackle the large problems on paper before I started at them in code but I can't seem to focus on paper for the large problems. When I have a little more time to work on a project, the harder solutions tend to come to me when I'm taking a break from code but I don't think I have enough break to cover all the code problems that I'm getting to. It's frustrating.

At any rate, I have no idea when you'll actually be able to get this plugin in any decent form from me. It all depends on where the short-term code takes me...

Comments

Do they make an herbal tea for coding? Find some, you workaholic!

Sounds cool. I wrote a few bits of code in php which save certain pieces of information (referer etc.), but I decided to sod that, and installed awstats yesterday. I run it as a cron job every 12 hours, and it does all the hard work for you. (Perhaps you could investigate their code??)

Oh, also, piece of advice:
Everyone does commenting, few can write nicely object orientated code, and even fewer can do decent code that protects/rescues from errors. There's nothing worse than a plain, default error. I couldn't care less about two million functions if I can't get it to install & work reliably.
You probably know that, though. :)
Good luck with it!

Thanks for the advice, Ed. I've definitely tried to break my own code a few times so far and then fixed any issues I had :) Installing it on a different server will really be the test...

As for awstats, I tried to get it working on my hosting provider but the way log files are set up, it was getting too complicated. I just wanted a small, immediate view of how few visitors I was getting. I may work some more complex features in to it eventually but for now I'm working on a stat counter that does exactly what I need.

Post a comment

Nick O'Neill

 

 

 

 

 

powered by movabletype