My younger son is currently studying computer science, applied math and physics at an Ivy League university, while my older son already has a CS degree and is considering starting on his master's; both have worked on multiple projects for small business owners. Perhaps because of this, I am frequently asked what advice I might offer to a freshman interested in pursuing a computer science degree.
For the entrepreneurially-inclined, get real-world experience as early as possible, ideally before beginning or in parallel with taking CS classes. It's one thing to "play with" cool features or to do a narrow task for a class assignment; it's quite another to do a project from scratch to someone else's specs, some of which you will not like.
The less technically competent your client is, the greater the learning experience. There are plenty of businessmen out there who will point to Amazon or eBay and expect you to replicate and enhance it for $600. Since you attend the Hogwarts School of CS Magic, shouldn't you be able to just wave your CS wand and make it so?
Other businessmen will give you broad ideas, rather than specs, and expect you to get started immediately. A few days later, after a meeting with another businessman, they will attach some random addition that doesn't fit, in the hope of creating "synergy." A few days later, another random addition will be added to the requirements.
Of course this will drive you nuts. But it will quickly teach you to ask probing questions before
starting a project and to triage out potential clients who will be more trouble than they are worth. Should you decide to work for "the man" after you complete your CS degree, at least you will now have the experience (and cynicism) to recognize a potential idiot boss before you make a long-term commitment to working for him.
If you do decide to build a work portfolio and don't really care much about the money component, make sure you avoid the "big idea" sweet-talkers who will rope you into doing a project that "will make you both rich." No money, just a vague promise to split future profits (with no signed legal agreement or business plan in sight). There are plenty of people like this who specifically prey on the young and inexperienced. Avoid them like the plague!
Instead, find a small charity or local community group and offer to work for them for free. At least the project will have defined limits, will get finished, and will likely get you a recommendation from a grateful client. An alternative way of getting clients is to offer to swap your time and growing expertise with a small business that you already frequent -- say a neighborhood restaurant or car repair shop.
I know this somewhat different advice than many of the other articles you might read, which focus more directly on CS itself. However, note that in the real world you'll very likely need to interact with the idiosyncrasies of the business world, probably more often than you might like.