InvestorsHub Logo
Followers 211
Posts 7903
Boards Moderated 15
Alias Born 05/24/2001

Re: Bird of Prey post# 13017

Wednesday, 05/29/2002 11:30:08 PM

Wednesday, May 29, 2002 11:30:08 PM

Post# of 218118
Was noticing something looked a little wrong with my 7DMA tracking of posts per day. Weekly peaks and valleys I didn't think should be happening since any 7-day period will only have 2 weekend days in it.

Looked at my source code and indeed there was a mistake. Your figures were more accurate than mine, although yours were a tad on the low end. Not much though.

I'd made a rookie error. You know how a lot of beginners get tripped up by zero-based counting, so, for example, the 8th element of an array is identified by a 7, etc? Well, this was similar to that.

I'm storing posting totals in an array so I can do my averages. Figured "Okay, subtract 7 from the current subscript, add them all up from there to the current one, divide by 7, and I've got a 7DMA."

Unh-uh.

If today's the 29th and I subtract 7, I get the 22nd. Problem is, from the 22nd through the 29th isn't 7 days. It's 8! So what I was doing was totalling 8 days of posting and dividing that by 7 and calling it my 7DMA.

Can't believe I did that! Especially since I *never* have trouble with zero-based arrays and such.

I fixed it, and the numbers leveled out like I thought they should've to begin with.

I think there's a saying that goes something like "Figures don't lie unless liars figure." Well, it should be "Figures don't lie unless liars figure or the figures were produced by a programmer who threw the figures together too quickly."

PS. I'm still excited about the Alexa score. Especially since for the past 4 weeks they've been making sure only unique pages viewed by unique users are getting counted. I don't know how many people let Favorites autorefresh, but it's good to know that's not impacting the score.

Join InvestorsHub

Join the InvestorsHub Community

Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.