Worksheet issues...
Is anyone else using the Scala WorkSheet functionality? I'm doing a 30 day experiment with IntelliJ after using Scala-IDE for Eclipse now for the last three years; especially it's Scala Worksheet since it was initially released. I have become completely addicted to the Eclipse version of the Scala worksheet. I am trying to use the IntelliJ version with the same level of zeal...and am running into issue after issue.
For example, here's my latest issue. This simple code's last line is resulting in an "java.lang.NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less$colon$less":
val a = List(1, 2, 3)
val b = List("a", "b", "c")
val z = a.zip(b)
val m = z.toMap
I have opened a ticket but haven't seen any activity on it. To remain productive, I have had to move back to Eclipse to use it's Scala WorkSheet. I was really enjoying how IntelliJ was working for my Scala needs. But, I cannot take it seriously for my development productivity cycles without the WorkSheet working at a much higher level. And I'm certainly less likely to drop the $200 for a personal license...or recommend it to the group of developers I am leading from Java into Scala.
Any constructive feedback on this would be greatly appreciated. Thank you.
Please sign in to leave a comment.
Last time I tried it, it was very slow. Since then the devs once said they made it faster.
But, honestly, I didn't consider it very useful. Instead of writing things into a worksheet, I better write them into a test-case.
This preserves the code at a defined locatino in my project, and adds automatic verification of the result.
For the same reason I've long stopped writing executables (objects with a main) for testing. It's better to write a test-case.
What is your usage of worksheets in Eclipse? Maybe I'm missing something.
Thank you very much for asking. I really appreciate it.
The work I am doing right now is mostly strategic API design.My use cases are interactive exploration of the concrete instances of the different types, instances and output. Scala makes so many different kinds of assumptive leaps which I am still not following very easily. So, in the WorkSheet, I can dynamically "shape" code explicitly watching the types, the instances and the output. This helps me get an intuitive feel for what is happening. I use this intuitive feel to rapidly resolve issues and help direct me in my design of the code.
I didn't use to rely on the WorkSheet. I've only done so as a result of my moving to Scala from Java and doing the "Functional Programming Principles in Scala" MOOC on Coursera where it is used by Odersky himself. He also strongly suggests Scala developers use it. It really has been a god-send for me and my development needs. I won't work without it any more. It's just too damn convenient to explore edge cases, odd type issues, etc. and get to the root of an issue very quickly.
BTW, I am doing test cases once a design is stable. In fact, I typically use the WorkSheet to play around with building context for the tests. Or to explore why a test I have created continues to fail even though I think I have written the code which ought to make it pass. Given I have done a good FP job, I can decompose rapidly within the WorkSheet to hone in on whatever the problem might be.
However, I don't use TDD much during my initial design on a new system or API. I have found them to be too distracting (and even inadvertently impacting and/or perverting) when doing deep explorative API design. I don't buy into the fad "Design via TDD" (Test Driven Development). TDD is awesome once a system is stable and being incrementally improved (same with Agile/Scrumm). I have found when I used TDD during design, it puts way too much focus on the tactical short term concerns and not enough on the strategic longer term good wholistic API design concerns.
Hence, my having become addicted to the Scala WorkSheet for my day-to-day work.
Hi Jim, thank you for the thorough explanation (that is, probably, the most complete worksheet usage justification I've ever read)!
We're now looking into the issue.
Pavel,
Tysvm! I have seen the ticket closed as fixed in the bug tracker.
So, I've just re-installed 13.1.4 and then re-installed the Scala plug-in 0.38.441. And this problem continues to appear. What is my means to know when the fix will be become available?
Thank you,
Jim
EAP version contains this fix: http://blog.jetbrains.com/scala/2014/07/23/scala-and-play-2-plugins-0-41-eap-is-out/
Best regards,
Alexander Podkhalyuzin.