Skip to content

Commit e96aafa

Browse files
committed
update README.md
1 parent 9f3a244 commit e96aafa

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,32 @@ There are a few style rules that are unique to this project:
1313

1414
- The first rule is that the code should correspond directly to the pseudocode in the book. When possible this will be almost one-to-one, just allowing for the syntactic differences between Python and pseudocode, and for different library functions.
1515
- Don't make a function more complicated than the pseudocode in the book, even if the complication would add a nice feature, or give an efficiency gain. Instead, remain faithful to the pseudocode, and if you must, add a new function (not in the book) with the added feature.
16-
- I use functional programming in many cases, but not exclusively; let the book's pseudocode be the guide. In general, pure functions (with no side effects) are prefered, but functions with side effects, and classes, can be used where appropriate.
16+
- I use functional programming (functions with no side effects) in many cases, but not exclusively (sometimes classes and/or functions with side effects are used). Let the book's pseudocode be the guide.
1717

18-
Beyond the above rules, we default to [Pep 8](https://www.python.org/dev/peps/pep-0008), with a few minor exceptions:
18+
Beyond the above rules, we use [Pep 8](https://www.python.org/dev/peps/pep-0008), with a few minor exceptions:
1919

2020
- I'm not too worried about an occasional line longer than 79 characters.
2121
- You don't need two spaces after a sentence-ending period.
2222
- Strunk and White is [not a good guide for English](http://chronicle.com/article/50-Years-of-Stupid-Grammar/25497).
2323
- I prefer more concise docstrings; I don't follow [Pep 257](https://www.python.org/dev/peps/pep-0257/).
2424
- Not all constants have to be UPPERCASE.
2525
- [Pep 484](https://www.python.org/dev/peps/pep-0484/) type annotations are allowed but not required. If your
26-
parameter name is already suggestive of the name of a type, you don't need an annotation, e.g.:
26+
parameter name is already suggestive of the name of a type, such as `url` below, then i don't think the type annotation is useful.
27+
Return type annotations, such as `-> None` below, can be very useful.
2728

28-
def retry(url: Url) -> None: # This 'Url' annotation should be avoided; but '-> None' is useful
29+
def retry(url: Url) -> None:
2930

30-
# Language Popularity
31+
# Language Choice
3132

32-
Are we right to concentrate on Java and Python versions of the code?
33-
What languages do students already know? The [TIOBE Index](http://www.tiobe.com/tiobe_index) says the top five are:
33+
Are we right to concentrate on Java and Python versions of the code? I think so; both languages are popular; Java is
34+
fast enough for our purposes, and has reasonable type declarations (but can be verbose); Python is popular and has a very direct mapping to the pseudocode in the book (ut lacks type declarations and can be solw). The [TIOBE Index](http://www.tiobe.com/tiobe_index) says the top five most popular languages are:
3435

3536
Java, C, C++, C#, Python
3637
38+
So it might be reasonable to also support C++/C# at some point in the future. It might also be reasonable to support a language that combines the terse readability of Python with the type safety and speed of Java; perhaps Go or Julia. And finally, Javascript is the language of the browser; it would be nice to have code that runs in the browser, in Javascript or a variant such as Typescript.
39+
3740
What languages are instructors recommending for their AI class?
38-
To get an approximate
39-
idea, I gave the query <tt>norvig russell "Modern Approach"</tt> along with
41+
To get an approximate idea, I gave the query <tt>norvig russell "Modern Approach"</tt> along with
4042
the names of various languages and looked at the estimated counts of results on
4143
various dates. However, I don't have much confidence in these figures...
4244

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy