12,548,119 members (50,035 online)

# Welcome to the Lounge

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.

 Google Maps Epic Fail Shameel29-Jan-13 4:14 Shameel 29-Jan-13 4:14
 Re: Google Maps Epic Fail Bergholt Stuttley Johnson29-Jan-13 4:17 Bergholt Stuttley Johnson 29-Jan-13 4:17
 Re: Google Maps Epic Fail Mark_Wallace29-Jan-13 21:30 Mark_Wallace 29-Jan-13 21:30
 On Cheating and Hard-Coding Ennis Ray Lynch, Jr.29-Jan-13 3:30 Ennis Ray Lynch, Jr. 29-Jan-13 3:30
 So I play Ruzzle (like Boggle), its kind of fun. As a joke for one of my friends I developed an application to give me the list of longest playable words on the board, down and dirty. Originally, I wanted to do it right, and generic, but alas, I didn't want to spend a lot of time on a joke so I hard-coded the graph. At first it felt dirty and wrong, but then it felt, right? Here was my approach (warning, code, avert your eyes ye lounge is for no code onliers. Oh, and DD, this isn't a trubechet) This is not presented for critique or questions, merely to illustrate how the hard-code actually worked well enough. First create an object to hold a letter public class Node{ public string letter; public List nodes; } Now take a pen and paper, and number the grid starting left to right, top to bottom, zero through 16 (like an array). Then make a list of 16 elements: foreach(string letter in lettersInOrder){ allNodes.Add(new Node(letter)); } Now hard-code the graph: allNodes[0].Nodes.Add(allNodes[1]); allNodes[0].Nodes.Add(allNodes[4]); allNodes[0].Nodes.Add(allNodes[5]); ... I was surprised at how simple it was, all these years avoiding hard-coding and I just hard-coded a 4x4 grid! Laugh. Also, to keep this post mildly apropos I will not post the traversal code : ) Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost "All users always want Excel" --Ennis Lynch
 Re: On Cheating and Hard-Coding Rage29-Jan-13 3:47 Rage 29-Jan-13 3:47
 Re: On Cheating and Hard-Coding PIEBALDconsult29-Jan-13 4:07 PIEBALDconsult 29-Jan-13 4:07
 Re: On Cheating and Hard-Coding Naerling29-Jan-13 20:47 Naerling 29-Jan-13 20:47
 Re: On Cheating and Hard-Coding englebart30-Jan-13 2:26 englebart 30-Jan-13 2:26
 Re: On Cheating and Hard-Coding RafagaX31-Jan-13 4:34 RafagaX 31-Jan-13 4:34
 Too Smart For My Own Good GenJerDan29-Jan-13 3:29 GenJerDan 29-Jan-13 3:29
 Last Visit: 31-Dec-99 18:00     Last Update: 21-Oct-16 16:40 Refresh « Prev1...29406294072940829409294102941129412294132941429415 Next »