|
I, of course, use the code generated by Visual Studio, but I also use LLBLGen and have written plenty of my own code generators, mostly for data acess layers. I think more people generate code than they realize (not even counting IDE generated code)... in your web pages you probably generate HTML with your JavaScript to make tables and such.
Anyway, as a programmer, my job is it improve efficiency for my customers, which means improving my own efficiency (and accuracy), so I try to cut down on manual repitition. I do this with using libraries and frameworks and creating my own libraries and frameworks, as well as writing code generators to automate the monotonous coding that I find my self doing repeatedly, day in and day out. That way, I can focus on the bigger picture of solving the larger problem my software will exist for.
|
|
|
|
|
Suprised so many voted "Never".
|
|
|
|
|
Hey BoomRShine,
If that is all about IDE generated code, you will see atleast 99% voted for "Always" .
In the subject line though it is not clear but I assumed it as code generator or converters.
|
|
|
|
|
Likewise.
I don't know anyone who codes without some form of IDE.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
I assume you mean Visual Studio...
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
|
Just select the database tables you need, set some settings and you get the code for your database access.
Okay, after the first creation I usually change it by hand, at least adding comments, but you get a working skeleton in correct syntax.
Happy coding!
Martin
|
|
|
|
|
I use MyGeneration with custom-made script to generate NHibernate classes. It automatically extracts column descriptions as comments etc. Very handy.
|
|
|
|
|
I wrote myself some code generators to produce complex data structures from excel spredsheets.
I also uses P/Invoke Wizard.
|
|
|
|
|
Anyone who ever uses a designer in visual studio is using a code generator!
Anyone who ever uses a wsdl proxy to a web service uses a code generator
Anyone who ever uses a strongly typed data set uses a code generator
Anyone who ever uses the Entity Framework uses a code generator
Anyone who ever uses AJAX is using a code generator.
I doubt that there is anyone who can honestly say that they never use one
|
|
|
|
|
I agree.
As it is, I typically will churn out the auto-gen code and then 'fix it' to what my needs are. If nothing else, it jump starts those mundane/tedious programming sessions.
No single raindrop believes it is to blame for the flood.
-irresponsibility@Despair.com
|
|
|
|
|
Looking the stats (at the moment), I rather believe most of the people probably interpret the question as meaning code, which is generated by custom code generators, not being part of some IDE or other graphical design tool.
For me, I am only sad to see that this weeks survey reveals no information at all, as the question is too ambiguous and the answers rather depend on how exactly the people who reply interpret the question. Sad, really
|
|
|
|
|
Which is why I have not voted. Why add to the confusion.
Peter Wasser
|
|
|
|
|
|
I use code-generators;But i don't use any of those.
|
|
|
|
|
In our company we use automated code generation for displays using "Presagis Vaps" for embedded SW and "Presagis Vaps XT" for non-embedded SW.
We also use "Rational Rose Real Time" for embedded and non-embedded SW.
We also made some tests with "Rational Rahpsody" for embedded SW but we were not satisfied with the results.
We also use "Esterel Scade" integrated with "Mathworks Simulink".
So, we use automated code generation a lot, even as our main products are critical embedded SW, but most of our code, I believe about 90%, still is done by hand.
I think automatic code generation is a great tool when you know where you can use it, but it will never substitued hand written code, but integrate with it.
|
|
|
|
|
Is a compiler code generator? It takes files with instructions (C, VB, Java...) and generates other files with instructions (machine code, IL, Java opcode). Is it really different from something that takes i.e. XML files and generates Java files?
|
|
|
|
|
You will be able to get a different kind of code generator, you know, the kind that is always grumpy and fueled by coffeine.
|
|
|
|
|
Since T4 Templates were introduced I use generated code more than before
|
|
|
|
|
|
I don't believe on the code written by the generator always, but some times it helps.
There comes some situation when we need a software to generate some codes or convert some codes to another language. In that case, it is helpful.
But this is not helpful all the time. At the time of auto generation, it creates some junk codes or creates something which doesn't meet the actual scenario. Maximum time the code format or naming convention doesn't meet the company guidelines.
In such scenarios, need to modify the generated code to accomplish the requirement which sometimes a bigger job than writing that in own.
Lastly I can tell, it is sometimes useful but not always.
Don't forget to Click on [Vote] and [Good Answer] on the posts that helped you.
Regards - Kunal Chowdhury | Software Developer | Chennai | India | My Blog | My Tweets | Silverlight Tutorial
|
|
|
|
|
Or don't think of code generation in the more classic sense.
For example, the DevExpress report designer generates C# code as part of serializing the form layout, and that is compiled and executed at runtime when the report is executed.
More obviously, most designers generate code. VS certainly does!
Do you use any refactoring tools? Those are code generators.
And what about runtime code generation? I use my own library to generate all the SQL statements (SQL is sort of code, right?)
Doesn't LINQ generate code at runtime?
I can't remember, since I don't use many features in .NET 3.5 and certainly none in .NET 4.0 yet, but isn't there other late-binding (or during runtime) code generation going on?
Marc
|
|
|
|
|
Agreed. I was thinking primarily of designers--for resource files, typed datasets, etc.--when I answered "Always."
|
|
|
|
|
I use VS20nn - so it codes my buttons, menus, etc. - the control classes - ONLY.
That is code generation (I can look and see the code - and of course, play with it).
Similarly, the HTML editor (Expressions 3). Although, once basically laid out, it again falls to human interference to make things right.
The question would really have been better phrased if it so somehow clearly indicated the type of computer-generated coding it was referring to. After all, in some cases (per my opening line) it's little different [morally and ethically] than calling some method or function from a library.
I just don't know - what's become of me?
/xml> "The difference between genius and stupidity is that genius has its limits." - Albert Einstein
| "As far as we know, our computer has never had an undetected error." - Weisert
| "If you are searching for perfection in others, then you seek dissappointment. If you are searching for perfection in yourself, then you seek failure." - Balboos HaGadol Mar 2010
|
|
|
|
|
|
I have used lex/yacc and later Bison to construct a simple command line control language for various production projects. Parser generators produce all the ugly code for all the state tables and control logic. You then drive it like a black box. So if you need a level of parsing beyond RegEx, I guess you have little choice but to use parser generator such as Bison.
|
|
|
|