Whirlwind Tour of Mill Build
Lets start a whirlwind tour. Last time we stopped at a basic Java app. Yes, Mill does of course support building Scala projects as well, but Mill works well for other builds as well.
class HelloWorld{
public static void main(String[] args){
System.out.println("I'm built with Mill")
}
}
Intro to Mill Build: Pleasant Complex Builds
I’ve experienced a few build tools over time: Apache Ant, Apache Maven, Gradle, SBT, MSBuild, make and probably some more I’ve forgotten about. Recently I’ve experimented with the Mill build tool and it is one of the best ones I’ve worked so far.
TLDR: In the Java eco system, I recommend to use Apache Maven when your app/library fits with its defaults. If Maven starts to be painful, consider Mill build and this blog series is for you ;).
JQuery: Always use dataType for $.ajax
I recently investigated a XSS vulnerability reported via Bugcrowd. I could reproduce the issue, I just didn’t understand it. The vulnerability looked like this:
Attacker uploads a JavaScript file onto Confluence as attachment
Manipulate a Confluence macro via REST API to have invalid parameters.
Now, when the macro is edited/used, the code in the uploaded JavaScript is executed.
The code snipped looked something like this:
// AJS is the Atlassian JavaScript library entry point. AJS.$ refers to the included JQuery library AJS.$.ajax({ url: 'url-manipulated-by-attacker-to-downloads-the-attachment-file', type: 'GET', success: function (response) { // some basic processing } })
One Billion Row Challenge: Learned So Far
Last Update 2024-02-04, see below
I participate in the One Billion Row Challenge by Gunnar Morling: Parse one billion rows of CSV, in plain Java, and be fast at it. It is a friendly completion and learning experience.
I had three goals:
Be faster than the 'naive' reference solution.
Experiment a bit more with the new Memory access API’s
Experiment the first time with the new SIMD APIs.
Copy, Paste and Edit Java to C# after 20 years
This post is part of C# Advent Calendar 2023. Visit it for all the awesome upcoming posts!
C# and .NET have an awesome ecosystem, with tons of libraries and code snippets out there.
But sometimes you get that rare snippet of code in another language. In this blog post, we copy, paste, and edit some example snippets from Java languages to C#. When C# started back in 2001, Java and C# were similar languages. But in the last 20 years, C# has quickly evolved in its unique way. So, let’s if that similarity still helps you: