I do not wear my yarmulke at work, either in my office, other lawyers’ offices, or in court. I know that there is a hetter for this, for which there are various justifications. I also know, of course, that wearing a yarmulke is required for making a brocha, and I wear one in the office when I eat breakfast, lunch, or dinner at my desk. But, bearing in mind that I am still also aware that yarmulke is "still" only a minhag Yisroel, is it permissible for me not to wear a yarmulke when I say a brocho over small snacks, e.g., coffee, candy, water, cookies; and also when I say asher yotzer? I frequently am in situations where it is either extremely awkward or nearly impossible to put on a yarmulke in order to say a brocho, e.g., I sometimes need to sip water when I try cases before a jury; or drink coffee when I conduct depositions. May I say the brocho without the yarmulke (as I have been doing), or, is it better for me not to say the brocho at all? I was once at a seminar dealing with sheilohs in the workplace, and when this question was asked, the rav declined to answer. I respect that, but I would still like to have a definitive answer.
You should avoid whenever possible situations where you are obligated to say a bracha but cannot cover your head. The problem is in saying G-d’s name with your head uncovered so there is no difference between small snacks or large ones. The Mishna Berura (2 12) refers to someone who wakes up at night to drink and doesn’t have a head-covering handy. Although, there are those who permit him to say a bracha with his head uncovered (in a one-time situation), the Mishna Berura concludes that it is preferable for him to cover his head with the edge of his pajama. In the situations you describe you should come up with “creative” solutions. Perhaps you could have a small piece of cloth that fits into the palm of your hand and can’t be seen by others. When making the bracha, you could rub your head with your hand. Another possibility is to make a bracha on a piece of candy or glass of water just before entering the courtroom and have in mind the water that you will be continuing to sip once you enter. Start drinking the coffee before the depositions begin (are you sure it’s healthy to be drinking coffee and snacking so regularly?).