Click here to Skip to main content
14,484,788 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 9:20
MemberTim Deveaux26-Nov-19 9:20 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
TheGreatAndPowerfulOz26-Nov-19 9:39
MemberTheGreatAndPowerfulOz26-Nov-19 9:39 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Marc Clifton26-Nov-19 12:07
mvaMarc Clifton26-Nov-19 12:07 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Dan Neely27-Nov-19 2:59
MemberDan Neely27-Nov-19 2:59 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Marc Clifton26-Nov-19 12:16
mvaMarc Clifton26-Nov-19 12:16 
JokeRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Rage26-Nov-19 22:44
professionalRage26-Nov-19 22:44 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
ZurdoDev27-Nov-19 1:59
mveZurdoDev27-Nov-19 1:59 
GeneralCodeDom users, what's your opinion? Pin
honey the codewitch26-Nov-19 8:45
mvahoney the codewitch26-Nov-19 8: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 9:09
MemberTheGreatAndPowerfulOz26-Nov-19 9:09 
GeneralRe: CodeDom users, what's your opinion? Pin
Sander Rossel26-Nov-19 10:39
professionalSander Rossel26-Nov-19 10:39 
GeneralRe: CodeDom users, what's your opinion? Pin
honey the codewitch26-Nov-19 10:44
mvahoney the codewitch26-Nov-19 10:44 
GeneralRe: CodeDom users, what's your opinion? Pin
Nelek26-Nov-19 22:21
protectorNelek26-Nov-19 22:21 
GeneralRe: CodeDom users, what's your opinion? Pin
honey the codewitch26-Nov-19 22:22
mvahoney the codewitch26-Nov-19 22:22 
GeneralRe: CodeDom users, what's your opinion? Pin
Nelek27-Nov-19 0:11
protectorNelek27-Nov-19 0:11 
GeneralRe: CodeDom users, what's your opinion? Pin
honey the codewitch27-Nov-19 0:12
mvahoney the codewitch27-Nov-19 0:12 
GeneralRe: CodeDom users, what's your opinion? Pin
Nelek27-Nov-19 11:26
protectorNelek27-Nov-19 11:26 
GeneralRe: CodeDom users, what's your opinion? Pin
honey the codewitch27-Nov-19 11:28
mvahoney the codewitch27-Nov-19 11:28 
GeneralRe: CodeDom users, what's your opinion? Pin
Nelek27-Nov-19 19:03
protectorNelek27-Nov-19 19:03 
QuestionUnit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
MSBassSinger26-Nov-19 6:05
professionalMSBassSinger26-Nov-19 6:05 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Eddy Vluggen26-Nov-19 6:32
professionalEddy Vluggen26-Nov-19 6:32 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Maximilien26-Nov-19 6:35
MemberMaximilien26-Nov-19 6:35 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Sander Rossel26-Nov-19 9:32
professionalSander Rossel26-Nov-19 9:32 
GeneralRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Rick York26-Nov-19 10:29
mveRick York26-Nov-19 10:29 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Marc Clifton26-Nov-19 12:11
mvaMarc Clifton26-Nov-19 12:11 
GeneralRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Dan Neely27-Nov-19 3:22
MemberDan Neely27-Nov-19 3: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.