Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Bikonja23868yIt should :)
I neee to represent time in separate hour and minute variables, but also as minutes from midnight so that's the conversion from minutes from midnight to minutes within the hour and theres also a GetHoursFromMinutes function -
Bikonja23868y@libcmg well of course it is, who doesn't comment code? *Runs to add comments in code* :D
-
Bikonja23868y@spongessuck dashes in function names? Never seen that before... But I like the concept, a little lengthy, but still acceptable and a bit clearer
-
@Bikonja And if you have an IDE with autocomplete you only have to type it once 😜
-
Bikonja23868y@spongessuck huh, Android version automatically adds dashes for wrapping I guess...
And it's JS so if someone makes an error it probably won't be visible until runtime so it would be nice to keep it as simple as possible, regardless of any help from an IDE. -
krlooss4938y@Bikonja @libcmg in my company it is forbidden to comment code.... Architecture says the methods name should be self explanatory, this would be something like getMinutesAfterMidnightFromMinutes()
-
@krlooss Utter nonsense, while it's true code should be self explanatory comments also help to explain things at a glance.
-
Bikonja23868y@nblackburn @krlooss totally agree, code should be self-documenting, it shouldn't do so at the detriment of everything else... Sometimes you would need an extra long name, sometimes you couldn't optimize things properly with making the code readable, sometimes you can even have conflicting problems with self-documenting code like verbose code that has a huge block so you don't see what the braces are closing (so write a comment to make it easier to see) or make the code compact, but therefore less readable (tbf, usually still readable enough, but still)...
So I just created a function called GetMinutesFromMinutes... It actually makes sense and I'm not sure if that makes it better or worse :)
undefined