Right but if your goal is to heat your apartment (and your alternative heat source is also electric) running the computer is a pretty efficient heat source.
Well, efficient is hardly the right phrase. When it comes to heating using electricity then 100% efficiency is on the low side. A heat pump could be many times more efficient.
I just also want to add that gas heating is also effectively >100% efficient relative to electricity because there are no losses incurred on the power generation side.
That depends on how you're making that gas. IIRC algae (the primary ingredient in most fossile fuels) are less than 10% efficient at converting sunlight into chemical energy after metabolic expenditures. (There's also the part where the sun is <<0.00001% efficent at turning fusion energy into sunlight-that-hits-earth, but that problem isn't specific to gas heating.)
What people say is that all electric heat is equally efficient in the sense that all the delivered watts ultimately become heat, but at least in the general area where I live, electric heat of any kind is not efficient in the sense that it is significantly more expensive than burning fuel (natural gas, oil, etc.) at home.