No more Blub for me, thank you, Vicar.
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry wrote:There is a case study. Would that be the assignment for this week?
No more Blub for me, thank you, Vicar.
chris webster wrote:
Joe Harry wrote:There is a case study. Would that be the assignment for this week?
Not as far as I can tell. The case study is a detailed look at implementing a solution for the so-called "Water pouring problem" using lazy evaluation, Streams etc.
There is a forum for the Week 7 assignment, but no sign of the assignment yet. I'm guessing it's going to be tough, though!
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry wrote:Week7 will be about Streams!
No more Blub for me, thank you, Vicar.
chris webster wrote:Have you looked at the assignment?
![]()
chris webster wrote:
Joe Harry wrote:Week7 will be about Streams!
Have you looked at the assignment?![]()
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry wrote:What is the terrainFunction doing? Could you guys give me additional explanation?
No more Blub for me, thank you, Vicar.
Matthew Brown wrote:Finished it a couple of days ago (currently working on my Compilers course assignment).
I found it relatively straightforward until I hit from(). I tried a few approaches there that didn't work (though I suspect that some of them would if I'd got it right). But I tried it before watching the water pouring video. I found that to be a huge help - the from() method in that solution works in a very similar way.
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry wrote:I haven't looked at the assignment fully other that the first part. It was last Friday I had a look at them and only solved the first two tasks. I just gave me some time to relax as the deadline for this assignment is the 15th of this month. I will take a look at them tomorrow. Hope they are not as difficult as it was for Week6.
No more Blub for me, thank you, Vicar.
Jeanne Boyarsky wrote:I made "from" so much more complicated than it needed to be the first time around! It was an interesting meandering journey though!
No more Blub for me, thank you, Vicar.
chris webster wrote:
Joe Harry wrote:I haven't looked at the assignment fully other that the first part. It was last Friday I had a look at them and only solved the first two tasks. I just gave me some time to relax as the deadline for this assignment is the 15th of this month. I will take a look at them tomorrow. Hope they are not as difficult as it was for Week6.
If you pay close attention to the hints in the assignment and source code, then it's not too bad. The "from()" method is a bit more difficult, but the water-pouring example is very helpful there. I found one of the biggest challenges on this assignment was making sense of the data structures we're given, and I definitely wouldn't have come up with this solution (or probably any solution) to the problem on my own. I still have plenty to learn about FP and Scala!
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
chris webster wrote:and I definitely wouldn't have come up with this solution (or probably any solution) to the problem on my own. I still have plenty to learn about FP and Scala!
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Matthew Brown wrote:I found it relatively straightforward until I hit from().
Wen Tong Lin wrote:hi Guys. I was wondering if you can point me to the right direction with from() method. My solution is doing an infinite loop.
The flow is:
1) if "initial" is empty return Empty stream.
2) do a for comprehension with 2 generators.
a) generate from "initial" assigning it to x.
b) use x._1 and x._2 as parameter of neighborsWithHistory
c) use the value returned by b) as the first parameter of newNeighborsOnly, and second parameter is explored + h._1
d) assign c) to next, and yield it to a val more.
e) then return initial #:: from( more, explored) recursively
Any help will be greatly appreciated.
No more Blub for me, thank you, Vicar.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
|