Skip to content

Kai assignment submission #17

Open
pranav7002 wants to merge 7 commits intoGit-Lecture-2026:kaifrom
pranav7002:kai
Open

Kai assignment submission #17
pranav7002 wants to merge 7 commits intoGit-Lecture-2026:kaifrom
pranav7002:kai

Conversation

@pranav7002
Copy link

Added assignment 1

typetesting.sh Outdated
@@ -0,0 +1,55 @@
#!/bin/bash

goal_text="innovation distinguishes between a leader and a follower, and the code we write today becomes the foundation for the intelligence of tomorrow."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/monkeytypegame/monkeytype/blob/master/frontend/static/languages/english_5k.json
fetch words list from here and cache it somewhere(probably somewhere like ~/.local/share/typetest). Fetch words from that file and randomly permute them using shuf . Also, let the user configure how many words they want in the test. If they don't specify a word count then keep a default hardcoded word count

This comment was marked as resolved.

@TanmayArya-1p
Copy link

Make the interface a TUI that shows the word progress by highlighting different characters. I'm looking for something like this . Doesn't have to be exactly like this but it should show the progress by highlighting characters using ANSI codes

List of other stuff to do if you get time after making the TUI: #9 (comment)

@TanmayArya-1p
Copy link

Good work on the writeups, they look well made

@TanmayArya-1p
Copy link

#10 (comment)

@TanmayArya-1p
Copy link

Nice work on the TUI, theres a couple of other things to do:

  • Make the number of words in a test configurable either through CLI args or a TUI menu
  • Align the entire thing to the center
  • Add the configurable words list feature that fetches from here
  • Do the browie points stuff : store previous results in a log/csv file somewhere and query historical stats through the cli or tui

typetesting.sh Outdated
@@ -0,0 +1,151 @@
640b964#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add the string before the shebang?
Remove it if it's accidental.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by mistake! it was a commit i was trying to reset

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a --help which prints the optional args and their possible value.

typetesting.sh Outdated

# generate words
generate_words() {
count=$1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good practice to make them local variables using local if they're not going to be used elsewhere

typetesting.sh Outdated
# draw screen
render() {

clear

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a good idea. The whole thing flickers as it renders everything again even as I type a single letter
A better idea would be to use tput cup 0 0 (puts the terminal cursor back to (0,0) without clearing the screen)
Smoother render

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TanmayArya-1p @Shashank-k15 might have some better ideas

@pranav7002 pranav7002 changed the title Kai Kai assignment submission Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants