@ricomariani

A few words about data and concurrency

“I need an atomic integer”Oh Lord, here we go.I find it completely astonishing observing what people think they need with regard to concurrent constructs and especially data sharing. It’s super hard to even understand all the considerations, even for experts, which is why not sharing data between threads at all has to be the first line of defense.But ok, you want to go there, I strongly recommend you don’t, but at least let...

@ricomariani

Approximately Correct Notes on Selected Threading Models

I’m not sure when I started thinking about threading this way but I’m fairly sure it has a lot do with too many hours spent thinking about remote procedure calls and stuff. But anyway, these are very useful notions.So, let’s consider a fairly simple case which illustrates the main kinds of choices you have. The idea here is that you’re going to get an object O from some provider P and then use it. Here are some of the...

@ricomariani

Performance Personae Cheat Sheet

[I decided this would be better if I pulled it out into its own thing: See https://medium.com/@ricomariani/performance-personae-96c46d28dbdd for the full article]Code Persona: Inner LoopCPU factors dominate costexcellent locality requiredno tempory allocations, only direct output allocationsthreading issues handled at higher level, code is generally devoid of any kind of lockingKey metrics:path length — cycles per...

@ricomariani

A few words about getting people on board

I was recently reminded of the importance of actually getting people involved and engaged if you ever want to be successful. If there is a secret sauce to this it’s this: Aspire to the awesome, and sell the awesome. Nobody wants to be part of the next mediocre.When people talk about their most amazing, most fun projects, they never recount that one time when they got a 1% improvement in performance or reliability with some hard work....

@ricomariani

The Essence of an Ally

No matter your cause you will face some of the same tough situations to various degrees. The word “ally” has evolved some but its essence is ancient.Sometimes you must not act when you wish you couldIt is far easier to get angry on behalf or your ally, solve a problem on behalf of your ally, or otherwise “do” something. But so often the right thing for you to do is nothing.Many times you are told things in confidence, your...

@ricomariani

Avoiding Coding Pitfalls with Performance Signatures

[Originally posted 12/11/2006… this came up again and I thought it would be good to reprint this pearl on Medium. Some notes added.]On Friday of last week [2006] I gave this presentation at the Computer Measurements Group CMG2006 conference(http://www.cmg.org). I had previously alluded to it in this posting and I have been waiting to write about it until after the conference.So for the benefit of those of you who couldn’t be...

@ricomariani

A very simple mocking strategy for straight C

In keeping with my “you really can unit test anything” here’s a simple strategy for injecting mocks into straight C code. It’s ultra dumb. I’m sure you could come up with it yourself but here it is for you. If you don’t like the context bit (so you can mock the method in just one file) then get rid of it. But I found it to be helpful.---------- mocks.h#ifndef NDEBUG// trigger this if not debug (could use any criteria you...

@ricomariani

Notes on Unit Testing and Other Things

People often ask me what constitutes a good amount of unit testing. I think the answer is usually a very high level of coverage but it’s fair to say that there are smart people that disagree. The truth is probably that there is not one answer to this question. Notwithstanding this, I have been able to give some pretty consistent guidance with regard to unit testing which I’d like to share. And not surprisingly it doesn’t...

@ricomariani

Working the Performance Review System as a Senior [Software] Engineer

I’m genuinely surprised by how often I hear very senior people lament the fact that they are evaluated yearly or half-yearly and that just isn’t enough time to get anything really important done to showcase their awesomeness.I think this really is totally a problem for more senior engineers because the more junior people generally feel like if they just “produce” enough then they have no issues. Heads down, code, code some...

@ricomariani

The Pit of Success

This is a repost of Brad Abram’s article from 10/2/2003. This article was actually the thing that got me blogging. The original posting has gone through many content ports and is now barely legible [https://blogs.msdn.microsoft.com/brada/2003/10/02/the-pit-of-success/]By request, here’s a reconstituted version. It’s about my talk so I guess it’s ok for me to post it.The Pit of Success: in stark contrast to a summit, a peak, or...

@ricomariani

Properties of Great [Software] Engineers

There is no one recipe for turning yourself into a “great” software engineer, but I’m very confident that if you look around in your own organization and examine the people you think are “great”, then you will discover that they tend to have these properties. This article is a bit proscriptive and also a bit myth-busting. As far as your own organization goes, well, your mileage may vary.If you are doing all these things, you...