Click here to Skip to main content
15,891,136 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: I AM UNSTOPPABLE Pin
honey the codewitch26-Nov-19 22:21
mvahoney the codewitch26-Nov-19 22:21 
GeneralRe: I AM INVINCIBLE! Pin
Daniel Pfeffer26-Nov-19 23:08
professionalDaniel Pfeffer26-Nov-19 23:08 
GeneralRe: I AM UNSTOPPABLE Pin
Sander Rossel27-Nov-19 0:08
professionalSander Rossel27-Nov-19 0:08 
GeneralRe: I AM UNSTOPPABLE Pin
#realJSOP27-Nov-19 1:00
mve#realJSOP27-Nov-19 1:00 
JokeRe: I AM UNSTOPPABLE Pin
Richard Deeming27-Nov-19 1:19
mveRichard Deeming27-Nov-19 1:19 
GeneralRe: I AM UNSTOPPABLE Pin
  Forogar  27-Nov-19 3:31
professional  Forogar  27-Nov-19 3:31 
GeneralRe: I AM UNSTOPPABLE Pin
honey the codewitch27-Nov-19 3:32
mvahoney the codewitch27-Nov-19 3:32 
GeneralOne of the very few times I find myself liking Ruby/Rails syntax Pin
Dan Neely26-Nov-19 8:55
Dan Neely26-Nov-19 8:55 
I'm replacing a ruby on rails site with C#/mvc. For the most part it's a complete rewrite because of problems with the site being scrapped. There're occasional parts where some logic is worth a directish port though. One is scoring standardized tests.

I've got a test responses table full of columns like:
SQL
Section1Question1Answer CHAR(1),
Section1Question2Answer CHAR(1),
...
Section1Question5Answer CHAR(1),
Section2Question1Answer CHAR(1),
Section2Question2Answer CHAR(1),
...
Section13Question5Answer CHAR(1),

The ruby code is then able to access the data like:
for section in 1..SECTION_COUNT
    for question in 1..QUESTION_COUNT
        test_to_score["Section{section}Question{question}Answer"] #do stuff
    end
end

Cool | :cool:

In C# I'm stuck with accessing them 1 at a time
C#
TestToScore.Section1Question1Answer //do stuff
TestToScore.Section1Question2Answer //do stuff
//... repeat 63 more times.
Dead | X|

I'm not doing enough processing for load/unloading temp arrays to be worthwhile, and every time I've thought to myself that reflection would be a good way to solve a problem I've ended up regretting it. Sigh | :sigh: Redoing the DB to store a single answer/row instead of a test attempt/row would just change where the pain points are; and since the test will always be M sections of N questions each keeping the entire response together is a lot simpler.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius

Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt

GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
TheGreatAndPowerfulOz26-Nov-19 9:09
TheGreatAndPowerfulOz26-Nov-19 9:09 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Dan Neely26-Nov-19 9:14
Dan Neely26-Nov-19 9:14 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Sander Rossel26-Nov-19 9:22
professionalSander Rossel26-Nov-19 9:22 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Dan Neely26-Nov-19 9:52
Dan Neely26-Nov-19 9:52 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Sander Rossel26-Nov-19 10:11
professionalSander Rossel26-Nov-19 10:11 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Dan Neely26-Nov-19 10:22
Dan Neely26-Nov-19 10:22 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
TheGreatAndPowerfulOz26-Nov-19 9:38
TheGreatAndPowerfulOz26-Nov-19 9:38 
GeneralRe: One of the very few times I find myself liking Ruby/Rails syntax Pin
Tim Deveaux26-Nov-19 9:20
Tim 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
TheGreatAndPowerfulOz26-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
Dan 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
professionalZurdoDev27-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 
GeneralRe: CodeDom users, what's your opinion? Pin
TheGreatAndPowerfulOz26-Nov-19 9:09
TheGreatAndPowerfulOz26-Nov-19 9:09 
GeneralRe: CodeDom users, what's your opinion? Pin
Sander Rossel26-Nov-19 10:39
professionalSander Rossel26-Nov-19 10:39 

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.