I feel I have opened the door for AI and come to the door gate with NN now First step achieved - A basic model with machine learning
AI study summary:
Make the route drawing function out for the tennis app.
Company’s restructure has come to a stable stage - Now it is time to focus on AI for the lont term goal
– 1 Choose a tool to label image and generate annotation file
– 2 Train the annotation using CoreML Tool
– 3 Register an account on App Store
– 4 Develop an App
– 5 Deploy it
Quite a challenge
Data based AI is super powerful, just a few line of code create easily recognise a face & eye, more importantly, it can apply to everything, amazing!!!!!
This is what I did in the past 3 months:
– property inspection, auction and settlemment. – moving home – buying furniture and home appliances. – Table, chairs – Bed, mattress, bedhead – Sofa – TV, fridge, washing machine – A fry pan – Toster, kettle, knife and a bowl – kitchen board – storage and shoe box
Now it is coming to and end with great excitment, life are to return to normal pattern - visiting libraries, exploring new technologies, reading books and sports.
Big milestone for my past 12 years work in China, New Zealand and Australia.
Keep going and explore more surprise and excitment ahead…
NodeJS Simple - To finish by end of week, Salesforce is a good company, treats its employee well.
Bench Mark Test with hot or cold start - for the same get translation function - API Gateway -> Lambda -> DynamoDB
Both tested twice - This is the average time.
Java Code Start: 11.6s Java Hot Start: 0.6s
NodeJS Code Start: 0.6s NodeJS Hot Start: 0.4s
Conslution - Java is way too slow for cold start, hot start is acceptable. - NodeJS is fast enough - 20 times as fast in cold start.
“The Programtic Programmer” is a great book. I will create a page to get the best advice from it.
I need to enhance my JS ability more - NodeJS on the way
Today is my last day with this company - They provide a good training system and being kind to me, a bit sorry for being with them short - just several weeks. I got one weeks’ free time next next week, and will make good use of it. – AWS - Redesign dictionary-read-aws - Write a NodeJS version to replace Java version to solve cold-start issue - If it is still too slow, then write a Golang or Rust version - which should be a lot faster. – Explore more about AWS programming APIs - Make myself ready for the new job. – Start AI/ML - This is long planned and will get it started – pass the AWS Machine Learning certification. – Apply it in my existing(music project) or new idea (EagleEye project)
I strongly feel Eureka Server and API Gateway should be merged into one layer - where microservices register with API Gateway directly. That would be a better architect. I shall create a project and explore it more.
Jason’s Language of 2022 - Golang - I will spend time with this language to explore more - Expected to have some free time the second half year I will expect myself have a busy first year due to join the new company and have a top performance there.
During the past several weeks, I got interviewed with 4 companies and got 3 offers - the 4th failed to provide good enough package so I directly reject them. The transition is over and I will start with a great company starting within 2 weeks - everything from them are great - every people I meet during the interview, the position, the package, the working setup - MacOS + Linux - So I will go with them. Will finish the job with the current company next Monday, and still have several days free time to explore new technologies and boost my projects. Another journey will start and I wish myself good luck.
I strong feel all the interfaces without a method should be replaced by annotation - which I believe is a better design. For example:
java.io.Serializable should be replaced by @Serializable
AWS Lambda is slow in my scenario because of cold start - in warm status java is pretty fast. According to a bench march test, static programming languages like Java and C# is a lot slow than dynamic programming languages such as python NodeJS, Rust. The reason is because Java and C# needs a virtual machine on the back to warm up first. I will use NodeJS to rewrite my program to solve the cold start issue. (Maybe can give Golang and Rust a try as well)
Lambda has some drawbacks - slow, lack of OS level operation. I have to use the python version selenium instead of java lambda which works perfectly in local while failed in lambda. It could be potentially solved by layers in lambda - I have to move on quickly now so have to move on with the python version.
First Cloud API ready - with API gateway, lambda and DynamoDB - A low cost solution
The project is updated - including upgrade to JUnit 5, Log4j. Will upgrade jason-product and promote code-challenge to be a formal project - Will do several Leetcode practice daily
I passed the Amazon Solution Architect associate test - It takes me sometime - The summary should be transfered here from Google Drive. SAP is in process - Should be able to achieve it before end of this year.
HakariCP - Worth a more detailed check -
As the gap between Springframework and JavaEE are kind of significant and not easy to transfer from one to another. Would be a good idea to create a spring-ee project to fill this gap - spring-ee intended to be a standard implementation of JavaEE (JarkatarEE) – More time to spend on this idea - probably can start with rs-api - This is a significant one.
A framework like springboot for jakatarEE?
Is there a npm like tool for Java Eco system? maven is still file-based, is there a command-based or is it possible to enhance maven to do so?
Start using Jira and Confluence to manage my own projects as there are too many and hard to go with the current way https://jasonz.atlassian.net/secure/Dashboard.jspa?selectPageId=10001#
Create my own model to predicate the covid-19 cases.
Create a free and common Olympic Database that can be easily used by anyone, it should include the following table: - Sport, including upper and each item, game logo - Country - Athlete - Game result - Olympic Update - Database is created, need to write a spider to get all the game data.
In ‘Rail on Rails’ PUT is used for update, POST is used to insert - Simple Solution for the confusing PUT and POST
Cloud Summary - Amazon Cloud is very nice, but I feel it becomes more of a luxury thing - It is not developer friendly. To get a deeper understand, a summary of AWS features and comparison is needed, together with a check on the existing cloud provider, especially community driven cloud prover.
Create a Page to compare language difference so that picking up another language would be a lot easier
Create a Page to compare MySQL, MariaDB, Oracle, SQL Server
Different Package management System - apt, skdman, brew, snap, npm, yum
Pass the AWS Solution Architect Certification Exam with a month – Due date 18 Nov 2020.
I strongly feel Docker has a strong Linux culture - which is great. It is so amazing that Docker has such a small size and can do so much things. Great tool. It is worth to check the details design of Docker.
Docker composer is used to declare the dependency between different services.
Docker mainly support 2 types of file persistence mechanism:
Need to figure out docker volume.
It is such a happiness to split dictionary into several micro services. The main difference is that I feel all the things are easily to upgrade and maintain. ‘Do one thing, and do it well’
Today’s top priority job is to split Jason Product into Separate small ones using microservice and deploy using Docker. Update - It is done - The first working Docker Microservice - Translation - is deployed and running well on Linux. Tomorrow will deploy it to Mac and set up the second one - would keep it running in the backend without stop. Docker is nice - however it seems not very neat to set up. However, once set up, it is very easy to deploy and run it.
Eclipse Micro Profile is a worth a more detailed check.
Today is the first day to start AWS I plan to get a AWS developer and architect’s certificate within one year.
Goal - Get AWS Developer Certificate by the end of this year. (31 Dec) - Get AWS Architect Certificate by the middle of 2021. (30 June)
Go Jason, you can do it.
SwiftUI is driving me crazy.
WSL - Windows SubSystem for Linux - It builds a real linux Kernel within windows - from Microsoft - Currently I am using MinGW(cmder). Seems it is a good option to give WSL a try - Linux is the best system for development.
SwiftUI is driving me crazy.
Apache Camel is used as an integration portal - It can go with CDI and spring, used to dispatch request(http, SOAP, JMS) to different service endpoints.
MicroProfile which is released in 2016, focus on Enterprise microservices applications, it is based on CDI, JSON-P, JSON-B and JAX-RS
I read a book about microservice from RedHat - which I have been using for long. In this book, it illustrate ‘Software is eating up the world’, mainly due to the free software movement, the cost of using technology is significantly lower, so it easy to build services using these technologies.
Java Security API is a combination of JASPIC, JAAS, JACC - all of which has a long history.
It still lacks the simplicity to be a excellent API.
More work to do for it.
Java Security API is very confusing, doesn’t seems to be easy to use. Seems there is more work needed.
A JavaEE 8 Technology Stack is added to Github Page.
I strongly feel the name of JavaEE should be renamed to Java Module or something like that. JavaEE which consists of multiple subsystems, is huge - while there is no need to use all of them. We can easily pick up the one that we use - which will make it a lot easier. JavaEE is not a good name anymore - EE is basically frightening - Java Module is better (Java 9 has a Module there which will be confusing)
It is not surprising if I release a book related to JavaEE technology within 2 years
The more I checked about JavaEE CDI2, the stronger I feel that Spring may not be the most suitable framework for us. Spring has departed from JavaEE quite far and it is hard for them to come back. It is reasonable to check more about Seam which is the reference implementation of CDI 2, and use seam’s feature in my library
JSR-356 - Java API for WebSocket - Summary & Thinking There are 2 parts of WebSocket Standard, server and client; First, use WebSocket to connect - Handshake. Second, communicate using the socket.
It contains: Server - which can push message to Client; Client - Which can push message to Server; It could be Web, or Java or others.
Client is responsible to connect to server. After connect is established, they will listen to each other. Encoder/Decoder - Which converts message between Java Object and Text;
JSON-B & JSON-P JSON-P and JSON-B are too small but great library(API) Before this 2, Jackson, Gson and a bunch of other JSON libraries out there. With Json-B and JSON-P as the standard, I feel free and can rely on it now.
It is very easy to use(JSON-B), quite nicely designed. JSON-P is simple but not enough, because it only provide a stream parse, and lack of facilities as what XPath3 provides. Luckily, Saxon provides an implementation meets w3c standard. I still hope there is a JSR for the flexible query using XPath - Needs to check more about whether there is existing JSR in progress - May be I can write one for JCP –
Bean Validation 2 is part of JaveEE8 The build in validation for single-parameter is great and easy. However, the cross-parameter is not very useful, because of 2 reasons:
SwiftUI can be regarded as the UI framework to Swift. As UI is a key part for App development, SwiftUI is highly emphasised.
Clarification of CDI and DI CDI/DI - CDI is a java ee specification, while DI is a common term as well as a java specification. DI is a subset of CDI CDI 2.0 includes DI 1.0 The main difference is CDI includes lifetime management such as construct/destroy a class, state, scope management.
Spring only implements DI 1.0 while doesn’t implement CDI2, and they will not do it as confirmed by Jouger Holler. Although Spring doesn’t implement JavaEE CDI2, it has all the features of it - life cycle, state, scope management.
Summary of JPA Technologies of different version
I strongly feel the limitation of define type first before using it both in programming language & relational database. In programming language, define type first is inconvenient, as it may be used just once. Similarly, in Database, define the table before using it is a limitation as well. Probably good to have a look at no-sql DB system like MongoDB.
Comparison between Java & Swift
I have tried swift for several weeks, and it proves to be an interesting & expressive language. After finishing the online material from Apple, I decide to read ‘The Swift Programming Language(Swift 5.2)’ The outcome should be:
Git bash is a nice tool which simulate linux command and satisfying performance. However, git bash doesn’t support screen split - This is a much needed feature for me. Hence, I made some investigation and finally find cmder is a perfect tool.
Swift is a nice language, with modern features which Java can learn. Seems like the third generation (C, C++ ->Java, C# -> Swift, Kotlin) introduces a much natural way of writing programe. Java is simply and nice, with poor UI though. Swift is great at making the UI development so attractive, especially for Animation part. Conclusion - Spending more time on it and think how to improve Java using features from Swift.
Selenium is good for web test, but there is big limitation about functions such as ‘Save As’ The reason is that ‘Save As’ function are system level functions, are for security reason, browser(Chrome & Firefox) didn’t provide a direct simulation.
Eclipse & IntelliJ IDEA 1 I have using Eclipse from 2010, and IntelliJ for 1 week. As recommended by ex-fellow from Alibaba and Architecture from my current company, I decided to try IntelliJ IDEA. By far, I have managed to run our product. Currently still in the stage of mastering useful hotkey of IntelliJ. I haven’t notice things that are declared by other ‘Far Better’ - seems all the things IntelliJ can do, eclipse do it well, as Eclipse is just community driven, while IntelliJ is developed by a company, so I doubt is it just because IntelliJ put more money on advertisement? There are many comments against Eclipse which seems they compare a old eclipse version or that they are using eclipse instead of Eclipse Java EE version.
Eclipse does a pretty good job - Really great design - plugin driven framework.
Eclipse used to be unstable, but now it is very stable. There are 2 points which seems IntelliJ is better:
I will try some more time for IntelliJ and then decide to whether to keep on eclipse or totally switch to IntelliJ.
Eclipse & IntelliJ IDEA 2 Update on 15 May: I fell in love with IntelliJ now The original issue is sourced from Vim-Simulator - This is a disaster. Although Vi is very good, the Vim-Simulator editor is bad experience:
It is strongly recommended to remove Vim-Simulator from IntelliJ.
Version 2020.1 is a perfect version. The main advantages are:
The main disadvantage are:
Rendering HTML is kind of difficult, the best way for now is relying on a browser to do it. HTML Renders available in Java:
As a summary of the work in the past month - Raumati Branch Picture (Chart is drawn with email sent out)
The key design difference between Java, NodeJS, Python
There is a dom4j issue today, finally found it is caused by maven dependency scope: There are 3 classpaths in maven: compile, test and runtime, there are different scopes and availability:
Java Module (Java 9) provides a package level encapsulation. It is useful for controlling the visibility of classes hence further decouple modules.
Whether it is useful for general java system is still questionable for 2 reasons:
Useful tools for Java Module
Annotation is a great feature, gain success in enterprise application development, the most successful usage of annotation are:
In core Java, seems all the mandatory annotations are still processed at compile time, such as Override. Runtime level annotations are still servers as an explanation instead of mandatory. Such as @Nonnull, @Nullable
However, there are a lot of objections in java community - Anti pattern.
JxBrowser is a library that allows web technology into Java Swing application, so that HTLM, CSS and JS can work in Java UI application. It uses v8 js engine(chrome engine) to drive the web. A pretty cool technology.
Annotation
Is it possible to - TODO
ScriptEngine, JavaCompiler
Several Locale related classes
Java Network
Common facility
Git Advanced:
Data sharing technology in Java There are 3 different level of Data exchange technologies: Information Exchange
Different processes(programmes) can share data through Disc Level and Internet Level. Different threads within the same process can share data through Memory Level, Disc level and Internet level.
As Memory Level is far more efficient than Disc Level and Internet Level, thus provide the
Why are we still using abstract class?? This is the comparison of interface & abstract class
So there are 2 type of coding philosophy:
From my mind, if I redesign a new language, abstract class should be removed.
Summary the bad design of old java Date * TODO
New time API: java.time LocalDate, LocalTime, Period, Duration, ZonedDateTime, DateTime, Instant, DateTimeFormatter, ZoneId, Clock TemporalAdjusters. TemporalAmount, TemporalAdjuster – Needs more in deep check – TODO
Java DB project is directly from Apache Derby, it was originally contained within JDK 6 and removed from JDK 8. Apache Derby is actively developed and is a embedded DB that is pure Java, support JDBC and support standard SQL.
HSQLDB is another embedded DB system, which seems gain more popularity(Used by LibreOffice and OpenOffice).
There are 4 types of JDBC Driver
Common XML libraries of Java EE
DOM is a tree structure parsing XML, there is another way: Streaming XML SAX and StAX
XML has quite a few technologies around it - XQuery, Xpath, Dom, SAX, XSL, XSLT, JAXB, dtd, xsd, The following technologies are around XML and managed by W3C
Tree Parser such as DOM parse(include Document, DocumentBuilder, DocumentBuilderFactory)treat XML as a tree structure and is suitable for most XML analysis. Streaming Parser such as SAX Parser and StAX parser generate event when reading the file, so it is suitable for big and simple XML analysis.
FileChannel is used for memory-mapping, which can be used
Regex is very powerful and I used in some scenarios during daily work. However, seems I never get a point to fully understand it. It is time now - Master Regex in one Week.
CyclicBarrier is similar to CountdownLatch, but can be used repeatedly once released.
Serializable interface There is no method in this interface, and if to modify the default serializable method, we need to provide readObject and writeObject method, and are called secretly!!! There is a benefit: If an Object implements Serializable, then it is easy to implements the Clone method using ByteArrayInputStream and ByteArrayOutputStream.
Clonable interface Clonable interface is ridiculous design, there is no interface, but once you implements it, we need to override the clone() method of Object - Bad Design !!! What we should do is to remove the clone method in Object class and add it to Clonable.
Java needs to maintain backward compatibility so there is no easy way to change fundamental class Object.
ThreadLocal seems a bad design, it is best not use it. Stream - groupBy is a very useful method together with Collector reduce can be used when there is no direct function of stream, but it should be a second choice as the function is not self-explaining.
Parallel Stream is suitable for most cases if there is no sequence required - it is not used that much only because it is fast enough - Stream is used for simple calculation only.
Today I started “Core Java Volume II - Advanced Features”, and expected to fully finish it within 6 weeks from day. This week, I plan to finish the first chapter - About Stream.
Restrictions have been used in Hibernate - not too bad though - TODO
I have created class which is very useful for Parameter Check and used to enhance Objects, functions should be:
It should be used for Parameter and result check of a call. I considered several names for it, Parameters and Requirements
Gson and Jackson can both be used to parse Json String & Objects - What is the difference?
These days, I use GraphQL as it is required by workflow innovation project. GraphQL seems promising, however, there is no utility to convert between JSON string and GraphQL query - Is it possible to write a utility?
When I read Gson, I noticed it uses Type, and I noticed interface have implicitly public method from Object, although it does not inherit from Object. Why is it designed this way?