kristofer / DTOs (java & python)
Last active
Data Transfer Objects (DTOs) Explained for Beginners (Java, then Python)
Data Transfer Objects (DTOs) via Java; Explained for Beginners
What Are DTOs?
A Data Transfer Object (DTO) is a simple container for data that travels between different parts of your application. Think of a DTO like an envelope specifically designed to carry exactly what's needed—no more, no less.
public class OrderDTO {
private Long id;
private String customerName;
kristofer / gist:d3baa93bb0434570863f9306365bece1
Last active
1 | sjldjaslkdjalkjddlasjlkjsa.kmd |
kristofer / Newbie and Git
Last active
How to SSH keys etc and so for Newbies and Git
Adding a new SSH key to your GitHub account
As a newbie, you don't understand this, but...
when you're in a terminal and you're fussing with git and you push and oops it doesn't work.
Maybe you need to make sure your git account has keys on your Mac so that git push
works right.
To configure your account on GitHub.com to use your new (or existing) SSH key, you'll also need to add the key to your account.
kristofer / Maven for Java Newbies
Last active
Maven and POM.xml for Newbie Java Programmers
What is Maven?
Maven is a powerful build automation and project management tool primarily used for Java projects. Think of it as your project's organizer and assistant that handles several critical tasks:
- Dependency Management: Automatically downloads and manages libraries your project needs
- Project Building: Compiles your code, runs tests, and packages your application
- Project Structure: Enforces a standard directory layout for consistent organization
kristofer / vscode and Maven
Last active
Maven and POM.xml with VS Code: A Beginner's Guide
Maven and POM.xml with VS Code: A Beginner's Guide
VS Code provides excellent support for Maven projects through extensions, making it a powerful environment for Java development. Here's how Maven and POM.xml work with VS Code:
Essential Extensions
First, you'll need to install these VS Code extensions:
kristofer / FASTAPI and Data Modeling Python
Last active
FastAPI, a modern Python web framework, is often used with database modeling to create robust APIs. Here's how it's typically done:
- Database Choice: FastAPI doesn't enforce a specific database. You can choose SQL (like PostgreSQL, MySQL, SQLite) or NoSQL databases. For SQL databases, SQLAlchemy is a common choice as an ORM (Object-Relational Mapper). SQLModel, created by the same author as FastAPI, is designed to work seamlessly with it.
- Data Models: Pydantic: FastAPI uses Pydantic for data validation and serialization. You define data models using Pydantic, which are then used to validate incoming requests and structure responses. SQLModel: SQLModel extends Pydantic to define database tables directly as Python classes. This allows you to define both data structures and database schemas in one place. SQLAlchemy: If using SQLAlchemy, you define models that map to database tables.
kristofer / Java & Python Git Ignore
Last active
1 | # Java |
2 | *.class |
3 | *.jar |
4 | *.war |
5 | *.ear |
6 | *.zip |
7 | *.iml |
8 | *.ipr |
9 | *.iws |
10 | .settings/ |
kristofer / LLM concepts and limits
Last active
A Short Personal Reference Guide to LLM Concepts & Limitations
Core Concepts
Foundation
- Large Language Models: Neural networks trained on vast text data to predict next tokens
- Architecture: Primarily transformer-based with attention mechanisms
- Parameters: Model size/capacity (billions to trillions)
- Training: Self-supervised learning on text corpora
- Inference: Generation of text responses to prompts
kristofer / API Introduction for Java & Python
Last active
Introduction to APIs for Python and Java Newbies
APIs (Application Programming Interfaces) serve as bridges between different software applications, allowing them to communicate and share data with each other. For beginner programmers in Python and Java, understanding APIs opens up vast possibilities to enhance your applications with external data and functionality.
What is an API?
An API is essentially a set of rules and protocols that allows one software application to interact
paul / Paul's zsh setup
Last active
How I like to configure a new zsh environment.
When setting up a new shell environment, I take the following steps to create a space that literally works for me. The command prompt tells me what machine I'm on, the path I'm in, Git status, virtual environment status, whether the last command succeeded or not, and its elapsed time. Plugins tell me whether the command I'm typing is in my path, and applies color to the command line arguments and man pages.
Install the following:
- Ghostty on Mac, terminator on Linux
- zsh
- brew install zsh
- Oh-my-zsh