All brands, companies and trademarks mentioned are the property of their respective owners.
English is not my native language. Sorry for the mistakes.
My name is Yury. I am a software developer. In my work I use very exotic programming languages, DBMS and other technologies related to programming. Well, that's just how it turned out. I'd like to practice something I don't normally encounter. To do this, I'll be completing a series of projects. A repository will be created for each project. I'll post a full description of each on https://weekend-game.github.io. You can see how it all developed in the blog.
Viewer of unusual files (BankViewer)
Java, Swing (Single Document Interface)
My friend receives bank statements in text format, where each field is specified by a key-value pair. He loads these files into the information system. Sometimes problems arise: either the payment date in the statement is indicated in a strange format, or the quantity is loaded instead of the amount, or the required field is not in the file at all. When viewing the file in a text editor, you can find the cause of any problem, but this is very inconvenient. It would be much more convenient to open the file in the program and see the bank statement as a table, where each line is a separate payment. You can immediately see what payments there are, from whom, to whom, what values are written in each column of the table.
This is exactly what this program does. But it also allows you to understand how to create a menu, toolbar, status bar, context menu, file open dialog box, display a file as a table, search, Drag & Drop, use L&F and put it all together as an SDI.
More details here: BankViewer.
Simple library (SimpleLibrary)
Java, Swing
While creating BankViewer, it became clear that some of the classes needed for this program would be needed in many other similar programs. It would always be necessary to display a message to the user, provide a status bar, localize the application, save some settings, work with Look and Feel, remember recently opened files, have predefined actions for frequently used actions, and be able to quickly and easily place input fields in windows. All of this was concentrated in the game.weekend.simplelibrary package during the development of BankViewer.
Here, I'll extract this package from BankViewer into a separate module for use in future projects.
More details here: SimpleLibrary.
Content Management System (CMS)
Java, Swing, SimpleLibrary
New project ideas emerge, and every project needs to have its own page on the website. However, adding just one new project requires making changes to all the website's pages. Then, you have to spend a long time checking what you've created. Sure, it's possible, but why?
I am creating my own CMS (content management system) for my website. Problem solved! Sure, I could use something ready-made, but what? And how long would it take me to master it? Would I be able to create the website exactly as I envisioned, or just something like it? I think Java is the best CMS in the world :-)
Furthermore, building this CMS allows me to practice working with Java files and creating a user interface using Swing, specifically: working with text fields, radio buttons, combo boxes, and list editing.
More details here: CMS.
Text editor (TextEditor)
Java, Swing (Single Document Interface), SimpleLibrary, BankViewer as an application template
So, I created a bank statement viewer. You can create viewers for many other things using a similar approach. But these are just viewers. And if you try to create an editor, you'll find you'll have to solve a ton of new problems. Now I am not creating some unusual editor, I am not creating an editor better than others, I am not trying to compete with anyone. I am researching what problems need to be solved and looking for solutions.
This is a regular, very simple text editor that lets you edit simple text files. It has retained all the features already available in BankViewer. But it not only opens existing files, but also creates new ones, saves edited text, ensures that you do not accidentally lose the result of editing, logically manages the activity of the Edit menu items. It can not only search for text, but also replace one text with another. It allows you to set a convenient font size, use a monospace font if it is convenient in a given situation.
More information here: TextEditor.
Editor library (EditorLibrary)
Java, Swing, SimpleLibrary
Various projects may require the use of a simple text editor as part of the project. A text editor should not only be able to work with text, but also open and save files, search within text, replace words (substrings) with others. This is precisely what the game.weekend.editorlibrary package focused on during the development of TextEditor.
Here, I'll extract this package from TextEditor into a separate module for use in future projects.
More details here: EditorLibrary.
Programming language interpreter (Interpreter)
Java, Swing, SimpleLibrary, EditorLibrary, TextEditor as an application template
I'm increasing the difficulty. In fact, a programmer should fight complexity (Steve McConnell. Code Complete. Chapter 34: Themes in Software Craftsmanship), but this is true for program texts. And I complicate the next task.
Creating your own programming language is a useful thing. Firstly, it is interesting. Secondly, it can be used, for example, for acceptance testing, that is, for writing acceptance tests (Robert C. Martin. Agile Software Development: Principles, Patterns, Practices. Chapter 4. Testing. "Acceptance tests are programs and are therefore executable. However, they are usually written in a special scripting language created for customers of the application."). Or, for example... Have you tried to write a program for calculating wages? Some accruals, deductions, and all this depends on a huge number of conditions. Of course, you can take all this into account, program it. Or you can give the accountant a simple language for describing the calculation rules. The main thing is not to tell the accountant the words "programming language", but to call it "setting up" accruals and deductions. :)
So, I take my editor and divide its central part into two parts: in the upper part I leave the editor, and place a panel at the bottom that will display everything that my interpreter outputs. Then I add the "Run" menu with the "Run" and "Stop" items...
More details here: Interpreter.
A game in a new language (AspenForest)
Weekend Game Language, Interpreter
Since I've created a programming language, why not write something interesting in it and experience what it's like to write in such a language? I'll take a break from algorithms and interpreter writing techniques and write a program in the language I created.
It's a small text-based game. A knight walks through an aspen forest. He meets different situations and must decide how to act in each one. The game has no music or graphics. The current language implementation simply doesn't allow for such features. However, nothing prevents them from being added. If Interpreter is Hello World for interpreter developers, then AspenForest is Hello World for text-based games, plus an attempt at using a new (actually very old) language.
More information here: AspenForest.