I am leaving my company and I am throwing a farewell party. It appears that there is no problem from the culture of my company, but I am wondering if it is a good idea to pay for my own going away party (ie, buying pizza). I would like to leave on good terms, with my coworkers and employer, would this be a good idea?
I think it would be a lovely gesture. You see, it's not too often that the departing worker buys the cupcakes or pizza. Usually the manager buys it for the departing employee. But in this case, it'd work out Ok if you had pizza + more.
So you'd get brownie points. It could possibly lead to some future gains, also.
So yes. Pizza is good.
In case, your co-workers are coders, then they would remember you for life. (If you add coffee in the treats list, then you've struck the chord there!)
If not, then still you would be remembered, everyone loves pizza.
On a serious note, I would also advise you to have a nice talk(about anything) with all of them before you leave, so that they would be happy to come forward to offer help in the future (or maybe future gains too like @Adel wrote).
I'm going to go against the grain here and say this sounds horrible. If you have to "buy" (so to speak) your way to get good references then there is a serious problem here. What I think is going on here is that you're excited to leave and you're not thinking straight. My advice is if this costs you more than 25 dollars, I would pass as it seems a bit too excessive just to get a reference.