The Eclipse MicroProfile is a community-driven profile initially developed by Red Hat, IBM,
TomiTribe, Payara and the London Java Community (LJC).
Launched in 2016, it was intended to sit alongside
Java EE’s Web and Full profiles, offering Java EE developers a smaller, lighter set of standards with which they could
build microservices. Today, MicroProfile lives as an Eclipse project, and is being supported and actively developed by
its creators as well as.....
Copying files in Java is, I think, header than it seems it should be. Typically, I see that
done with, say, a ByteArrayInputStream and a ByteArrayOutputStream . Thanks to Kotlin’s
extension function capabilities, this
operation is a one-liner:
File("/path/to/destination").writeBytes(File("/path/to/source").readBytes())
That could even be an extension function itself:
fun File.copyFile(dest: File): Unit = dest.writeBytes(this.readBytes())...
My work machine runs Windows (go ahead and laugh. I’ll wait). While I’ve been able to tweak the machine
and get a moderately acceptable setup, there are times when I’d really like to use Linux for something,
so I spin up a virtual machine with VirtualBox. While that works, I don’t really like having source code — especially with changes in flight — .....
If you wrote software on a DOS system in the 80s or 90s, you probably used one of the Borland
products, Turbo Pascal or Turbo C, with that beautiful, beautiful blue, mouse-enabled
text-based user interface (TUI, if you will). Those IDEs were powered by a library called
Turbo Vision (TV), which Borland documented and published for others to use. I loved it. While
we all live in a GUI world and there are.....
I’m currently working on a DSLs-in-Kotlin presentation for my local JUG, so I need a good domain in which to work. HTML is a great sample
domain, but it’s been done to death. After a bit of head scratching, I’ve come up with what is, I think, a somewhat novel domain: REST
application building. Sure, there are libraries like Ktor, but suffers from some very serious NIH.....
If you’ve been working with Java for very long, you’ve probably had occasion to use
String.format() . And, if you’re like me, you may very well have been doing it "wrong".
Let’s take a look at what was, for me, common usage, and how, maybe, you should be
doing it.
Let’s start by taking a look at a mildly complex — and highly.....
I was recently on a business trip and, as is my custom, I took along my Roku box so that I would have something to watch in the hotel room in the evenings. Unfortunately, the hotel wifi required that you sign in on each device in order to access the internet, but this Roku is old enough that it didn’t offer way to do that. I found some options in The Tubes, but.....
Wise or not, I recently made the move to Linux on my work machine. For the most part, it works wonderfully. For reasons that aren’t too terribly relevant here, I found myself needing (or wanting) to run the Windows version of Firefox. While I could run it successfully, it wouldn’t connect to the internet. After a whole lot of digging, I finally found the answer, which I thought I should document.....
Today I found myself with a common problem: I had a delimited string of an unknown
number of parts that that I needed split apart and process. Prior to Java 8, implementing
that might looked something like this:
for (String part : string.split("\\n")) {
if (!myList.contains(part)) {
if (!part.isEmpty()) {
myList.add(part);
}
}
}
While that works and seems to be pretty efficient, I felt it could use a stream
makeover, as I find the.....
Recently at work, we found an odd scenario with a REST (-ish ;) endpoint from another team:
If the request provided a list of, say, 11 IDs in the query string, the system would only return information on
the first 10 of them, silently dropping anything over that seemingly odd limit. The initial reaction was
of, course, "Well, let’s just increase the limit." To be honest, I had the same reaction, but
then I.....