Click here to Skip to main content
14,457,167 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: One of the very few times I find myself liking Ruby/Rails syntax Pin
Tim Deveaux26-Nov-19 10:20
MemberTim Deveaux26-Nov-19 10:20 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
TheGreatAndPowerfulOz26-Nov-19 10:39
MemberTheGreatAndPowerfulOz26-Nov-19 10:39 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Marc Clifton26-Nov-19 13:07
communityengineerMarc Clifton26-Nov-19 13:07 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Dan Neely27-Nov-19 3:59
MemberDan Neely27-Nov-19 3:59 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Marc Clifton26-Nov-19 13:16
communityengineerMarc Clifton26-Nov-19 13:16 
JokeRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Rage26-Nov-19 23:44
professionalRage26-Nov-19 23:44 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
ZurdoDev27-Nov-19 2:59
mveZurdoDev27-Nov-19 2:59 
GeneralCodeDom users, what's your opinion? Pin
honey the codewitch26-Nov-19 9:45
mvahoney the codewitch26-Nov-19 9:45 
Before I submit this Tip thing, I wanted to know among people that have used the codeDom, if they'd prefer something like this?

var result = CD.Method(typeof(bool), "MoveNextInput");
var input = CD.FieldRef(CD.This, "_input");
var state = CD.FieldRef(CD.This, "_state");
var line = CD.FieldRef(CD.This, "_line");
var column = CD.FieldRef(CD.This, "_column");
var position = CD.FieldRef(CD.This, "_position");
var current = CD.PropRef(input,"Current");
result.Statements.AddRange(new CodeStatement[] {
	CD.If(CD.Invoke(input,"MoveNext"),
		CD.IfElse(CD.NotEq(state,CD.Literal(_BeforeBegin)), new CodeStatement[] {
			CD.Let(position,CD.Add(position,CD.One)),
			CD.IfElse(CD.Eq(CD.Literal('\n'),current),new CodeStatement[] {
				CD.Let(column,CD.One),
				CD.Let(line,CD.Add(line,CD.One))
			},
				CD.IfElse(CD.Eq(CD.Literal('\t'),current),new CodeStatement[]
				{
					CD.Let(column,CD.Add(column,CD.Literal(_TabWidth)))
				},
					CD.Let(column,CD.Add(column,CD.One))))
		},
		CD.IfElse(CD.Eq(CD.Literal('\n'),current),new CodeStatement[] {
			CD.Let(column,CD.One),
			CD.Let(line,CD.Add(line,CD.One))
		},
			CD.IfElse(CD.Eq(CD.Literal('\t'),current),new CodeStatement[] {
				CD.Let(column,CD.Add(column,CD.Literal(_TabWidth-1)))
			}))),
		CD.Return(CD.True)),
	CD.Let(state,CD.Literal(_InnerFinished)),
	CD.Return(CD.False)
});


I know it looks like hell, but it's so much less verbose than using the raw object model
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

GeneralRe: CodeDom users, what's your opinion? Pin
TheGreatAndPowerfulOz26-Nov-19 10:09
MemberTheGreatAndPowerfulOz26-Nov-19 10:09 
GeneralRe: CodeDom users, what's your opinion? Pin
Sander Rossel26-Nov-19 11:39
professionalSander Rossel26-Nov-19 11:39 
GeneralRe: CodeDom users, what's your opinion? Pin
honey the codewitch26-Nov-19 11:44
mvahoney the codewitch26-Nov-19 11:44 
GeneralRe: CodeDom users, what's your opinion? Pin
Nelek26-Nov-19 23:21
protectorNelek26-Nov-19 23:21 
GeneralRe: CodeDom users, what's your opinion? Pin
honey the codewitch26-Nov-19 23:22
mvahoney the codewitch26-Nov-19 23:22 
GeneralRe: CodeDom users, what's your opinion? Pin
Nelek27-Nov-19 1:11
protectorNelek27-Nov-19 1:11 
GeneralRe: CodeDom users, what's your opinion? Pin
honey the codewitch27-Nov-19 1:12
mvahoney the codewitch27-Nov-19 1:12 
GeneralRe: CodeDom users, what's your opinion? Pin
Nelek27-Nov-19 12:26
protectorNelek27-Nov-19 12:26 
GeneralRe: CodeDom users, what's your opinion? Pin
honey the codewitch27-Nov-19 12:28
mvahoney the codewitch27-Nov-19 12:28 
GeneralRe: CodeDom users, what's your opinion? Pin
Nelek27-Nov-19 20:03
protectorNelek27-Nov-19 20:03 
QuestionUnit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
MSBassSinger26-Nov-19 7:05
professionalMSBassSinger26-Nov-19 7:05 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Eddy Vluggen26-Nov-19 7:32
professionalEddy Vluggen26-Nov-19 7:32 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Maximilien26-Nov-19 7:35
MemberMaximilien26-Nov-19 7:35 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Sander Rossel26-Nov-19 10:32
professionalSander Rossel26-Nov-19 10:32 
GeneralRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Rick York26-Nov-19 11:29
mveRick York26-Nov-19 11:29 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Marc Clifton26-Nov-19 13:11
communityengineerMarc Clifton26-Nov-19 13:11 
GeneralRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Dan Neely27-Nov-19 4:22
MemberDan Neely27-Nov-19 4:22 

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.