Giter VIP home page Giter VIP logo

tgdwyer.github.io's People

Contributors

alikfp avatar alistairmccutcheon avatar angustrau avatar baker-mg avatar blake-haydon avatar coedice avatar ctbo avatar dependabot[bot] avatar dynisious avatar fplcodes avatar g-tang2 avatar griffinhcollins avatar hallgchris avatar haotongwang avatar j-woolfe avatar juliagia avatar mariuszskon avatar mrrhys avatar nitinma2 avatar rhys-newbury avatar rileyij avatar sullyj3 avatar tgdwyer avatar theger14 avatar usisgooder avatar wingerse avatar yuxuanyio avatar yzalvin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tgdwyer.github.io's Issues

Sentence Trailing Off

I was reading through Levels of Abstraction and the final sentence just trails off "They provide advantages..." should this sentence be deleted or are there actual advantages we want to highlight.

Add "hacktoberfest" topic

Hacktoberfest is an event which celebrates open source contributions. By adding the "hacktoberfest" topic/tag to this repository (as explained in more detail here) means that contributors are incentivised to open pull requests, due to potentially being eligible for a free t-shirt or planted tree sponsored by DigitalOcean.
This can push beginners to contribute, and get more experienced folks a reason to not put off contributions.

Full disclosure: I'm interested in a free t-shirt ๐Ÿ˜„

typescript1: multiple issue with "Generic Types" section

In section "Generic Types", at https://tgdwyer.github.io/typescript1/#generic-types

function binarySearch1(arr:number[], key:number): number {
    function bs(start:number, end:number): number {
        if(start > end) return -1;
        const mid = Math.floor((start + end) / 2);
        if(key > arr[mid]) return bs(mid + 1, end);
        if(key < arr[mid]) return bs(start, mid - 1);
        return mid;
    }
    return bs(0,arr.length);
}

const studentsById = [
  {id: 123, name: "Harry Smith"},
  {id: 125, name: "Cindy Wu"},
]

console.log(binarySearch1(studentsById,"125").name)

This produces the following compilation errors:

bs1.ts:17:27 - error TS2345: Argument of type '{ id: number; name: string; }[]' is not assignable to parameter of type 'number[]'.
  Type '{ id: number; name: string; }' is not assignable to type 'number'.

17 console.log(binarySearch1(studentsById,"125").name)
                             ~~~~~~~~~~~~

bs1.ts:17:47 - error TS2339: Property 'name' does not exist on type 'number'.

17 console.log(binarySearch1(studentsById,"125").name)
                                                 ~~~~


Found 2 errors.

Similar error for the second example.

Furthermore, I am not sure if objects in javascript can be directly compared with < and >.

Using head and rest multiple times could be confusing in Cons lists.

In the Computation with Pure Functions section of Functional Javascript the names head and rest are used multiple times to refer to different things. They are used in cons for list elements, they are used as names of the selector functions, and they are used within the definition of the selector functions.

I realise why they are all named similarly but I could forsee this maybe being confusing and hard to follow. Especially since cons lists can be hard to get your head around the first time you see them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.