r/javahelp • • May 08 '19

Good at math to learn java

I have discalculia im horrible at math do you need to be good at math to learn coding java and java script

22 Upvotes

20 comments sorted by

5

u/tragicxharmony May 08 '19

I have dyscalculia and I've been studying Java in school for the past year. It's going pretty well, honestly, but I've had to be very careful when working on projects because I have a lot of trouble with numbers moving around on me. One of the biggest things that trips me up is < and > symbols--I use them wrong all the time, for no good reason, and it creates a lot of errors so I always double and triple check. I use a lot of comments to remind myself what numbers are there for (as well as very very obvious variable names--nothing like just int i = 1 because I'll lose track of what's going on), and if something isn't going right I have been known to print out whatever I'm working on and highlight things because for some reason seeing the code in a different form works better sometimes.
I'm naturally good at English and writing; coding isn't as natural to me, but adjusting things to fit my learning style has worked so far for me. I'm very lucky because my degree is a Bachelor of Arts in computer science, rather than a Bachelor of Science, so I don't have to take any math higher than college-level algebra. I don't know if you were looking to do a traditional college program or something different entirely, but that may be something to look into as more colleges are beginning to offer less math-heavy degree tracks.

3

u/DupeDawn May 08 '19

Thankyou this comment was very helpful

1

u/AnonymousHerbMan May 09 '19

so I don't have to take any math higher than college-level algebra

/u/tragicxharmony this doesn't seem right. Are you sure that college-level algebra is your highest? That would mean you don't even need calculus?

Look, I'm in the same boat right now as /u/DupeDawn, 100%. I promise you. Well, the boat that can see the shoreline anyway.

I failed algebra in highschool but passed the following year. Failed pre-calc twice as a freshman in college, but passed the third semester. Calculus, however... that's a battle I've been fighting for 4 years now.

I'm also getting a Bachelor of Arts in Computer Science, and I chose my school because it had the least math of those I looked at. The classes I had/have to take are:

  • Pre-calc

  • Calc 1

  • Discrete Math

  • Discrete Math 2

Most colleges offering a BA in CSC will have something near identical to this (plus or minus a class). I don't want you getting the idea that you can skirt by with just college algebra. You can definitely expect to take at the least Calc and Discrete Math (or some equivalent logic class).

I'm in my 5th year still taking Calculus (actually looks like I'm gonna pass this time!) and Discrete 2. I've finished all of my CSC classes (except for 1) and my minor in CIS. The only things left is the math -- I'm at the finish line.

For me personally, Discrete math plays the biggest role in coding. This becomes especially true in the later classes. If you haven't taken the proper discrete classes (which may have calc as a pre-req), you might find yourself lost when discussing certain subjects. 1 class in specific that I'm currently struggling with has Discrete 2 as a pre-req. I don't find the code or concepts around the algorithms difficult -- It's when I'm asked to write a proof of the algorithm that I'm SOL.

So do you really need to know calc in order to code? Debatable. I spent an entire summer at an internship coding for industrial machines in C#. Calc made up about 15-20% of my code. A large portion of it was easily searchable online or reused code from other methods. But in a case like that, you might want that calc backbone.

But there's also lot of times where calc out of sight, out of mind. I've currently worked my way as a freelancer developing websites for $50/hr, and I don't use calc in the slightest. So depending on your end goal with where you want to go as a coder, the need for calc becomes debatable. If you're gonna pursue CSC for a degree, you'll only need calc for the occasional formula or graphics problem.

**TLDR: Whether or not you need Calc is debatable and depends a lot on what field of programming you intend to pursue. But if you're looking at a degree in Comp Sci, calc is mostly just a checkbox pre-req for other things.

1

u/tragicxharmony May 09 '19

Yes, I know the course requirements for my major. I need to take algebra and a discrete math course specifically for the Computer Science degree. According to people who have taken that discrete course, it's theory-based, and I generally do well in theory-based courses.
The ONLY difference between the BA and the BS is that two math classes have been taken out of the BA, replaced by one more mandatory computer science course and one elective computer science course. I know this is highly unusual compared to usual requirements, but I very much know what my degree requires me to take. I don't expect or want a traditional software developer position when I leave school, because I know I'm not as technically skilled in math and have an extensive background in English and communications.

22

u/Majeh1254 May 08 '19

Not necessarily. It can depend on what sort of application you are building but I think math skills help build a proper mindset for solving problems which is definitely preferred in software development

22

u/Daedalus9000 Java Developer May 08 '19 edited May 08 '19

Logic is much more useful (in general) than math. There are certainly specific types of programming that do require a stronger math background, but not very many.

2

u/[deleted] May 09 '19

Discrete math and logic is still math.

2

u/Daedalus9000 Java Developer May 09 '19 edited May 09 '19

Yes, discrete math is math; by definition. Math is logical, but logic is not necessarily math. I've taken plenty of courses in prepositional and predicate logic; was never once asked to do any math.

* I should add, also, that I've been plenty successful as a developer for a while now and I was terrible at discrete math in school. So I find any proposed correlation between the two to be highly suspect.

7

u/[deleted] May 08 '19

Yes and no.....

You need to have a good knowledge of what math to use, what formulas to use, etc.

You really don't need a great knowledge of how to actually do the math operation, that's what the program does for you.

Looking up what Discalculia is...I dunno how bad it might be for you. If you understand what formula to use and when, and the basic mechanics of how it works then you will be ok.

6

u/[deleted] May 08 '19

Short answer is no; and never let having dyscalculia stop you trying.

Long answer is that on a basic level numbers are what computers operate on. But logic, understanding program flow etc is more important. Programs create there own layers of abstraction and those are what you need to understand.

Remember you might learn differently than others - so don’t be afraid to find out what works for you. Don’t assume you can’t get it.

4

u/ClarkTheCoder May 08 '19

Hey, first of all it's dyscalculia. Secondly, no you typically don't need to be good at math in order to code. When math comes into play I just google the formulas/algorithms that I need. Logic is much more important and as you write more and more code your logic skills typically improve. I too have dyscalculia and have passed many programming/data structure/algorithms classes. With hard work and persistence you can succeed. Don't let dyscalculia decide your future.

1

u/nascentt May 08 '19

No. If you can code, you can make the program so the math for you.

Logic is more important.

1

u/ElGallinero May 08 '19

It really depends, as many have already pointed out. However, the key to coding and understanding software development is to be able to think abstractly, which is also very important in math.

1

u/jkuhl_prog May 08 '19 edited May 08 '19

Math provides a logical framework to solving problems, but it isn't strictly necessary for learning programming. There are other means of learning logic.

There are some fields, like 3D game programming, where knowing algebra is useful, like to refactor an equation to fit in the syntax of a language and some fields of machine learning will use calculus, but I think most software programming won't go much beyond Algebra 1 topics, if it even goes that far.
Furthermore, in many cases the math is often buried under layers of abstraction anyways. Like with machine learning, if you're using tensorflow, you might not even see the calculus directly. Or if you're making a game, an editor like Unity will hide a lot of the mathematical code for you.

1

u/steaknsteak May 08 '19

Programming doesn't generally require much direct math, but it requires a similar way of thinking to be good at it, i.e. primarily using strict logic and sequential thinking, rather than other skills like memorization, pattern recognition, or creativity

1

u/evils_twin May 09 '19

Math is pretty vague. I would say being good at Boolean algebra would help a lot.

1

u/MrZombieTheIV May 09 '19

In my opinion, no. But why don't try it and find out?

1

u/itshowitbeyunno May 09 '19

The most math I've done is incrementing i by one.

1

u/amackenz2048 May 09 '19 edited May 09 '19

You've not provided a lot of information so it's difficult to speculate.

The computer does the *calculations* but *you* would need to tell it how to do that. In the 15 seconds I spent googling dyscalculia it seems that many concepts may be difficult?

Without knowing more about your specific scenario it's difficult to say but here's a common scenario to use as a test - sorting.

Lets say you have this list of numbers:

5,9,3,8,2,1,4

Now you want a sorted version of that list. It would look like this (note some gaps - everything is just ascending):

1,2,3,4,5,8,9

There will typically be libraries that do the actual sorting for you (or you can learn how to do it with various techniques/algorithms). But does the *concept* make sense? If you were asked to find the average of that list of numbers, or the max/min would that make sense conceptually? There will usually be functions to do those for you so often you don't need to know too much about the specifics.

These sorts of problems are encountered pretty frequently (I hit them on a near daily basis).

Edited to add:

You will also need to step through a sequence of steps and be able to remember what the current "state" of a system is. This is a bit difficult to explain and not everyone does this well. Kinda like writing a list of instructions for cooking a cake. You'll need to be able to "see" what step should be next, and when each step should occur. And if the cake comes out wrong you'll need to be able to mentally step through the steps to figure out where things went wrong. You may know how to make the cake - but writing it down for somebody else (a computer) requires precision.

1

u/[deleted] May 09 '19

I say go for it. Programming is just being able to wrap your head around a complex to-do list. If nothing else, it may help you reason better about math, without making you do any.