Throw the gates wide open

https://lemmy.world/post/22013622

Throw the gates wide open - Lemmy.World

cross-posted from: https://lemmy.world/post/21982615 [https://lemmy.world/post/21982615]

Always being told you are wrong growing up puts pressure on masking to always try to be right and gives an all-or-nothing thinking.

It is OK to not be perfect. It is something I have recently accepted about myself, and hope others can as well. 🩷

This is something I’ve discovered about myself lately and I’m now trying to tackle, and hopefully start to dismantle.

I did a fuck up the other day and may have unintentionally offended someone (a combination of mental and sensory overload led to a louder than expected verbal outburst of frustration)

I’ve put out an apology and have asked for an accommodation to help with the sensory aspect, but I’m still churning inside and over thinking because of my shitty social and communication ‘skills’

Thanks for your comment, it sums things up ‘perfectly’ 🤣

Being bad at something and half assing can be step towards getting better at something.
I would argue that being bad at something is always a step towards getting better at it! Where else would you start?
Mom says I’m very smart and naturally gifted at many things.
that’s all the hype i needed to start my bootleg heart surgery!
Being bad at something or not knowing something that you like is actually pretty nice because there is so much stuff you can still learn about it.
Except when you want to learn it but there isn’t enough time to. Then it is nice and frustrating at the same time.
Conversely, don’t chastise or put down anyone that does take shortcuts for fun things where it just doesn’t matter.
I prefer doing it right on the first try before I forget how to fix my projects when they are falling apart.
(Don’t think I’m autistic): I didn’t know I half ass so much stuff in my life
I’m going to have to say it: why would you super glue parts of a model? It’s a lot harder to use than poly cement?
Lol don’t ever say that car one out loud on Instagram.

I’ve grown up with people around me constantly telling and shaming me for doing things wrong or only wanting to half-ass it, even if I just wanted to try something new.

It’s hard getting out of that mindset, especially since its now just me psyching myself out mentally, but it helped seeing this post

Funny. I’ve always been proud of understanding things deeper than people around me (or trying).

But at the same time those people around would treat as something miserable the fact that I don’t even try to remember dates, numbers, names, other specific facts not necessary for understanding the whole architecture. I’m fine with that context, but it’s obvious.

I resonate with this. I love astrophysics and space, but never bothered to learn the names and order of the planets of the solar system. Likewise, only recently I’ve put the effort to learn the order of the months, since not knowing them makes it very hard for me to remember birthdays of people. And I believe I’ve been hinted from people once close to me, that those type of things mean I only care about myself.

Homework 4.2 (submit a zip file) Assignment 4: Dictionary Logistics General Description In this assignment, you need to build a dictionary application using Swing. The application has the following features. Users can: add new words, new meanings to the words. replace an old word with a new one, without changing its original meaning and its frequency. remove words from the dictionary and check if a word is in the dictionary. count the frequency of searches for each word. display the most frequent words based on the prefix they provide. display the search history. Import and export words in batch. In detail, your dictionary should have the following functionalities: Users should be able to add, remove and modify words. Users should be able to check if a certain word is in the dictionary and retrieve its meanings. Users should be able to see the three most frequent words that can complete their given keyword. e.g., for uni, it should return universe, university, universal. e.g., for apple, mapple, napple, lapple are feasible for the search. The dictionary will display a search history of up to 10 words, showing the most recently searched words first. Only the matched words (including the three most frequent words) will be added to the search history. Users should be able to import/export the dictionary from/into a txt file. word0 Input format: word_meaning0 word1 word_meaning1 … wordn word_meaningn word0 Output format: frequency0 word_meaning0 word1 frequency1 word_meaning1 … wordn frequencyn word_meaningn For export, please export the words in the (descending) order of frequency. We ensure that no word will have the same frequency in grading test cases. Exception Handling In this assignment, you need handle 4 kinds of exceptions: InvalidWordError: the word entered to add/find/clear is not a word By mentioning word, we define it as a String consisting of a-z and A-Z WordNotFoundError: the word is not found in our dictionary. WordDuplicatedError: the word to be added has existed in the dictionary. FileNotFoundError: the file path provided does not exist when importing or exporting from a txt file. Definition of Exceptions In order to raise those 4 exceptions, please define them by inheriting the RuntimeException class. Once needed, you need to: First, throw the related exception. Then, display texts to notify that an error has occurred. Notice: For grading, we will test only Layout Example for Dictionary one error for each exception-handling test case. Recommended Procedure for Implementation

  • Create a project named Dictionary.
  • Create a package under src named Dictionary.
  • Create a form under package Dictionary with the name Dictionary.form. Check create bound class and it will automatically create Dictionary.java
  • On Dictionary.form, design the GUI of Dictionary. In particular, you should (at least) have the following components as you can see in the figure we show above:
  • FINDButton Note: only increase the frequency counts of the top 3 words. The words feasible to be searched should include the keyword. Display the top 3 (or 2 or 1) words in the TextFreqWord1, TextFreqWord2, TextFreqWord3 fields in the (descending) order of frequency If there are fewer than 3 words to display, please leave those TextFreqWord fields empty.
  • ADDButton
  • MODIFYButton Note: replace the old word with the new one, but keep its original meaning and frequency.
  • REMOVEButton
  • CLEARButton
  • IMPORTButton
  • EXPORTButton
  • TextNewWord: where you type in the word you want to add/find/remove
  • TextOriginalWord: where you type in the frequency you want to modify
  • TextFreqWord1, TextFreqWord2, TextFreqWord3: 3 TextBoxes to display frequent words in finding procedure
  • TextArea: where:
  • word meanings are displayed
  • error messages are displayed
  • searchHistoryList: a JList where show the search history Be careful: The names of the components should be the same as showed above. Don’t forget to consider and handle 4 self-defined exceptions during implementation!
  • Define 4 self-defined exceptions mentioned above using inheritance of RuntimeException.
  • Implement the Action Listens for all the buttons.
  • Test your code and see if the GUI works smoothly and has the expected functionality. SampleTest Please notice that SampleTest is just to help you understand the whole assignment more easily. Sample tests are only for clearer explanation and simple testing during your implementation. Passing all the sample tests does not mean you will get a full score. You need to read the description carefully, and think it comprehensively when implementing this assignment. After you complete the assignment following the recommended procedures listed above, you could the following SampleTest code to test if your implementation works smoothly: package Dictionary; import java.awt.*; public class SampleTest { public static void main(String[] args) { Dictionary myDictionary = new Dictionary(); // Test for ADD // InvalidWordError myDictionary.TextNewWord.setText(“s1mple”); myDictionary.TextArea.setText(“Best AWPer”); try { myDictionary.ADDButton.doClick(); } catch (InvalidWordError ex) { } // WordDuplicatedError System.out.println(“InvalidWordError passed”); myDictionary.TextNewWord.setText(“niko”); myDictionary.TextArea.setText(“Fortunate entry fragger”); myDictionary.ADDButton.doClick(); myDictionary.TextNewWord.setText(“niko”); myDictionary.TextArea.setText(“Rifler”); try { myDictionary.ADDButton.doClick(); } catch (WordDuplicatedError ex) { System.out.println(“WordDuplicatedError passed”); } // Valid ADD myDictionary = new Dictionary(); myDictionary.TextNewWord.setText(“niko”); myDictionary.TextArea.setText(“Fortunate entry fragger”); myDictionary.ADDButton.doClick(); System.out.println(“Word niko ADD successfully.”); // Test for CLEAR button myDictionary = new Dictionary(); myDictionary.TextNewWord.setText(“niko”); myDictionary.TextOriginalWord.setText(“nikoo”); myDictionary.TextFreqWord1.setText(“aaa”); myDictionary.TextFreqWord2.setText(“bbb”); myDictionary.TextFreqWord3.setText(“ccc”); myDictionary.TextArea.setText(“Fortunate entry fragger”); myDictionary.CLEARButton.doClick(); myDictionary.TextNewWord.getText(); String String tmp0 tmp1 = = myDictionary.TextOriginalWord.getText(); String tmp2 = myDictionary.TextFreqWord1.getText(); String tmp3 = myDictionary.TextFreqWord2.getText(); String tmp4 = myDictionary.TextFreqWord3.getText(); String tmp5 = myDictionary.TextArea.getText(); if (tmp0.equals(“”) && tmp1.equals(“”) && tmp2.equals(“”) && tmp3.equals(“”) && tmp4.equals(“”) && tmp5.equals(“”)){ System.out.println(“CLEAR button test passed”); } // Test for FIND button myDictionary = new Dictionary(); // “No Word Matched.” myDictionary.TextNewWord.setText(“NIKO”); myDictionary.FINDButton.doClick(); if (myDictionary.TextArea.getText().equals(“No Word Matched.”)) { System.out.println(“No Word Matched test passed”); } // Valid FIND Test 1 myDictionary = new Dictionary(); myDictionary.TextNewWord.setText(“niko”); myDictionary.TextArea.setText(“Fortunate entry fragger”); myDictionary.ADDButton.doClick(); myDictionary.CLEARButton.doClick(); myDictionary.TextNewWord.setText(“nIko”); myDictionary.TextArea.setText(“Least Fortunate entry fragger”); myDictionary.ADDButton.doClick(); myDictionary.CLEARButton.doClick(); myDictionary.TextNewWord.setText(“nIKO”); myDictionary.TextArea.setText(“So-so Fortunate entry fragger”); myDictionary.ADDButton.doClick(); myDictionary.CLEARButton.doClick(); myDictionary.TextNewWord.setText(“ni”); // return niko myDictionary.FINDButton.doClick(); if (myDictionary.TextFreqWord1.getText().equals(“niko”)) { System.out.println(“FIND Test 1 passed”); } // Valid FIND Test 2 myDictionary = new Dictionary(); myDictionary.TextNewWord.setText(“niko”); myDictionary.TextArea.setText(“Fortunate entry fragger”); myDictionary.ADDButton.doClick(); myDictionary.CLEARButton.doClick(); myDictionary.TextNewWord.setText(“nIko”); myDictionary.TextArea.setText(“Least Fortunate entry fragger”); myDictionary.ADDButton.doClick(); myDictionary.CLEARButton.doClick(); myDictionary.TextNewWord.setText(“nIKO”); myDictionary.TextArea.setText(“So-so Fortunate entry fragger”); myDictionary.ADDButton.doClick(); myDictionary.CLEARButton.doClick(); for (int numi = 0; numi < 3; numi++) { // freq of “niko” is 3 myDictionary.TextNewWord.setText(“niko”); myDictionary.FINDButton.doClick(); } for (int numi = 0; numi < 4; numi++) { // freq of “nIko” is 4 myDictionary.TextNewWord.setText(“nIko”); myDictionary.FINDButton.doClick(); } for (int numi = 0; numi < 5; numi++) { // freq of “nIKO” is 5 myDictionary.TextNewWord.setText(“nIKO”); myDictionary.FINDButton.doClick(); } myDictionary.CLEARButton.doClick(); if(myDictionary.searchHistoryList.getModel().getElementAt(0).equals(“nIKO”)&& myDictionary.searchHistoryList.getModel().getElementAt(1).equals(“nIko”)&& myDictionary.searchHistoryList.getModel().getElementAt(2).equals(“niko”)){ System.out.println(“Search History Test passed”); } e l s e { System.out.println(“Search History Test failed”); } myDictionary.TextNewWord.setText(“n”); myDictionary.FINDButton.doClick(); if (myDictionary.TextFreqWord1.getText().equals(“nIKO”) && myDictionary.TextFreqWord2.getText().equals(“nIko”) && myDictionary.TextFreqWord3.getText().equals(“niko”)) { System.out.println(“FIND Test 2 passed”); } // Test for REMOVE button // test for WordNotFoundError myDictionary = new Dictionary(); myDictionary.TextNewWord.setText(“NIKO”); try { myDictionary.REMOVEButton.doClick(); } catch (WordNotFoundError ex) { System.out.println(“WordNotFoundError passed”); } // Valid REMOVE myDictionary = new Dictionary(); myDictionary.TextNewWord.setText(“niko”); myDictionary.TextArea.setText("Fortunate entry fragge