BiggieStylin Evil Genius. Love it/Hate it.

1Dec/110

SimpleIRC

So I know its been a while since I've said anything or worked on anything related to SimpleIRC, but I think its time. I've been wanting to dig back into Python again and learn more, so what better way to pick up Python3 by writing my old IRC bot code back up again. Hopefully I'll be able to make some progress and get it going again... miniE will live again! If you want to help or keep track of my progress, go on over to my SimpleIRC github page and have a look. Keep checking back for updates, hopefully I'll have a running bot again soon.

18Jul/104

Netbeans 6.9 CPU Usage

I use Netbeans for just about all of my editing on projects anymore.. and the latest version of 6.9 has had a problem I've been dying to get fixed for a while. I'm primarly a PHP programmer, so I'm not sure if the bug extends beyond the PHP plugin or not. However, I've noticed while having a project open, Netbeans seems to use 100% of one of my CPUs (dual core machine). I've been casually searching around for a fix and until tonight I hadn't found anything. Finally I found this comment on the netbeans blog which provides a flag to use that seems to have fixed it completely!

Hopefully this helps some of you out there from getting totally frustrated with netbeans. For those of you who don't want to click the link... the fix is to add this flag to your shortcut for netbeans.

-J-Dnetbeans.indexing.recursiveListeners=false
30Nov/090

SiTech_Plugins

Well, I'm finally doing it. I'm rewriting my voodoo code that makes reloadable modules or plugins in PHP. I've always toyed with the idea of rewriting my original work for PHP_Modules and making it work with classes; now the time has come. I have started work with my SiTech library to make SiTech_Plugins. It will be the same concept of PHP_Modules, but not only will it work with functions, it will now work with classes. This is something that was never really possible before because when PHP_Modules was written, it was written for PHP 4.

I haven't gotten very far yet with code, but the theory of it is to create a base class with a __call() method. That's basically all the base class will consist of. When a plugin is loaded, the class read from the plugin file will be created to extend this base class. From there, all methods found within the class will be stored as lambda functions inside a special class variable. This then makes it easy to reload code, by recreating the lambda function when the code is reloaded. Therefore, the class itself never needs to be redefined, it just needs all the functions reloaded. So, in theory this is entirely possible with PHP 5 and the use of the magic __call() method for classes.

Some of you may wonder why I don't use runkit from PECL. While it would make things a ton easier, I wanted more of a code solution that might work for everyone without extra requirements. I might look into creating it to work both ways though. I can imagine runkit would be a lot cleaner method of doing such voodoo, but I'm also unsure if runkit will even compile with 5.3.  I'll have to do some research into that and find out for sure. Of course, there will be more to come as I make progress even if its good or bad progress.

10Nov/090

Life & Updates

Well, its been a bit since my last post and I think its time for another update. I'm still looking for a job, haven't had any luck finding much yet. Might have a part time job lined up until something else works out though, so that's good :) On the other hand, I've had some time to work on dev.php-oop.net So far its been mainly backend work, so there's not a lot more to show for it, but I've taken some time to implement a new password hashing using crypt and blowfish. I'm also trying to work on the password reset form to make it work better. Currently it just resets the password, but I want it to e-mail the user, then the user must click a link before the password is actually reset.

On the other hand, my jogging is going well. I'm not keeping up with it as good as I would like, but I have managed to go as far as 3 miles in one time. I also went this past Sunday and jogged with my friend, we both ran to see how fast we could do a mile and half. I managed to run it in 12 minutes and 51 seconds! I just hope I can keep doing it and keep running further. I would like to participate in a marathon sometime soon as well. I'm also, starting this week, lifting weights with the weight set I just got moved in. I'm hoping between that and running, I can make up for the last few years of my life that I just haven't tried anything to get into shape. Hopefully I'm making up for lost time at this point :)

24Oct/090

Life & Changes

Well... things have been changing in my life lately. I've had to move back to my home town and look for a job in the Kansas City area. I'm currently living in a house my parents own until I can get a job and a place of my own. Kelsey had to move back in with her parents for the time being until sometime in late January or early February of next year. Its hard on both of us, but we'll make it through it. I'm currently looking for employment in the St. Joseph, MO or Kansas City area, so if anyone knows of anything, please feel free to let me know.

On another note, with the lack of work I've had lately, its given me time to work on php-oop.net again. I've actually been working with the dev site to get things going. I started with a total rewrite because I wanted to take a totally different approach to the back end of the site. I didn't want to use a framework, but I wanted the same structure. I wound up using my own SiTech library for the back end to make it more MVC like. I think the approach is working wonderfully. I've learned new things and made tweaks to SiTech to improve functionality and how it all ties together. If anyone is interested in participating with either SiTech or the development of php-oop.net, please let me know. I could always use some extra help.

A couple of other things I'm trying to do more/better is writing in my blog, and jogging each day. This is the first post after a while, so we'll see how that part goes, but the jogging is already going great! I started Monday (the 19th) by jogging almost 3/4th of a mile. I can say that Tuesday, my legs were so sore that it killed me! Wednesday I went jogging again, but I'm not really sure how far I made it. Thankfully after that my legs weren't as sore, but still hurt Thursday. Yesterday (Friday) I went jogging again and actually made it a full mile! Since we ran on a track, I also did a lap of sprint/jog where I sprinted the straight parts, and jogged through the corners. It was really great, and I'm happy to say today my legs don't hurt at all. Hopefully next week I'll be able to push it up to where I can go every day instead of every other day.

Well, here's to hoping things go as planned... I'll update again later this week.

11Jan/090

Seven Things

Well, I've been tagged by Lig to write seven things about myself. This should be interesting... Here's my seven things:

  • I've been coding for about 10 years now. I started when I was about 15 by learning HTML and Perl. Shortly after though, I picked up on PHP3 and the journey began. I used to love being an admin on the EvilWalrus website, and actually gained most of my knowledge while coding on the site. Now I enjoy languages such as PHP, Python, C/C++ and C#.
  • I've been with my girlfriend Kelsey for over four years now. She is my everything, and I plan to spend every minute of my life with her. I want to travel the whole world with her and see everything we possibly can. She is the most amazing person and the most amazing thing to ever happen to me. I honestly can't wait to make her my wifey :)
  • I'm actually adopted. I love my parents who adopted me very much, and I'm also so happy that they were able to give me more than I ever expected as a child. I don't know my birthmother at all and I don't have any desire to. I have a paper with her name and her mothers name on it, but there is no name or any information for my birthfather.
  • I've been to over twenty states during my childhood while traveling with my parents. I've also been to Cancun Mexico three different times, to Hawaii four times and Pearl Harbor twice. I've been able to ski in Colorado, snowmobile in Wyoming, and watch hot air baloon show in New Mexico. The thing I remember the most from all the traveling though is in Hawaii when we went downhill mountan biking. We had to get up at 4am in the morning and take a bus ride to the top of a mountan where we watched satallites orbit above us, and then the sunrise.
  • I don't get along with my family very well. I'm very close to my parents and grandparents, but not at all with any of my aunts, uncles or cousins. It's partially because I'm the second youngest out of 25 cousins and partially because I feel like an out cast and not accepted into my family.
  • I was home schooled from 7th grade all the way through high school. This was for a couple of reasons, one is because of all the traveling I was doing with my parents. Another is because the kids at the private school I went to loved to pick on me and I hated it. While I enojyed home schooling, I feel like I missed out on a lot by not going to high school.
  • I actually know how to do a lot more than use computers and program. My dad is a developer, so while growing up I learned a lot from him. I can operate several types of equipment like tractors, backhoes, loaders, bulldozers, and skid loaders. I've also had to lay sod, pour and curve concrete curbs, and do lots of odd jobs for him. My favorite thing is when he would get new land and there would be buildings that we had to tear down and destroy. I've seen some of the hottest and biggest fires from burning the debris. My dad has shown and taught me a lot of things that I'm very thankful for.

Well, there's my seven things.I hope its been as interesting of a read as it was for me to write. Now for my seven people... ok, only five, but I'll add two more later. :)

  • Adam Ward - Because he's been an awesome friend over all these years.
  • Joey Smith - Because he's been an awesome mentor and friend, and he's given me my start into Linux.
  • Cody Brocious - He's always been there to talk and help. I wouldn't have gotten anywhere in Python without him.
  • Philip Olson - Because we still need to get that windows site done! ;)
  • Graham Christensen - I know he's been tagged already, but I haven't seen anything yet and would love to.

Last but not least... the rules to pass on!

  • Link your original tagger(s), and list these rules on your blog.
  • Share seven facts about yourself in the post - some random, some wierd.
  • Tag seven people at the end of your post by leaving their names and the links to their blogs.
  • Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter.
19Sep/080

New Tutorials

Well, I'm sitting here today trying to think of new subjects to do a new tutorial. A few ideas are coming to mind, but if there's anthing that anyone would like to see, please let me know. It'll probably be a few weeks before I have anything ready, but I'd like to start on something!

5Feb/080

New Tutorial Series: What you should know about X

I've started on a new series of tutorials that I plan on writing over the next few weeks. They're pretty simple subjects, but I feel they need to be out there! The series is titled "What you should know about: X". My first subject in the series is Dynamic Includes. This is based on my previous tutorial that is here, but is completely rewritten.

I'll start working on a new tutorial when I get the chance. As the tutorial says in the conclusion, it will be about input filtering to prevent injection attacks on your site. I hope someone who reads these will learn something they can put to use! If you notice any problems or errors, please just let me know. Happy reading!

12Dec/070

PHP and ini_set() – A few things you should know

Today I was writing some code for a website I'm building and came across a problem when trying to set the include path. When I was using set_include_path() and ini_set() to set the include_path, both functions would return false. It took me some time and a bit of help from Davey to finally figure out what was going on.

In my Apache configuration I was using php_admin_value to set an include_path for one of my virtual hosts. If you're not familiar with php_admin_value, you can see the manual page here. By using php_admin_value in the httpd.conf (or a vhost), you're there by telling PHP to force that setting and disallow anything else to change it, meaning PHP scripts or even .htaccess files. That was fine, except what I didn't realize, is that for some reason PHP sees that setting and disallows it to be changed in any other virtual host or PHP script running under Apache. I can only speculate that this behavior is a bug and not intended. I would assume for that value to only affect the virtual host it was declared in, but instead, I spent 30 minutes debugging my code wondering why my calls to set_include_path() were returning false.

Let me just clarify for a second, the virtual host I had php_admin_value on was called, lets say foo.example.com and the code I was working on, that was returning false, was in the virtual host for bar.example.com. So, as soon as I realized that was the only place I was using php_admin_value at was foo.example.com, I changed it to php_value and restarted Apache with the new configuration. Instantly the code on bar.example.com began working as expected and setting my new include_path value. I'm not sure if this is default expected behavior, but it's not what I expected at all. I will be filing a bug report to verify this though.

Well, that was my fun for the evening. I just wanted everyone to be aware of the effects php_admin_value and php_admin_flag have on your Apache configuration. If anyone has any different results or findings, please let me know!

10Dec/070

Call of Duty mods

Lately in my spare time, I've been working on something a bit different. Instead of the normal PHP or Python adventures, I've been working with a game language for Call of Duty. It's structured somewhat like C++ but there's quite a few differences. I won't get into them now, but perhaps at a later date I'll post my findings on the language itself, somewhat of a tutorial of sorts. Anyway, I've been working with this language to create my own mod for the game.

Why do I want to do this, you may ask? It's for a few reasons, but mainly because I'm curious and picky. I can't find a mod out there that does everything I like. Out of the mods I can find, I can't find one that works without modification and is easy to add on to. I'm modeling my code closely after another mod that I've downloaded and like, but I'm rebuilding the code, hopefully fixing a few flaws and problems I've seen and ran into with the other mod. I'm also taking things from another mod I like that will add features that aren't in the mod I'm modeling mine after.

I haven't got much done so far, but I'm hoping sometime this week I'll have some actual code that can be tested on my server. I'm going to have quite a few features in it, like the ability to maintain a crouch only server (this means that there is no standing and running, you must remain crouched), user punishment methods, bash only (weapon melee only attack), weapon damage modifiers, weather effects, and lots of other things. I'll make another post explaining more, it's pretty interesting stuff though. Until next time...