Have you ever worked with other people? Have you ever worked with people who like indenting with tabs? Have you worked with people who think a tab should be exactly 8 spaces?
Nope, we just use ‘black’. No messing about arguing over styling standards. Just run black as a pre commit hook, and just focus on building features. A simple life is a happy life as far as I’m concerned.
What? Using pre commit hooks is just a handy way of avoiding the problem you described. It’s nothing to do with a specific language, it can be literally any language, you just automate a linter to tidy up the code before a push, problem solved. Unless you’re writing your code in notepad, you’ll never have an issue with indentation anyway. Using a tool like a linter or preconmit hook to make your life easier and let you focus more time on important stuff, instead of messing about with aesthetics is surely a good thing, no? I’m not sure what your definition of “broken” is, but it works exactly how it was designed to. You might not like the design choice, and that’s ok, but it works exactly how it should if you use it how it’s supposed to be used.
It not really a problem, you just have to use it how it was designed. Otherwise it’s like me saying Java is broken because it gives me a compile error when I miss a brace… that’s not broken, that’s a programmer error lol
No, unfortunately not. Thankfully, in python, since it’s just whitespace, literally any linter with an “apply” option will be able to fix it for you. No need for a failed build because you missed a delimiter. Handy isn’t it?
Enter every professor who requires notepad so you can't "use an IDE as a crutch". Bitch, I'm not using notepad in the real world and I'd probably fire anyone on my team who did.
cmd: make three fields, when field 1 is null then 2 is totally required, but not if 3 is null, so all 3 can be null, but hide the submit button if that happens.
cmd: ok undo the last command but then redo it but make 2 required if field 3 is 2 characters or less
cmd: make timezones work pls
cmd: run build
I just realized this is how my PMs think the world works...
Oh just masochistically making things harder for yourself when better tools exist. I'm just kidding. My teacher made me write code on notepad and compile it in a command prompt 😔
I use python occasionally and it seems fine for the most part, but yesterday my partner asked how to import python classes from other directories and I am not ashamed to admit that this bullshit-ass, nonsense-ass, init-dot-py-ass, edit-the-path-ass, no-relative-paths-in-imports-ass language fucking sent me something fierce.
I TA'd a Python class once. It was an utter pain figuring out exactly how wrong peoples' broken code was because of that, especially on group projects where the members just mashed their code together.
I always thought this was kind of weird, but I never thought about how stupid it really is. I’d rather have to put a few extra brackets than deal with that ‘expected indent at line’ shit
63
u/grasshopper147 Apr 08 '22
"for no reason" Number of invisible characters at beginning of line controls code scope. Screw that.
Source: I teach this crap at univ to kids and have worked with lots of other languages for 2 decades.