Used GitHub issues along with my partner Advik to organize work:
Period 5: Personal Review - peer grades for our projects
Period 5: Stocks - during dress rehearsal
Period 5: Frogs - during dress rehearsal
Period 5: Lung Cancer - during dress rehearsal
I was responsible for the creation of curriculum up until the first Popcorn hack based on Advik’s wireframe that he created
This consisted of for loops, while loops, and iteration through dictionaries/lists
Through this team teach, I learne
class Song(db.Model):
__tablename__ = "Song"
id = db.Column(db.Integer, primary_key=True) # Define a primary key column
character = db.Column(db.String, nullable=False) # Breaking bad character
song_name = db.Column(db.String, nullable=False)
artist = db.Column(db.String, nullable=False)
genre = db.Column(db.String, nullable=False)
lyrics = db.Column(db.String, nullable=False)
def __init__(self, character, song_name, artist, genre, lyrics): # Constructor
self.character = character
self.song_name = song_name
self.artist = artist
self.genre = genre
self.lyrics = lyrics
# Convert db data to a dictionary in order to return easily using JSON
def to_dict(self):
return {"character": self.character, "song_name": self.song_name, "artist": self.artist, "genre": self.genre, "lyrics": self.lyrics}
# Create method to let users add a song to the DB
def create(self):
try:
try:
self.lyrics = genius.search_song(self.song_name, self.artist).lyrics.split("Lyrics")[1]
except:
self.lyrics = "Check that the artist name and song name are spelled correctly"
db.session.add(self) # add prepares to persist object to table
db.session.commit() # SQLAlchemy requires a manual commit
return self
except:
db.session.remove() # remove object from table if invalid
return None
# Read method to return every part of the table
def read(self):
return {
"id": self.id,
"character": self.character,
"song_name": self.song_name,
"artist": self.artist,
"genre": self.genre,
"lyrics": self.lyrics
}
# Initialize songs
def initSongs():
# Adds each song + its metadata to the db
song1 = Song(character="Walter White", song_name="Changes", artist="David Bowie", genre="Art Pop", lyrics=genius.search_song("Changes", "David Bowie").lyrics.split("Lyrics")[1]); db.session.add(song1)
song2 = Song(character="Walter White", song_name="Back in Black", artist="AC/DC", genre="Hard Rock", lyrics=genius.search_song("Back in Black", "AC/DC").lyrics.split("Lyrics")[1]); db.session.add(song2)
song3 = Song(character="Walter White", song_name="Baby Blue", artist="Badfinger", genre="Rock", lyrics=genius.search_song("Baby Blue", "Badfinger").lyrics.split("Lyrics")[1]); db.session.add(song3)
db.session.commit()
....
<div class="table-container">
<div class="add-container">
<h2>Add a song</h2>
<label for="songName">Song Name:</label>
<input type="text" id="songName" placeholder="Enter song name">
<label for="artistName">Artist Name:</label>
<input type="text" id="artistName" placeholder="Enter artist name">
<label for="genre">Genre:</label>
<input type="text" id="genre" placeholder="Enter genre">
<label for="character">Person:</label>
<input type="text" id="character" placeholder="Enter name">
<button onclick="addSong()">Add</button>
</div>
<!-- HTML table for displaying data -->
<table class="hacker-theme">
<h2>Songs</h2>
<thead>
<tr>
<th>Character</th>
<th>Song Name</th>
<th>Artist</th>
<th>Genre</th>
<th>Lyrics</th>
<th>Lyrics Toggle</th>
</tr>
</thead>
<tbody id="result">
<!-- Data will be populated here -->
</tbody>
</table>
</div>
</div>
.....
function addSong() {
const songName = document.getElementById("songName").value;
const artistName = document.getElementById("artistName").value;
const genre = document.getElementById("genre").value;
const character = document.getElementById("character").value;
const apiUrl2 = `http://localhost:8069/api/song/create`
var body = {
"song_name": songName,
"artist": artistName,
"genre": genre,
"character": character,
}
fetch("http://localhost:8069/api/song/create", {method:'POST', body: JSON.stringify(body), headers: {
'Content-type': 'application/json',
}})
.then(response => response.json())
.then(json => {
console.log(json)
fetchSongs()
})
}
Towards the end of the test I began losing focus and because of that, I got 4 questions wrong in a row for misreading and misunderstanding questions.
The main takeaway for me from this test is to pace myself during future tests
As the first trimester of the school year concludes, it’s important to reflect on the notable progress and skills acquired during this period. Utilizing GitHub issues for efficient project organization, mastering AGILE collaboration, and embracing various tools such as Git, VSCode, WSL/Linux, and AWS have enriched our technical expertise. In our passion project, the Lyrics Create API, we developed a robust class for song data management and overcame challenges like API optimization and CORS issues. Serving as a Scrum master provided invaluable experience in effective work management and facilitation. College Board MCQ tests highlighted the need for pacing and maintaining focus. Moving forward, we aim to build upon these lessons, strengthen collaboration, and further excel in the upcoming trimesters.