Skip to content

Instantly share code, notes, and snippets.

View danthe1st's full-sized avatar
💭
https://danthe1st.github.io/

dan1st danthe1st

💭
https://danthe1st.github.io/
View GitHub Profile
@danthe1st
danthe1st / languages.md
Last active November 10, 2024 15:24
My expectations for programming languages

Introduction

I like using the Java programming language for many reasons. While there are some things about Java I would prefer to work in other ways, it does a lot of things right and I consider it "better" for me (meaning it matches my expectations more) than other programming languages. When I write code, I want to be able to do it as I do it in Java and these expectations can be seen as prerequisites for that.

The purpose of this gist is to show some reasons I prefer Java over other languages. It lists a few things that annoy me with other programming languages. This may contain controversial opinions and is by no means exhaustive.

Fulfilling the criteria listed here doesn't make something a good language alone but this gist lists some expectations I have from languages that are necessary for me to like it.

@danthe1st
danthe1st / findg.sh
Last active February 23, 2024 12:23
script for combining find|grep
#!/bin/bash
# combination of find and grep
# Usage:
# findg <text> [<directory>] [<extra args for find>]
set -u
export SEARCH_STRING="$1"
shift
@danthe1st
danthe1st / Eclipse.md
Last active September 22, 2024 19:17
Why I personally prefer Eclipse over IntelliJ

Why I personally prefer Eclipse over IntelliJ

Introduction/Disclaimers

I do not claim any IDE being better than another. These are just reasons I personally like developing in Eclipse more than I like developing in IntelliJ.

I have used both the Eclipse IDE and IntelliJ for quite some time and I cannot deny that both are excellent IDEs. While Eclipse is better for me, this might not be the case for you. This is my subjective opinion and this gist is intended to explain some reasons so I don't have to repeat myself all the time.

As I am (mainly) a Java developer, this applies to Java development specifically but some points may not be specific to Java.

What is compared?

IntelliJ comes in two editions: Community Edition (free) and Ultimate Edition (paid). When comparing Eclipse and IntelliJ, this is (in my experience) often ignored. Some functionality is possible in Eclipse (especially using Eclipse IDE for Enterprise Java Developers which is Free and Open Source as well) which are is available

@danthe1st
danthe1st / Data_class_checklist.md
Last active April 8, 2023 21:36
JPA data class checklist and example persistence.xml for EclipseLink
  • Primary Key:
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long oid;
  • annotate all data classes with @Entity
  • Create attributes
  • Annotate relations
  • Create getters/Setters, equals/hashCode (required for Sets)
@danthe1st
danthe1st / _safe rebase.md
Last active August 10, 2022 20:59
safe git rebase (pre-rebase hook)

Description

This gist contains a script of mine that prevents unsafe rebases.

I consider a rebase as unsafe if there is work based on the branch to rebase.

This works should work cross platform as long as bash is installed correctly on /bin/bash (git for windows comes with bash).

This hook can be useful if git is configured to do a rebase instead of a merge when pulling.

Keybase proof

I hereby claim:

  • I am danthe1st on github.
  • I am dan1st (https://keybase.io/dan1st) on keybase.
  • I have a public key ASB4bPNz1v1SNwIS12KPEno9kiTLb8MeczT313MvnzCMXwo

To claim this, I am signing this object: