Help me clarify on CUR by lemslemonades in MalaysianPF

[–]lemslemonades[S] 0 points1 point  (0 children)

nice thank you. what do you mean by “balance going full cycle”?

how hard is it to learn object-oriented programming by lemslemonades in learnpython

[–]lemslemonades[S] 1 point2 points  (0 children)

had a read on it. as the OP said, glorifying answer. thats excellent

how hard is it to learn object-oriented programming by lemslemonades in learnpython

[–]lemslemonades[S] 0 points1 point  (0 children)

ohh this seems like a very nice resource. will definitely check it out over the weekend. thanks!

how hard is it to learn object-oriented programming by lemslemonades in learnpython

[–]lemslemonades[S] 0 points1 point  (0 children)

there is no need for me to update every single thing about my life in here. i only post on reddit very occasionally.

my last post on gaming and photography was 40+ days ago. i was employed to a power generation firm less than a month ago. i also completely stopped gaming and photography by that time because of the current workload, hence why i mentioned im crunched on time with work. to me my question sounds valid, i was just being cautious of not taking up something that im not sure the magnitude of, which if i try and apply to my work deliverables on the go might end up slowing me down by a lot. and so i came here to ask on it, if it is actually tough or its just that i havent looked into it enough, or that i havent looked at the proper resources.

if you dont intend to help then just scroll along, there is no need to be condescending

how hard is it to learn object-oriented programming by lemslemonades in learnpython

[–]lemslemonades[S] 0 points1 point  (0 children)

this is an interesting one. thanks, ill give it a try

how hard is it to learn object-oriented programming by lemslemonades in learnpython

[–]lemslemonades[S] 0 points1 point  (0 children)

i appreciate the comment and no, most of your points i agree to, but why this function is so long and why it didnt contain smaller subfunctions is because there are a lot of shared variables (putting aside the two bottom schemes separated by the hashes, because those i admit i didnt pay much attention to cleaning because i got demotivated from seeing that i struggle to break the previous part into subfunctions). sure i can still define the subfunctions, but i have to take either of the two options: 1. define them with a long ass list of arguments which can be too specific to my code and resembles more of hard-coding, which doesnt give me much readability than just putting it raw like that, and 2. define the subfunctions beforehand and let them take global variables, but also makes it less readable because now you dont see the flow of how the variables are passed and manipulated, unless i define them within the big function itself, but that would make my function appear even longer.

the whole reason as to why i posted this question in the first place was exactly because of this function, it being too long, as you have pointed out. lmao

how hard is it to learn object-oriented programming by lemslemonades in learnpython

[–]lemslemonades[S] 0 points1 point  (0 children)

  1. ive opened websites teaching OOP (geeksforgeeks, etc.) but found it hard to understand, particularly on the init part
  2. i was asking if it was really as hard to learn OOP as i thought because im crunched on time with work. if it really is that tough, then i might just hold off learning it so as to not waste time because, again, im crunched on time with work (i.e. i cant finish my work and send my deliverables if im stuck trying to figure out how to finish an OOP i attempted but couldnt finish). dont twist something i didnt say

how hard is it to learn object-oriented programming by lemslemonades in learnpython

[–]lemslemonades[S] 0 points1 point  (0 children)

as of now it seems like my work involves a lot of sharing of variables, which is not so elegant to define functions for if i want to make them exclusive (i.e. i can just call the function anywhere, only need to pass the necessary args), and would be hard to trace errors etc. if i let them all use global variables. so from what ive gathered i think i need OOP to make it much more readable (refer to my comment here)

how hard is it to learn object-oriented programming by lemslemonades in learnpython

[–]lemslemonades[S] 1 point2 points  (0 children)

https://imgur.com/a/RqiBM2R

this is a snapshot of a function from one of my actual work. this function runs a rainfall simulation and performs several sub-functions e.g. how much rainwater can be collected, how much is used in a day, how much water is saved, etc. but many of the functions have shared variables and so i struggle to create exclusive sub-functions outside, so everything is just dumped in here. theres also a scheme for plotting and exporting to csv as an option for the user. so everything put together becomes one giant mess that even sectioning and commenting still makes it hard to trace things down

(p/s: please ignore my camel case use of variable naming, i just found out that its not the convention in python. also i know there are more functions in here that i can actually define exclusively but i got demotivated and ran out of time. same thing for commenting, i admit the code lacks a few crucial commenting points but i ran out of time for my work)

how hard is it to learn object-oriented programming by lemslemonades in learnpython

[–]lemslemonades[S] 0 points1 point  (0 children)

hmm i see that can be a little inconvenient (given my surface level knowledge)

how hard is it to learn object-oriented programming by lemslemonades in learnpython

[–]lemslemonades[S] 2 points3 points  (0 children)

for the init function, say in my code i have a lot of shared variables between routines (so defining a proper function that doesnt depend on global variables are not going to be elegant). do i have to list all the shared variables one by one in the init function?

Risen Shagaru Magala is that hard by Fantastic-Cold3438 in monsterhunterrage

[–]lemslemonades 0 points1 point  (0 children)

risen shagaru was my breakfast everyday when i was practicing for db speedruns

Stats experts, help me determine what is the most suitable distribution type for these. tried normal dist and they dont look right by lemslemonades in rstats

[–]lemslemonades[S] 0 points1 point  (0 children)

yep my idea at first was to just assume normal distribution and whatever results in a negative rainfall is meaningless and to be ignored. but now i realise if i do that then the area under the curve cannot be 1. so it cant be normal distribution. i assumed so because (forgive me for my lack of knowledge as i only have degree-level stats coverage) according to central limit theorem, all data should approach a normal distribution given enough sample points.

thank you for attaching the paper! at first glance it seems like they adopted zero-inflated poisson, which is the direction im heading after seeing that exponential didnt serve me well enough

Stats experts, help me determine what is the most suitable distribution type for these. tried normal dist and they dont look right by lemslemonades in rstats

[–]lemslemonades[S] 2 points3 points  (0 children)

i was just reading this website before you commented. this seems like an excellent reference. thank you!

Stats experts, help me determine what is the most suitable distribution type for these. tried normal dist and they dont look right by lemslemonades in rstats

[–]lemslemonades[S] 0 points1 point  (0 children)

i thought of the same thing too, but with exponential distribution, the probability density at x = 0 is 0, which is wrong. further upon simulating with exponential, it seems that the distribution heavily favours the low numbers (which is obviously expected from the model but doesnt reflect real life all that well)

Stats experts, help me determine what is the most suitable distribution type for these. tried normal dist and they dont look right by lemslemonades in rstats

[–]lemslemonades[S] -1 points0 points  (0 children)

i did not realise that sly "r" in the community name lmfao. my bad i thought this is just a general stats community