> It's bad ethics to write stuff that only you can maintain
However, even in the best codebase, it takes time for somebody new to come up to speed. If they need help now, it will make sense for them to call in the original developer.
So, if you were a good developer and something happens, you can get called in to consult. Make sure you hit them for 50+% more than whatever your salary was; that's the penalty for the company gaining the flexibility to not use you when they don't have work.
And, even if something doesn't happen, they might want you to train the next person, again, make sure you charge appropriately for it.
Don't be a dick--especially if the company is going down, there are going to be other people springing loose shortly and you might want to work for/with them.
However, even in the best codebase, it takes time for somebody new to come up to speed. If they need help now, it will make sense for them to call in the original developer.
So, if you were a good developer and something happens, you can get called in to consult. Make sure you hit them for 50+% more than whatever your salary was; that's the penalty for the company gaining the flexibility to not use you when they don't have work.
And, even if something doesn't happen, they might want you to train the next person, again, make sure you charge appropriately for it.
Don't be a dick--especially if the company is going down, there are going to be other people springing loose shortly and you might want to work for/with them.
Good luck.