Skip to main content
21 events
when toggle format what by license comment
Jan 22, 2016 at 3:18 comment added 200_success "Excel spreadsheet" is sort of the type of motivation I was hoping to see included in the question.
Jan 22, 2016 at 1:14 comment added LewlSauce It won't get to 17 because it's based on the number of columns in an excel spreadsheet that I'm using. Thanks for the idea though and going to place that in.
Jan 22, 2016 at 0:53 answer added the Tin Man timeline score: 1
Jan 22, 2016 at 0:14 comment added the Tin Man One initial comment - what happens if col_num is not one of the checks? Say it's 17? What will your code do at that point? Long chains of if/elsif should have a catching else to handle that case even if you think you'll never encounter it simply to help debugging and as a safety net.
Jan 21, 2016 at 23:18 comment added 200_success At the least, posting the entire method in which this code appears would be a good idea. Posting your entire model might also help. (The length limit on questions is 64 kB, so don't worry about length.)
Jan 21, 2016 at 23:08 comment added LewlSauce Really trying to avoid posting my whole model here if I can help it, just based off of the type of application I'm trying to code. If this doesn't help, I apologize and understand if my question should just be closed instead.
Jan 21, 2016 at 23:06 comment added LewlSauce Long story short, tmp_string_text holds data based on the colum number. finding_node_ip = finding.node.ip. Ultimately, as opposed to calling finding.node.os, finding.node.device_type, finding.node.scan_time, finding.vuln_finding.description, etc, I'm wondering if there's a way to call all of the required information in one call. Sorry. Let me know if that helps.
Jan 21, 2016 at 22:54 comment added 200_success But your "explanation" just reiterates what the code says, and doesn't answer my questions.
Jan 21, 2016 at 22:52 history edited Jamal CC BY-SA 3.0
deleted 17 characters in body
S Jan 21, 2016 at 22:50 history suggested LewlSauce CC BY-SA 3.0
added clarification
Jan 21, 2016 at 22:48 comment added LewlSauce Thanks. So tmp_string_text is the data that will go in that column. I'm iterating through a bunch of columns and if, for example, the column == 1, then tmp_string_text gets assigned that text. At the bottom of this function, I'm doing something with tmp_string_text (inserting it into a cell.
Jan 21, 2016 at 22:46 review Suggested edits
S Jan 21, 2016 at 22:50
Jan 21, 2016 at 22:30 comment added 200_success Stack Overflow can reformulate your code, but Code Review would prefer to give you the best possible advice for your situation. Please tell us more about what you are trying to accomplish. Is there a reason for this particular column numbering? What is tmp_string_text for? What is the finding object? What about finding_node_ip — is that a function call, a method call, or a variable? Better yet, show your entire function or class, so that we have more context.
Jan 21, 2016 at 22:30 history edited Jamal CC BY-SA 3.0
edited title
Jan 21, 2016 at 22:26 history edited Jamal CC BY-SA 3.0
added 1 character in body; edited title
Jan 21, 2016 at 22:24 history edited 200_success
edited tags
Jan 21, 2016 at 22:23 comment added 200_success Welcome to Code Review! As a courtesy to other users, please declare your cross-posts.
S Jan 21, 2016 at 22:22 history suggested LewlSauce CC BY-SA 3.0
clarified title
Jan 21, 2016 at 22:22 review First posts
Jan 21, 2016 at 22:52
Jan 21, 2016 at 22:21 review Suggested edits
S Jan 21, 2016 at 22:22
Jan 21, 2016 at 22:16 history asked LewlSauce CC BY-SA 3.0