When former Chicago Cubs farmhand Matt Canepa and his college teammate Pat Pezet were wrapping up their finance degrees at California Polytechnic State University, they were struggling with the reality that they would no longer be a part of the baseball world.

Little did they know they were about to come upon an idea that would bring them right back to the game they loved.

While up late one night working on an economics project, the two -- acting like a couple of "college idiots" as Pezet said -- put some coffee grinds in their mouths to get a quick caffeine rush.

“We immediately thought to ourselves, 'I wonder if we could actually make this?'” said Pezet, who spent five years at Cal-Poly, the first four as a second baseman for the baseball team.

Grinds was in 20 major league clubhouses with all 30 organizations using it at some level at the start of the 2012 season. Courtesy of Canepa/Pezet

A few years later, that idea has become a growing business. By the start of the 2012 season, Grinds, marketed as “coffee in your pocket” and a safe alternative to chewing tobacco, is in 20 major league clubhouses with all 30 organizations using it at some level, and it has even started popping up in some NFL locker rooms.

“I always knew [Canepa could be a good businessman],” said Cubs second baseman Darwin Barney, who roomed with Canepa in the minors. “He’s a guy who always had things sorted out. He was the guy that took care of all the bills and everything so he had a good handle on life and the business aspect of things. Lucky for him they came up with this idea and they had the resources to start a company. I think it’s pretty awesome you play with somebody and see them being successful outside of baseball but still being involved with the game you love. It’s a lot of fun to watch.”

Canepa was Pezet’s teammate for only one year at Cal-Poly, having transferred in for his junior year. He played well enough that season to get drafted by the Cubs in 2006. After struggling through two seasons in low Class A ball and realizing the game was "a little harder without a metal bat," Canepa was let go in the spring of 2008 and returned to Cal-Poly that fall to complete his degree.

That’s when he reconnected with Pezet and while trying to complete a school assignment, the two stumbled upon a creative and safe alternative to chewing tobacco. They entered a business competition to see if their idea had any legs. After getting third place in their initial competition, they finished first in another, winning $18,000 from the two competitions. And they got a small backing from some of the judges to try to make their business prototype a reality.

“That’s when we decided we needed to actually give this business a shot,” Canepa said. “You know, instead of just taking our winnings to Vegas after graduating college.”

Though neither Canepa nor Pezet was ever a tobacco chewer, having played baseball for so long, they knew many players who were. When they graduated college in June of 2009 they formed the company Grinds and in the spring of 2010 they took their new product to spring training and gave it to the players, hoping to generate some buzz by handing out free samples.

While the initial prototypes weren’t exactly as they had hoped -- the coffee was dry, the taste wasn’t that good and the pouches containing the coffee were too easily broken -- Canepa and Pezet were encouraged by the positive response they received from the players and coaches.

San Francisco Giants manager Bruce Bochy contacted Canepa and Pezet during the 2010 season and told them Grinds had been a huge help in his attempt to quit chewing tobacco. That was all the motivation the guys needed to perfect their product and ensure that 2011 was going to be a great year for their company.

By the end of 2010 they found a manufacturer that could provide a higher quality product, one that had a pouch that wouldn’t dissolve or break easily.

“It went from not really tasting great to something when you opened a can and you immediately thought, ‘Wow, what is that?’” Canepa said. “I remember being on a bus when we got our new product and when I opened it, the person next to me was really curious as to what it was.”

Canepa and Pezet provided their product for free to all players, coaches and team personnel and that hasn’t hurt their marketing campaign, either.

Cubs pitcher Jeff Samardzija, who was a teammate of Canepa’s while the two played for the Cubs' short season low Class A club in Boise, is a fan of Grinds.

“You’re always looking for a little extra energy out there and with baseball sometimes it’s a long day with BP and infield and so on down the line and then nine full innings of ball,” Samardzija said. “You know Grinds, they’re actually pretty sweet. Instead of carrying a cup of coffee around which could be kind of difficult at times, you just throw it in, and it’s kind of like beef jerky and it gives you a little jump of energy.”

The caffeine boost Grinds provides -- one can has 20 pouches, each pouch being the equivalent of about a quarter cup of coffee -- is something that even non-tobacco users can enjoy. The fact it’s easily used on the field, unlike other caffeine products, is another benefit.

Along with possibly increasing the caffeine content, adding some flavors to the existing line of mocha, mint chocolate and cinnamon roll are some of the changes they hope to make in the near future.

While Grinds clearly has its advantages over chewing tobacco, White Sox utility man Brent Lillibridge, who was introduced to the product by third baseman Brent Morel, who played with Canepa and Pezet at Cal-Poly, pointed out another baseball staple to which Grinds is an upgrade.

“Instead of bubble gum, it’s a healthy choice because it doesn’t have a bunch of sugar,” Lillibridge said. “It works both ways for guys that don’t chew and guys that chew as a replacement [for tobacco]. They’ve done really good at reaching out to us and trying to get the business going. Obviously, any good business is going to succeed.”

With Major League Baseball trying to crack down on tobacco use in general -- the new collective bargaining agreement doesn’t explicitly ban chewing tobacco use, but restricts when and where it can be used -- a product like Grinds figures to be in greater demand this season. That’s what Canepa and Pezet are hoping, as their stated goal is to be in all 30 clubhouses by the end of this season.

“The cool thing about what we’re doing is that Pat and I recognize there’s a problem with tobacco and guys just want something else to help them stop,” Canepa said. “We’re not here to tell you that you need to stop using tobacco, but if you want to stop give our stuff a try and see if you like it. We’ve had guys go from using one or two cans every two days to one can a week. So they’re not technically quitting, but at least they’re reducing their use of it. It’s satisfying from that standpoint.

“We get emails from players, in fact more from the wives or girlfriends, saying how much they appreciate the help they’re getting to quit this habit.”

Sahadev Sharma is a contributor to ESPNChicago.com.