Wednesday, October 8, 2008

A couple o' perl scripts

I'm in a course this semester in which we exclusively use Java. And whilst working on a project, I got quite tired of creating accessors and mutators (getters and setters) for every single member variable I had. So I wrote a couple perl scripts to do it for me.

Now, a friend of mine who uses an IDEs to write his software has informed me that many of them do this for you. I don't use an IDE. I don't have any need for it. The code I write simply isn't that big or that complex. I use vim and javac. And if I must use a GUI, I generally go with KWrite on Linux or TextMate on Mac (or Notepad++ on Windows if I've booted into it for some reason.)

So, these scripts are for you java coders out there, who, like me, just don't use an IDE. You can find them here.

If I ever get around to making a version 2, I might include support for C++. But as for now, java coders, have fun.

Oh, yes, by the way, these are the first perl scripts I've ever written. I know there are probably a thousand ways to improve them. By all means, download them and improve them if you want. Just remember to credit me and share alike.

Food waste

Today I ate at Subway. The woman in line ahead of me requested that they redo her sandwich as they accidentally put pepper on it. Now this was a full sandwich. Meat, cheese, vegetables, condiments, the works! And when she requested a pepper-free sandwich, the Subway employee tossed that whole sandwich, the whole thing, into the trash.

That was a footlong. It could have been a meal for two or more people.

Now lets do a little math. There are some 30,000 Subway locations, according to Suppose that each location threw away one sandwich a day. That is enough wasted food for 30,000 or more people! Let's look at what would happen if, I think more realistically, each location threw away just one sandwich a week. That's still about 4,300 meals a day. Food that could save, or at least ease, the lives of over 4,000 people daily. And why? Because Subway employees, in general, don't care.

I propose that there should be something of a recycling center for edibles. A place where restaurants could take their unwanted or uneaten food that would in turn distribute it to homeless shelters and soup kitchens for those in need. I further propose that these places, like regular recycling centers, offer a tangible reward for distributing this food. Or maybe governmental incentives.

I dunno. All I know is I don't have the money or the power to help. But someone out there does. If you can, please, do something. This is stupid. If people don't want it anyway, at least give it to someone who needs it!

But until that happens, if you're ever homeless in Jacksonville, Alabama, the dumpster behind Subway is a great place to score some grub.