Comment by ndriscoll
That's why I didn't just include code; if you produced valuable design docs as part of your work, that was part of your research too. I'm generally skeptical of the societal utility to offering any protections or special treatment for trade secrets though (the entire point of patents/copyright is to incentivize people to share these things; it's insane to also protect their secrecy), so that no doubt affects my thinking. If you want the deduction for having spent money on R&D that you didn't think was valuable, prove it by giving it up. If it's entangled in other secrets you don't want to share, you get no deduction. Seems fair to me.
That is making assumptions that aren’t based in reality. Serious software R&D stopped relying on patents and copyrights years ago because they are effectively non-enforceable in many cases.
A significant percentage of algorithm and foundational computer science R&D in software is now protected exclusively via trade secrets. There are no other practical options. This wasn’t always the case but all other forms of protection have steadily eroded over the last couple decades.
Weaponizing the tax code because you have an ideological aversion to trade secrets doesn’t seem fair to me.