Share Mistakes that you would have done while learning programming. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Share Mistakes that you would have done while learning programming.

share your mistakes that you may have done while learning programming so it can help other they would not repeat it... Also share some tricks to Novice Programmers learning Programming.

30th Apr 2018, 9:55 PM
Akash Rai
Akash Rai - avatar
4 Answers
+ 7
I think everyone done this at least once or something similar inside a function... if (x == y) { return true; } else { return false; } instead of... return x == y;
30th Apr 2018, 9:58 PM
TurtleShell
TurtleShell - avatar
+ 7
#1:not a mistake,but it makes code unnecessarily long if(aBoolean){ //doStuff } else{ //doOtherStuff } when you could use:: aBoolean?doStuff:doOtherStuff; #2 thinking if(x=2){ //dostuff } is same as if(x==2){ //dostuff } #3:lastly,poor use of arrays person1="Tim" person2="bob" person3="dave" pe...haa its annoying, when u could use:: person=["Tim","bob","dave"] Well this were my beginner mistakes and theyre quite common,hope i helped
30th Apr 2018, 10:18 PM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 3
char foo[5] = "Hello"; Experienced C/C++ programmers will see the problem. I didn't at that time. I just deleted the project. Or my very first error I've written (Java): public class HelloWorld { System.out.println("Hello world!"); public static void main(String[] args) { } } The book author said I should just "place it in there". My only advice: Read books and practice.
30th Apr 2018, 11:37 PM
Timon Paßlick
+ 1
30th Apr 2018, 11:44 PM
Timon Paßlick