Code Monkey home page Code Monkey logo

hlp2022-samples's Introduction

hlp2022 TBL2 Code

Intro

The purpose of the sample code in labels is to understand the difference between good and bad FP code.

The code there was taken from Issie (working) but is of very poor quality. It illustrates some of teh typical mistakes that can be made when writing FP code.

The purpose of this TBL is to get practice applying the Issie Coding Guidelines to existing code (which you will have to do in project work).

The code here can maybe be run - but the purpose of this TBL is to study the source code without running it.

Method:

  1. Fork and clone this repo. Go to labels solution, labels.fs.
  2. Trace down from top-level function drawing a tree representing which functions are called by each function (you don't need to include library functions or subfunctions). The root of this tree is the top-level function. You do not need to consider any code other than that which appears in your call tree. Subfunvtions local to a function can get analysed with the function.
  3. For each function (and its local subfunctions) apply the Issie coding standards considering:
    • Function name
    • parameter names
    • local names
    • choice of named vs anonymous subfunction
    • Is this function useful - or does it just make code less readable?
    • Is code documentation needed (and is that only because of bad code/names/etc?)

This is not an exclusive list - you may find code issues in addition to those mechanically obtained as above.

Document your results per team, and any questions you have where you can't decide. Lits issues per function + any overall issues. Correct names (where possible) this is the easiest refactoring Make other code improvements if you can (you probably won't have time in the TBL). Suggest nature of improvement in your documentation if you like.

E-mail me your results. I'm ok with whatever file type (markdown / word/ pdf) you prefer.

hlp2022-samples's People

Contributors

tomcl avatar

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.