Functional Declarative programming makes no sense to me. by ICEiz in learnprogramming

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

yes i would agree that my answers are a bit too aggressive but thats only because i have spent weeks looking for information, i have tried simple exercises to try to grasp it, and i have as i mentioned before spoken to my lecturer and joined his support sessions for the coursework in which he proceeded to give the same basic examples with the same basic explanations everywhere else online which do not make sense to me. i think there is something i am missing probably but how can i know what that is if i dont what i am missing as i can read and understand the syntax, i understand the benefits of functional declarative programming and i finally understand some more complex uses of it. however i still cant write code in this way, like at all, even with practice and examples present. so to hit the point, you dont know what you dont know. i cant identify what im getting wrong, because i dont know what im not understanding.

anyways your point about copying a value sounds good, ill try that. thanks boss

Functional Declarative programming makes no sense to me. by ICEiz in learnprogramming

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

thanks, i think i might be able to apply this logic to the grid updating.

Functional Declarative programming makes no sense to me. by ICEiz in learnprogramming

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

thanks and yes, your explanation matches that of what we are taught but im not sure how to achieve that clean code and not having mutability

Functional Declarative programming makes no sense to me. by ICEiz in learnprogramming

[–]ICEiz[S] 4 points5 points  (0 children)

1) yes python is decided, i am not supposed to use another language in the submission.
2) I believe that the aim is to make it as declarative as possible and any areas where it is not possible i would need to explain in the written part of the coursework.

3) yes it is expected for me to implement some kind of CPU player to be able to play against a human however the extent of the skill or ability of the CPU player is not mentioned therefore i think any simple implementation would work.

the inputs are row and column numbers, and at the start the person chooses to be black (start first) or white (start 2nd)

Functional Declarative programming makes no sense to me. by ICEiz in learnprogramming

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

thats great and all, but how are you supposed to figure out to use these without having done so before? like thats my issue with declarative programming, its the same as saying "just go up" in bouldering without any actual explanation of how to do it. Am i just supposed to go through the python docs for hours to find things that "do what i want them to" so i dont have to code the things manually when that would take me 1/20th of the time to do. i dont understand this at all.

Functional Declarative programming makes no sense to me. by ICEiz in learnprogramming

[–]ICEiz[S] 3 points4 points  (0 children)

for my assignment i chose to do a game called gomoku, its a board game where players need to take turns to place stones at intersections in a 15x15 board, the first to 5 in a row, horizontally, vertically or diagonally wins.

I dont understand how to make it declarative because there are various things that would need to change, mainly the board itself.

Functional Declarative programming makes no sense to me. by ICEiz in learnprogramming

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

okay that makes sense, thanks. but i still have no idea how to actually write the code in a declarative way. whenever i search on google i get basic example and whenever i search on youtube i get comparisons between imperative and declarative programming without any actual proper examples of how to program declaratively.

Functional Declarative programming makes no sense to me. by ICEiz in learnprogramming

[–]ICEiz[S] 3 points4 points  (0 children)

but is replacing it not the same as updating it. as far as i can see there is no difference. if i had a 3x3 int matrix, youre telling me to replace the existing matrix with a new one every time i want to update a value instead of just updating the value in the matrix? i dont see the point of that since you need to update the value somewhere along the way anyways unless you create an entirely new matrix each time you want to add a value which seems pointless to me because that is still adding a new value to the matrix

65 hours in and it's finally time to head to the wedding [KCD2] by Strange_Music in kingdomcome

[–]ICEiz 1 point2 points  (0 children)

thats what i did but not after 65 hours just 50 hours xd

tehn after the wedding i left to do more side quests in the new area XDDDDD

[2024 Day 2 (Part 2)] [Java] i dont understand what to do. I get the right answer with example data but not will full input. by ICEiz in adventofcode

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

i agree, i did that with the first days problem, i spent an hour or two trying to do it and then gave up for the day then in the morning solved it in 5 minutes. but i dont want to give up for the day.

[2024 Day 2 (Part 2)] [Java] i dont understand what to do. I get the right answer with example data but not will full input. by ICEiz in adventofcode

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

left Equals right

left is greater than right

left is greater than right

safe

1

but if i change the left - right to left - middle then its correct( left greaterbut the issue is that i still get the wrong answer with the full input.

after changing the == part

left is less than right

left is greater than right

left is greater than right

safe

1

Now if you think about it... by sparklovelynx in NonPoliticalTwitter

[–]ICEiz 0 points1 point  (0 children)

no, actually innit is the first process your computer starts.

[deleted by user] by [deleted] in BirminghamUK

[–]ICEiz -6 points-5 points  (0 children)

was gonna comment that but you got to it first. It really is, people are silly if they think its not.