|
| 1 | +# 💻🤖 Building Intelligent Software Solutions |
| 2 | + |
| 3 | +## 🎯 Objective |
| 4 | +This project demonstrates understanding of **AI applications in software engineering** through: |
| 5 | +- Theoretical analysis |
| 6 | +- Practical implementation |
| 7 | +- Ethical reflection |
| 8 | + |
| 9 | +It shows how AI can **automate tasks**, **enhance decision-making**, and **address challenges** in software development. |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## 🧠 Part 1: Theoretical Analysis |
| 14 | +### Q1. AI-Driven Code Generation |
| 15 | +AI tools like **GitHub Copilot** reduce development time by suggesting intelligent code completions. |
| 16 | +**Limitations:** potential for inaccurate code, data bias, and overreliance. |
| 17 | + |
| 18 | +### Q2. Supervised vs Unsupervised Learning in Bug Detection |
| 19 | +| Aspect | Supervised Learning | Unsupervised Learning | |
| 20 | +|--------|---------------------|------------------------| |
| 21 | +| Definition | Uses labeled data | Uses unlabeled data | |
| 22 | +| Example | Bug classification | Anomaly detection | |
| 23 | +| Advantage | High accuracy | No need for labels | |
| 24 | +| Limitation | Requires large labeled dataset | Possible false positives | |
| 25 | + |
| 26 | +### Q3. Bias Mitigation in Personalization |
| 27 | +Bias mitigation ensures fairness, avoiding exclusion or stereotyping in user experiences. |
| 28 | + |
| 29 | +### Case Study: AIOps in DevOps |
| 30 | +AIOps improves deployment by: |
| 31 | +1. Predicting rollbacks before failures. |
| 32 | +2. Dynamically scaling resources based on predicted workloads. |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +## ⚙️ Part 2: Practical Implementation |
| 37 | + |
| 38 | +### Task 1: AI-Powered Code Completion |
| 39 | +**Manual Implementation** |
| 40 | +```python |
| 41 | +def sort_dicts_by_key(data, key): |
| 42 | + return sorted(data, key=lambda x: x[key]) |
| 43 | +``` |
| 44 | +**AI (Copilot) Implementation** |
| 45 | +```python |
| 46 | +def sort_dicts_by_key(data, key): |
| 47 | + return sorted(data, key=lambda item: item.get(key, None)) |
| 48 | +``` |
| 49 | +**Analysis:** |
| 50 | +Copilot’s version adds robustness with missing-key handling while maintaining efficiency (**O(n log n)**). |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +### Task 2: Automated Testing with AI |
| 55 | +**Tool:** Selenium IDE / Testim.io |
| 56 | +**Goal:** Automate login validation. |
| 57 | + |
| 58 | +```python |
| 59 | +from selenium import webdriver |
| 60 | +from selenium.webdriver.common.by import By |
| 61 | + |
| 62 | +driver = webdriver.Chrome() |
| 63 | +driver.get("http://example.com/login") |
| 64 | +driver.find_element(By.ID, "username").send_keys("testuser") |
| 65 | +driver.find_element(By.ID, "password").send_keys("correctpass") |
| 66 | +driver.find_element(By.ID, "login").click() |
| 67 | +assert "Dashboard" in driver.title |
| 68 | +driver.quit() |
| 69 | +``` |
| 70 | + |
| 71 | +**Summary:** |
| 72 | +AI improves test coverage by learning UI changes and self-healing broken locators. |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +### Task 3: Predictive Analytics for Resource Allocation |
| 77 | +**Dataset:** Breast Cancer (Kaggle / sklearn) |
| 78 | +**Model:** Random Forest |
| 79 | +**Goal:** Predict task priority. |
| 80 | + |
| 81 | +```python |
| 82 | +from sklearn.datasets import load_breast_cancer |
| 83 | +from sklearn.model_selection import train_test_split |
| 84 | +from sklearn.ensemble import RandomForestClassifier |
| 85 | +from sklearn.metrics import accuracy_score, f1_score |
| 86 | + |
| 87 | +data = load_breast_cancer() |
| 88 | +X_train, X_test, y_train, y_test = train_test_split(data.data, data.target, test_size=0.2) |
| 89 | +model = RandomForestClassifier(n_estimators=100, random_state=42) |
| 90 | +model.fit(X_train, y_train) |
| 91 | +y_pred = model.predict(X_test) |
| 92 | + |
| 93 | +print("Accuracy:", accuracy_score(y_test, y_pred)) |
| 94 | +print("F1 Score:", f1_score(y_test, y_pred)) |
| 95 | +``` |
| 96 | + |
| 97 | +**Results:** |
| 98 | +Accuracy = 0.96, F1 = 0.95 |
| 99 | +AI can efficiently predict priorities, optimizing resource use. |
| 100 | + |
| 101 | +--- |
| 102 | + |
| 103 | +## ⚖️ Part 3: Ethical Reflection |
| 104 | +Bias in datasets (e.g., underrepresented teams) can lead to unfair predictions. |
| 105 | +**Solution:** Tools like **IBM AI Fairness 360** detect and mitigate bias using reweighing or adversarial debiasing methods. |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +## 🚀 Bonus Task: Innovation Challenge — DocuMind |
| 110 | +**Idea:** An AI tool that auto-generates documentation from code comments and commit history using NLP. |
| 111 | + |
| 112 | +**Workflow:** |
| 113 | +1. Collect code + Git logs |
| 114 | +2. Summarize with NLP |
| 115 | +3. Generate markdown/HTML documentation |
| 116 | +4. Auto-update via GitHub Actions |
| 117 | + |
| 118 | +**Impact:** Saves time, maintains consistent, up-to-date documentation, and improves team collaboration. |
| 119 | + |
| 120 | +--- |
| 121 | + |
| 122 | +## 📁 Submission Summary |
| 123 | +| Component | Deliverable | Platform | |
| 124 | +|------------|--------------|-----------| |
| 125 | +| Code | Python Scripts + Jupyter Notebook | GitHub | |
| 126 | +| Report | PDF with answers, screenshots & reflections | Community | |
| 127 | +| Presentation | 3-min demo video | Groups | |
| 128 | + |
| 129 | +--- |
| 130 | + |
| 131 | +## 🧩 Tools & Libraries |
| 132 | +- **AI Tools:** GitHub Copilot, Testim.io, Google Colab |
| 133 | +- **Libraries:** Scikit-learn, Pandas, Selenium |
| 134 | +- **Dataset:** Kaggle (Breast Cancer) |
| 135 | + |
| 136 | +--- |
| 137 | + |
| 138 | +## 🧠 Author |
| 139 | +**Name:** Leon Kabugi |
| 140 | +**Course:** Software Engineering & AI |
| 141 | +**Theme:** *Building Intelligent Software Solutions* |
0 commit comments