Moving away from Blogger/Blogspot for blogging

Hello everyone,in the recent years I didn't had time to actually blog and the reason was not only the lack of time.The real reason was that personal blogs are no longer this viable as ones were. In the current time most people read medium or ghost or very development aligned websites to get their content.In the past years when this blog was created dzone.com was actually a blog aggregator, where you put your blog and people can vote for it, in a way similar to reddit. It was AWESOME had a front and back page and the blog links having a lot of votes sometimes made it to the front page. There was RSS for both pages and it was so so awesome. Javalobby was forum back then.Now all is over.. dzone is completely different, javalobby doesn't exist and to have a personal blog and just rely only on your twitter or reddit presence is just too much work for a developer.Also there is something else - blogger(blogspot) is basically very hard to use, it is hard to format code, it does not support markdown, it is some outdated not competing wordpress anymore google product that I believe soon will be canceled....and writing a blog post for development on it is PAIN !!!  (medium.com is pain too btw)So because of the reasons above I am archiving my blog.I might post sometimes to http://dev.to which I believe is the best medium alternative for developers blogging right now, it is basically twitter, reddit a like and you can follow me  here https://dev.to/gochev .Btw basically http://dev.to is like twitter/reddit where a post is a...

NestJS + Mongo + Typegoose

The current state of Mongo with NestJS ( and Node) .Currently you have 3 options to use Mongo with Node (and NestJS).1) NestJS + Mongoose where maybe the best tutorial I have found is here https://scotch.io/tutorials/building-a-modern-app-using-nestjs-mongodb-and-vuejs the issue is that I hate the fact I had to write the schema definitions and the typescript interfaces. If you are fine with writing everything 2 times ones the Schema and ones the Document as Typescript Interface maybe this is the best way to go.2) NestJS + TypeORM where you can actually use TypeORM with MongoDB, however I do not recomment this if you want to learn more I would ask you to write this blog post https://medium.com/articode/typeorm-mongodb-review-8855903228b13) NestJS + Typegoose - basically what it does is it uses your domain objects to get the schema from them. And this is what this post is all about. There is a lot of documentation how you can achieve that, however I didn't like most of it, it just looked like too much code. On top of that ALL tutorials ALWAYS include using of a DTO class and I don't see a reason to use DTO classes at all in 99% of the cases.DTOs are great because of many reasons, but none of the tutorials on the internet actually explains why they want DTOs and in fact none of them need DTOs so I would like to write the most easy straightforward NEST + MongoDB + TypeGoose example.So first of all we will install nestjs cli, NestJS is very, very similar to Angular and even if you dont like angular trust me you will like NestJS. Great beginners tutorial for NestJS you can read...

Becoming a Junior Java Developer 101

Hello everyone,in order to become a Java developer you don't need much ;), however if you start learning everything you probably will be overwhelmed and will focus on the wrong bits and basically will probably give up.However I have to say DON'T give up. Java is extremely easy language, maybe the easiest to start with, it is the most easy language to understand and to read (in case someone else has written the code) so this is the primary reason why Java is the most commonly used language.The issue with JavaScript is ones you learn the language and bits of the SDK (Standard Development Kit) you will be overwhelmed by a HUGE number of Libraries and Frameworks, you will not know what to learn and how to combine and how to connect different frameworks in order to have a finished product.So I hope this guides will give you some direction and by reading and understanding EVERYTHING in this guide you should be more than ready to join some company as a Junior Java Developer. All materials are completely FREE and are far better then any academy or university course and etc.Why you will choose an Academy or University or Udemy course ? The only reason is if you are lazy. You see in order to understand and start applying something you need to first learn it and then to use it to write something. Most people just read without the writing bit, or try to write before they have learned anything (which is better case then the first in my opinion) but in both cases this creates a huge,...

Use Multiple JVM versions on Mac OS and Linux

LinuxDownload multiple Java versions and put them into /opt/ If you already have some JDK from ubuntu repo or etc not a big deal, just fix the paths bellowRegister them as alternativessudo update-alternatives --install /usr/bin/java java /opt/java-8-oracle/bin/java 1081sudo update-alternatives --install /usr/bin/java java /opt/sap-machine-jdk-11.0.3/bin/java 1080Edit your ~/.bashrc filealias java11='sudo update-alternatives --set java /opt/sapmachine-jdk-11.0.3/bin/java;export JAVA_HOME=/opt/sapmachine-jdk-11.0.3/'alias java8='sudo update-alternatives --set java /opt/java-8-oracle/bin/java;export JAVA_HOME=/usr/lib/java-8-oracle/'SAVE and start a new bash terminalexecutejava8 to use java8java11 to use java11the latest version you have set stays as system wide, but the JAVA_HOME is not :( you can put java8 or java11 as a last line in the bashrc but since it is sudo it will always require password when start and is not great ;(MacInstall homebrew, since it rox !Install Oracle Java 8 or OpenJDK 8.I recommend adoptopenjdkbrew tap adoptopenjdk/openjdkbrew search adoptopenjdkbrew cask install adoptopenjdk8brew cask install adoptopenjdk11On mac since it RULZ you have a java_home executable (that changes and fixes both your path and your JAVA_HOME) , so the .bashrc changes are easy !Edit your ~/.bashrc fileexport JAVA_8_HOME=$(/usr/libexec/java_home -v1.8)export JAVA_11_HOME=$(/usr/libexec/java_home -v11)alias java8='export JAVA_HOME=$JAVA_8_HOME'alias java11='export JAVA_HOME=$JAVA_11_HOME'java8Note: the latest execution of java8 is to make it system wide by defaultSAVE and start a new bash terminalexecutejava8 to use java8java11 to use java11WindowsUse a normal OS or suffer...

Use Multiple JVM versions on Mac OS and Linux

LinuxDownload multiple Java versions and put them into /opt/ If you already have some JDK from ubuntu repo or etc not a big deal, just fix the paths bellowRegister them as alternativessudo update-alternatives --install /usr/bin/java java /opt/java-8-oracle/bin/java 1081sudo update-alternatives --install /usr/bin/java java /opt/sap-machine-jdk-11.0.3/bin/java 1080Edit your ~/.bashrc filealias java11='sudo update-alternatives --set java /opt/sapmachine-jdk-11.0.3/bin/java;export JAVA_HOME=/opt/sapmachine-jdk-11.0.3/'alias java8='sudo update-alternatives --set java /opt/java-8-oracle/bin/java;export JAVA_HOME=/usr/lib/java-8-oracle/'SAVE and start a new bash terminalexecutejava8 to use java8java11 to use java11the latest version you have set stays as system wide, but the JAVA_HOME is not :( you can put java8 or java11 as a last line in the bashrc but since it is sudo it will always require password when start and is not great ;(MacInstall homebrew, since it rox !Install Oracle Java 8 or OpenJDK 8.I recommend adoptopenjdkbrew tap adoptopenjdk/openjdkbrew search adoptopenjdkbrew cask install adoptopenjdk8brew cask install adoptopenjdk11On mac since it RULZ you have a java_home executable (that changes and fixes both your path and your JAVA_HOME) , so the .bashrc changes are easy !Edit your ~/.bashrc fileexport JAVA_8_HOME=$(/usr/libexec/java_home -v1.8)export JAVA_11_HOME=$(/usr/libexec/java_home -v11)alias java8='export JAVA_HOME=$JAVA_8_HOME'alias java11='export JAVA_HOME=$JAVA_11_HOME'java8Note: the latest execution of java8 is to make it system wide by defaultSAVE and start a new bash terminalexecutejava8 to use java8java11 to use java11WindowsUse a normal OS or suffer...