Older blog entries for trukfixer (starting at number 6)

Hmm.. went to add a note at php.net.. doesnt seem to have taken it.. some reason I intermittently get page not found errors over there.. anyhow, I was gonna put this under the abs() notes, may as well post here too. input always appreciated..:)

assume we take user input from a form untreated and assign it to variable $range. We want to be sure this number is a Positive Whole number, since abs() just sets a number to positive or 0, and we dont want decimals...

if(!is_numeric($range))//checks for numeric input
{
$range=1;
}
//sets $range to integer 1 if input is anything other than a numeric value
if(!int($range))//checks to make sure it is an integer (not decimal)
{
$range=int_val($range);
}
//if a decimal- sets $range to integer value
$range=abs($range);//sets value to positive whole number

for example the input "testing" would return $range =1, the input "3.578" would return value=3 If the input is null, I am havent tested to see if it gets set to 1 courtesy of int_val or not, but I believe it will be.

I'm sure there's probably a more elegant way to do this using regex, however for an apprentice php coder, this might be a little easier to understand and use.

anyhow, I've been digging around on the use of regular expressions in php, finding some interesting ideas..

personally, Im in a fairly decent mood. although Im collecting lots of scratches from my new kitten.. he's nuts. flying all over the place like a little hellraiser.. middle of night he decided to play with my hair, leaving 3 nice scratches on my forehead.. he also decided to chat with a friend who said hello early morning while I slept... if you can make sense of ".....////////////////'''''''''''']]]]]]]]]]]]hhhhhhhhhhhhhh"

let me know.. I'm not sure whether he was saying "hi" or "get lost, dude, let Bri sleep!"

kind of slow at work.. being on flat rate, my paycheck this week is gonna REALLY suck..:(

Oh well.

Hmm been a while since I posted here. an interesting weekend on the personal level, learning a lot about myself lately.. mainly my patience and tolerance....

Finished the map pagination for NGS and committed it, it works really well, and we are taking it a bit further, although I dont know how much of it will actually be implemented, because we are adding a couple new features for our game... going to have to make it modular, however.. we'll probably make the code so that we will have a drop-in module that can be coded and modified as the NGS code changes, making it easier to maintain separately.

Also continuing alpha development of the affiliate code (but I gotta get a hold of the client sooner or later, I've reached the point I cant take the code further until I know what data is required to be maintained)...

I also gotta get back to work on my CMS for my website.. I've let that lag a bit. I got to get off my butt and stop being such a procrastinator... it's just hard for me to do something a little at a time, and pick up where I left off. I like to code straight through and complete the particular section of code I had in mind, but time constraints seem to prevent that at my current coding speed.. I also spend WAYYY too much time reading forums (OPBS= Other People's B.S) and I'm too tolerant of incessant chatters on AIM.. however, I've downloaded deadAIM, which allows you to appear away to the world while chatting with someone else... Also grabbed SpyBot software and finally located that no-good piece of junk software that has been generating pop-up ads by force on my PC... hopefully my tired old system will be a little more stable now.. If I could afford a new PC, I'd get one, and switch my current machine to Linux (with a new hard drive and a memory upgrade) so I could do my development work on the linux machine... I think it would save me time.. right now I have an ancient P2-350 machine running the Linux. which originally was intended to be my development machine, but it has a bad hard drive, and I dont want to go putting a new hard drive in such an old box.

Oh well... one of these days, I'll hit the lottery (yeah right, when I'm 90 and too old to enjoy it!!)

After having a look at my activities for a while, I've realized the necessity to leave some control to others...

So.. I've learned the true meaning of Delegation of Authority.... giving up control of aspects of my website that take up time, to another person, whom I must trust to do a good job. It wasn't hard to do. the trust is already established, so now I am down to the administration of just a couple of the games I run, very little else to do now, which frees me up to concentrate on coding.

I've started digging into the WorDoG code and beginning to realize it isnt quite as good as it looked at first. many portions will have to be re-coded to suit, it appears...

I've come up with an additional bunch of ideas again.. I keep getting ideas faster than I can code them, Im going to have to learn to code faster than my ideas..

Personally, I feel a little more relaxed lately, although still overly tired and sluggish... Can't wait til my insurance takes effect so I can get a complete checkup and have my back problem looked at.

I think I am going to look into learning a bit of C++ code as well, although I don't quite know what I want to do that for, it just interests me at the moment.. Perhaps just a whim, I dont know...

Enjoyed a good laugh with iamsure over the comments by the aatrade team about cvs commits. Not to mention QA testing for a couple very interesting bugs, and finding some really weird stuff going on with sessions.. gonna be interesting to figure out what is happening there..

Whew.. what a weekend. we got NGS working , released, and a game running.. I also got wordog.net back in place and the game running, but I need to learn a bit more about classes to really understand the code.. The display is buggy. Oh well.. I still have a million and one things to do and a bunch of notes to go through. Managed to get some housework done over the weekend. (didnt do anything for the holiday)

Development of the affiliate software is coming along slowly right now, need more info from the client, however I think I have enough to run a pre-alpha test on the scripts and see if I can tighten up the code a bit. we'll see.
started studying more Linux .. need to get a little more in-depth to take some things further and develop a few handy macros that I have in mind for my specific purposes... since I do quite a few script installations, I'd like to make a set of commands into a macro using just a couple of variables, which would grab and install a given tarball into a given directory on a given webfolder, with all needed permissions already set.. but that would rely heavily on the permissions being properly set in the tarball itself. Hmmm....

THE CODE: Last night, came home from work to a half dozen requests varying from minor bugs on some code I am running to a request to look at and debug a cgi script or re-code it in PHP.. gawd, sometimes I LOATHE AIM.. I wish I could set "away" selectively or put someone "on hold" until I get around to them.. if I close the window, they pop up right in the middle of what Im typing (ticks me off), and if I minimize the window, that stupid flashing alert drives me nutz.. I suppose I could disable the flashing window when minimized, but then I'd forget that they had a problem.. and p*** them off.. so many issues, trying to discuss them all, accomplished absolutely nothing last night.. zip, zilch, nada...

I got so frustrated with it all I almost deep-sixed the server and everything to do with coding.. one of the warning signs of impending burnout.. SOOOO.. I am taking a few days off, and absolutely REFUSE to discuss code or server issues, much less look into them, until this holiday weekend....
PERSONAL:

finally getting health insurance this month.. about time! maybe get something done for my back problems..

1 Jul 2003 (updated 1 Jul 2003 at 15:11 UTC) »
WORK ... is a 4-letter word... working on cars can be a pain in the *** some days (yeah Im a mechanic in the real world) I sure do hope I can find some funding sources soon to get back to school.. My back problems are really killing me.. it's to the point my left arm is almost always feeling like I got a shot of novocaine in the shoulder- numb shoulder down.. affecting my performance on the job.. cant afford medical bills, Hmm cant afford anything actually.... Mechanics are sadly underpaid! For all the training(40 hours plus a year) investment ($2000.00 a year in new tooling, $15,000-$60,000 total investment) and headaches (modern cars have as many as 30 on board computers, networked and multiplexed, making accurate diagnosis a huge headache, in addition to the HIGHLY limited accessibliity- ask me sometime how to get to the generic electronic module on a ford escort.. you'll need lots of band-aids)and Experience (18+ years for me, master certified, etc, etc.) 20-25 grand a year isnt much of a salary anymore...

server: my first love.. finally got this thing running smoothly again (after almost 72 hours downtime- tech support on cheap remote servers really IS lousy- you get what you pay for) and finally getting things back in place. I got to remember to send zaldun the info he needs for the projects...

Hmm spent some time here trying to figure out how to get myself noted as a project developer and/or contributor to the Nova Gaming System project.. no such luck..

my first exposure to a blog- interesting stuff.. finding lots of good info here.. and interesting projects.

Talked with Zaldun about 1.5 hours in regards to a banner roation/timer/account credit script for the affiliate software.. (he's doing the JavaScript, which I know very little of)

He has some rather good ideas, and is a great asset to all I do...

HMm.. talked to Mom tonight.. they miss me.. I've been in Miami since November now, and love it. Amazing that a country boy can move to the big city and enjoy it..



Just read iamsure's article- excellent advice....although I guess I'm biased.. being that I am kinda intimately involved with NGS...

Well I guess thats all for tonight.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!