Archive for the ‘perl’ Category

Fedora Core 5 irssi scripts

Tuesday, August 8th, 2006

I have been using irssi as my IRC client on gentoo for years. I loved it, I would run it in screen so when I was out in the “real world” I could ssh into my system and “pick up” my IRC session and chat with my buds. When I installed fedora a few weeks ago I made sure to install irssi as well

yum install irssi

For those of you who wanted to know how to install it for your self. I noticed after I installed it I wasnt able to load any of the scripts I have written for it. I was missing the vital command “/script”. To solve this problem all that has to be done is to run the following command

/load perl

This will give you the “/script” command, and with out it you cant load or run any perl scripts. To keep from typing this every time you start irssi simply add it to your startup script for irssi. From the command prompt run the following command

echo "load perl" >> ~/.irssi/startup

I hope this will help someone out there.

Commenting your code

Thursday, September 29th, 2005

Ok I have been reading and writting a lot of code lately, and one thing that is really pissing me off when I start reading other peoples code is the massive lack of commenting that is going on. It really drives me insane. Whats wrong with taking 1 min of your time as you are writting code to pause and

// this is a comment
/* or maybe this is a comment */
# and maybe this is a comment…
! Maybe even this. Whats it take to get people to comment!?!?!

It doesnt make you cool to not add comments to your code, no one thinks youre a great programmer because you managed to write 1200 lines and not 1 comment in it, it makes you a bit of an a-hole. Im not talking to any one person out there, and if you do comment your code good woot for you, keep it up.

I have been running into a whole mess of uncommented code in the UT2004 video game. It has all this open source stuff where you can make mods etc etc, and thats great and all, but when youre doing code for public projects such as a game mod like this; even if you dont think anyone will look at the code; better guess again, we will reverse compile your code and look what you did to see how it happened so we can make a mod thats similar or maybe even fix a bug in your mod (yep you might have a bug in your mod I know its hard to believe) and reading through 1261 lines of code to find 10 lines that have a comment on them and then only 4 of those 10 are even the slightest bit like a comment (the others are who evers name and date etc) makes it harder to fix your code, or see what youre doing/trying to do. Moral of this rant is to comment your code no matter what your doing!!!!!

How to start Fluxbox with a random style

Wednesday, April 20th, 2005

In #fluxbox yesterday someone asked if fluxbox could be started with a random style everytime. The simple answer is no. I told this person I did feel it would be a simple thing to whip up a script to set the style to be random everytime, and well….it was pretty easy. If you would like to have fluxbox start with a random style try my script in the downloads section. Its in the perl section. Right now the styles must be located in ~/.fluxbox/styles and I dont really have plans to do anything else to it unless someone sends a patch.

Fluxbox Menu Creator

Friday, March 25th, 2005

I have been wanting a version of fluxbox-generate_menu that I could use that would only update my background dir. Also I didnt want anything but the few minimal tools I like to use. I could have used a method built into fluxbox to put all of my images in the menu and it would even dynamicly update…but (and this is a big stinky but for me) it would put all the images into 1 sub folder. No big deal if you dont have alot of background images. I have over 300 and yeah I like to have them all in my menu to choose from. So during the night I got bored and as usual I couldnt sleep, then to top it off it was dead in #fluxbox on IRC so I wrote If you want a menu that will be like mine and only have the things you want and use in your menu with out alot of editing then this may be for you.

thanks to Zan for the spell checking of the app.