Sunday, December 5, 2021

Spring Professional Certificate Study Guide Section 1-1, Question 16-28

16. What does the @Bean annotation do?

17. What is the default bean id if you only use @Bean? How can you override this?

18. Why are you not allowed to annotate a final class with @Configuration

19. How do you configure profiles? What are possible use cases where they might be useful?

20. Can you use @Bean together with @Profile?

21. Can you use @Component together with @Profile?

22. How many profiles can you have?

23. How do you inject scalar/literal values into Spring beans?

24. What is Spring Expression Language (SpEL for short)?

25. What is the Environment abstraction in Spring?

26. Where can properties in the environment come from – there are many sources for properties – check the documentation if not sure. Spring Boot adds even more.

27. What can you reference using SpEL?

28. What is the difference between $ and # in @Value expressions?

Tuesday, November 30, 2021

Spring Professional Certificate Study Guide Section 1-1, Question 1-15

1.1 Container, Dependency and IOC

In this article, I'm going to answer the first 15 questions of Section 1.1 from the Professinal VMware Spring Certificate study guide. Those questions are:
  1. What is dependency injection and what are the advantages of using it? 
  2. What is an interface and what are the advantages of making use of them in Java? 
  3. What is an ApplicationContext?
  4. How are you going to create a new instance of an ApplicationContext?
  5. Can you describe the lifecycle of a Spring Bean in an ApplicationContext?
  6. How are you going to create an ApplicationContext in an integration test?
  7. What is the preferred way to close an application context? Does Spring Boot do this for you?
  8. Are beans lazily or eagerly instantiated by default? How do you alter this behavior?
  9. What is a property source? How would you use @PropertySource?
  10. What is a BeanFactoryPostProcessor and what is it used for? When is it invoked?

Friday, September 17, 2021

Best Practices & Principles in OOP

SOLID principles

Before even beginning to introduce all the essential OOP principles and patterns, keep in mind that:

  • Focus only on KISS ("Keep it simple and stupid") and OOP Principles first, then observe your code to see which pattern it might need for a code quality improvement -> apply patterns  

1. Single Responsibility 

"A class should have one, and only one, reason to change."

Wednesday, September 15, 2021

HOW GOOD IS GODD ENOUGH? By H.P. Schoener (On quantitative evaluation of functionalities in self-driving vehicles)

最近在寫論文的前言與動機的部分,看了一篇有趣的文章。這邊簡單做個重點紀錄供日後閱讀。

1. “How Good is Good Enough?“ in Autonomous Driving? by H.P. Schoener
本文提出一個量化自駕車功能"是否夠好"的方法。

自動駕駛就是把人類開車時95%會做對的事情自動化,把剩下5%最小化。據統計,德國高速公路(Autobahn)平均每行駛750萬公里會有一次S0等級(S0是最輕微的)事故,也就是說自駕車測試至少要跑750萬公里且不能發生任何事故。
五大常見的意外起因:

德國汽車產業近年的困境

註:本文於2020年九月完成,時隔一年才發布,但是疫情還沒結束,所以內容都適用啦~

最近因為corona疫情影響,德國汽車產業備受打擊,政府出手Kaufprämie(消費津貼)救車市,否則會有更多人失業...到底為什麼德國舉世聞名的汽車產業會面臨這窘境呢? 除了疫情影響,其實原本產業就不太好? 本文會簡單介紹一下我的看法。

Tuesday, September 14, 2021

Generics in Java

What are Generics?

Enable us to parameterize the type of variables in a class or interface by its definition, so code can be reused for more general types of inputs. Moreover, the type of variables would be checked more thoroughly at compile time, so errors in run-time due to misinterpretation of data are minimized.

Wednesday, August 25, 2021

About Collections and Maps in Java

Today we are gonna have a brief view over the Collection and Map interfaces in Java:

As following diagram shows, while they are all used to save a group of objects of same types, Sets, Lists, Queues and Deques belong to the Collection interface, whereas Maps have their own interface.

Reference: https://www.codejava.net/java-core/collections/java-map-collection-tutorial-and-examples

----------------------------------------------------------------------------------------------------------------------

Friday, August 20, 2021

"Final" Keyword, Immutability and Thread Safety in Java

關於Java的Final關鍵字,Immutability與Thread Safety

1. Definition of "Thread safety": Multiple threads will access a shared object coordinately such that unsaved changes made by one thread would not be overwritten by the other.

How to achieve thread safety?

Friday, September 11, 2020

C1以後的德語學習

學德語五年的小小心得 一直想要寫一篇關於我個人學德文方法的文章,因為本人從小對語言學習頗有興趣,目前學過外語有英文10年以上、日文1.5年、德文5年、法文1年。其中德文因為人在德國的生活、學位與就業所需,是近年來用得最多的。 雖然我大四才開始接觸德文,但是到現在將近五年,自認為還挺認真學,並且達到可以用全德語工作,且生活上交流也完全沒問題,因此想寫下自己一路走來的學習心得,本篇會分為兩部分: 
1. 簡單描述我學習德語的歷程
2. 介紹一些我個人的學習方法

Wednesday, August 26, 2020

七夕之卡爾斯魯厄美術館半日遊

今天是七夕,中午先去吃了久違的印度餐吃到飽,享用便宜好吃的各式咖哩(吃得超飽),然後下午約會去看了卡魯Karlsruhe市中心的國立美術館(Staatliche Kunsthalle Karlsruhe)

Friday, June 19, 2020

EAST-ADL介紹

這篇講一點EAST-ADL的皮毛,也是今天的學習心得

ADL (Architecture Description Language)是一種用來描述某種特定領域之系統的語言 (domain-specific language。 而EAST-ADL是一種專門設計用以描述汽車嵌入式軟體系統的ADL。

Thursday, April 2, 2020

來聊聊自動駕駛功能測試的一環-虛擬整合(Virtual Integration)吧!

§為什麼傳統道路測試不再夠用?

在自動駕駛從一個很新穎的話題蛻變成新產品之前,需要歷經許多安全與可行性測試,但因為傳統道路測試有其限制(例如:需要等到產品之軟硬體部分都研發完成才能整車上路測試、且測試需要天時地利(天候、路況、車流有不可複製性),危險的情境測試的成本太大等問題)。
更關鍵的一點,訓練自動駕駛功能所用到的機器學習資料集需求量龐大,要累積到10^9公里級的道路駕駛里程,才有辦法訓練一個新功能到它足夠安全,如果是一組有100輛車的車隊,全年無休地駕駛,需要約10-400年的駕駛才能達成。一聽就知道不可行了吧!

Sunday, March 29, 2020

關於德國藍卡與永居的理解

聲明:本文之任何數據及內容都是個人理解,詳情可能依官方網站與承辦人員而有所出入

首先要有一個觀念:能居留不代表能在那合法工作!!


1.長期居留(如學生) :Aufenthaltserlaubnis
是有限制的居留許可,效期在90天~2年之間(視學位所需時間而定),由各城市的Ausländeramt發出。畢業後多久會失效這我不知道,有人說是馬上,不過畢業後如果沒有工作,能先換18個月的找工作簽,如果幸運拿到工作合約, 便可以直接申請工作簽證。

Sunday, February 16, 2020

「簡短歐洲史系列」- 神聖羅馬帝國重點簡介

本篇將介紹以下重點:
1.神聖羅馬帝國?是什麼概念?
2.皇權與教權的拉鋸
3.三十年戰爭簡介
4.法蘭克王國的衰微與舊制度時代(Ancien Régime)


神聖羅馬帝國?是什麼概念?

Thursday, February 13, 2020

「簡短歐洲史系列」- 美泉宮與神聖羅馬帝國的起源

本篇文章會依序介紹:
1.複習:神聖羅馬帝國的成立
2. 補充:關於捕鳥者亨利一世
3. 補充:關於奧托一世
4. 美泉宮簡介

隨便寫寫-2015年第一次看到科隆大教堂的我

生平第一個世界奇觀-科隆大教堂

這篇文章是4.5年前寫的了,但是卻一直沒有發表,就當作一個日記囉!

22.8(六)

昨天(2015)參加語言學校戶外教學,

「簡短歐洲史系列」-西羅馬帝國滅亡與中世紀的法蘭克王國


本篇我們將會依序介紹以下主題:
1. 中世紀的起源
2. 中世紀的細分
3. 法蘭克王國與查理曼(查理大帝)
4. 中世紀-宗教興盛、教廷輝煌的年代(476-1453)
5. 中世紀的衰亡

今天著重在介紹中世紀前期(5-11世紀)的簡史。


Tuesday, January 28, 2020

在奧斯維辛集中營解放75周年"奇裝異服",這什麼時代了還有這種政治人物?!

今天(1/28)是奧斯維辛集中營解放的75周年,歐洲許多政治人物上至德、法、波蘭等國總理乃至地方議員們都會表態他們對歷史的看法。這點由許多德國政治人物發文以#WeRemember(我們記得)表示重視歷史犯下的過錯可見一斑。

#另類選擇黨(AfD)是一個德國民粹政黨,立場就我所知是反移民的,並且對於外國人不甚友善。
好笑的是,今天heute show 推特貼文發表了一張圖,上面是在薩克森自由邦州議會(Sächsischer Landtag)任職的AfD(另類選擇黨)的Gudrun Petzold議員,意有所指地在今天這個具代表性的日子(Auschwitz-Gedenktag)披著死狐狸做的圍巾出席。Heute show這個政治時事嘲諷的節目當然不會放過此機會調侃,而該貼文下的德國人留言也很有趣:

"嘔拜託,這一定是p圖的 拜託誰來告訴我"
"當你的衣服比你更有腦"
"這狐狸一定感到很羞愧"

去查了下這個薩克森州議會,AfD在去年2019的選舉拿到了27%的選票,成為該邦議會除了CSD外第二大勢力,看來這個邦的風向在變,還是少去為妙~

Thursday, August 15, 2019

「簡短歐洲史系列」- 霍亨索倫家族、腓特烈二世與奧地利領土繼承戰爭

今天前往霍亨索倫城堡旅遊囉!這個景點在德國明信片上的常客,身為獲評選為全球十大城堡、歐洲五大城堡的Burg Hohenzollern,在遊客心中的名氣卻遠遠不如新天鵝堡,不過比起新天鵝堡的童話色彩,這座堡壘的外貌則陽剛許多,見證了鐵血普魯士的輝煌歷史。

Tuesday, July 16, 2019

在德國健康保險的Q&A

剛到德國的學生都會被要求要保公保(主要是TK,AOK,DAK三間其中一間),這是因為德國政府規定以下幾種人需要強制公共健康保險Pflichtversicherung

強制公保Pflichtversicherung
主要是以下兩種人會被強制保公保:
1. 年薪不超過Jahresarbeitsentgeltgrenze的工作者(2019年是60.750歐元),必須強制保公保。
2. 所有不超過30歲之學生且就讀大學學期不超過14學期。
對於以上兩種人,沒得選,他們就是要從上面提到三間保險公司去選一間。通常公保分為Krankenversicherung(健保)與Pflegeversicherung(長照險)。而公保保費金額就我所知,只與收入有關,而與年齡無關。

而當你大學讀了很久(像我),超過了14學期後,你可以自願繼續留在公保或者改成私保(因為私保比較便宜,但是保障也相對較少,特別需注意的是,如果你保私保,以後要改回公保是非常難的!)


自願留在公保: Freiwillige gesetzliche Krankenversicherung
如果妳繼續待在公保,則你必須繳交將近兩倍於學生時期的保費,該保費算法為你的Einkunft(收入或家人餽贈)乘上一個百分比,對於學生是14%,對於上班族是14.6%。並且有個最低與最高Einkunft的計算基數,當你賺的月薪不足Mindestbeitrag(約1000多歐,每家保險公司可能不太一樣),就必須以此基數計算,所以賺得少於此金額是虧的。 當你賺的錢比Höchstbeitrag還多時,你必須繳的保費就不會再變了。

私人保險 Private Versicherung

然後如果你是Berufstätiger或freiwilliges Praktikum,公司有義務幫你出一半保費,這也是為什麼找實習時,公司一般喜歡收自願實習而非義務實習生,因為公司負擔較小。