Java/README.org
2024-09-07 19:34:21 +02:00

4.7 KiB
Raw Blame History

Readme

#+author Emma Nora Ada Theuer

My Java repo

Summary

This is the place where I upload my smaller projects written in Java, mostly to get practice back from when I actually used the language because I will need it for uni.

Where are all the other things?

Back in the day, I did write a lot more java code, but unfortunately, I don't find any of that anymore. I think it was on a drive that was wiped since. It's a bit sad, since I had a full rewrite of a text-based game and many other things there.

That code is terrible!

That might very well be. I'm just getting back into java so clean code, standards and some best practices might be lacking as of now. I'm getting back to it. I might have some more files somewhere, that will be added as time passes.

Scripts here

This will be a short summary of what each script that I upload here is.

Passgen/

Passgen (Also known as this took 5 minutes, half the code and no packaging in python) is a very simple project, actually. It generates a cryptographically secure password using a simple cli (Using picocli). This was meant to be a lot less work because I did not expect needing a third party library and maven (and as such a pom.xml file) for this to work correctly. It can generate an xkcd-style password (See xkcd-936 for more), a password using letters and numbers and using letters, numbers and special characters. XKCD-Style passwords as of now only work on linux and require a dictionary file at /usr/share/dict/words. The length is variable. A bit on the usage:

  • -x xkcd will generate an xkcd style password
  • -s simple will generate a password only using letters and numbers
  • -l length sets the length of the password. For regular passwords and simple passwords, this determines the length, for xkcd passwords the amount of words.

TextGame/

This will only be here temporarily until I think of a better place. It's a text-based game, based on the D&D Combat system, with a storyline I'm not yet sure about. I haven't done yet on this, except for implementing the base classes for weapons, rolling Dice and a longbow. See Concept.org for how the rest of the development is supposed to go. Details will follow later. This will get it's own repo when development is in a later and more mature stage.

fizzbuzz.java

This doesn't need much explaining. It's a simple fizzbuzz. I used this to motivate myself while feeling down and unmotivated to code. It took less than 3 minutes.

LuckyNumber.java

A short, simple script that asks the user for nationality and displays a lucky number based on that input. It was a quick and dirty script that I did very early, mostly to get me familiar with String comparison and conditionals. I would probably do it a bit differently by now (use a switch statement instead of an if-else chain) and use a random number generator for people who aren't German or Polish. Part of why I did that project also just was a 2137 joke lol

TicTacToe.java

The first bigger file for now. It's a TicTacToe game. Uses coordinates and an ASCII playing field. Used it to familiarize me with more complex data structures again (HashMaps, ArrayLists, an initial draft also contained a HashSet). Also the first file that actually used multiple functions, which was very useful to refamiliarize myself with how variable scope and all that is handled in java.

… and more?

For Java, I am currently working on TextGame and it's bound to become a bigger project. I also still am working on wallman, which of course is a python project. With both of these in mind, it might take some time for me to actually push something new here, but I hope it won't be too long. I also was about to work on some small commits for the python file manager ranger and all of that means that this repo might be stagnant for a while.

Ideas for more!

I don't have too many small project ideas for java right now, because I would most likely just… Do them. I want to improve the AI for TicTacToe though, as it currently just does random moves. That will probably be about as much code as the project took already though, so it's not a high priority. There are some other, smaller, non-concrete ideas I have in mind but it's not at the point where it'd be ready yet. I'll give a small list in bullet points though:

  • Better TicTacToe AI
  • Password strength checker (and potentially checker if the passwords are in any known leaks), would be integrated into passgen
  • Password manager (Would incorporate Passgen)
  • Rock-Paper-Scissors-Lizard-Spock; wouldn't take too long, just don't really want to do it right now.
  • Basic Webserver; I just really want very basic processing of information so it shouldn't become too massive.
  • … And obviously TextGame