Comment on: Stackoverflow needs to be circumvented. rant + ramble
0 03 Aug 2016 07:10 u/im_the_dude_man in v/programmingComment on: Stackoverflow needs to be circumvented. rant + ramble
I've honestly only had negative experiences on that site. Even when providing code, researched links, other failed code, and similar questions on SO that do not address my specific problem. I only ever used SO as a last resort due to their toxic nature. Usually I was insulted thoroughly, question marked as duplicate while referencing the links I had provided, and I learned nothing and only gained a great detest for the site.
Comment on: (Brian Will) Object-Oriented Programming is Embarrassing: 4 Short Examples
Thank you. I took a c++ class and have been practicing by helping my friends who are taking that course now, but I will definitely try that out. I suppose I should clarify my question, is there any reading on the general practices of coding? Like a much more general, how to approach coding projects that isn't language specific? So if I were able to get an internship or job I'd have an understanding of how to embed myself in a team, while learning, without being too much of a hindrance.
Comment on: (Brian Will) Object-Oriented Programming is Embarrassing: 4 Short Examples
Thank you. As someone who just started coding is there a place you would recommend starting?
Comment on: (Brian Will) Object-Oriented Programming is Embarrassing: 4 Short Examples
Is there any reading you recommend that has to do with what you're talking about?
Comment on: The Ruby Programming Language community is now under siege by SJW entryists and the trojan horse Code of Conduct
This is why the term "useful idiots" is thrown around a lot when discussing this subject.
Comment on: Is this a good sub for programming help?
Yeah, that's why I asked here real quick. This is probably going to be the only time I do this here and if anything I'll try to drum up some activity over in /v/ProgrammingHelp. I just have some tight time constraints.
Comment on: Is this a good sub for programming help?
I can understand that frustration man.
My big thing is I need to be able to ask questions to figure things out, the best way I learn is to explain it myself and have someone knowledgable in the subject tell me if I'm right or if I'm and idiot. Stack Overflow is a horrible place for me due to that, because most people there are much quicker to call me an idiot, and then never reply to any further questions I have in my attempts to learn and not just get answers. Maybe I've just had terrible experiences on that site but I do a lot of searching, reading, attempting on my own, and messaging classmates before I go looking for help online.
People have been pretty cool here, and the semester is about over so you need not worry about me spamming noob code all over the place.
Comment on: Is this a good sub for programming help?
Hmm I did not think of that, thank you. I'll try that out.
edit: I'm getting an error when I try that.
Comment on: Is this a good sub for programming help?
Oh man......I think I just gave myself permanent brain damage from that facepalm.
Thank you.
Comment on: Is this a good sub for programming help?
The commented out code is where I am having trouble, I commented it out just so I could move on testing my program.
//Function to check Social Security Number string ssidCheck(string) { string input, a, b, c, d, e, f, g, h, j; bool checkInput; int len, numA, numB, numC, numD, numE, numF, numG, numH, numJ;
checkInput = true;
//Loop to verify proper ssid entry
do
{
cout << "Please enter your Social Security number as 123-45-6789: ";
getline(cin, input);
len = input.length();
if (len < 1 || len > 11)
{
cout << "\nImproper entry. Please try again 0.\n";
checkInput = false;
}
for (int i = 0; i < input.length(); i++)
{
if (input[i] == ' ')
{
cout << "\nImproper entry. Please try again 1.\n";
checkInput = false;
break;
}
else if (input[i] < '0' && input[i] > '9' && input[i] != '-')
{
cout << "\nImproper entry. Please try again 2.\n";
checkInput = false;
break;
}
else if (input[i] == '-' && i != input.at(3))
{
cout << "\nImproper entry. Please try again 3.\n";
checkInput = false;
break;
}
else if (input[i] == '-' && i != input.at(6))
{
cout << "\nImproper entry. Please try again 3.5.\n";
checkInput = false;
break;
}
else if ((i == input.at(3) && input[i] != '-') || (i == input.at(6) && input[i] != '-'))
{
cout << "\nImproper entry. Please try again 4.\n";
checkInput = false;
break;
}
*/
if (checkInput == true)
{
a = input.at(0);
b = input.at(1);
c = input.at(2);
d = input.at(4);
e = input.at(5);
f = input.at(7);
g = input.at(8);
h = input.at(9);
j = input.at(10);
numA = stoi(a);
numB = stoi(b);
numC = stoi(c);
numD = stoi(d);
numE = stoi(e);
numF = stoi(f);
numG = stoi(g);
numH = stoi(h);
numJ = stoi(j);
if ((0 == numA + numB + numC) || (0 == numD + numE) || (0 == numF + numG + numH + numJ))
{
cout << "\nImproper entry. Please try again.\n";
checkInput = false;
break;
}
else if (numA == 6 && numB == 6 && numC == 6)
{
cout << "\nImproper entry. Please try again.\n";
checkInput = false;
break;
}
else if (numA == 9)
{
cout << "\nImproper entry. Please try again.\n";
checkInput = false;
break;
}
}
}
} while (checkInput == false);
return input;
}
Comment on: Is this a good sub for programming help?
Heh, any help would be greatly appreciated. I'm down to like 2 projects due at the end of the week now.
Comment on: Is this a good sub for programming help?
It looks like it's c++ 11, I never actually thought to check that before.
At the moment my verification code is giving me trouble. I've used it before for a clock project, though I made some tweaks for a social security verification and my problems are coming up when I go to verify proper placement of the hyphens.
Originally I was using input.length() - 3, for the digital clock input but it wasn't working for the two hyphens so I changed it to a input.at(3) and input.at(6) to no avail. I can provide the code if you want.
Comment on: Is this a good sub for programming help?
Yeah I saw that, that was why I wanted to make sure.
Most of the subs dedicated to just programming haven't had a post in 2-3 months =/.
I deleted my account from that site, I've had better results talking to people on Voat and it was a much nicer experience overall.