So mobile app developer here. New to the industry. Did an unpaid internship for 7 months then a low paying position with another startup for 9 months.

I've been struggling with finding a a better overall position and I finally passed the interview process elsewhere. They wanted to see some samples of my recent code so I took some basic code I've written from my current position and privately displayed it to their lead. Once they sent me the job offer, I put in my 2 weeks.

I told my boss/ceo about the process and how I used some code snippets. He was cool with it at first but a week later, I guess he told the CTO and he flipped out.

My final day was Friday with the flexibility of working next week if I wanted extra $ but now they're cutting it down to Thursday. I'm told that I broke their NDA and if I asked permission it wouldn't have been an issue. They said the code that I shared was nothing critical but I still broke a legal contract. CEO said he could write a cease and desist letter but probably don't think they have to.

CEO went on to say that he feels like he has the moral obligation to notify my future employer about this situation but at this point he won't. He personally feels betrayed by my actions.

I apologized and mentioned that i may not fully understand their perspective. I didn't do anything maliciously but I messed up. I feel bad that he feels betrayed but I'm honestly feeling like he tried to make me feel as shitty as possible. Threatening future employment really hurt me.

Maybe there's a perspective I'm not understanding.

AITA?