I have been working in an agile environment for the past year and a half (PHP, Java). Before that I was an apprentice with the company I work for, for a long while where I learnt how to make websites (basic html, css)...
But since then I've also spent a lot of my personal time (during non-work hours) reading various blogs, writing nifty functions in js, learning frameworks such as angular, libraries such as D3, and even writing my own version of jQuery (personal use). I've also recently started freelancing in my spare time for some extra cash.
Safe to say, I feel like while I know that I do not know as much as the seniors, I feel like I know enough of at least Javascript and CSS to not be lectured over simple things like defining a name space. But with one developer who is a senior, he constantly goes on and on about defining a namespace (of which I do every time), and extremely simple things like event handling etc. I feel like he's patronising me, and I find it very embarrassing.
Well a few days ago, I was writing inline javascript because I find it a lot easier to debug when mixing between a programming language and javascript, i.e. using values from the programming language in javascript. I then change this before it goes live with very little hassle, and since I was the only developer working on this I saw no problem doing this. Well he practically shouted at me over it saying "ALWAYS put this and that in a separate script file" and I told him I know this, I always have done aside from during the initial stage of development.
I just don't know how to handle it, while it may not be best practice to do it like that, and I didn't have all of the code outside of the js file, only the parts that were using values from the programming language.
He is a nice guy, he's not the kind of guy to say something spiteful and he's always helpful if I don't know something. I don't believe he does this as a way of patronising me, but as I say, it's extremely embarrassing because he speaks loudly in an open office plan and I find it quite insulting most of the time, just because of the sheer amount of time I spend working 14-15 hours a day some days (this job + freelancing/coding for fun).