Good Coding Practices - #1 - Competitive Programming In Java

preview_player
Показать описание
The first lecture of this series is probably the most difficult to master: Good coding practices! We discuss this based on three goals:

1) Correctness
2) Efficiency
3) Debuggablilty

I would love to hear your suggestions and views in the comments below. Will try to incorporate as many suggestions in the last lecture of this series: Multithreading.

Happy Coding!

#java-coding #java-best-practices
Рекомендации по теме
Комментарии
Автор

One of the most important thing for programmers regardless of whether they practice competitive programming or not, is to spend some time finding sensible identifiers. Apart from the fact that it's a good coding practice, good identifiers help enormously to understand what the program is doing.

devashishjaiswal
Автор

Hehe I made a summary :

Correctness
- final declaration for required data types
- avoid Object creation
- Scanner slows down, use InputReader
- avoid too many static functions

Efficiency
- use library functions as much as possible
- write freaking jUnit @Test-ing
- assertEquals("RESULT", functionToCall())

Debuggability
- avoid too many global variables
- Separate logic from Pre-processing
- variable/function pneumonics must make sense

Please don't flag this/ report this as spam because I'll be coming here time to time to revise all the tips :)

tilakmadichettitheappdeveloper
Автор

Thanks for this @Gaurav, one important aspect I wanted to point out, although using inbuilt libraries may help clear the cp acceptance criteria, it wont help in interviews as interviewers want us to implement such libraries, also debugging issues may be difficult at times.

pste
Автор

hello sir, are you participate in codejam or kickstart??
I solve problem on codejam but it generate error not compilation.I didn't get idea what I make wrong. So, could you help me so, next time I solve that problem.

idrispatel
Автор

Hello sir android app banane ke liye kya kya sikhna padta h please detail

Funkey
Автор

I am working in a project, in which I use FPGA for simulation acceleration. There I need some help with hdl coding for FPGA and Nios II processer

udakasarinda
Автор

@Gaurav Can you please post the git link to the template files? Need to setup Intellij. Thanks :)

alokporwal
Автор

please bring more such videos.
Plus if you got time will you solve some Div 3 questions from codechef or codeforces so that we can have that idea how to write code and also we can open that blockage so that we can get logic of the problem straight into our heads.
Thank you

chrollo
Автор

Programming confuses people if its very hard . I m leaning this to help me in life .

thornadotrigger
Автор

please help me in this question


create an array of objects of the person class, of size 4. create three objects of the person class, with values, and assign the objects to the array. loop through the array and print the name, job, and
email of all person

abdu...
Автор

Is competitive coding in java recommendable?

nandanambati
Автор

Hello sir....thanks for this video ..
Will you complete series on java

khushichaurasia
Автор

What parts of C++ do I need to know to be a competitive programmer?

lakshit
Автор

good old days when we can hear the typing sound 😌

charan
Автор

Maybe you could code a "Revelation 12 Sign" searcher? Would be nice.

julian.
Автор

Wow, thank you for the awesome lecture! I was confused whether I should turn to C++ from Java until I watched your lecture and found the elegance of solving problems using Java :)

mingyyu
Автор

Great content. I was in need of this for so long.

DivijShrivastava
Автор

+Gaurav Sen

gaurav, I want to ask you that growth of my coding skills has got freezed I have come to a level where I can solve two or some times 3 questions in long challenge from the level where I wasn't able to solve even a single question. Now I am not getting how should I take my coding skills to the next level. What problems should I solve now, solving problems which are high difficulty and not able to solve is highly demotivating and sometimes even I doubt whether I will ever be a good programmer or not although I enjoy it a lot whenever I solve a problem. I want you to guide me how should I proceed from this point where I have stuck at a place.

arpit
Автор

Hi Gaurav,
I have soon to appear for placements for companies like DIrectI and Goldman Sachs and I have a good experience in programming but not the deep concepts. How can I build them fast? Please suggest something.

AkashSharma-ymco
Автор

Which is the idea plugin shown in red color with [ ] brackets.

arpit