If you are getting paid to build the house because you're in the business of building houses, then yes it is an expense. If you're building a house to keep ownership of and rent out, then no, that cost has to be capitalized and depreciated over the expected lifetime of the improvement.
The general question addressed by this law is "should it be allowed to reinvest profits tax-free and delay paying taxes indefinitely?". There are many places in the tax code where this answer is "no" (eg you pay taxes on bank interest yearly, even on a long term CD), and there are many places where this answer is "yes" (retirement accounts, US savings bonds, stock buybacks, 1031 exchange).
It's ridiculous that software development is getting singled out, given that for most business activity the answer is default yes, with only specific list of things that have to be capitalized. I'm just saying the right answer isn't set in stone, apart from of what the tech industry has gotten used to and how effectively abrupt this change was.