Approximating the Area beneath a Curve Programmatically

Given any function in the slope-intercept form, be it linear or non-linear, the area between the curve and the x-axis between two points can be easily approximated with the Riemann Sum using a For loop.

This is a simple pseudo-code example, where Y1 is the function and Y1(I) is the value of Y1 at X = I:

N = 0
For (I, Left Limit, Right Limit, Step Interval)
    N = Y1(I) + N
End
Display N

To determine the step interval, use this:

Step Interval = (Right Limit - Left Limit) / Number of Steps

To improve accuracy, there are multiple ways of using this approximation, which distinguish between which end of each step to use.  To adjust the limits and intervals for the desired method, use this code:

If LRAM (using left end)
    Right Limit = Right Limit - Step Interval
End If
If MRAM (using middle of step, often most accurate)
    Left Limit = Left Limit + (Step Intverval / 2)
    Right Limit = Right Limit - (Step Intverval / 2)
End If
If RRAM (using right end)
    Left Limit = Left Limit + Step Interval
End If

For anyone wishing to have a complete program for a TI-83 or TI-84 calculator, use my Riemann Sum Program.

Please note that this is an approximation. You can find exact answers using integrals.

No SMTP with GoDaddy

As the first letter in the acronym SMTP stands for simple, that’s what I was expecting when I decided to use the Google Apps SMTP server to send out notifications for Xusix.  In the end, after three days of repeatedly rewriting the mailer functions, I discovered the reason nothing was sending.  GoDaddy shared hosting doesn’t allow SMTP connections.  At all.  They simply block anything that appears to be sent through that protocol, or uses a common SMTP port, leaving me to the only remaining option: using GoDaddy’s own mailer.  The problem with this is that their spam filter is so aggressive, few messages ever make it through.  And so, notifications on Xusix, although programmatically work, will likely never reach an inbox.

Worst or Best Thing Ever

I’ve started something new, something I’ve always hoped to avoid because I hate it.  I’m now running not just one, but several autoblogging web sites.  They are designed to automatically build news sites for several locations across the U.S., build automated online stores composed of Amazon and eBay items, and integrate text advertisements inline with the page content.  These types of sites, while sometimes useful, are basically pointless to the end user.  They ultimately serve the purpose of generating a massive amount of monetizing content, from advertisements to direct sales.  The only reason these types of sites even exist is that the companies being advertised or sold through will pay a reasonable amount of their profits to the web site owner that pointed the customers there.  I hope to become that person, not because I like that particular method of making money, but because I can do absolutely nothing and get paid, possibly a nice sum, as well.  And so, you can view the ultimate in advertising mayhem at deals.alanaktion.com, www.dealscanner.tk, and a few unreleased domains that will appear in the near future.

Link

Okay, as if I needed yet another profitless project, I started up a nice new BitTorrent tracker and index site.  Check it out at www.openwave.tk and start sharing files today!

A new twist

About a month ago, I was working on a simple code project for school in some free time.  It’s a web site that takes simple phrases and makes a song out of them, based on the 99 bottles of beer song.  I rediscovered the fun little script today, and you can see my song here.  When you write a song with it, the URL that shows the song will always show your song, so you can send that link around to share it with anyone!

Donald Knuth

His books were kinda intimidating; rappelling down through his skylight seemed like the best option.

Binary

why does binary go like this? 01110111 01101000 01111001 00100000 01100100 01101111 01100101 01110011 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01100111 01101111 00100000 01101100 01101001 01101011 01100101 00100000 01110100 01101000 01101001 01110011 00111111

New Site

Alanaktion.com has now become a developer resource blog, where Alex and I will be blogging about developer resources that we find during our development.  I’ll also be building a section of the web site to provide resources that we build for sale and for free.  I’ll be going through all of my old projects and releasing most of them as open source soon, likely hosted on SourceForge, and I’ll link to all of those from the new site too.