I have heard of serverless from so many vendors by now that it feels more about marketing than anything else. I have a bad gut reaction when I feel that there is more marketing than substance about any technology.
I decided to look at Now from Zeit just out of curiosity and I think that I should look at it a bit more since it looks quite easy.
On the Zeit site, you can see the free offering that they have and it allows you to get your feet wet and be more curious about what you can do.
The Now CLI also looks like a very simple way to perform everything you need.
I also like the immutability approach that they have that allows you to move quickly from one deployed version to another.
It is definitely worth more time to see what I could do with this platform.
Decided to try to learn Java 8 and Spring 5 but the first commit is using Spring Boot 2.0.0.BUILD-SNAPSHOT.
I got a working controller and everything is building with Gradle 3.3.
Until today, the Apache Commons Configuration was a very helpful tool as a quick configuration utility in many projects. For loading simple configuration item it is fine.
I was trying to find a way to store and read a Map to contain some configuration and there is was no easy way that I could find. I came up with a Krusty solution for now but I am hoping that I can find something more elegant.
GitHub Repo with example code.
I was trying to use the useragentstring.com api to query and map browsers to my custom object and I did not want to name my fields with agent_type, agent_name and agent_version.
Simple solution that I found on this page was to annotate my properties in the class with:
The mapping is happening automatically.
I want to explore how using log4j for email alerts in an application is feasible but how well it works in a real application.
The idea came from the fact that a team I work with change the rules for alerts on a regular basis based on the work and the situations they are caught in. It is clear that we have to stop changing the code to accommodate the new rules they give us.
Log4j is a possibility and I found this blog post that talks about it:
For a Spark project I needed to bundle some dependencies and I found a few Stackoverflow answers that explained to add this section to your pom.xml:
But once I packaged my application I ended up with a huge jar file. It contained everything the application needed.
My mistake was that the pom.xml did not contain the proper scope for each dependency and because of that they were all getting bundled into the jar.
Specified that a few were provided (provided) and it reduced the jar size considerably.
How a small missing piece can change other behaviours drastically.
I was puzzled by a Git error I saw today.
I simple create a git repo on the “server”:
git init /git/newRepo
Then on my workstation I cloned it and added a file:
git clone ssh://server/git/newRepo
git add test
git commit -m “testing”
and I get this error:
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as ‘master’.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to ‘ssh://server/git/newRepo’
From reading a StackOverFlow answer I understood that the issue on the server side is that the new Git repository is open on the master branch by the user that created it and so it prevents a push to it because it could corrupt it. One way was to make the repo a bare one but another it to get the remote use into another branch than master.
On the server:
git add README
git commit -m “README”
git checkout -b test
and after that command I can pull and push normally.