On the other hand, in Canada you can put part of your mortgage paiement as deductible if you work from home (same thing with you computer, phone, etc). So that does lower your taxes compared with someone who work in a company. Is it the same in the US?
In the US, things that you buy and use for your job are tax-deductible (no doubt the IRS has a very detailed definition of “use for your job”). If your employer buys them for you, then the employer gets to deduct them as a business expense.
Mortgage interest (up to a certain ceiling) is always deductible in the US, whether or not you are working from home. If a certain part of your home is set aside for business use, you can also deduct a proportional slice of your real estate taxes, depreciation, and various other things, but not, it appears, the principal.
In Germany we can deduct all sorts of business expenses. It sounds like a sweet deal, but employees get 1000€ as "default business costs" automatically. Since programming does not require that many resources, I find it is not necessarily so easy to get far above 1000€ in business expenses. If you buy something expensive like a computer, you have to split it across several years, so it doesn't help that much either.