Tasks and Duties
Task Objective: Develop a command line interface (CLI) Python application that functions as a simplified To-Do List Manager. This task emphasizes the importance of planning, modular design, and writing clean, efficient code. You'll apply core Python programming skills while designing an application that is user-friendly and maintainable.
Expected Deliverables:
- A ZIP archive containing the final Python code files, a README.md file explaining how to run the application, and inline comments addressing design choices.
Key Steps to Complete the Task:
- Plan the Application: Begin by designing the architecture of your CLI application. Outline the modules and classes that will be used. Create a flow diagram or pseudo-code of the application's logic (this can be included in the README file or as separate documentation within your archive).
- Implement Core Features: Write code that allows users to add, remove, view, and mark tasks as completed. Ensure that your program uses functions or object-oriented programming principles appropriately.
- Error Handling & User Input: Implement robust error handling and input validation. Ensure that your application gracefully handles unexpected user inputs or errors.
- Documentation & Comments: Provide clear comments within your code and write a detailed README file. The README should explain your design decisions, how to install dependencies (if any), and how to run your application.
- Testing: Include a few test scenarios or instructions on how the user can test the application manually.
Evaluation Criteria: Your submission will be evaluated based on the quality and organization of your code, clarity of documentation, effectiveness of error handling, and overall functionality of the CLI application. The code should be easy to follow and reflect a good understanding of software design principles.
This task is designed to take approximately 30-35 hours, allowing you to explore both creative design and rigorous coding practice. Make sure your final deliverable is self-contained and ready to run on a standard Python environment.
Task Objective: This week you will focus on developing your debugging skills by identifying, reproducing, and resolving issues in a provided Python script. You will simulate real-world troubleshooting scenarios where you encounter and fix challenging bugs while maintaining code clarity.
Expected Deliverables:
- A corrected Python script that is free from bugs, along with a detailed log file (or documentation) outlining the problems found, steps taken to resolve them, and any improvements made to the code structure.
Key Steps to Complete the Task:
- Initial Code Review: Begin by examining the given Python script. Identify sections of the code that are likely to cause issues, such as areas dealing with file I/O, loops, and conditional statements.
- Create a Bug Report: Write down each bug you find, clearly detailing the error messages and unexpected behaviors. Keep track of your hypotheses on what the root causes might be.
- Step-by-Step Debugging: Use debugging tools like Python's pdb module or integrated development environment (IDE) debuggers to trace the execution and isolate issues. Modify the code progressively and validate your fixes with manual or automated testing.
- Documentation of Process: Maintain a detailed document (as a text or markdown file) that outlines all debugging steps: from bug identification through resolution. This document should include snippets of code before and after changes, along with explanations.
- Code Optimization: As part of your debugging, refactor segments of the code to improve readability and efficiency, without altering the intended functionality.
Evaluation Criteria: The final submission will be assessed on your ability to clearly document bugs and the resolution process, the functionality of the corrected script, and the improvements made to code quality. Be sure to demonstrate clear, step-by-step troubleshooting and justify your approaches.
This task is estimated to require around 30-35 hours, and it allows you to enhance essential debugging techniques relevant to real-world Python development. Ensure your final deliverable is a self-contained ZIP archive with the corrected Python script and your comprehensive debugging log.
Task Objective: Create a suite of automated tests for a moderately complex Python module that you develop. This task focuses on test-driven development (TDD) practices, emphasizing unit tests, integration tests, and documentation of test cases to ensure code reliability and maintainability.
Expected Deliverables:
- A ZIP archive containing the Python module, a set of automated tests (using frameworks such as unittest, pytest, or similar), and a document explaining your test cases and methodology.
Key Steps to Complete the Task:
- Module Development: Design a Python module that performs a set of related tasks (for example, a mini library for basic mathematical operations, string manipulation, or data parsing). The module should be structured in such a way that it is easy to test.
- Writing Tests: Develop a comprehensive test suite that covers various scenarios, including edge cases and error conditions. Choose either TDD (write tests first) or add tests after development, but document your process clearly.
- Test Documentation: Write a detailed README or documentation file that explains what each test case covers, why it was chosen, and how it relates to functionality within the module. Include instructions on how to run the tests.
- Review & Refactor: After the tests pass, review your code for maintainability. Refactor if necessary to achieve a balance between clarity and performance while ensuring no tests break.
- Final Check: Validate that your tests run successfully in a clean environment and that they logically cover all aspects of the module’s functionality.
Evaluation Criteria: Your submission will be evaluated based on the comprehensiveness of your tests, clarity of documentation, code quality, and your ability to effectively demonstrate TDD principles. The final code should be easily executable and demonstrate robust testing practices.
This exercise is designed to be completed in approximately 30-35 hours. All deliverables must be self-contained within your submission archive, requiring no external datasets or proprietary resources.
Task Objective: Optimize the performance of a Python application that you develop. This task focuses on identifying performance bottlenecks, applying optimization techniques, and comparing the efficiency of the code before and after optimization.
Expected Deliverables:
- A ZIP archive containing the original and optimized Python code files, along with a detailed report documenting the changes made, profiling data (e.g., using cProfile, timeit, or other profiling tools), and a performance comparison.
Key Steps to Complete the Task:
- Baseline Performance Analysis: Create a Python application that processes data or performs a computational task with identifiable bottlenecks. Document the current performance using profiling tools to establish a baseline.
- Identify Bottlenecks: Analyze the profiling data and identify functions or segments of code that cause slowdowns. Clearly note which parts of the code you expect to optimize.
- Implement Optimizations: Apply performance enhancement strategies such as algorithmic improvements, utilizing built-in libraries, or optimizing data structures. Refactor code to eliminate redundant computations and resource-intensive operations.
- Document Your Changes: Create a detailed report describing the identified issues, the optimization strategies applied, and the results of subsequent profiling tests. Include before-and-after benchmarks to showcase improvements in execution time and resource usage.
- Final Verification: Ensure that the optimized code maintains the same functionality and accuracy as the original application and passes any automated tests you have created previously.
Evaluation Criteria: The evaluation will focus on the rigor of your performance analysis, the effectiveness and clarity of your optimization strategies, and the quality of your documentation. Your report should clearly articulate your process and the measurable improvement achieved after optimization.
This task is structured to require about 30-35 hours of work, combining practical coding challenges with in-depth performance analysis. Your ZIP archive must be self-contained, requiring no external input files beyond what you generate.
Task Objective: Enhance the security of a Python application by identifying potential vulnerabilities and implementing appropriate fixes. This task aims to develop your skills in writing secure code and understanding common security pitfalls in software development.
Expected Deliverables:
- A ZIP archive containing your secure Python application code, a security audit report detailing vulnerabilities discovered and fixed, and a set of applied security measures (e.g., secure coding practices, encryption, input validation improvements).
Key Steps to Complete the Task:
- Initial Security Review: Begin with a basic Python web or CLI application that performs user input handling or processes sensitive data. Conduct a preliminary audit to identify potential areas of weakness such as SQL injections, improper error handling, or data leakage risks.
- Vulnerability Identification: Document any vulnerabilities discovered. Use Python security tools or static analysis libraries if necessary. Take care to explain how each vulnerability could be exploited in a real-world scenario.
- Security Hardening: Implement improvements, such as adding input sanitization, using parameterized queries, enhancing error messaging, or employing encryption where needed. Ensure that your modifications do not adversely affect the overall functionality of the application.
- Documentation and Reporting: Create a comprehensive security report that outlines every vulnerability identified, the corresponding fix, and the rationale behind the chosen security measures. Include code snippets that highlight the secure modifications.
- Testing and Validation: Run tests to verify that the application functions securely and correctly after the changes. If possible, simulate potential attack scenarios to confirm the robustness of your fixes.
Evaluation Criteria: Your submission will be assessed on the clarity and thoroughness of your security audit, the effectiveness of your implemented fixes, and the overall improvement in code security. The report should clearly demonstrate a good understanding of secure coding practices and risk mitigation strategies.
This task is designed to take approximately 30-35 hours and emphasizes practical application of security principles in Python. Ensure your final deliverable is a self-contained package with all necessary documentation and code files.
Task Objective: Set up and integrate a Continuous Integration (CI) pipeline for your Python project. In this task, you will work on automating the build, test, and deployment steps, simulating a professional development environment. The goal is to improve your development workflow by utilizing CI/CD principles.
Expected Deliverables:
- A ZIP archive containing your Python project with an integrated CI configuration file (e.g., for GitHub Actions, Travis CI, or another widely-used CI tool). Also include a documentation file that explains how your CI pipeline was set up, the tests run, and instructions for replicating the environment.
Key Steps to Complete the Task:
- Project Setup: Use one of your previous projects or create a new Python project that includes a series of automated tests. Ensure that your project structure is clean and well-documented.
- CI Pipeline Configuration: Choose a CI tool that is publicly available (e.g., GitHub Actions, Travis CI, CircleCI). Write a configuration file that automates the following steps: code linting, running your test suite, and generating a test report. Ensure the pipeline fails if any tests do not pass.
- Test Integration: Integrate your test suite into the CI pipeline so that every commit triggers the build and testing process. Document any challenges you encounter in getting the CI pipeline to run smoothly.
- Documentation and Reporting: Create a detailed README or documentation file that explains the CI configuration, the process of setting it up, and how the pipeline ensures code quality. Include instructions on how to trigger builds locally and view CI logs.
- Final Verification: Test your CI setup by making a small change or commit in your project repository and demonstrating that the pipeline triggers as intended. Capture relevant logs or screenshots if necessary, and include them as part of your documentation.
Evaluation Criteria: Your submission will be evaluated on how well you set up the CI pipeline, the clarity of your documentation, and the seamless integration of automated testing. The solution should demonstrate a professional approach to maintaining high code quality through automation.
This final task is intended to simulate a real-world development environment and should take about 30-35 hours. Ensure your submission is a self-contained ZIP archive containing all relevant files and instructions for replicating your CI setup.