• 16
• 15
• 11
• 9
• 10
• ### Similar Content

• Hey all,
I just wanted to share a VS extension. It's useful for other people who are debugging multiple processes (aka server, player1, player2) with breakpoints that will break across those processes. It just puts up a (user defined sized) label in your window telling you which process the debugger dropped into. It's simple, but useful for rapid fire debugging for multiple processes to make it obvious that process you broke in. Just put some cookie text in your command lines and configure it from View -> Other Windows -> Process Hint.
https://marketplace.visualstudio.com/items?itemName=gthomson.ProcessHint
Feedback or questions welcome.
• By Hermetix
I am trying to setup the custom wizard for making a 3ds MAX 2018 plug-in (to export a character animation data), but I can't locate the wizard file folder to put the .vsz file in. In the 3ds MAX 2018 docs, it only mentions where the folder is in VS 2015 (VC/vcprojects). It's a VC++ project, but I don't see any folder in VC for the wizard files. I'm using VS 2017 update 15.5.6 Enterprise, and the folders in VC are: Auxiliary, Redist and Tools.

Thanks.

• I know vertex buffer is just another GPU resource represented by ID3D12Resource, but why is it said that vertex buffer don’t need a descriptor heap??
Other resources like depth/stencil resource, swap chain’s buffer need to have descriptor heaps. How does these resources differ from vertex buffer.
• By tedyage
I want to output the Image file from the shaderresourceview of the rendertexture, so I have to transfer the shaderresourceview into a image object, and I don't know how to do this. Could you help me with it?
PS:I am using SharpDx to develop my program. So it's better be coding by C#. Many thanks.

• Is there any way to know the active solution configuration using a build macro? I know $(Configuration) is for active project configuration but I can't find one for active solution • Advertisement • Advertisement # Is there A Method for Placing a Line Space after Each Function? ## Recommended Posts I just removed all the white vertical white space for my C++ Visual Studio 2017 project using : ^.$\n

What is the recommended standard for the spacing between functions.  Is it suggested that a line break be placed after each of the functions' closing brace?  If so, is there a convenient method or do I just go through all the code and press enter after each function?  Anything else I need to know about line spacing?

I don't mean to be petty, I'm just finishing up this project,

Thank you,

Josheir

##### Share on other sites
3 minutes ago, Josheir said:

I just removed all the white vertical white space for my C++ Visual Studio 2017 project using :   ^.\$\n

Why? Vertical space isn't something to be scared of -- it allows you to group or structure things within the current scope easily. This sounds like just a change without any solid reasoning behind it.

5 minutes ago, Josheir said:

What is the recommended standard for the spacing between functions.  Is it suggested that a line break be placed after each of the functions' closing brace?

Pick something and go with it.  Personally I like a line or two between each function, btu as long as it's consistent it doesn't really matter. Find something you find appealing and easy to read -- that's the most important bit.

7 minutes ago, Josheir said:

I don't mean to be petty, I'm just finishing up this project,

Why make sweeping formatting changes to the current project if all you need to do is finish it up? If you were unhappy with something, take that as something to change for the next project.

##### Share on other sites

Also, I noticed that the .cpp files have one extra line space before the last brace when the function has no return (void return type.)  Once again, is this the standard and how is it changed to none?

Thank you very much.

Josheir

##### Share on other sites

Well I'm polishing up this project so that it may be presentable if needs be (at an interview perhaps.)  One of the criticisms was the spacing seemed to be random in the functions.  I thought why not just make it all the same.

Is it suggested that I do this all manually instead?

Thanks again,

Josheir

##### Share on other sites

Making your formatting consistent is good. Just understand that everyone is going to do things differently, so it doesn't actually matter what you choose to do, so long as you are disciplined about doing it the same way throughout your code.

There is no such thing as a universal formatting standard for code.

If you want to format your code to be consistent, which is again a good thing, you should use a formatting tool like clang-format or Visual Studio's Format Document command (found under Edit menu -> Advanced). There's no need to do it by hand.

##### Share on other sites

The main lesson in code style is that you find some set of rules that feels good to you, and learn to apply them while you enter or edit code. At some point you can do that automatically without thinking about it.

##### Share on other sites

I've been using a Visual Studio extension called AStyle for C++ formatting. It allows you to set several options relating to braces, tabs, whitespace, etc. and it can be set to format on save.

##### Share on other sites

I think changing the code if even a sweep is also practical learning.  This applies more to a different "sweeping change," being consistent with capitalization for different variable types and names.

Josheir

Edited by Josheir

##### Share on other sites

Going back and reformatting everything afterwards is not really a useful learning experience at all. It's reinforcing poor behavior (the idea that you'll "clean it up later," which is often impractical in the real world), and not teaching you how to have the mental discipline to either

(a) be consistent in your code hygiene practices as you develop or

(b) develop the tolerance for reading and navigating code that is not formatted in your current personal style of the month.

And it's mostly pointless, as others have noted: we have programs to do this for us, by choosing to manually reformat your code you're just wasting precious time.

Further, to your point about cleaning it up for eventual display in a portfolio... as employers who review code portfolios, we can usually tell that a piece of code has been overly sanitized. We want to see real code that is reflective of how you really work. Seeing that code in the state you will naturally write it is far more useful to us than seeing something you've taken and artificially cleaned up to fix every last minor style nit and document every last function extensively.

I would recommend you not do this in the future.

##### Share on other sites

I actually disagree with the suggestion to not over-sanitize code. Reviewers will know that you put in extra effort, sure, but I don't see that as a bad thing.

What I typically would suggest is instead to over-sanitize the important parts of your code, and just format/lightly-comment the stuff that doesn't need as much explanation.

I would rather hire a programmer who submits thorough and clean code (and takes a bit longer to do so) than a programmer who submits messy but "realistic" code.