What's your day job/career/dream job? Let's get to know some of the players in the MCOC Community

24

Comments

  • PolygonPolygon Member Posts: 4,488 ★★★★★
    edited November 2023
    DNA3000 said:

    Polygon said:

    I am at pre final year in my college and really want to become a programmer. I really like logical reasoning and thinking, that's why I chose this. I also want to contribute to mcoc in some way, especially want to design and code a story final boss. Wish me luck guys.

    Does coding/programming require more of a logical based style of thinking or creative thinking? I struggled with physics because it needs creative thinking but i was really good at subjects like math, chemistry, grammar because i had a logical/analytical mindset
    It would never occur to me to think of Physics as being the creative one and Chemistry as being the logical one.

    Writing code is 90% logical. But there's a reason why the introduction to programming in a lot of programs is called "data structures and algorithms." First you learn what you're supposed to code, then you learn how to code it. The creative part of programming is the algorithmic part: the part where you take a problem and devise a way to solve it with a step by step process that you could write code to actually do.

    (A data structures person would say that there's tons of creativity there as well, but those people are nuts)

    I remember the first time I saw something I thought was super creative, or inventive, in the context of programming. It was the algorithm to draw a circle on a computer screen using nothing but addition, subtraction, multiplication and comparison (i.e. is A greater than B?). No sine, cosine, trig functions of any kind. Not even any division. Just the three fastest operations a computer can do.

    Whenever I ran into a difficult programming problem, I would always reflect on this algorithm, and how the very things that limit what a computer can do can often be leveraged into interesting out of the box solutions. Coding is pretty structured and logical, but programming is problem solving, just with code, and all problem solving is creative in nature.
    In chem/math you mainly take an equation, and plug in your known variables to find an unknown , sometimes referencing other data, but it’s usually a straight forward plug and play, like calculating for an equilibrium constant based on reaction rate data. But for a typical physics problem, the problem solving requires more depth; you have to make a set of assumptions, decide which equation to use, and it can be a lot more theoretical . Newton invented calculus just because it was needed for physics. Alternatively just because you're fluent in english doesn't make you a poet.

    TL;DR Math is the language of rigorous calculation, but not physical understanding. Mental models are the language of physics

    Also for that example, Cant you just use the implicit equation of a unit circle x^2 + y^2 = 1 , or r instead of 1 for a different radius ? I know you said no trig, but you could also parameterize that with x = rcosθ, y = rsinθ for 0<theta<2pi


  • DNA3000DNA3000 Member, Guardian Posts: 19,611 Guardian
    Polygon said:

    Cant you just use the implicit equation of a unit circle x^2 + y^2 = 1 , or r instead of 1 for a different radius ? I know you said no trig, but you could also parameterize that with x = rcosθ, y = rsinθ for 0 < theta < 2pi

    That's how many people conceptualize drawing a circle. But what increment do you step theta? If you step in increments of, say, one degree, that will be too small for small circles and too big for big circles. With small circles you will be plotting the same points over and over again. With large circles the points won't be connected together, there will be big gaps between them. So how do you draw a circle on a square grid where all the dots are connected?

    Also, sine and cosine are trig functions. Trig functions take, on a comparative basis, much longer to compute. If you're trying to draw a circle and you need to compute hundreds of trig functions, that will be pretty slow. In the old days, incredibly slow, but even on modern CPUs like say Intel Core architectures I think floating point sine is like twenty times slower than floating point multiply.

    So the trig go around the circle algorithm is a) slow, b) inefficient, and c) draws ugly circles that sometimes turn into just a bunch of points.

    There's an algorithm that draws every point on the circle, doesn't draw any extra points, automatically scales with the size of the circle, and uses no complex math and thus runs extremely fast. The basic outline of the method is this:

    Imagine a circle drawn on a checkerboard grid, centered at the origin, with radius R. There's at least one point you know is on the circle: four actually. (R,0) is definitely on the circle. So is (-R,0), (0,R), and (0,-R) because circles are symmetric. Let's focus on the right side dot at (R,0). Notice that if we walk around the circle counterclockwise, there are only two possible locations for the next dot we draw. It can be one pixel higher, at (R,1). Or it can be one pixel to the left, at (R-1,0). If we want our circle to be connected, we can't step diagonally to (R-1,1). How do we know which way to go?

    Equation of a circle: X^2 + Y^2 = R^2. We precompute R^2 and keep that around. The first point we drew was (R,0). That point satisfies the circle equation: R^2 + 0^2 = R^2. Which of our two possibilities also satisfies the circle equation? If we step up one to (R,1) then we would get R^2 + 1^2 which is greater than R^2. So that point is *outside* the circle. So we move to (R-1,0) which is now *inside* the circle. Now we just repeat. We can go to (R-1,1), or (R-2,0). Up one, or left one. So we compute (R-1)^2 + 1^2 and compare to R^2. If the point is greater than R^2 then that point is still outside the circle, and we have to move to the left, to R-2,0. But in this case it is likely that (R-1)^2 + 1^2 is less than or equal to R^2, which means that point is inside or on the circle. So we go that way.

    And over and over, we move up one or left one, always checking to see if we are inside the circle or outside the circle. If we are outside, we go left. If we are inside or on, we go up.

    Meanwhile, circles are symmetric. Which means every time we draw (a,b) we should also reflect that point left/right and up/down. We should draw (a,-b), (-a,b), and (-a,-b). We flip the dots from the right side of the origin to the left side, and we draw them above and below the origin. Moreover, we can also flip any point diagonally about the two diagonals. Which is basically swapping the x and y coordinates. So we can also plot (b,a) when we plot (a,b) because both points are on the same circle. So except for the four points on the axes, every time we calculate one dot we draw eight.

    When the x coordinate equals or exceeds the y coordinate, we know we have crossed the diagonal, and we stop. At that point we have drawn a complete circle around the origin with radius R, and every point is connected (because we always step up or left, always keeping dots connected without gaps) and we do it with minimal calculation. Every point gets drawn once, and we get eight points per calculation, and every calculation involves just a couple additions, subtractions, or multiplications. And most multiplications are squaring, and most of them are cached from prior calculations.

    Once you see it, you wonder why it wasn't obvious to begin with. It is a beautiful algorithm.
  • DNA3000DNA3000 Member, Guardian Posts: 19,611 Guardian
    Polygon said:

    In chem/math you mainly take an equation, and plug in your known variables to find an unknown , sometimes referencing other data, but it’s usually a straight forward plug and play, like calculating for an equilibrium constant based on reaction rate data. But for a typical physics problem, the problem solving requires more depth; you have to make a set of assumptions, decide which equation to use, and it can be a lot more theoretical . Newton invented calculus just because it was needed for physics. Alternatively just because you're fluent in english doesn't make you a poet.

    This depends greatly on the kinds of chemistry and physics you're doing.
  • TerminatrixTerminatrix Member Posts: 2,900 ★★★★★

    I am at pre final year in my college and really want to become a programmer. I really like logical reasoning and thinking, that's why I chose this. I also want to contribute to mcoc in some way, especially want to design and code a story final boss. Wish me luck guys.

    You might get Kabam's attention with this 🙂 Wish you the best!
  • TerminatrixTerminatrix Member Posts: 2,900 ★★★★★

    Cybersecurity specialist

    Nice!!! I see those jobs are in high demand
  • TerminatrixTerminatrix Member Posts: 2,900 ★★★★★

    I am at pre final year in my college and really want to become a programmer. I really like logical reasoning and thinking, that's why I chose this. I also want to contribute to mcoc in some way, especially want to design and code a story final boss. Wish me luck guys.

    Why did some of you disagree with this? I think it's great that MCOC has had such an impact that they want to design part of it 🙌🏾
  • Eb0ny-O-M4wEb0ny-O-M4w Member Posts: 13,996 ★★★★★

    Not against Forum rules?

    None of personal info should be shared on posts.

    It is, yeah. Considering they have closed and deleted multiple post's in the past where people were only commenting about their age range, this one is kinda going a bit more far than that
  • ahmynutsahmynuts Member Posts: 7,480 ★★★★★
    edited November 2023
    DNA3000 said:

    PT_99 said:

    I'm studying medicine.
    Anyone want coca cola formula?

    To the people who disagreeing everyone, I hope you get "disagreed" on your next 10 job interview, that'll show you, something or other.

    I find it difficult to believe that most of the people who are aggressive disagree flaggers are otherwise that productive with their time.
    I don't know. At this point, the statistics lean heavily in favor of most of us somehow being extremely productive despite playing this game and being on the forums all the time so i'd believe it
  • captain_rogerscaptain_rogers Member Posts: 9,105 ★★★★★
    Polygon said:

    I am at pre final year in my college and really want to become a programmer. I really like logical reasoning and thinking, that's why I chose this. I also want to contribute to mcoc in some way, especially want to design and code a story final boss. Wish me luck guys.

    Does coding/programming require more of a logical based style of thinking or creative thinking? I struggled with physics because it needs creative thinking but i was really good at subjects like math, chemistry, grammar because i had a logical/analytical mindset
    Yes, creative thinking is of less side than logical thinking. You do need some creativity, but approaching problem within the rules is what you do most of the time
  • captain_rogerscaptain_rogers Member Posts: 9,105 ★★★★★

    I am at pre final year in my college and really want to become a programmer. I really like logical reasoning and thinking, that's why I chose this. I also want to contribute to mcoc in some way, especially want to design and code a story final boss. Wish me luck guys.

    Awesome!! And maybe you can get in on other games too
    I would like to but game developers are the worst paid jobs among tech, also have high working hours nd strict deadlines
  • captain_rogerscaptain_rogers Member Posts: 9,105 ★★★★★
    ahmynuts said:

    I am at pre final year in my college and really want to become a programmer. I really like logical reasoning and thinking, that's why I chose this. I also want to contribute to mcoc in some way, especially want to design and code a story final boss. Wish me luck guys.

    You might get Kabam's attention with this 🙂 Wish you the best!
    He really likes logical reasoning and thinking. It clashes too much
    Yes I thought about it sometimes too.
    Logical reasoning looks everything on a objective, binary pov, But I always believe everything in this universe is gray, and highly opposed to the idea of binary (either this or that), i.e., Most of the times, there is a third option.
  • captain_rogerscaptain_rogers Member Posts: 9,105 ★★★★★
    DNA3000 said:

    I am at pre final year in my college and really want to become a programmer. I really like logical reasoning and thinking, that's why I chose this. I also want to contribute to mcoc in some way, especially want to design and code a story final boss. Wish me luck guys.

    Programmers do not, in general, design story content. Content designers have more in common with, say, people who build things in Minecraft. Programmers built Minecraft itself, but the people who build things within Minecraft are not, in general, programmers.

    If you did have programming skills, within the context of a game like MCOC that would probably help you in one of a few ways. If you actually wanted to write code to expand or maintain the game engine, that would of course be your primary skill requirement. May god have mercy on your soul. If you decided to be a systems engineer (say, the guys that designed relics, or the battlegrounds mode, or even something like the piggy banks), that would help work with programmers to implement system designs, or assist with troubleshooting them, as the systems engineers probably work closest with the actual programmers and the actual code. And third, if you worked as, say, a champion designer and they let you, you could read the code to figure out how the various game mechanics worked to inform you on how to best design things that functioned the way you want them to, because the only games I know that are well documented are the ones that no one has worked on for twenty years.

    But 90% of game design is not programming, at least when it comes to games like MCOC. The programmers that work in a game studio are like the plumbers that work at a restaurant. Necessary, but often substantially removed from anything the customers actually see.
    Thanks for your kind words! And yes, I meant it when I said i l wanna design a boss, My design and content creation skills are ****, and it's not my interest either, but still I would like to design a boss, I always thought about it.
  • CrcrcrcCrcrcrc Member Posts: 7,962 ★★★★★
    b
    DNA3000 said:

    Polygon said:

    Cant you just use the implicit equation of a unit circle x^2 + y^2 = 1 , or r instead of 1 for a different radius ? I know you said no trig, but you could also parameterize that with x = rcosθ, y = rsinθ for 0 < theta < 2pi

    That's how many people conceptualize drawing a circle. But what increment do you step theta? If you step in increments of, say, one degree, that will be too small for small circles and too big for big circles. With small circles you will be plotting the same points over and over again. With large circles the points won't be connected together, there will be big gaps between them. So how do you draw a circle on a square grid where all the dots are connected?

    Also, sine and cosine are trig functions. Trig functions take, on a comparative basis, much longer to compute. If you're trying to draw a circle and you need to compute hundreds of trig functions, that will be pretty slow. In the old days, incredibly slow, but even on modern CPUs like say Intel Core architectures I think floating point sine is like twenty times slower than floating point multiply.

    So the trig go around the circle algorithm is a) slow, b) inefficient, and c) draws ugly circles that sometimes turn into just a bunch of points.

    There's an algorithm that draws every point on the circle, doesn't draw any extra points, automatically scales with the size of the circle, and uses no complex math and thus runs extremely fast. The basic outline of the method is this:

    Imagine a circle drawn on a checkerboard grid, centered at the origin, with radius R. There's at least one point you know is on the circle: four actually. (R,0) is definitely on the circle. So is (-R,0), (0,R), and (0,-R) because circles are symmetric. Let's focus on the right side dot at (R,0). Notice that if we walk around the circle counterclockwise, there are only two possible locations for the next dot we draw. It can be one pixel higher, at (R,1). Or it can be one pixel to the left, at (R-1,0). If we want our circle to be connected, we can't step diagonally to (R-1,1). How do we know which way to go?

    Equation of a circle: X^2 + Y^2 = R^2. We precompute R^2 and keep that around. The first point we drew was (R,0). That point satisfies the circle equation: R^2 + 0^2 = R^2. Which of our two possibilities also satisfies the circle equation? If we step up one to (R,1) then we would get R^2 + 1^2 which is greater than R^2. So that point is *outside* the circle. So we move to (R-1,0) which is now *inside* the circle. Now we just repeat. We can go to (R-1,1), or (R-2,0). Up one, or left one. So we compute (R-1)^2 + 1^2 and compare to R^2. If the point is greater than R^2 then that point is still outside the circle, and we have to move to the left, to R-2,0. But in this case it is likely that (R-1)^2 + 1^2 is less than or equal to R^2, which means that point is inside or on the circle. So we go that way.

    And over and over, we move up one or left one, always checking to see if we are inside the circle or outside the circle. If we are outside, we go left. If we are inside or on, we go up.

    Meanwhile, circles are symmetric. Which means every time we draw (a,b) we should also reflect that point left/right and up/down. We should draw (a,-b), (-a,b), and (-a,-b). We flip the dots from the right side of the origin to the left side, and we draw them above and below the origin. Moreover, we can also flip any point diagonally about the two diagonals. Which is basically swapping the x and y coordinates. So we can also plot (b,a) when we plot (a,b) because both points are on the same circle. So except for the four points on the axes, every time we calculate one dot we draw eight.

    When the x coordinate equals or exceeds the y coordinate, we know we have crossed the diagonal, and we stop. At that point we have drawn a complete circle around the origin with radius R, and every point is connected (because we always step up or left, always keeping dots connected without gaps) and we do it with minimal calculation. Every point gets drawn once, and we get eight points per calculation, and every calculation involves just a couple additions, subtractions, or multiplications. And most multiplications are squaring, and most of them are cached from prior calculations.

    Once you see it, you wonder why it wasn't obvious to begin with. It is a beautiful algorithm.
    As someone in college studying programming, you just exactly captured the creativity of coding algorithms. Figuring out stuff like this that seems like it should be the obvious first answer after you've done it is one of the best feelings.
    (kabam if you need an intern hmu)
  • RonSwansonRonSwanson Member Posts: 1,171 ★★★★
    Foreman for the finishing department of a cabinet company and i wear many other hats in that department. Machine operator/machine tech/machine maintenance. I run our pump room that supplies paint to our spray booth. I'm the repair and service tech for our Sames Kremlin paint pumps. I manage and maintain our paint inventory. I work hand in hand with a chemist from AkzoNobel to test and maintain our color standards for the paint they provide us.

    I just took a sweet job that comes with a new house in a really nice town, I supervise a small team who really think highly of me.

    In fact, one of my recent initiatives to improve staff morale was to organise hammocks.

    The boss is really great, his name is Hank but there is something odd about him.

    I'm sure it will work out fine...

    I hope you like the Denver Broncos
  • IsisixkswmrIsisixkswmr Member Posts: 237
    I’m in middle school but my dream job has always been to be a researcher/biologist
Sign In or Register to comment.