r/learnjava • • Aug 05 '22

Dont understand CodeWars or Leetcode after finishing MOOC Java

Idk but I feel like a literal idiot, even the basic basic "very easy/easy questions" are hell for me. I don't get it. How do I understand these questions more?

Its like theres a gap between the two courses/websites that I havent filled yet

70 Upvotes

31 comments sorted by

16

u/8igg7e5 Aug 05 '22

There's a common mismatch in expectations for MOOC. It is a purely introductory course to programming (with Java).

It skips essentially all foundations of computational theory and almost all of the common data-structures and functional models of decomposition. It's approach is to focus on how to solve certain types of problems, but almost never mentioning why you might favour one over another. This tends to result in the student 'over-fitting' any knowledge gained to the specific problems they've seen, rather than having built a framework of knowledge around composing types of problems.

It's still a good course, possibly still one of the better free 'introduction' courses, but you should assume that you still have a lot to learn about programming and Java when completed.

IMO they should've skipped the JavaFX parts, spending that time looking at a problem and the several different ways it could be solved, comparing the approaches.

9

u/Critical_Switch1663 Aug 05 '22

Halfway done Java MOOC and I am still struggling badly when it comes to translating word problems into code. It’s like I don’t know how to put everything together that MOOC Java has taught so far, even tho I’m doing well in it

5

u/8igg7e5 Aug 05 '22

Those early stages of learning programming require quite a change in how we think. You're learning a language but also a model of thinking that is more abstract than most other things we do.

Don't be concerned that you're struggling, it will get better and, once you have that 'Eureka!' moment for a concept you'll find climbing that particular hill much easier in the future (just try not to get too daunted by those jagged-looking cliff-faces off in the distance for now).

1

u/Zebra_Delicious Jan 08 '23

Did you carry on, if so what is your level now?

1

u/anonymous062904 Aug 05 '22

What should I do now?

6

u/buttsilikebutts Aug 05 '22

I did mooc up to the javafx bs and still couldn't do leetcode when I started. It just takes practice

3

u/anonymous062904 Aug 05 '22

How did you start getting Leetcode questions right:

Did you just check the solution everytime to find a pattern?

5

u/timberline00 Aug 05 '22

I’d also like an answer to this. Maybe every 5th easy problem I could kind of solve, but the start has been demoralizing.

3

u/ryuugami47 Aug 05 '22

I started solving the problems on pen and paper first by going through an example input step by step by hand. Then I translated what I did into pseudo code and then into java.

1

u/user_reg_field Aug 08 '22

That's what I'd, as an interviewer, like to see in an interview anyway. Having a rational approach to problem solving that you can explain very valuable.

2

u/Dj0ntyb01 Aug 05 '22

That's what I do, and it works.

Check out Neetcode.

Good video explanations for common problems and solutions in a bunch of languages.

11

u/titanium_mpoi Aug 05 '22

Do projects while doing your mooc course. Just binge watching the course isn't gonna take you anywhere and this is a very common problem for newcomers.

And yes leetcode is more of a problem solving while the mooc course you did just helped you with the basics.

Try to stay motivated and again DO PROJECTS.

5

u/anonymous062904 Aug 05 '22

I have one project right now which is a guessing game based on random numbers scanners and arrays

Are you saying to make projects with different data structures

Or it literally doesn’t matter what project you make

1

u/titanium_mpoi Aug 08 '22

What I mean is let's say you studied oops in java which is again a very tought and important maybe try do a project related to it? for eg. A class car having functionalities like wheels or engine cc or horse power etc . Join some discord servers if you can, they have a lot of project ideas there.

8

u/Critical_Switch1663 Aug 05 '22

I’m halfway done MOOC Java and my confidence has gone down. Everyone hyped it up so much and yet I still can’t even translate world problems into code

2

u/titanium_mpoi Aug 08 '22

this is what exactly what I was saying in the comment above, in programming its very hard to maintain consistency and motivation, you will feel like giving up in the end most likely if you follow those mooc course(not saying they are bad but most of them are just badly structured). They are good but only at understanding the basic concepts.

To maintain your confidence try to projects, its like you learned something today then do a project over it this way it would be more interesting and you will stay motivated.

Progress is always slow but after a month of doing this consistently you will feel like you have done a great job and it would be a world of difference.

sry for typos english is not my first language.

PS: https://java-programming.mooc.fi/ this is by far the best mooc course out there, its well structured and it provides real world examples and questions.

54

u/mrmartyman Aug 05 '22

you need to learn Data Structures and Algorithms for that first. This course from Princeton is great for it.

https://www.coursera.org/learn/algorithms-part1?action=enroll

https://www.coursera.org/learn/algorithms-part2

If you are doing it just for leetcode and not a class I recommend picking up "Cracking the Coding Interview".

34

u/animeis4kids Aug 05 '22

leetcode is pro level

mooc is noob level

indeeed, there is a huge gap. Mooc exercises are all about teaching you the numbers and leetcode problemas are like asking you to do algebra.

i recommend you to still do leeetcode, you will learn a lot.

18

u/lookForProject Aug 05 '22

Although leet code can be challenging, I wouldn't use those two categories.
Leetcode is about algorithms, mooc about learning coding and to program.

Also, note that although leetcode, like a lot of coding games, is a lot of fun, you don't develop skills you necessarily need as a junior.

You almost never implement an algoritm as a professional. Although, when you do, knowing, or having knowledge of algorithms, can help a lot.

8

u/A27_97 Aug 05 '22

Some of the answers here are so bad.

Java MOOC is meant to teach you Java and programming. Programming is used to solve problems (problem solving), similar to Leetcode. Understanding programming or writing code doesn’t mean you’ll be able to solve problems, it means you’ll have a tool that you can use to solve problems.

You write more code to get better at programming, you solve more problems to get better at problem solving. So practice more leetcode and you’ll get better at it.

4

u/diggieinn Aug 05 '22

Codingbat.com has easier questions, that is a good starter for leetcode IMO

1

u/AnybodyKlutzy91 Aug 08 '22

What is Mooc sorry newbie here, what's the website for it?

1

u/anonymous062904 Aug 08 '22

Massive Open Online Course - Java University of Helsinki

1

u/AnybodyKlutzy91 Aug 08 '22

Is this where I can learn functions etc. As a beginner?

2

u/anonymous062904 Aug 08 '22

Yes you will learn: functions, scanner input, printing variables, loops, arrays, methods, classes, encapsulation, polymorphism, Object Orientated Programming, and Basic Sorting Algorithms

3

u/Bosco_is_a_prick Aug 05 '22 edited Aug 05 '22

Start with CodeWars. Select only level 8 problems and sort by most completed. If you can't complete the problem look at the solutions and lookup any code you don't understand. They will be lots of methods you probably have not come across before so keep looking things up. Keep doing the level 8 problems until your solution is similar to the ideal solution most of the time.

2

u/buttsilikebutts Aug 05 '22

Try one for a little bit, see how far you get, look at a solution and move onto a different problem. Don't submit any answers though, then come back to it in a week when you forget the solution and it's like trying it for the first time again

1

u/SarthakTyagi15 Aug 05 '22

Try to understand the code editor of leetcode and practice atheist 5 problems daily.

Also on YouTube, "kunal kushwaha" dsa Playlist on java

1

u/elfranco001 Aug 05 '22

MOOC teaches you the basics of the java language. If you want to be a programmer you will need to learn data structures and algorithms. This will be a new kind of learning, and its detached from just java it will improve your programming skills in every language. Start with the book Data Structures and algorithms in java. You can also find thousands of youtube videos about data structures.

1

u/[deleted] Aug 05 '22

Just keep practicing