-
Notifications
You must be signed in to change notification settings - Fork 1
Add page “teach” #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
77ba6f1
df7d59e
9e9554b
fdbab94
9850a22
2eb61c6
0706d6c
7a9af57
f947e45
55dfe20
60d1811
adc31b4
5013958
74992b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| - name: Bartosz Balis | ||
| institution: AGH University of Science and Technology, Poland | ||
| location: | ||
| longitude: 19.9136192 | ||
| latitude: 50.0668858 | ||
| - name: Björn Regnell | ||
| institution: Lund University, Sweden | ||
| location: | ||
| longitude: 13.203493 | ||
| latitude: 55.7119483 | ||
| - name: Jim Newton | ||
| institution: EPITA, France | ||
| location: | ||
| longitude: 2.3551565 | ||
| latitude: 48.7979973 | ||
| - name: Jonathan Brächthaeuser | ||
| institution: Tübingen University, Germany | ||
| location: | ||
| longitude: 9.04158 | ||
| latitude: 48.5294782 | ||
| - name: Lalit Pant | ||
| institution: Kogics, India | ||
| location: | ||
| longitude: 77.9469233 | ||
| latitude: 30.3254097 | ||
| - name: Laurent Moccozet | ||
| institution: Université de Genève, Switzerland | ||
| location: | ||
| longitude: 6.1429217 | ||
| latitude: 46.199444 | ||
| - name: Lionel Parreaux | ||
| institution: Hong Kong University of Science and Technology, Hong Kong | ||
| location: | ||
| longitude: 114.2632715 | ||
| latitude: 22.3363998 | ||
| - name: Mark Lewis | ||
| institution: Trinity University, United States | ||
| location: | ||
| longitude: -98.4855322 | ||
| latitude: 29.4618769 | ||
| - name: Martin Odersky | ||
| institution: École Polytechnique Fédérale de Lausanne, Switzerland | ||
| location: | ||
| longitude: 6.5600475 | ||
| latitude: 46.5185825 | ||
| - name: Michał Kowalczkiwicz | ||
| institution: University of Wrocław, Poland | ||
| location: | ||
| longitude: 17.0322743 | ||
| latitude: 51.1140086 | ||
| - name: Michel Schinz | ||
| institution: École Polytechnique Fédérale de Lausanne, Switzerland | ||
| location: | ||
| longitude: 6.5654067 | ||
| latitude: 46.5189865 | ||
| - name: Nastaran Fatemi | ||
| institution: Haute École d’Ingénierie et de Gestion du canton de Vaud, Switzerland | ||
| location: | ||
| longitude: 6.6571205 | ||
| latitude: 46.7792436 | ||
| - name: Philip Haller | ||
| institution: KTH Royal Institute of Technology, Sweden | ||
| location: | ||
| longitude: 18.0680626 | ||
| latitude: 59.3498706 | ||
| - name: Roman Debski | ||
| institution: AGH University of Science and Technology, Poland | ||
| location: | ||
| longitude: 19.9149496 | ||
| latitude: 50.0689793 | ||
| - name: Sukyoung Ryu | ||
| institution: Korea Advanced Institute of Science and Technology, South Korea | ||
| location: | ||
| longitude: 127.358196 | ||
| latitude: 36.3721427 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| {% comment %} | ||
| Renders the teachers list to a map. | ||
| {% endcomment %} | ||
|
|
||
| <link rel="stylesheet" href="https://unpkg.com/leaflet@1.8.0/dist/leaflet.css" integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ==" crossorigin="" /> | ||
| <script src="https://unpkg.com/leaflet@1.8.0/dist/leaflet.js" integrity="sha512-BB3hKbKWOc9Ez/TAwyWxNXeoV9c1v6FIeYiBieIWkpLjauysF18NzgR1MBNBXf8/KABdlkX68nAhlwcDFLGPCQ==" crossorigin=""></script> | ||
|
|
||
|
|
||
| <div id="teachers-map" style="height: 400px"></div> | ||
|
|
||
| <script> | ||
| const map = L.map('teachers-map').setView([0, 0], 1); | ||
| L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | ||
| maxZoom: 19, | ||
| attribution: '© OpenStreetMap' | ||
| }).addTo(map); | ||
| L.geoJSON([ | ||
| {% for teacher in site.data.teachers %} | ||
| { | ||
| "type": "Feature", | ||
| "geometry": { | ||
| "type": "Point", | ||
| "coordinates": [{{ teacher.location.longitude }}, {{ teacher.location.latitude }}] | ||
| }, | ||
| "properties": { | ||
| "popupContent": "{{ teacher.name }} at {{ teacher.institution }}." | ||
| } | ||
| }, | ||
| {% endfor %} | ||
| ], { | ||
| onEachFeature: function (feature, layer) { | ||
| if (feature.properties && feature.properties.popupContent) { | ||
| layer.bindPopup(feature.properties.popupContent); | ||
| } | ||
| } | ||
| }).addTo(map); | ||
| </script> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| --- | ||
| shortTitle: "Ideal for teaching" | ||
| shortDescription: "Scala is ideal for teaching programming to beginners as well as for teaching advanced software engineering courses." | ||
| --- | ||
|
|
||
| <div class="wrap"> | ||
| <div class="scala-text scala-text-large"> | ||
| <h3>Readable and Polyvalent</h3> | ||
| <p> | ||
| Most of the concepts involved in software design directly map | ||
| into Scala constructs. The concise syntax of Scala allows the teachers | ||
| and the learners to focus on those interesting concepts without dealing | ||
| with tedious low-level implementation issues. | ||
| </p> | ||
| <p> | ||
| The example in file <code>HelloWorld.scala</code> below shows how a “hello | ||
| world” program looks like in Scala. In <code>Modeling.scala</code>, we show an | ||
| example of structuring the information of a problem domain in Scala. In | ||
| <code>Modules.scala</code>, we show how to use classes to implement | ||
| software modules. Last, in <code>Algorithms.scala</code>, we show how the | ||
| standard Scala collections can be leveraged to implement algorithms with | ||
| few lines of code. | ||
| </p> | ||
| <p> | ||
| Learn more in the dedicated page about | ||
| <a href="{% link teach.md %}">Teaching</a>. | ||
| </p> | ||
| </div> | ||
|
|
||
| <div class="scala-code"> | ||
|
|
||
| <div class="code-element"> | ||
| <div class="bar-code"><span>HelloWorld.scala</span></div> | ||
| <pre><code>@main def run() = println("Hello, World!")</code></pre> | ||
julienrf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </div> | ||
|
|
||
| <div class="code-element"> | ||
| <div class="bar-code"><span>Modules.scala</span></div> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what this example is supposed to highlight. In what programming language can we not do this? Or even not do it as easily as in Scala? (except perhaps C)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I initially wrote something that was using abstract methods and abstract type members, but I thought maybe a simpler example would also work… class DatabaseAccess {
private final Connection connection;
public DatabaseAccess(Connection connection) {
this.connection = connection;
}
public List<Data> readData() { ... }
}
class HttpServer {
private final DatabaseAccess databaseAccess;
public HttpServer(DatabaseAccess databaseAccess) {
this.databaseAccess = databaseAccess;
}
}(or maybe we can do it in a simpler way in Java? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not more complicated in Java. It's only more verbose, because transferring constructor parameters to fields requires some code. But that has nothing to do with "modules". It's just the regular verbosity of a Java class.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, so maybe “more complicated” was not the right wording, what about “less readable”? Do you think we should show something more spectacular? Or is it okay to go with this straightforward example? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want to talk about modules, then I think we would need something more "spectacular". But it doesn't need to be about modules. It can be an example about "no boilerplate" (perhaps also showing a |
||
| <pre><code>// A module that can access the data stored in a database | ||
| class DatabaseAccess(connection: Connection): | ||
| def readData(): Seq[Data] = ??? | ||
|
|
||
| // An HTTP server, which uses the `DatabaseAccess` module | ||
| class HttpServer(databaseAccess: DatabaseAccess): | ||
| // The HTTP server can call `readData`, but it cannot | ||
| // access the underlying database connection, which is | ||
| // an implementation detail | ||
| databaseAccess.readData()</code></pre> | ||
| </div> | ||
|
|
||
| </div> | ||
|
|
||
| <div class="scala-code"> | ||
|
|
||
| <div class="code-element"> | ||
| <div class="bar-code"><span>Modeling.scala</span></div> | ||
| <pre><code>/** A Player can either be a Bot, or a Human. | ||
| * In case it is a Human, it has a name. | ||
| */ | ||
| enum Player: | ||
| case Bot | ||
| case Human(name: String)</code></pre> | ||
| </div> | ||
|
|
||
| <div class="code-element"> | ||
| <div class="bar-code"><span>Algorithms.scala</span></div> | ||
| <pre><code>// Average number of contacts a person has according to age | ||
| def contactsByAge(people: Seq[Person]): Map[Int, Double] = | ||
| people | ||
| .groupMap( | ||
| person => person.age | ||
| )( | ||
| person => person.contacts.size | ||
| ) | ||
| .map((age, contactCounts) => | ||
| val averageContactCount = | ||
| contactCounts.sum.toDouble / contactCounts.size | ||
| (age, averageContactCount) | ||
| )</code></pre> | ||
| </div> | ||
|
|
||
| </div> | ||
| </div> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| layout: blog-detail | ||
| post-type: blog | ||
| by: Julien Richard-Foy (Scala Center) | ||
| title: "Teach Programming with Scala" | ||
| --- | ||
|
|
||
| Scala is more than a great programming language for building software. | ||
| It is also a great tool for teaching programming! | ||
|
|
||
| We are happy to announce that we have published a [new page][teach] on the | ||
| website to explain the benefits of using Scala to teach programming, and to | ||
| show a map of the universities who use Scala around the world (also shown below). | ||
|
|
||
| {% include teachers-map.html %} | ||
|
|
||
| *Teachers who use Scala in their course.* | ||
|
|
||
| ## Motivation | ||
|
|
||
| Since Scala embraces several programming paradigms, it can be used to introduce | ||
| many important concepts involved in computational thinking, from the most basic | ||
| ones to the most advanced ones. It is suitable to teach programming to | ||
| beginners, as well as to teach advanced software engineering courses. | ||
|
|
||
| However, until now it was not easy to know which institutions use Scala. This | ||
| information can be useful for students, PhD candidates, teachers looking for | ||
| possible teaching connections, and companies interested in hiring new Scala | ||
| developers. | ||
|
|
||
| ## Teach with Scala | ||
|
|
||
| In the new [“Teach”][teach] page, we explain why we think Scala is a great tool | ||
| for teaching programming, with evidence from several teachers around the world: | ||
|
|
||
| - Scala supports multiple programming paradigms, which helps compare and contrast | ||
| different solutions to programming problems, | ||
| - Scala is expressive: students can focus on the intent of their program without | ||
| being distracted by low-level concerns or syntactic noise, | ||
| - Thanks to its type system, the Scala compiler helps the students to find bugs | ||
| before run-time, | ||
| - Scala’s constructs are regular and principled, | ||
| - Best practices are the norm (e.g., limited usage of `null`), | ||
| - Scala runs on the JVM and on JS runtimes, | ||
| - Scala’s ecosystem is large, and it can leverage the JVM and JS ecosystems, | ||
| - Scala is versatile, it can be used to build many kinds of programs. | ||
|
|
||
| The page also shows a map of teachers who use Scala in their courses. | ||
|
|
||
| Finally, it provides several pointers to educational material. | ||
|
|
||
| ## Join the Movement | ||
|
|
||
| We welcome all the teachers who use Scala to [contribute] to this page by: | ||
| - adding themselves to the map of teachers, | ||
| - refining the content, | ||
| - providing testimonials, such as a single short sentence that summarizes | ||
| why you like using Scala to teach, or a sentence about a specific aspect | ||
| of the language that works well for you. | ||
|
|
||
| Last but not least, we have set up a [community of teachers] where you can | ||
| exchange best practices and work together on tools to improve your experience | ||
| as teachers. | ||
|
|
||
| [teach]: {% link teach.md %} | ||
| [community]: https://teachers.scala-lang.org | ||
| [contribute]: mailto:scala.center@epfl.ch?subject=Teaching |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nature of this item (a use case of the language) is very different from the others items (language features). That does not look good to me.
I would not recommend to merge it, except if we have a clear idea on what other items we want and what is the timeline to make these changes. But this probably needs some thinking and discussion. Personally I think we should keep promoting some language features in the front page. So I would move "Scala for teaching" somewhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will update the other items at some point. Hopefully before the end of the summer. The goal of this section is to give highlights on why we think Scala is interesting. So far, that section focused on language features, but we would like to make it more use-case oriented.