views:

437

answers:

9

Does the US Federal Government have a coding style guide for C# and or Java? If there isn't, I think there should be given the amount of time they put into the Federal Enterprise Architecture and Document Standards.

+1  A: 

In the past, working as a government contractor, our shop used our own coding style. We were not provided a coding style from our government customer that we had to use.

Alex B
A: 

I don't think there's one at the top Federal level. I'd suspect you'd need to get to the sub-Department (organization, group) level to find one. And I suspect that they will vary between Departments, organizations, and groups.

McWafflestix
A: 

This is would depend on the contractor delivering a solution. If you're actually an employee of the government, there may exist something specific for your agency or department. You'd then have to check the in-house IT folks.

Owen
A: 

Your client (in this case the government agency that is hiring you) will tell you about any requirements for the project. They can't expect you to know beforehand or find out, especially as coding style can vary wildly from place to place.

Lucas Jones
A: 

Anything the government requires from a prospective vendor will have to be in the Request for Proposal. If it isn't in there, the vendor does not have to comply, unless later statements of work are agreed upon.

I think it would be a mistake to micro-manage vendors. Even if they came with something great, I doubt it would change with the times and become stale.

johnny
The RFP may well list requirements, but what really matters is what is in the statement of work, which will either be included in the contract, or referenced by it. The requirements in an RFP don't necessarily flow down to the contract.
kevin42
A: 

I'm a government contractor right now, and I work side by side with Federal employees. There is no mandated coding style whatsoever for us. This is in the DOC.

Ethan Shepherd
+1  A: 

In my experience, each contractor has their own style guidelines. Even within one area of the federal government I've seen several different styles used by different projects (and rightly so IMO).

It's pretty common for government projects to require you adhere to certain principals, such as MOSA, but that's way more abstract than a coding style.

kevin42
A: 

Well, capitalists have their preferred coding style. Probably with numerous variations (democracy thing). Communists have their own code style policies. Which one is right? Who knows. Use what works best for you.

User
A: 

Guidelines very from sector to sector of the government. The DOD and DHS have their own rules which you must play by to do business with them. My guess is that if there are guidelines for a specific project, most of the time you're not going to be allowed to talk about them especially when dealing with the DOD. (Classified access). I would guess this is why there aren't overall rules which all departments in a branch of government use. You have to remember that on some projects that even mentioning that there could be guidelines which people follow might be a federal offense.

Kevin