As far as I have noticed, people who are new to programming often use a mixture of German and English. It makes it more difficult to understand, for me at least. But this is part of the learning phase.
Yes, I remember that too, but the sooner you stop, the better. Understanding the english terms is also very important and it makes the understanding of the code harder if the words are just random for you imo
It absolutely makes sense in some cases. If you are developing custom software for very specific, nieche subjects, badly translating German technical terms into non official english terms could bring more issues than just using the official German term. Still should follow english guidelines and comments etc, but it might be the better to have a checkHackfleischVerordnungCompliance method than to try to translate it, making it relate less to the official term and creating room for error by vague, bad translations
It's real fun as an American who has had to do an SAP migration. I worked with consultants in the US and India who have done numerous conversions, and even they don't know what the German words behind the column names are, but they know BUKRS = Company, KOSTL = Cost Center, etc., and they pronounce them similarly "BOOkers" "COSTle"... 🤦
Thank god German at least uses the same alphabet (more or less). Imagine getting code from an Arab company with that philosophy...
In a global economy where English is the lingua franca, it seems like the logical choice. A German is far more likely to understand English than the other way around.
They're not talking about translations to display to the users, they're talking about terms in the actual code (e.g. function names) which can't or shouldn't be translated.
I'm well aware of what they're talking about. You shouldn't have german words in your code, except for custom german terms. Some people use german words as values in their code instead of using some translation tool between the value in your code and the value to display to the user
If you mean inside strings, then I would say that is acceptable if you're making German-only software. Why use English strings and then use gettext or another similar library to translate them if you're never ever going to use the English strings?
Because using translations makes texts reusable, easy to fix on several places and with tools like localise non programmers can make changes in the translations without having to dive into the code. Plus I would expect every software to be available in english for non english speaking german citizen. Translations doesn't mean english first btw
Imagine making a piece of software for the management of a German restaurant, no one's ever going to use it in a language other than German, it wouldn't make sense to make up some English strings and then translate them.
Besides, it's not like everything is available in English. You're just used to it because you don't bump into things that aren't.
You don't understand. You don't do english strings, you have a json with translation keys for the words and this json can be german words and the english version gets translated later. A restaurant is a bad example btw since many foreign people work in restaurants. I told the advantages of doing this already, even if you only use one language.
looks like a code of an average university professor: shitty as hell to collaborate with others, but good enough to leave it and never return to it (otherwise you forgot what it is about, lol)
It is actually Greenfoot which was last updated in 2022 and is basically BlueJ but with a built in actor-based library intended for making simple games
the 4 chunk code by itself is fine. sure we loop in chunks and loop over a specific width and height.
but then move the code that handles a specific element into a separate method.
and similarly the code to check an individual element. it really worries me that this code is checking if the neighbour is in the current chunk. fair enough the 'zellen[i][j]' only contains so many elements, but that means that a cell on the edge (zellen[0][j]) or zellen[i][zellen.length -1] is going to not be checked for neighbours?
I think for this you either need overlapping chunks
but it gets worse. i and j are 'num chunks' not 'chink wodth/height'. so this loop isn't looping over the current width and height of the chunk but over i and j , the amount of chunks.
I don't get all the complaints about big O. It appears this is some sort of cellular automaton kind of thing, changing the state of cells based on neighboring cells. It's not clear what the "chunk" is, because k and l are never used. But without seeing the rest of the code, it's impossible to tell, maybe it makes sense.
if you have a 2d-array of other 2d-arrays and you need to go through every item, what the hell else are you supposed to do, short of accelerating it with some vector math, which is probably overkill here? Also, NUM_CHUNKS, CHUNK_WIDTH, CHUNK_HEIGHT appear to be constants, so the concept of assimptotical complexity is not even applicable here.
27
u/klekaelly May 04 '23
O(n6) I think?
9
u/robottron45 May 04 '23
this method is definitely working
"verbreiteKrankheit", it will make the reader feel sick
14
u/_ohmu_ May 04 '23
And in german... my eyes are bleeding
73
u/tlaziuk May 04 '23
looks like a code of an average university professor: shitty as hell to collaborate with others, but good enough to leave it and never return to it (otherwise you forgot what it is about, lol)
67
u/Fischchen May 04 '23
BlueJ, mein Beileid...
34
u/Inaeipathy May 04 '23
for { for { for { for { for { for { for ..........
11
u/mashermack May 04 '23
Any normal linter would trigger a thermonuclear detonation at the fourth for loop.
8
u/mike_a_oc May 04 '23
Big O my god....
6
u/skantanio May 04 '23
Fackin BlueJ bro… nostalgia
3
u/mosskin-woast May 04 '23
The method isn't even called
istInfiziert... Why mix languages in a single symbol 😭3
u/Any_Ad_8134 May 04 '23
my biggest fear is that people actually use some other language then english in production.. saying as a ger
3
u/HellVollhart May 04 '23
*Crying in worst case O(N6 )
2
u/josephblade May 04 '23
the 4 chunk code by itself is fine. sure we loop in chunks and loop over a specific width and height.
but then move the code that handles a specific element into a separate method.
and similarly the code to check an individual element. it really worries me that this code is checking if the neighbour is in the current chunk. fair enough the 'zellen[i][j]' only contains so many elements, but that means that a cell on the edge (zellen[0][j]) or zellen[i][zellen.length -1] is going to not be checked for neighbours?
I think for this you either need overlapping chunks
but it gets worse. i and j are 'num chunks' not 'chink wodth/height'. so this loop isn't looping over the current width and height of the chunk but over i and j , the amount of chunks.
edit: someone please tell me I misread something
1
u/cheezballs May 04 '23
Is that netbeans?
1
u/ChickenLegBizGuy May 05 '23
It just keeps going…
1
u/RootU5R May 06 '23
For the method name, it worked here on this subreddit
1
u/[deleted] May 08 '23
Why the names of everythin is in German) 😄
1
u/lets_eat_bees May 12 '23
I don't get all the complaints about big O. It appears this is some sort of cellular automaton kind of thing, changing the state of cells based on neighboring cells. It's not clear what the "chunk" is, because
kandlare never used. But without seeing the rest of the code, it's impossible to tell, maybe it makes sense.if you have a 2d-array of other 2d-arrays and you need to go through every item, what the hell else are you supposed to do, short of accelerating it with some vector math, which is probably overkill here? Also,
NUM_CHUNKS,CHUNK_WIDTH,CHUNK_HEIGHTappear to be constants, so the concept of assimptotical complexity is not even applicable here.0
u/[deleted] May 04 '23
[deleted] — view deleted comment