- No constraints
- Small methods: 4 lines each
- No if statements
- No primitives
- No loops
- Baby steps
- Change approach, if you're doing bottom-up (Cell class first),try top-down (Board class first)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function flatten(items) { | |
| return items.reduce((result, current) => { | |
| if (current.constructor === Array) | |
| return result.concat(flatten(current)) | |
| return result.concat(current); | |
| }, []); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PROGRAM-ID. FIZZBUZZ. | |
| DATA DIVISION. | |
| WORKING-STORAGE SECTION. | |
| 01 BY-3 PIC 9(1). | |
| 01 BY-5 PIC 9(1). | |
| 01 C PIC 9(2). | |
| 01 I PIC 9(3) VALUE 1. | |
| PROCEDURE DIVISION. | |
| PERFORM FIZZBUZZ-OF VARYING I FROM 1 BY 1 UNTIL I=100 | |
| STOP RUN. |
Read them in this order
- Test Driven Development: By Example; Kent Beck https://www.goodreads.com/book/show/387190.Test_Driven_Development
- Agile Technical Practices Distilled; Pedro Moreira Santos, Marco Consolaro & Alessandro Di Gioia https://www.goodreads.com/book/show/41758433-agile-technical-practices-distilled
- Understanding the Four Rules of Simple Design; Corey Haines https://www.goodreads.com/book/show/21841698-understanding-the-four-rules-of-simple-design
- 99 Bottles of OOP; Sandi Metz & Katrina Owen https://www.goodreads.com/book/show/31183020-99-bottles-of-oop
- The Nature of Software Development; Ron Jeffreis https://www.goodreads.com/book/show/23016056-the-nature-of-software-development
- The Software Craftsman: Professionalism, Pragmatism, Pride; Sandro Mancuso https://www.goodreads.com/book/show/23866948-the-software-craftsman
OlderNewer