Skip to content

olexandrakk/Winter-2025-Exams

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Winter 2025 Exams for SEF1

Deadlines and exams schedule

  • IM-41 Deadline: 2025-01-15 12:00, Exams: 2025-01-16 10:00-18:00
  • IM-42 Deadline: 2025-01-16 12:00, Exams: 2025-01-17 10:00-18:00
  • IM-43 Deadline: 2025-01-08 12:00, Exams: 2025-01-09 10:00-18:00
  • IM-44 Deadline: 2025-01-09 12:00, Exams: 2025-01-10 10:00-18:00

Prerequisites

Steps to pass the exam

Choose alternative

  • Solve tasks from this repo
  • Here is more difficult tasks in addition or instead of previous: https://github.com/HowProgrammingWorks/Winter-2025-Exams/tree/main/Difficult
  • Open-source contribution: submit to google forms
  • Conference talk or seminar participation: submit link to google forms
  • For those who want technical interview: submit link to google forms
  • For those who have projects instead of this exams tasks:
    • Pet projects, commercial projects, practical programming experience in products
    • You need to create a screencast video presentation of codebase and project functionality (15-30 minutes long)
    • Upload it to Youtube, Google Drive, or other hosting with video support and add link to this video in your project repository
  • Articles: submit links to google forms
  • MDN contribution: submit links to google forms

Tasks

  • Fork this repository: https://github.com/HowProgrammingWorks/Winter-2025-Exams
  • Clone this repository to your machine or you can do everything in Github integrated VSCode IDE
  • Create branch exams
  • See directory /Tasks there are 38 tasks prepared in one of the worst possible implementation and style and N more tasks to be implemented from the scratch
  • You can select from 3 to 6 tasks (except difference.js and size.js) to refactor and optimize
  • In implemented tasks code works and gives right results. You need to change files but do not break functionality covered by tests
  • In tasks without given implementation we have just tests and they should pass
  • To improve code style you may use:
  • Use tests from *.tests.js files to check tasks functionality
    • For example run: node size.test.js to check size.js or npm t (to check all taks)
    • Output example: Test size.js: Passed: 11 of 11
    • If tests fails you will see something like: Case: size(23456789) -> "23 mb", expected: "123 mb"
  • Your task is to improve (respect list priority):
    • Code readability
    • Code style
    • Simplicity
    • Quality
    • Supportability
    • Reliability
    • Testability
  • I'd advice to find a few friends from the group and cross-review the code
  • Here is a checklist of common problems we have in code:
    • Do not mutate function input parameters
    • Prefer arrow functions in JavaScript and lambda in Python
    • Preferably use for..of or for on a variable or Array/map, and avoid for..in and forEach
    • Use intermediate identifiers to separate long expressions
    • Prefer const and use let as a last resort, but never use var
    • Convert all magic values to constants
    • Follow the rules for naming identifiers
    • Think carefully about the names of identifiers so that when reading the code, everyone understands their contents
    • Don't make functions too long (5-10 lines preferably, ...20 is ok, but...)
    • Don't make a big stack of if statements, use arrays and objects instead
  • Hints:
    • Use eslint and prettier, fix all warnings
    • Follow code style and naming conventions from lectures and code examples
    • Respect 2 space indentation
    • Add empty line between semantic blocks for visual separation
    • Don't change incoming parameters
    • Decompose complex functions
    • Respect SRS (separation of concerns)
    • Respect SRP (single responsibility principle)
    • Prefer const, minimize let usage
    • Remove unneeded operations, calls, arguments, blocks, etc.
    • Prefer arrow functions
    • Use round brackets even for single argument lambda functions
    • Optimize loop invariant
    • Optimize lexical scope, minimize area of identifier visibility
    • Prefer for..of loops, sometimes use classical for, in a rare use .map(), try to avoid .forEach()
    • Use intermediate variables
    • Decompose long expressions
    • Return result of logical expression instead of return true; else return false;
  • Make each refactoring and optimization step a separate commit
  • It is important not to rewrite a code from scratch but to improve it step by step
  • At the seminar (see links above), I showed an example of how to optimize the code step by step
  • When you're done, make a pull request to my repository
  • Good luck!

About

Winter 2025 Exams for SEF1

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%