Tag: Java

  • Implementing Windows’ Restart Manager in Java

    Implementing Windows’ Restart Manager in Java

    Disclaimer: I don’t know what I’m talking about, I’ve done little Win API (Win32) development and I only have a few years of Java development of which maybe 2 or 3 are developing desktop applications with JavaFX (Dashman being my first fully fledged out JavaFX app). Disclaimer 2: I have only tested this on my […]

  • Restoring window sizes in JavaFX

    Restoring window sizes in JavaFX

    Update 2018-05-23: Updated the code to my current version, which fixes a few bugs. When doing usability testing of an alpha version of Dashman, one thing that I was strongly asked was to have the windows remember their sizes when you re-open the application. The need was clear as it was annoying to have the […]

  • Book Review: Beginning Hibernate by Jeff Linwood, Dave Minter

    Book Review: Beginning Hibernate by Jeff Linwood, Dave Minter

    Sweet introduction to Hibernate. I can’t believe it doesn’t cover migrations (and I’m sure some people will point out migrations it’s not part of Hibernate, but without it, there’s no good way to maintain a production database). The book is on the short side for a computer book and that’s a huge plus. Even then, […]

  • Using Oracle’s JDK in CircleCI (with Gradle)

    Using Oracle’s JDK in CircleCI (with Gradle)

    I’m evaluating re-writing Dashman in Java (instead of Electron). It’s too early to tell, but so far all the experiments and the early re-write are going well and it’s solving the issues I was having with Electron. This short post is about CircleCI. Because now I’m using common, boring technologies, I decided setting a CI […]

  • Setting (database) credentials on a Spring Boot project, the right way

    Setting (database) credentials on a Spring Boot project, the right way

    Searching online for how to set up the credentials to access the database (or any other service) while in development leads to a lot of articles that propose something that works, but it’s wrong: putting your credentials in the application.properties file that you then commit to the repository. The source code repository should not have […]

  • Isomorphic JavaScript (with ClojureScript) for pre-rendering single-page-applications, part 2

    Isomorphic JavaScript (with ClojureScript) for pre-rendering single-page-applications, part 2

    In part 1 I covered the basic problem that SPA (single page applications) face and how pre-rendering can help. I showed how to integrate Nashorn into a Clojure app. In this second part, we’ll get to actually do the rendering as well as improving performance. Without further ado, part 2 of isomorphic ClojureScript. Rendering the […]

  • Isomorphic JavaScript (with ClojureScript) for pre-rendering single-page-applications, part 1

    Isomorphic JavaScript (with ClojureScript) for pre-rendering single-page-applications, part 1

    I don’t think I have found the ultimate solution for this problem yet but I have reached a level in which I’m comfortable sharing what I have because I believe it’ll be useful for other people tackling the same problem. The reason why I doubt this is the ultimate solution is because it has not […]

  • jar-copier 0.1.0 released

    jar-copier 0.1.0 released

    jar-copier is a Leiningen plug in to copy jars from your dependencies to your source tree. It’s a very small simple utility that proved to be necessary to have a sane setup with Java agents (New Relic for example). It’s very simple to use. Put [jar-copier “0.1.0”]  into the :plugins  vector on your project.clj. To […]

  • Refactoring: Consolidate Duplicate Conditional Fragments; in Java, Python and Ruby

    I’m reading the book Refactoring and one of the refactorings it shows is called “Consolidate Duplicate Conditional Fragments” and it shows an example in Java: if (isSpecialDeal()) { total = price * 0.95; send(); } else { total = price * 0.98; send(); } is refactored into if (isSpecialDeal()) { total = price * 0.95; […]

  • Are dynamic languages just a temporary workaround?

    This can unleash so much hate mail, but here it goes, my inbox is ready! Are dynamic languages just a temporary workaround? I’m not sure! I’m switching between the two types of languages all the time: Java, Python, C#, JavaScript. I’ll try to make the long story short. Statically typed languages, like Java and C#, are nice […]