This is a place where I upload my smaller things I write in Java, mostly to get practice back.
Find a file
2024-09-07 14:05:52 +02:00
Passgen Split up into 2 files for better structure 2024-09-07 13:46:20 +02:00
fizzbuzz.java Initial Commit 2024-09-04 12:55:46 +02:00
LuckyNumber.java Initial commit 2024-09-04 13:22:31 +02:00
README.org Improve documentation for passgen 2024-09-07 14:05:52 +02:00
TicTacToe.java Initial Commit 2024-09-04 12:54:25 +02:00

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.

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

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.

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?

I just started to lay out the technical foundation for a quite big java project, first in plain text to get an understanding of how everything actually is going to work out. What classes and interfaces do I need and more. 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 with passgen
  • Password manager (Would incorporate the password generator)
  • 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 the other project I mentioned in "… and more?"