Nice to mention you read the post by Spolsky, it's a good one.
If I understood you correctly, you are ALSO offered a salary that is 40% less than what you make now in addition to equity, that is actually a big deal. It's not typical for co-founders to even take salary early on, which is obviously a higher risk. A higher equity position would make sense if you were to work for free, but since you are also getting a salary, the equity being negotiated is a trade-off for the difference in the salary and your market rate.
Sounds like you are young and truly interested in the opportunity. Unless you have some financial obligations (big student loans, saving up for your first place or a wedding) you aren't giving up too much just yet. If you are going to be a lead engineer (by function) and CTO by title, it really will not do any harm to your resume, especially if the software you build is also an interesting project/experience in your opinion.
Do ask how much equity you would be giving up to investors for the money coming in. Dilution might be a bigger worry if you end up giving away most of it. Also, see what the valuation of the company be upon a deal, that will give you an idea what your equity stake is worth.
To minimize risk with your current job and paycheck, don't rush to quit just yet. Get involved with venture on your nights and weekends and don't quit until the check is written by investors (unless you have faith in your partner and savings to live on) and your agreement is signed. If you are in good standing with the company and they value talent (although sounds like you haven't been there long), you might be able to ask for a 1-month unpaid leave, so you have a way to come back if something goes wrong with the funds or the deal drawn up on paper ends up being different than what you discussed and agreed to. Do discuss this with your manager instead of just resigning - most good dev managers will leave a door open for talent to come back, even months later (I have in my dev manager days). That also means not burning bridges and not say anything negative about the company, sounds like that isn't an issue, so that's all good.
Assuming that you're talking a proper CTO role - building a technical product, managing a team of technical people and being responsible for the future of the product (and therefore, company), your friend needs to realise that whatever he's built is going to get thrown away - because it's just a prototype. From a guy who's learned the basics of coding.
If that's the case - I suspect he's undervaluing your contribution. Whilst you're not taking on the risk of working for free pre-investment, you are taking the risk of starting a business from scratch, you are taking the risk of your reputation, and you are making financial and life sacrifices to do so. There needs to be adequate "reward" for these risks.
If my assumption isn't the case, or, he doesn't admit it, or it's not a truly technical product, then he should get a lead engineer instead.
Remember, he's asking you. You specifically. There's a reason for that. Your job is to find out what that reason is and come to an agreement on what the *actual* value is, not what either one of you *feels* is right.
Or just do it. Or don't.