It seems like I'm all set for being accepted into a full time position following an internship at a major IT firm in my hometown (specialized in networking). Although I always expressed my interest in programming during any interviews with this company, I would always say that I do not feel that I could work in that field at a larger company, that's why I decided to try myself in networking instead. After being accepted we signed a "student work" contract with rather lax conditions about 6 months ago, which has basically concluded as of this month. The internship consisted of general training in networking from various in-house teachers on-site after school, no actual work was given to us thus far.
Unrelated to this job, I have been programming for years as a hobby, and I genuinely do not feel like I could work at a large firm. However, I recently took part in a national competition with very convincing results. Immediately after our standings were revealed a member of the jury called me aside and offered to connect me to a local programming job, also in my hometown, at a small company which I happily took. This outcome made me realize that I would rather pursue a career in programming, which I'm a lot more passionate about.
Now I'm faced with somehow communicating my decision to switch careers with my internship's HR, after having told them about rather pursuing a career in networking previously. We've already had casual interviews and we were set to have another round of "serious" interviews in late June (following final exams at my 5th year technician training in school) to finalize our positions and discuss payment, but the job we'd be getting would mean that I'd be reduced to answering calls and e-mails while trying to work my way up with studying for various certifications, which I no longer feel interested in whatsoever. I have not signed any new contracts yet, so the only obligations of having to work there are emotional.
I already had a casual interview with the programming firm and based on my initial impressions it seems to be a place I would want to start working at, and it seemed like they would be happy to have me on board. Regardless of the outcome, I've decided to leave the field of networking behind for good.
Should I give a notice to HR as soon as possible that I no longer intend to work at them, giving them time to look for a replacement ASAP, or should I wait until the offer at this second job is finalized with a written contract before giving any form of notice to my internship provider? How could I justify such a sudden change in direction in a professional manner?