Click here to Skip to main content
14,488,104 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Style and form in generated code Pin
honey the codewitch27-Nov-19 0:06
mvahoney the codewitch27-Nov-19 0:06 
GeneralRe: Style and form in generated code Pin
Member 798912227-Nov-19 1:56
MemberMember 798912227-Nov-19 1:56 
GeneralRe: Style and form in generated code Pin
honey the codewitch27-Nov-19 2:06
mvahoney the codewitch27-Nov-19 2:06 
GeneralRe: Style and form in generated code Pin
Member 798912227-Nov-19 2:48
MemberMember 798912227-Nov-19 2:48 
GeneralRe: Style and form in generated code Pin
honey the codewitch27-Nov-19 2:51
mvahoney the codewitch27-Nov-19 2:51 
GeneralRe: Style and form in generated code Pin
Gary Wheeler27-Nov-19 1:58
MemberGary Wheeler27-Nov-19 1:58 
GeneralRe: Style and form in generated code Pin
honey the codewitch27-Nov-19 2:02
mvahoney the codewitch27-Nov-19 2:02 
GeneralRe: Style and form in generated code Pin
MSBassSinger27-Nov-19 4:47
professionalMSBassSinger27-Nov-19 4:47 
I am updating a NuGet package that, as an ancillary function, generates SQL and C# code. I tend to agree with your post, but do have a couple of deviations.

Quote:
it's almost always stupid to try to support generated code that a user has modified

"Almost" being the key word here. By generating stored procedures, C# POCO classes, and C# manager/factory classes that tie the SPs and POCO instance creation together, I save the developer a lot of time on the initial creation of the classes and SQL code. If the developer wishes to change them to suit his or her particular approach, it still takes less time than writing the code themselves from scratch, especially with "find and replace" in the IDE. The only downside is if the developer has so many changes as to have to re-generate the SPs, POCOs, or factory classes, then any manual edits have to be redone. Good planning can avoid most, if not all, of that.

Quote:
Commenting the generated code is pointless

I find it useful to add comments in my generated C# code so
1) Intellisense can show brief explanations of methods and parameters,
2) The user can understand why I coded something the way I did.

I find it useful to add comments to my generated T-SQL code so the developer understands why I coded that way, and what value there is to it.

That said, yes it does take more of my time, but I want to give any users my NuGet packages have some additional info. I even do sample WinForms apps and a readme Word document to assist. Senior developers might not need them, but less experienced developers might benefit.
GeneralRe: Style and form in generated code Pin
honey the codewitch27-Nov-19 4:51
mvahoney the codewitch27-Nov-19 4:51 
GeneralRe: Style and form in generated code Pin
Bruce Patin27-Nov-19 6:22
MemberBruce Patin27-Nov-19 6:22 
GeneralRe: Style and form in generated code Pin
honey the codewitch27-Nov-19 6:24
mvahoney the codewitch27-Nov-19 6:24 
GeneralRe: Style and form in generated code Pin
Member 1181677627-Nov-19 22:05
MemberMember 1181677627-Nov-19 22:05 
GeneralRe: Style and form in generated code Pin
honey the codewitch27-Nov-19 22:08
mvahoney the codewitch27-Nov-19 22:08 
GeneralHow do you deal with impromptu design meetings with conflicting approaches? Pin
Marc Clifton26-Nov-19 3:28
mvaMarc Clifton26-Nov-19 3:28 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
Chris Maunder26-Nov-19 3:45
cofounderChris Maunder26-Nov-19 3:45 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
Marc Clifton26-Nov-19 3:58
mvaMarc Clifton26-Nov-19 3:58 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
Chris Maunder26-Nov-19 7:53
cofounderChris Maunder26-Nov-19 7:53 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
Jörgen Andersson26-Nov-19 4:09
professionalJörgen Andersson26-Nov-19 4:09 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
raddevus26-Nov-19 4:20
mvaraddevus26-Nov-19 4:20 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
F-ES Sitecore26-Nov-19 3:53
mveF-ES Sitecore26-Nov-19 3:53 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
Eddy Vluggen26-Nov-19 3:58
professionalEddy Vluggen26-Nov-19 3:58 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
F-ES Sitecore26-Nov-19 4:03
mveF-ES Sitecore26-Nov-19 4:03 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
Eddy Vluggen26-Nov-19 4:04
professionalEddy Vluggen26-Nov-19 4:04 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
Marc Clifton26-Nov-19 4:01
mvaMarc Clifton26-Nov-19 4:01 
GeneralRe: How do you deal with impromptu design meetings with conflicting approaches? Pin
Daniel Pfeffer26-Nov-19 4:00
professionalDaniel Pfeffer26-Nov-19 4:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.