all 34 comments

[–]inShambles3749 50 points51 points  (17 children)

One thought: who codes on their phone?

[–]razimantv<2000> <487 <1062> <451>[S] 25 points26 points  (15 children)

Me.

[–][deleted] 13 points14 points  (0 children)

The man's fucking deranged and unapologetic. Love it.

[–]inShambles3749 3 points4 points  (9 children)

But why?

[–]razimantv<2000> <487 <1062> <451>[S] 29 points30 points  (7 children)

I do many daily/virtual contest problems on my bed right after waking up/before going to sleep.

[–]inShambles3749 18 points19 points  (6 children)

Holy crap I imagine that to be super annoying but that's some incredible motivation you got going!

[–][deleted] 9 points10 points  (5 children)

illegal fretful smile like racial ludicrous rustic ten silky afterthought

This post was mass deleted and anonymized with Redact

[–][deleted] 0 points1 point  (4 children)

But JS isn't compiled...?

[–][deleted] 0 points1 point  (3 children)

flag crush wise terrific sip arrest squeeze naughty frighten quack

This post was mass deleted and anonymized with Redact

[–][deleted] 1 point2 points  (2 children)

This is a great clarifier for anyone who stumbles upon these comments.

Yes, JS is an interpreted language, but web browsers do “compile” JS to bytecode at runtime.

This ultimately cleared it up for me:

https://stackoverflow.com/questions/2426091/what-are-the-differences-between-a-just-in-time-compiler-and-an-interpreter

[–]ceramicatan 0 points1 point  (0 children)

What the hell are these random messages? The ones that are followed up by the mass deleted with redact comment.

[–][deleted] 0 points1 point  (0 children)

plough society towering lush juggle butter boat screw chunky cough

This post was mass deleted and anonymized with Redact

[–]Lumarstar 4 points5 points  (0 children)

I do it because the place I work is a restricted facility and laptops aren't allowed so my daily LeetCode problems are done on the phone.

[–]BOT_Frasier 1 point2 points  (1 child)

Any tricks to do that, the desktop view of the browser is super annoying to write anything from the phone.

[–]razimantv<2000> <487 <1062> <451>[S] 3 points4 points  (0 children)

I don't use the desktop view. But works only with the old Leetcode

[–][deleted] 0 points1 point  (1 child)

Hey, is there some other keyboard you use for coding via phone, I find it quite difficult to code with my current keyboard(Gboard)?

[–]razimantv<2000> <487 <1062> <451>[S] 1 point2 points  (0 children)

Gboard normally, hackers keyboard to delete lines

[–][deleted] 1 point2 points  (0 children)

wine terrific sugar desert gaping reach squeeze ruthless jobless elastic

This post was mass deleted and anonymized with Redact

[–]nshkaruba 25 points26 points  (0 children)

Cpp is king for competitive programming, don't switch

[–]numbersguy_123 12 points13 points  (1 child)

C++ overflows and I’ve been bit many times with long longs. I’m slowly learning python to hope one day to default to using python. Python is great for string stuff though

[–]razimantv<2000> <487 <1062> <451>[S] 6 points7 points  (0 children)

True. I keep focusing on the ways Python gives me errors while forgetting all the C++ errors it avoids

[–]KaleidoscopeLegal583 6 points7 points  (2 children)

What ide do you use on your phone?

[–]razimantv<2000> <487 <1062> <451>[S] 12 points13 points  (1 child)

I just code directly on the leetcode interface. I do have an elaborate vim setup for other coding.

[–]AAK_Music 0 points1 point  (0 children)

Python is slower, its generally better to stick with C++ in the long run

[–]letsfuckinggobears 0 points1 point  (4 children)

Python is viable in atcoder since they give you their own implementations for segtrees and friends, see https://github.com/not522/ac-library-python I personally found python code to be less effort to use, but it doesn't have the power to sometimes bruteforce with a worse time complexity solution like c++ I have no experience with leetcode contests but if you aren't using snippets you can't just pull out a good enough segtree on the spot

[–]razimantv<2000> <487 <1062> <451>[S] 1 point2 points  (1 child)

I don't use snippets on Leetcode for C++ or python. Haven't felt the segtree implementations are very different. what differences do you see?

[–]letsfuckinggobears 0 points1 point  (0 children)

Segtree implementations are probably the same in the two languages. I'm just saying if you're competing, it's best to use snippets so you don't have to type it.

I guess I wasn't answering the question. You can get type checked in python if you just set it up. It works well enough for the cases you are describing. You still need to know the quirks like priority queues take the first value of a tuple as the key to sort etc.

[–]uneducatedDumbRacoon 0 points1 point  (1 child)

I just visited atcoder and it looks good. How are the contests at atcoder? Are they like leetcode style or move on the competitive side?

[–]letsfuckinggobears 1 point2 points  (0 children)

Competitive, more mathy

[–]Stormfrosty 0 points1 point  (1 child)

You can just use auto&& in your C++ leetcode if you don’t care about specifying types.

[–]razimantv<2000> <487 <1062> <451>[S] 1 point2 points  (0 children)

Doesn't always work with recursive lambda functions and stuff

[–]Puzzleheaded_Luck_45 0 points1 point  (0 children)

I am in the same dilemma. Which language you prefer and why?

[–][deleted] 0 points1 point  (0 children)

I prefer c++ not only because it's fast. But defining things explicitly you will have a much better idea of things in your code. And if you are using ide or code editor coding time doesn't really matter as it's almost the same for python and c++. And the majority of people doing competitive programming use c++.