What I'm hearing is all about the other employee, but there's a greater perspective of the office as a whole to consider. The general goal of most workplaces is to function as a team and combine the efforts of the team and the organization into a successful end goal. There's a fine line between specialization of labor (his analysis, your code) and claiming undue credit for someone else's work. While your fellow employee's claims are certainly annoying, another part of the picture is the perspective of the boss and the way work flows in the team.
Incentives and Goals
First - make sure you're clear on the incentives and goals for your work - is this a case of he-who-presents-the-most-final-product wins? Or is it more about combining efforts - code, analysis, reports - where effort is regularly combined, so that any large and meaningful contribution is valued?
Ways to diagnose this:
- What activities are directly tied to any bonuses or incentives?
- Who has gotten rewarded or praised in the past? What actions get promotions? Who is held in high esteem by the boss?
Make sure your contributions are clear to the whole team by taking ownership
Don't just say "hey, I wrote that code" - take ownership of the code in a helpful and supportive way. When the colleague is going on and on in the team meeting about his great findings - ask him if the code base is working out for him? Are there any updates that should be made? Propose ways that the code base can be grown, since it's clearly something that is useful to more than one person. Given that you are the primary creator and the mind behind the key decisions in this area, your competence will shine through, and you'll be having a productive conversation.
This is a way of highlighting that something you made has now benefited two elements of the research - your own work and your colleague's.
Talking to the Boss
Yes, if you are concerned that your boss doesn't see the value of your creations because someone else is taking credit for your work, it's time to have a talk with the boss. A key element here is to get a sense of whether the boss understands that your code has serious value and took serious work that was yours and yours alone. Generally in a team the work of any team member should be available to colleagues for reuse - the organization paid for this work for the good of the organization, not the individual. But often that work isn't given much credit if it's not the major visible output of the team.
Generally it won't go well if you are simply passively asking the boss to recognize your work and to shut down the bragging of your colleague. But it is important to ask for:
- affirmation that your contribution to the research be recognized - including any insistence that is appropriate in crediting you in publications
- input on whether value is placed on the work you've done - in a software development shop, there is no doubt that the code has value. But when code is used as the means to an end (getting data for analysis and writing reports) - it can be important to get a sense of whether the organization values this work.
Taking ownership vs. Begging for Credit
Either way, it's communicating that you have done good work and provide valuable contributions to the team. Taking ownership in any venue is generally stronger way of communicating the value because it shows that you have vision, useful input, and you're not putting anyone else on the defensive. It sounds like this guy is doing work (analysis) that lends some degree of value - he didn't just carbon copy your work. So if you start pointing fingers, you start getting into a realm of judgements and defensiveness that may not work well for anyone.
But if you take ownership of your own work products and make them valueable to the team, you show a positive way to move forward and you highlight yourself and the work you do in a way that is hard to dispute.