呢幾日諗緊一個難題,話說有個朋友,中學識嘅。我無同佢同過班,剩係同佢一齊讀過一個星期先有兩堂嘅 Computer Studies, 但係就偏偏係依家最老死嘅朋友。
我今日都問過佢,但係佢都解唔到究竟我哋點樣熟絡。我諗唯一解釋到嘅,就係緣。緣呢樣嘢好奇妙,只要時辰一到,擋都擋唔住。無嘅話,真係住响隔籬,甚至做埋同房,都唔會識到。
我呢,人緣就幾好喇,但姻緣就嘛嘛。
Search This Blog
Monday, January 31, 2005
Self-disposing Resource Pattern
A few mon, I have encountered a quite disturbing problem (see below). Until recently, I found that this problem can be solved by a interesting class, SoftReference, in Java. So, I formulated the following pattern. It's still a rough draft, but I would like to publish it first.
Name: Self-disposing Resource Pattern (Java)
Context: A is some expensive resource that may or may not be pooled. A is used to create another kind of resource, B. If A is disposed, it cannot create B anymore. However, if A is not disposed, the system may run out of memory.
Problem: Determine when to dispose A.
Solution: Java comes with SoftReference class for memory management. “An object is softly reachable if it is not strongly reachable but can be reached by traversing a soft reference.” An A instance can be registered to a resource manager to be a soft reference when it is no longer reachable by any thread. On the other hand, the resource manager can start off a thread to dequeue the SoftReference instances from a reference queue and clean up the resource properly.
Name: Self-disposing Resource Pattern (Java)
Context: A is some expensive resource that may or may not be pooled. A is used to create another kind of resource, B. If A is disposed, it cannot create B anymore. However, if A is not disposed, the system may run out of memory.
Problem: Determine when to dispose A.
Solution: Java comes with SoftReference class for memory management. “An object is softly reachable if it is not strongly reachable but can be reached by traversing a soft reference.” An A instance can be registered to a resource manager to be a soft reference when it is no longer reachable by any thread. On the other hand, the resource manager can start off a thread to dequeue the SoftReference instances from a reference queue and clean up the resource properly.
Friday, January 28, 2005
First Week of the Semester
The school has been started this Tuesday. I attended to the classes for three consecutive nights. It's so tired. Tomorrow, I need to take another one in the afternoon. I'll need to decide whether I should drop the Tuesday class. That class was very boring.
Monday, January 24, 2005
Days of Part-time Working
I haven't blogged for a long time. I am currently working as a part time. In theory, I should have more time than before and I should have more time to blog. Obviously, it's not.
I found that there are many personal stuff have to take care in the first. Like have the MP3 player fixed, applying for CEF, etc.
The second week, I got cold again. I had to take rest at home and didn't go to work out. My body get a bit slimmer. It's not good though. After I got better, I go hiking with friends and upgrading the CPU. Actually, these few weeks I was trying to get an AMD's Althon XP CPU which was out of stock. I gave up in this week and got a Sampron. Another thing I wanted to get was a Palm T3 which was again out of stock. I am considering if I should by T5 instead.
This week, I finally started trying to swim. Rocky now is my "couch" preventing me from drowning. Even just one day, I thought I had the key to swim.
Today, we went to Leo's home to play video games and having dinner together. It's a tired but enjoyable day. Rocky and I almost missed a bus when going there. However, we still miss the stop to get off the bus. Luckily, Michael and Sammi were still enjoying their lunch.
Interesting enough, we missed the bus of the back trip. We then take the MTR to get back home. When getting the last trip of the train, we missed the train again.
I found that there are many personal stuff have to take care in the first. Like have the MP3 player fixed, applying for CEF, etc.
The second week, I got cold again. I had to take rest at home and didn't go to work out. My body get a bit slimmer. It's not good though. After I got better, I go hiking with friends and upgrading the CPU. Actually, these few weeks I was trying to get an AMD's Althon XP CPU which was out of stock. I gave up in this week and got a Sampron. Another thing I wanted to get was a Palm T3 which was again out of stock. I am considering if I should by T5 instead.
This week, I finally started trying to swim. Rocky now is my "couch" preventing me from drowning. Even just one day, I thought I had the key to swim.
Today, we went to Leo's home to play video games and having dinner together. It's a tired but enjoyable day. Rocky and I almost missed a bus when going there. However, we still miss the stop to get off the bus. Luckily, Michael and Sammi were still enjoying their lunch.
Interesting enough, we missed the bus of the back trip. We then take the MTR to get back home. When getting the last trip of the train, we missed the train again.
Sunday, January 2, 2005
Summary of These Two Weeks
Xmas eve - Had a party with colleague, then friends.
Day after boxing day - BBQ with other friends, dinner with yet some other friends. It's a great day.
New year eve - tried to buy T3. However, it seems that it was totally out of stock.
Plan on 2005 - Study. Start profiling my financial status, again.
Day after boxing day - BBQ with other friends, dinner with yet some other friends. It's a great day.
New year eve - tried to buy T3. However, it seems that it was totally out of stock.
Plan on 2005 - Study. Start profiling my financial status, again.
Monday, December 20, 2004
Social Gathering
Last Saturday, I went to a colleague house club for a gathering. I played badminton, someone played squash. Then we had dinner and chatting together. It is quite enjoyable.
Vacation
It has been a long time I didn't take any leave. After two days of rest, I am really energized.
Exam
I took a two-day leave to study for the exam last week. The overall performance is good. However, I missed a 20-point question. Hope I can still get an A in this class.
Friday, December 10, 2004
Sick
I don't feel quite well since yesterday. However, I need to hold an important meeting this morning. So, I take off as soon as the meeting is done.
Another Colleague Leaving
One of my colleague is leaving the company as he does not want to keep implementing the always on-going project, which I am currently the project manager. I will not be the manager next month. However, he is a smart guy and very helpful. So, after next month, all old team member is gone. New manager, new developers, and new policy will take care the project soon.
Sunday, December 5, 2004
Final Decision
Everything seems going smoothly. I can work as a valuable part-time in the company about half of the day each day. So, starting from next month, I will have plenty of time to execute my plan.
I'll start learning swimming. Maybe going to take some Japanese course. Pressure will be much relieved.
I'll start learning swimming. Maybe going to take some Japanese course. Pressure will be much relieved.
Friday, December 3, 2004
Tension Relieved
I've told my intention on Tuesday. It turns out that my reasoning is based on some false assumption. Even though my time is still a constraint, I can choose to perform another role in the company. A role that can take less time. I can even choose to be a part-time, too.
As there are too many possibilities, it will take some time to think about it.
As there are too many possibilities, it will take some time to think about it.
Tuesday, November 30, 2004
The Intention of Leaving
I think it's about time to leave the company. I found that my job duty is going to be worthless. Even my manager has no priority to meet me for more than a week. I think it is good though. I can focus more on my study and speed up my progress.
Sunday, November 28, 2004
The Last Day of Class
Today is the last day of class. Even though I've dropped the class, I loved to attend it. I just don't want to do the homework anyway.
Friday, November 26, 2004
Money Matters: The First Month Loses
I have been trying the invest on the stock market for about 5 months. The last two trading days of this month will not go up to much. So, I think this month, the fifth month, is the first month I losing the money.
The Future
I've work for this company for about 2 years. However, I found that the work load given by this company is torturing. Now, I need to be a project manager of an ERP project which has been also existing for about 2 years. I've have been already working on this project for 1.5 years, from implementation to current status.
Even though I am the project manager and there are another four team members, all of them have another projects on hand. No one can guarantee what can be done and what can't be done given a deadline. The schedule, which has been fixed, is simply means nothing.
I don't want to bear the risk of the project anymore. In fact, I don't want to be a project manager. Studying the degree already takes me so much time. Being a good project manager takes time. My life will be very hard in order to studying hard and work hard. As a matter of fact, I already need to withdraw a course in order to take care of the human resources changes of the project. I don't want this happening again. It's wasting my time and money.
Monday, I'll propose to my manager that either I'll not do any project management or I'll quit the job. Study now is my first priority. Almost nothing can change it.
Even though I am the project manager and there are another four team members, all of them have another projects on hand. No one can guarantee what can be done and what can't be done given a deadline. The schedule, which has been fixed, is simply means nothing.
I don't want to bear the risk of the project anymore. In fact, I don't want to be a project manager. Studying the degree already takes me so much time. Being a good project manager takes time. My life will be very hard in order to studying hard and work hard. As a matter of fact, I already need to withdraw a course in order to take care of the human resources changes of the project. I don't want this happening again. It's wasting my time and money.
Monday, I'll propose to my manager that either I'll not do any project management or I'll quit the job. Study now is my first priority. Almost nothing can change it.
Accomplishment
Today, I've finished the user interface implementation of table dependency finder, my new product. I used to develop software development tools. This is one of them. However, the company seems not quite need them.
Here's the pattern:
Here's the pattern:
- My colleagues always encounter some problems over and over again.
- There are tools available on the market.
- The tools are expensive.
- My colleagues solve them manually.
New Diary
I have stop writing diary for a long time. First, I am busy. Second, it's hard to maintain a site of diary 2-3 years ago. So, now here I am.
Subscribe to:
Posts (Atom)
Popular Posts
-
常言道,投票係最和平合法顛覆政權嘅方法。 如果我係林鄭,區選會如期,用緊急法立公投法,响投票當日投埋五大訴求邊樣要邊樣唔要。邊個係社會一小撮人,邊個係大多數就一目了然。 大家知有得投票,你話重需唔需要上街? 咁樣做,最少响投票日前,都唔會有大型活動,社會立即回復安寧。當然...
-
Project 一個一個完結,終於可以唔駛留响公司留到咁夜。
-
呢排興講港女港男,今次講吓醜女。 响香港,醜女被人叫豬扒,豬扒一詞係由黃子華把口講出嚟嘅,當年無線有套劇叫《男親女愛》。黃子華响一間律師樓做事務律師叫余樂天,under 鄭裕玲演嘅 Miss Mo. 有場戲,余樂天話 Miss Mo 係豬扒。Miss Mo 就當然會問乜嘢意思啦,...
-
香港有好多地方,都係填海填返嚟,差不多有個灣字嘅地方都真係一個海灣,當中包括柴灣同小西灣。 相傳當年柴灣附近盛產木材,可當柴燒,所以海灣因而得名。而柴灣亦有西灣呢個別稱,聽聞係因為呢兩個字响客家語嘅發音相近,翻譯員手文之誤而產生。睇返 1893 年嘅文件,柴灣的確係有 S...
-
一朝早去咗入境處見官,但其實唔使咁早去。個官問完父母有無入英藉,再問有無英國居留權,又問有無証明,但係幾十年前嘅事,本護照都掉晒,無 Proof, 無計。 攪完一單,到攪錢嘅問題,話說星期六拎唔到錢做 Apartment 嘅按金, 都真係唔好意思,但係業主真係好鬼死煩,日日响...
-
原來要去澳洲做嘢唔係太難,係時候考慮吓係咪要轉換環境。
-
乜嘢係 香港居民 ? 基本法第三章 第二十四條 香港特別行政區居民,簡稱 香港居民 ,包括永久性居民和非永久性居民。 香港特別行政區永久性居民為: ( 一 ) 在香港特別行政區成立以前或以後在香港出生的中國公民; ( 二 ) 在香港特別行政區成立以前或以後在香港...
-
話說徒弟仔去咗北歐睇完極光,會再留多陣。基於巨蟹座係一個心情比較唔穩定嘅人,就突然出咗飛過去探佢嘅念頭。另一方面,徒弟仔係一個比較隨意嘅人,其實問佢當刻,都未準備好之後嘅行程,所以提議咗之後,佢無反對。於是一個完全無計劃,口噏噏咁就出現咗一個唔存在嘅行程,問題係我請唔請到假同買唔...
-
一早起身,Facebook 俾「我的天文台」洗版。我印象中,細個嘅時候農曆新年都係差唔多嘅溫度,似乎和暖嘅氣候,令到寒冷嘅天氣變得特別。 亦因為咁,噚日開始,就有好多人去大帽山睇結霜... 結霜嘅嘢,打開雪櫃個冰格咪有囉,上大帽山睇個景又唔係特別靚,要睇靚嘅都係去外國睇啦! ...
-
美國同台灣係國家 Level, 香港係城市 Level. 一個城市去話一個大國乜乜乜,讉責物物物,一係就越權,一係就當自己係同一個層次 (Maybe 當自己係國家? 國安法 Please). 退一萬步嚟講,裴洛西係國會嘅議長,係美國最高立法權力單位嘅最高領導,最多都係特首發個聲明...