From d5b3389375a5c6efa921ef0f4391c1b734f11761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Mass=C3=A9?= Date: Wed, 13 Jun 2018 13:14:16 +0200 Subject: [PATCH 1/4] Introducing Accessible Scala blog post --- blog/_posts/2018-06-13-accessible-scala.md | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 blog/_posts/2018-06-13-accessible-scala.md diff --git a/blog/_posts/2018-06-13-accessible-scala.md b/blog/_posts/2018-06-13-accessible-scala.md new file mode 100644 index 000000000..e293920d4 --- /dev/null +++ b/blog/_posts/2018-06-13-accessible-scala.md @@ -0,0 +1,56 @@ +--- +layout: blog-detail +post-type: blog +by: Guillaume Massé +title: Introducing Accessible Scala +--- + + Have you found yourself where you had to verbally describe code? For example, while pair-programming +or talking about work during lunch. Verbally describing code is not an easy task, fortunately for you the +Scala Center is working on this. [SCP-016]: Accessible Scala, was submitted to provide industry-leading support +for blind and partially-sighted developers. It's also an opportunity to formalize a spoken Scala. For example, +how do you pronounce: `Map[K, V]`? Perhaps `Map of K V`, or maybe `Map taking K and V`. + + Reading Scala out loud make some of its syntactic elements less intimidating for beginners. When we read the +following expression: `class S[+T]` as `class S parameterized with covariant T`, we don't need to mentally +associate the syntax `+T` with its concept `co-variant`. + + One of the goals of the proposal is to remove the noise introduced by various delimiters. Notice how the type +parameter delimiters: `[` and `]` are absent from the verbal description. However, with more complex expressions, +this can make the audible form ambiguous, for example, with nested types: `Either[Wobble[T], Option[Wobble[S]]]` +becomes: `Either applied to types Wobble of T, Option of Wobble of S`. + + To overcome the limitation of verbal description, we created a technique called the Cursor. The idea is simple: +from your cursor location, you can navigate the abstract syntax tree of the source code. From a node, you can +navigate to the parent node, to the siblings (left or right) or the first child. As you navigate the code, +it's described and selected. We created an online demo (adjust your volume!) to let you try the cursor +technique and hear the descriptions. + +# Want to try it? + +We created an [online demo]. You can try it now! (Tip: It works best on google-chrome! ) + +We also created a [vscode extension] so you can try on your project. Search for `Accessible Scala` in the +extension manager + +# What's next? + +We hope you are excited as we are by the online demo. We would like to hear your feedback on the verbal +descriptions. We would like to invite the Scala community to improve the quality of the project and join the +effort. You can find an extensive test case here: [DescribeTest.scala]. If you find that descriptions could +be improved, send us a pull request with the expected form. Another area where we would need help +is to create an integration with [Emacspeak]. It's an emacs plugin widely used by blind developers. If you +know emacs lisp well and want to participate, please reach out to us! + +# Talk to us! + +Thoughts or opinions about Accessible Scala? Join us over on [Scala Contributors] to contribute to the discussion. +We also have a [gitter] channel. + +[SCP-016]: https://github.com/scalacenter/advisoryboard/blob/master/proposals/016-verbal-descriptions.md +[vscode extension]: https://marketplace.visualstudio.com/items?itemName=scala-center.accessible-scala +[online demo]: https://scalacenter.github.io/accessible-scala-demo/ +[DescribeTest.scala]: https://github.com/scalacenter/accessible-scala/blob/master/tests/unit/src/test/scala/ch.epfl.scala.accessible/DescribeTest.scala +[Emacspeak]: https://github.com/tvraman/emacspeak +[gitter]: https://gitter.im/scalacenter/accessible-scala +[Scala Contributors]: https://contributors.scala-lang.org/TBD From 7f9f20ddc59673ffc2bdcbc343554e7b9e766104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Mass=C3=A9?= Date: Thu, 14 Jun 2018 14:24:13 +0200 Subject: [PATCH 2/4] Accessible Scala: link to youtube demo --- blog/_posts/2018-06-13-accessible-scala.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blog/_posts/2018-06-13-accessible-scala.md b/blog/_posts/2018-06-13-accessible-scala.md index e293920d4..1e7da04a7 100644 --- a/blog/_posts/2018-06-13-accessible-scala.md +++ b/blog/_posts/2018-06-13-accessible-scala.md @@ -32,7 +32,9 @@ We created an [online demo]. You can try it now! (Tip: It works best on google-c We also created a [vscode extension] so you can try on your project. Search for `Accessible Scala` in the extension manager - + + + # What's next? We hope you are excited as we are by the online demo. We would like to hear your feedback on the verbal From 1478851d7191cafbfb6469013102084d163dced4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Mass=C3=A9?= Date: Thu, 14 Jun 2018 17:08:15 +0200 Subject: [PATCH 3/4] put more emphesis on the proposal goals & add cursor example --- _sass/base/media.scss | 20 +++++++ blog/_posts/2018-06-13-accessible-scala.md | 69 +++++++++++++++------- 2 files changed, 69 insertions(+), 20 deletions(-) diff --git a/_sass/base/media.scss b/_sass/base/media.scss index ef8cc8844..763900e28 100755 --- a/_sass/base/media.scss +++ b/_sass/base/media.scss @@ -10,3 +10,23 @@ picture { margin: 0; max-width: 100%; } + +// site design / logo © 2015 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required +// stackexchange.com +kbd { + padding: .1em .6em; + border: 1px solid #ccc; + font-size: 11px; + font-family: Arial,Helvetica,sans-serif; + background-color: #f7f7f7; + color: #333; + -moz-box-shadow: 0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset; + -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset; + box-shadow: 0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset; + border-radius: 3px; + display: inline-block; + margin: 0 .1em; + text-shadow: 0 1px 0 #fff; + line-height: 1.4; + white-space: nowrap +} \ No newline at end of file diff --git a/blog/_posts/2018-06-13-accessible-scala.md b/blog/_posts/2018-06-13-accessible-scala.md index 1e7da04a7..cb7325504 100644 --- a/blog/_posts/2018-06-13-accessible-scala.md +++ b/blog/_posts/2018-06-13-accessible-scala.md @@ -5,42 +5,71 @@ by: Guillaume Massé title: Introducing Accessible Scala --- - Have you found yourself where you had to verbally describe code? For example, while pair-programming -or talking about work during lunch. Verbally describing code is not an easy task, fortunately for you the -Scala Center is working on this. [SCP-016]: Accessible Scala, was submitted to provide industry-leading support -for blind and partially-sighted developers. It's also an opportunity to formalize a spoken Scala. For example, -how do you pronounce: `Map[K, V]`? Perhaps `Map of K V`, or maybe `Map taking K and V`. - - Reading Scala out loud make some of its syntactic elements less intimidating for beginners. When we read the -following expression: `class S[+T]` as `class S parameterized with covariant T`, we don't need to mentally -associate the syntax `+T` with its concept `co-variant`. - - One of the goals of the proposal is to remove the noise introduced by various delimiters. Notice how the type -parameter delimiters: `[` and `]` are absent from the verbal description. However, with more complex expressions, -this can make the audible form ambiguous, for example, with nested types: `Either[Wobble[T], Option[Wobble[S]]]` -becomes: `Either applied to types Wobble of T, Option of Wobble of S`. - + Scala is proudly a welcoming environment for all. The Scala Center is demonstrating this by supporting +the development of Accessible Scala, a tool for blind and partially-sighted developers (see [SCP-016]). +One of its goals is to remove the noise introduced by various delimiters. For example, we could read the +following expression: `class S[+T]` as `class S parameterized with covariant T`. Since there is more than one way +to pronounce Scala source code, we are open to the community proposition. You can find an extensive test case +here: [DescribeTest.scala]. If you find that descriptions could be improved, send us a pull request with the +expected form. + + Reading Scala out loud make some of its syntactic elements less intimidating for beginners. There is no more +need to mentally associate the syntax `+T` with its concept `co-variant`. Notice on the example above, how the type parameter delimiters: `[` and `]` are absent from the verbal description. It call also help sighted developers to describe Scala orally, for example in the context of pair programming. However, when expressions get more complex, the audible form can become ambiguous or difficult to decypher. + To overcome the limitation of verbal description, we created a technique called the Cursor. The idea is simple: from your cursor location, you can navigate the abstract syntax tree of the source code. From a node, you can navigate to the parent node, to the siblings (left or right) or the first child. As you navigate the code, -it's described and selected. We created an online demo (adjust your volume!) to let you try the cursor +it's described verbally and selected. Here is an illustrated example, the arrows (→ exp ←) repesents the highlighted text and Alt + Arrow the keyboard shorcut applied to navigate. + +``` + +→ private ← class A { // speaks: "private" + val a = 1 +} +``` + +Alt + Right + +``` +private class → A ← { // speaks: "A" + val a = 1 +} +``` + +Alt + Down + +``` +private class A { + → val a = 1 ← // speaks: "val a equals 1" +} +``` + +We created an online demo (adjust your volume!) to let you try the cursor technique and hear the descriptions. # Want to try it? We created an [online demo]. You can try it now! (Tip: It works best on google-chrome! ) -We also created a [vscode extension] so you can try on your project. Search for `Accessible Scala` in the +We also created a [vscode extension], so you can try on your project. Search for `Accessible Scala` in the extension manager - +
+ + + Hello world demo + + + + Coverage demo +
+ # What's next? We hope you are excited as we are by the online demo. We would like to hear your feedback on the verbal descriptions. We would like to invite the Scala community to improve the quality of the project and join the -effort. You can find an extensive test case here: [DescribeTest.scala]. If you find that descriptions could -be improved, send us a pull request with the expected form. Another area where we would need help +effort. Another area where we would need help is to create an integration with [Emacspeak]. It's an emacs plugin widely used by blind developers. If you know emacs lisp well and want to participate, please reach out to us! From 5880ab1fa2fbaf6a02913113155935f79c60bec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Mass=C3=A9?= Date: Thu, 14 Jun 2018 19:30:09 +0200 Subject: [PATCH 4/4] Accessible Scala: more text to explain the problem + fix typos --- blog/_posts/2018-06-13-accessible-scala.md | 37 ++++++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/blog/_posts/2018-06-13-accessible-scala.md b/blog/_posts/2018-06-13-accessible-scala.md index cb7325504..c67cba102 100644 --- a/blog/_posts/2018-06-13-accessible-scala.md +++ b/blog/_posts/2018-06-13-accessible-scala.md @@ -7,19 +7,42 @@ title: Introducing Accessible Scala Scala is proudly a welcoming environment for all. The Scala Center is demonstrating this by supporting the development of Accessible Scala, a tool for blind and partially-sighted developers (see [SCP-016]). -One of its goals is to remove the noise introduced by various delimiters. For example, we could read the -following expression: `class S[+T]` as `class S parameterized with covariant T`. Since there is more than one way -to pronounce Scala source code, we are open to the community proposition. You can find an extensive test case +One of its goals is to remove the noise introduced by various delimiters. The current solution with +text-to-speech engine, would read + +```scala +def foo[A: Wibble](s: String, b: Wobble[A]): Int = ... +``` + +as + +```bash +def space foo open square bracket capital s colon space +wibble close square bracket open bracket a colon space +string comma space b colon space wobble open square bracket +capital a close square bracket close bracket colon +space Int space equals space ... +``` + +Indeed such a description is necessary to enable precision editing. + +However, the following would convey the same information more efficiently: + +```bash +def foo parameterized with: A context bounded by: Wibble. s String, b Wobble of A returns: Int +``` + +Since there is more than one way to pronounce Scala source code, we are open to the community proposition. You can find an extensive test case here: [DescribeTest.scala]. If you find that descriptions could be improved, send us a pull request with the expected form. - Reading Scala out loud make some of its syntactic elements less intimidating for beginners. There is no more -need to mentally associate the syntax `+T` with its concept `co-variant`. Notice on the example above, how the type parameter delimiters: `[` and `]` are absent from the verbal description. It call also help sighted developers to describe Scala orally, for example in the context of pair programming. However, when expressions get more complex, the audible form can become ambiguous or difficult to decypher. + Reading Scala out loud make some of its syntactic elements makes it less intimidating for beginners. There is no more +need to mentally associate the syntax `+T` with its concept `co-variant`. Notice in the example above, how the type parameter delimiters: `[` and `]` are absent from the verbal description. It can also help sighted developers to describe Scala orally, for example in the context of pair programming. However, when expressions get more complex, the audible form can become ambiguous or difficult to decipher. To overcome the limitation of verbal description, we created a technique called the Cursor. The idea is simple: from your cursor location, you can navigate the abstract syntax tree of the source code. From a node, you can navigate to the parent node, to the siblings (left or right) or the first child. As you navigate the code, -it's described verbally and selected. Here is an illustrated example, the arrows (→ exp ←) repesents the highlighted text and Alt + Arrow the keyboard shorcut applied to navigate. +it's described verbally and selected. Here is an illustrated example, the arrows (→ exp ←) represents the highlighted text and Alt + Arrow the keyboard shortcut applied to navigate. ``` @@ -49,7 +72,7 @@ technique and hear the descriptions. # Want to try it? -We created an [online demo]. You can try it now! (Tip: It works best on google-chrome! ) +We created an [online demo]. You can try it now! (Tip: It works best on Google Chrome! ) We also created a [vscode extension], so you can try on your project. Search for `Accessible Scala` in the extension manager