Writing outside your identity can be fraught with peril for an author. I write male Characters. I like them but they are not me. I have not been taught the code, the signals that males use and acquire through shared experiences that are unique to their gender. If you want to avoid falling back on the tropes of masculinity when you write you have to give it some study.
Teaching eleven to eighteen year old boys for nearly twenty years has given me some insight. The expectations of behaviour and action placed upon them are similar to the ones I experienced but the responses are very different. Most interesting is the transition from twelve to fourteen years old when real violence enters their existence for the first time (hopefully). If you've ever had dogs you'll know what I mean. The brutal and rapid establishment of a pecking order as the testosterone kicks in and competition for status and mates begin. Most pass through this phase to establish themselves as the men we know from day to day but at both ends of the status spectrum there are casualties.
Some men never recover from the battering they receive and lack confidence and self esteem into adulthood and some achieve such success with brutality and horror that their existences are blighted by material success that lacks any emotional connection with their fellow humans. Both are equally broken.
Now, women experience this too. It is a part of growing up but within our society the social construct of gender is real. It's even harder when writing characters that live in era that is utterly alien to ours. I had to perform plot gymnastics to establish a second century female character as one that the men around her would treat as an equal. One of the reasons I wrote science fiction was to play in a culture that did not have those constructs. My characters did not have to burden themselves with the expectations of their gender and I could focus on other motivations for them.
I particularly enjoyed researching and trying to understand the military culture. My father was an NCO in the RAF and as a child I could see he was different to other men. His vocabulary and directness set him apart and demonstrated a different value system and beliefs to those around him. Trying to recreate that difference for the voices of my characters is one of the most enjoyable parts of world building that I do.
I must admit something at this juncture, seventeen years ago I swore rarely and never in public. It didn't even cross my mind to use obscenity and blasphemy. Then I met a right sweary little shitgobbler and yes, dear reader I married him. The stream of filth that would flow from him as part of general conversation was fascinating. He was a voracious reader (I wouldn't have gone near him otherwise) so it was not due to a limited vocabulary, rather the environment of his childhood and work.
I found it startling but it at least showed me a different style of language that, if used properly could be a part of my toolkit. At this point I should mention three of my favourite sources of inspiration in this field. The first is the opening twenty minutes of the Stanley Kubrick film "Full Metal Jacket". The drill sergeant, ably played by R. Lee.Ermey unleashes a tide of filth, that is both brutal and poetic on the recruits. This immediately establishes the otherness of the world they have entered and their status within it. Apparently it was scripted from the evening conversations he would have with Kubrick that were recorded and cherry picked for flavour. It is authentic and powerful.
The second I would recommend is Mark Thomas. A comedian, turned activist (though that could well be the other way round) whose joyous exposition on the utility of the word "fuck", "the swiss army pen knife of swear words" in his mid nineties channel four comedy special, "Sex, Filth and Religion" cheers me greatly. Do watch it, though he is apparently a little shamefaced when it's mentioned. Silly boy.
Finally, and to pull this back to my writing in a roundabout way, we come to ARRSE. It's a site for ex and serving members of the British Army. Safe to say a lot of the posters there have never actually experienced the joys of military life but there are enough there to give insight into the culture. There are rich veins of humour and horror running through it in equal measure. It serves as a space where men can safely be men without the usual strictures of polite society. Some of it is (hugely) offensive but as a resource it is invaluable. You see I have a character who wants to say more. It's got to the point where he'll end up with his own book, possibly even a twitter account. How he is does not fit with the general tone of the Custodians series.
I blame the Flashman books, I want to write a character that you wouldn't trust with your daughter or your car. He's sweary and pragmatic in his use of violence. His humour is sick and dark. I like him, I think you might like him too. You might meet him next year.