昨天在看一篇評論,說美國總統做什麼都改變不了大部分中產階層的命運。理據如下:
1. 大學生普及化,一般水平的人力資源充足,而需求卻沒有相對增加,使一般中產階級工種薪酬下降,而且惡性循環不斷。
2. 軟件業發達,企業軟件取蒂中產階級工種人手(如中級管理人員),高層工作效率因軟件發達而不斷上升,促使人手需求不斷下降。
那麼,要擺脫那惡性循環,除了是優秀人才,或是專業工作從業者,或是成功startup的核心團員。還有什麼正常途徑?扎鐵吧!
作為軟件行業從業員, 又如何擺脫厄運?
Monday, March 25, 2013
Laptop火牛點解咁大隻
Laptop本來的設計精要在於移動性,
但係好多laptop的火牛,都差不多是一罐可樂咁重( 最近習慣了用可樂做單位)。帶laptop出街 ,本來是1.5kg卻變了2kg,實在無耐。
點解火牛要咁大隻,唔可以好似Apple果D維他奶size?
我有谂過買多一隻牛,公司一隻屋企一隻, 咁就少左個藉口唔帶Laptop, 但又不想為一部舊laptop投入過多金錢… 你話人係不係總要犯賤?又要解決問題又不肯付出:P 還是多花一兩舊水,把懶惰的藉口抹去吧啦
點解火牛要咁大隻,唔可以好似Apple果D維他奶size?
我有谂過買多一隻牛,公司一隻屋企一隻,
Friday, March 08, 2013
SEO Tips: Abuse Github
NOTE: I'm not a SEO guy. If this post used wrong wordings, sorry for that. And, I'm not a native English speaker, don't blame my English writing :P And, I don't know whether someone has shared something similar :)
I have several pet projects hosted on github. And, I observed that Google give pretty high ranking to github repository. If a github repository has a homepage, that homepage will get benefits as well.
Thus, I carried out an experiment at https://github.com/mrkschan/github-seo-effect. I used the search terms "Github SEO effect" as the repository name and set the homepage that links to my blog post at http://mrkschan.blogspot.hk/2013/03/github-seo-effect.html
The result is pretty amazing. Here is a Google search result before I carried out the experiment (I was using Chromium private browsing, with links set to use "gl=us").
My blog post gets nowhere on the search result.
After a few days that I set the homepage to the blog post, the result becomes the following screencap.
My repository goes to the top of the search result. And, the blog post is on the first page of the Google Search :)
BTW, shall we abuse Github for SEO purpose? Try your search here: http://www.google.com/search?gl=us&q=github+seo+effect
I have several pet projects hosted on github. And, I observed that Google give pretty high ranking to github repository. If a github repository has a homepage, that homepage will get benefits as well.
Thus, I carried out an experiment at https://github.com/mrkschan/github-seo-effect. I used the search terms "Github SEO effect" as the repository name and set the homepage that links to my blog post at http://mrkschan.blogspot.hk/2013/03/github-seo-effect.html
The result is pretty amazing. Here is a Google search result before I carried out the experiment (I was using Chromium private browsing, with links set to use "gl=us").
My blog post gets nowhere on the search result.
After a few days that I set the homepage to the blog post, the result becomes the following screencap.
My repository goes to the top of the search result. And, the blog post is on the first page of the Google Search :)
BTW, shall we abuse Github for SEO purpose? Try your search here: http://www.google.com/search?gl=us&q=github+seo+effect
Friday, March 01, 2013
Github SEO effect
This is a blog post to experiment the hypothesis:
Google would give github repo pretty high ranking.
If a repo's README has a link to a page outside github, that page gets SEO bonus.edit: 20130308 If a repo's homepage has set to a web page, that page
would get SEO bonus from Google (I didn't carry out experiment on the
effect of the README yet). And, if the page links back to the github
repo, that's a plus.
Search google with the query "Github SEO effect" :)
Link: https://github.com/mrkschan/github-seo-effect
Result: http://www.google.com/search?gl=us&q=github+seo+effect
Google would give github repo pretty high ranking.
Search google with the query "Github SEO effect" :)
Link: https://github.com/mrkschan/github-seo-effect
Result: http://www.google.com/search?gl=us&q=github+seo+effect
Thursday, February 28, 2013
信念, Faith
男人問女人: "你有什麼信念嗎?"
女人問: "為什麼問這個問題?"
男人說: "別人說人不能沒有信念."
女人答: "我相信會找到一個愛我的人."
女人問: "那你呢?"
男人說: "我不知道."
朋友們, 你的信念是什麼?
Faith - (from thefreedictionary.com)
信念 - (from 中華民國教育部 - 重編國語辭典修訂本)
信仰不疑的意念.
我的信念? 可能是建立一個舒適的家 :)
女人問: "為什麼問這個問題?"
男人說: "別人說人不能沒有信念."
女人答: "我相信會找到一個愛我的人."
女人問: "那你呢?"
男人說: "我不知道."
朋友們, 你的信念是什麼?
Faith - (from thefreedictionary.com)
1. Confident belief in the truth, value, or trustworthiness of a person, idea, or thing.
2. Belief that does not rest on logical proof or material evidence.信念 - (from 中華民國教育部 - 重編國語辭典修訂本)
信仰不疑的意念.
我的信念? 可能是建立一個舒適的家 :)
Labels:
self
Thursday, January 31, 2013
很久沒寫
最近寫的, 不是生活相關的, 就是技術相關的, 缺少了思考的東西. 人像懶了, 笨了.
原因? 曾經想過會不會是生活太匆忙而給自己藉口不去思考東西/反思. 又會不會是習慣了 twitter 文化, 一切從簡? 那今天又為什麼在寫這篇廢話呢? 不是在 twitter 上寫句: o, i'm so lazy. 就行了嗎?
事原: 有位家人最近離開了這個世界, 我因而接觸到佛學的地藏王菩薩經. 裡面, 提到了無間地獄. 無間地獄在電影無間道被提及過: "明明我已晝夜無間踏盡面前路, 夢想中的彼岸為何還未到". 再加上最近有點迷失(even after i read the book "Life is what you make it" twice), 對無間地獄提起了點興趣. 剛坐車回家的時候, 在想如何去認識無間地獄. 忽然, 想起了在大學的時候, 學習道家文化時在這個 blog 寫了點東西. 到家了, 便走上這裡, 找找以前寫的東西. 期間, 我在看自己以前寫的東西. 整個過程很有趣. 因為我在嘗試認識從前的我. 看了, 發覺對從前的我很陌生, 而且這個過程很有趣 :)
為此有感而發, 在twitter文化驅使下寫了句 "regrets should be prevented, but reviewed is encouraged. http://mrkschan.blogspot.hk/2006/09/blog-post.html … my 1st blog :)". review的就是要多認識自己, regret的就是我的靈魂好像有一年時間消失了一樣.
想了一會, 我不想以後再後悔. 花少少時間, 寫一寫, 裝個讀書人.
原因? 曾經想過會不會是生活太匆忙而給自己藉口不去思考東西/反思. 又會不會是習慣了 twitter 文化, 一切從簡? 那今天又為什麼在寫這篇廢話呢? 不是在 twitter 上寫句: o, i'm so lazy. 就行了嗎?
事原: 有位家人最近離開了這個世界, 我因而接觸到佛學的地藏王菩薩經. 裡面, 提到了無間地獄. 無間地獄在電影無間道被提及過: "明明我已晝夜無間踏盡面前路, 夢想中的彼岸為何還未到". 再加上最近有點迷失(even after i read the book "Life is what you make it" twice), 對無間地獄提起了點興趣. 剛坐車回家的時候, 在想如何去認識無間地獄. 忽然, 想起了在大學的時候, 學習道家文化時在這個 blog 寫了點東西. 到家了, 便走上這裡, 找找以前寫的東西. 期間, 我在看自己以前寫的東西. 整個過程很有趣. 因為我在嘗試認識從前的我. 看了, 發覺對從前的我很陌生, 而且這個過程很有趣 :)
為此有感而發, 在twitter文化驅使下寫了句 "regrets should be prevented, but reviewed is encouraged. http://mrkschan.blogspot.hk/2006/09/blog-post.html … my 1st blog :)". review的就是要多認識自己, regret的就是我的靈魂好像有一年時間消失了一樣.
想了一會, 我不想以後再後悔. 花少少時間, 寫一寫, 裝個讀書人.
Labels:
self
Thursday, December 20, 2012
How to use Shovel with Django
Here is my attempt to use Shovel (Rake, for Python) in Django.
Shovel can be used as an alternative to Django built-in Command. The reasons to use Shovel instead of the Command are:
1. "Rake, for Python" sounds cool.
2. Shovel is light-weight.
3. I can find all tasks in one place (the shovel/ directory).
4. I hate writing a list of make_option.
5. I hate inheriting LabelCommand, BaseCommand, NoArgsCommand, etc.
Okay, you get it... The reasons to use Shovel are actually: (i) "Rake, for Python" sounds cool, and (ii) I am lazy.
I didn't use the term "replacement for Django Command" because we cannot simply invoke Shovel task in the Django codebase using django.core.management.call_command(). (But we can have work-around, like making a Command to proxy the call)
Let's get back to my attempt to mix the two. I placed the shovel/ folder inside the Django project.
And I setup the Django environment at the top of the Shovel task file.
NOTE 1: The name of Shovel task file cannot collide with any module/app name of the Django project.
NOTE 2: We can place the shovel/ folder outside the Django project but we have to use proper Python path and import statement (e.g. use `from themix.things.models import Thing` instead of `from things.models import Thing`).
My attempt can be found at - https://github.com/mrkschan/shovel-django-mix.
Shovel can be used as an alternative to Django built-in Command. The reasons to use Shovel instead of the Command are:
1. "Rake, for Python" sounds cool.
2. Shovel is light-weight.
3. I can find all tasks in one place (the shovel/ directory).
4. I hate writing a list of make_option.
5. I hate inheriting LabelCommand, BaseCommand, NoArgsCommand, etc.
Okay, you get it... The reasons to use Shovel are actually: (i) "Rake, for Python" sounds cool, and (ii) I am lazy.
I didn't use the term "replacement for Django Command" because we cannot simply invoke Shovel task in the Django codebase using django.core.management.call_command(). (But we can have work-around, like making a Command to proxy the call)
Let's get back to my attempt to mix the two. I placed the shovel/ folder inside the Django project.
djangoproject/ - manage.py - settings.py - urls.py - shovel/
And I setup the Django environment at the top of the Shovel task file.
try: # Load the django environment
import imp
import os
import sys
me = os.path.abspath(os.path.dirname(__file__))
module_info = imp.find_module('context', [me])
imp.load_module('context', *module_info)
except:
print >> sys.stderr, 'Cannot setup Python environment from context.py'
At last, the setup injects a directory to Python sys.path and use Django function to load the settings.py.
def setup_django_env(path):
from django.core.management import setup_environ
try:
module_info = imp.find_module('settings', [path])
settings = imp.load_module('settings', *module_info)
setup_environ(settings)
except ImportError:
msg = "Error: Can't find 'settings.py' in configured PYTHON_PATH", path
print >> sys.stderr, msg
sys.exit(1)
# assume shovel/ directory is placed at the same level of settings.py
setup_django_env(os.getcwd())
This is a common technique to integrate Django with other Python gears as well. By applying this technique, I can freely use any Django functions / models in Shovel.NOTE 1: The name of Shovel task file cannot collide with any module/app name of the Django project.
NOTE 2: We can place the shovel/ folder outside the Django project but we have to use proper Python path and import statement (e.g. use `from themix.things.models import Thing` instead of `from things.models import Thing`).
My attempt can be found at - https://github.com/mrkschan/shovel-django-mix.


