36
laraib
7y

3 types of beginner programmers. Everyone has gone from this stage.

Comments
  • 34
    int people[]={100,200,300}
  • 8
    Probably use array yeah but if I had to do it like that probably

    int person0 = 100;
    int person1 = 100;
    int person2 = 100;
  • 0
    meh @sho3k. What about decimal jump?? You still have boiler plate and additionally bad formatted code 😪
  • 27
    int person = 100;
    int personn = 200;
    int personnn = 300;
  • 8
    If you're tagging numbers on the end of variables I'm rejecting that review in a heartbeat - meaningless names. Cut that shit out.
  • 3
    @CrankyOldDev you, I like you.
  • 3
    List<Person> people = new List<Person>();
    people.Add(new Person(100));
    people.Add(new Person(200));
    people.Add(new Person(300));
  • 2
    @SAM41 That's a bit too advanced for a beginner
  • 0
    @SAM41 List is an interface, you can't instanciate it duh...
  • 2
    I mean if you're numerating them then you go with real world standards, e.g.
    person1
    person2
    person3

    But a better approach (which has already been stated) is just to use an array
  • 2
    @mang that depends on the language bro, e.g. in C# you can ;)
  • 1
    @mang read it as ArrayList if you don't know C#
  • 1
    @dandrei279 this solves everything!
Add Comment