| 晓天's profile心田上,梦园中PhotosBlogLists | Help |
|
November 21 谈论 Celebrity Collage by MyHeritageJuly 17 新加坡之行印象1) 香港机场的巧克力是白菜价,Cadbury很大很大的一板只要12港元。 2) 新加坡环境真的不错,绿化很好! 3) 新加坡有数不清的印度人,潮水一般。不过严格的讲可能里边有不少都是新加坡籍的,我们有次打车一个印度人模样的出租车司机说他爷爷的爷爷就来新加坡了。。 4) 新加坡地铁站的扶梯速度要比国内快好多,足见他们的生活节奏也挺快。而且换乘很方便, 5) 到处都是罚款的警告,什么在地铁上吃东西罚款500新元,乱贴广告罚款1000新元...印象最深的是公交车上贴个大牌子,禁止带榴莲上公交,违者罚款1000新元 -_- 6) 到的时候王斌夫妇去接的我们,晚上去IMM吃斯里兰卡大闸蟹,席间互换八挂消息,感觉超级好~~他们两口子小日子过的也很甜蜜,很滋润的 ^_^ 7) 遗憾的是姚岱小朋友回国了,没有见到白雪公主和七个小矮人的现实翻版,那可是一个帅哥和七个空姐! 8) 三天内在大街上一个交警都没有看到..... 9) 新加坡的汽油卖的比美国都贵,一升要10+人民币,养个车简直烧钱...... 10) 传说新加坡小强比较多,这次去看真没看到,倒是在我们住的condo看到只壁虎,忽然想起原来在mysore的时候宿舍门口整天有青蛙蹦来蹦去。唉,相比之下中国生态环境真的有点%^&* 11)房子真***贵,他们房价和平均工资的比例似乎比上海高好多,看来上海房价还有很大的上升空间! 12)夜间打了个车被加收了50%的服务费 13)CATHAY航班上的冰淇淋是哈根达斯的!! June 23 Python study notes 61 Regular Expressions
a) Regular expressions are a powerful and standardized way of searching, replacing, and parsing text with complex patterns of characters.
b) In python, all functionality related to regular expressions is contained in the re module.
c) The $ means "end of string", the caret ^ means "beginning of the string"
d) \b means "a word boundary must occur right here", in python, the '\' character in a string must itself be escaped.
e) To work around the backslash plague, you can use what is called a raw string, by prefixing the string with the letter r. This tells Python that nothing in this string should be escaped.
f) M? optionally match a single M character.
g) Pattern in parenthese defines a set of exclusive patterns, separated by vertical bars. (CM|CD|D?C?) etc.
2 Using the {n,m} Syntax
a) ^M{0,3} means match the start of the string, then anywhere from zero to three M characters, M{3} means exactly three times.
b) There's no way to programmatically determine that two regular expressions are equivalent.
3 Verbose Regular Expressions
a) a Verbose Regular Expression is different from a compact regular expression in two ways: Whitespace is ignored. Comments are ignored.
b) A comment in a verbose regular expression starts with a # character and goes until the end of the line
c) When using verbose regular expression, you need to pass an extra argument when working with them: re.VERBOSE.
d) \d means any numeric digit(0 through 9)
e) putting pattern in parenthese means remember them as a group that I can ask for later.
f) to access the groups that the regular expression parser remembered along the way, use groups() method on the object that the search function returns. It will return a tuple of however many gourps were defined in the regular expression.
g) \D means any character except a numeric digit, and + means 1 or more
h) * means zore or more characters. June 20 Python study notes 51 Handling exceptions
a) Python uses try...except to handle exceptions and raise to generate them.
b) A try...except block can have an else clause, like an if statement. If no exception is raised during the try block, the else clause is executed afterwards.
2 Working with File Objects
a) Python has a built-in function, open, for opening a file on disk. open returns a file object, which has methods and attributes for getting information about and manipulating the opened file.
b) The open method can take up to three parameters: a filename, a mode, and a buffering parameter. Only the first one, the filename, is required.
c) The mode attribute of a file object tells you in which mode the file was opened.
d) The name attribute of a file object tells you the name of the file that the file object has open.
e) The tell method of a file object tells you your current position in the open file.
f) The seek method of a file object moves to another position in the open file. The second parameter specifies what the first one means.
g) The read method reads a specified number of bytes from the open file and returns a string with the data that was read. The optional parameter specifies the maximum number of bytes to read.
h) The closed attribute of a file object indicates whether the object has a file open or not. To close a file, call the close method of the file object.
i) try...finally block: code in the finally block will always be executed, even if something in the try block raises an exception.
j) There are two modes for writing to files: "Append" mode will add data to the end of the file, "Write" mode will overwrite the file. "Append" works even if the file didn't exist, it will create the file if necessary.
3 Iterating with for loops
a) syntax of iterating a list: for s in li: syntax of doing a normal counter: for i in range(n):
b) range produces a list of intergers
c) os.environ is a dictionary of the enviroment variables defined on your system.
4 Using sys.modules
a) you can always get a reference to a module through the global dictionary sys.modules
b) The sys module contains system-level information, such as the version of Python you're running, and system-level options
c) sys.modules is a dictionary containing all the modules that have ever been imported since Python was started. The key is the module name, the value is the module object
d) Given the name(as a string) of any previously-imported module, you can get a reference to the module itself through the sys.modules dictionary
e) Every Python class has a built-in class attribute __module__, which is the name of the module in which the class is defined.
5 Working with Directories
a) os.path is a reference to a module -- which module depends on your platform
b) expanduser will expand a pathname that uses ~ to represent the current user's home directory
c) The split function splits a full pathname and returns a tuple containing the path and filename
d) splitext splits a filename and returns a tuple containing the filename and the file extension
e) The listdir function takes a pathname and returns a list of the contents of the directory
f) os.path.isfile takes a pathname and returns 1 if the path represents a file, and 0 otherwise.
g) use os.path.join can ensure a full pathname
h) isdir function returns 1 if the path represents a directory, and 0 otherwise.
i) whenever possible, you should use the functions in os and os.path for file, directory, and path manipulations. These modules are wrappers for platform-specific modules
j) The glob module takes a wildcard and returns the full path of all files and directories matching the wildcard.
k) nested functions can be called only from the function in which it is defined.
June 19 看了5章dive into python最深刻的感想Python is a damn well flexible, simple and efficient language!
据说youtube是用python写的,有没有人能证实一下 Python study notes 41 Importing modules using from module import
a) syntax: from object import object, the attribute and methods of the imported module types are imported directly into the local namespace.
b) from module import * in Python like import module.* in java
c) If you access attributes and methods from a module very often, or if you want to selectively import some attributes or methods but not others, use from module import
2 Defining classes
a) Python is fully object-oriented: you can define your own classes, inherit from your own or built-in classes, and instantiate the classes you've defined.
b) syntax: class Name:
c) pass is a Python reserved word that just means "moving along, nothing to see here". The pass statement in Python is like an empty set of braces({}) in Java or C
d) In python, the ancestor of a class is simply listed in parenthese immediately after the class name. syntax: class FileInfo(UserDict):
e) Python supports multiple inheritance. In the parentheses following the class name, you can list as many ancestor classes as you like, separated by commas.
f) __init__ is called immediately after an instance of the class is created. It would be tempting but incorrect to call this the constructor of the class.
g) The first argument of every class method, including __init__, is always a reference to the current instance of the class. By convention, this argument is always named self. In the __init__ method, self refers to the newly created object; in other class methods, it refers to the instance whose method was called. You do not specfic this argument when calling the methodl; Python will add it for you automatically.
h) you must explicitly call ancestor's __init__ method if needed.
i) __init__ method never returns a value.
j) __init__ method are optional, but when you define one, you must remember to explicitly call the ancestor's __init__ mehtod(if it defines one)
3 Instantiating classes
a) Instantiating classes in Python is straightforward. To instantiate a class, simply call the class as if it were a function, passing the arguments that the __init__ method defines. The returned value will be the newly created object.
b) In general, there's no need to explicitly free instances, because they are freed automatically when the variables assigned to them go out of scope.
c) Python keeps a list of references to every instance created.
d) Python supports data attributes. Data attributes are pieces of data held by a specific instance of a class
e) Python has no form of function overloading
f) Python supports data attributes, they are pieces of data help by a specific instance of a class
4 Special class methods
a) __setitem__, __getitem__ Called to implement assignment to
self[key]. Same note as for __getitem__b) When accessing data attributes within a class, you need to qualify the attribute name: self.attribute.
c) When calling other methods within a class, you need to qualify the method name: self.method
d) When a subclass has no __init__ method of its own, Python walks up the ancestor and finds the __init__ method
e) __repr__ is a special method that is called when you call repr(instance). The repr function is a built-in function that returns a string representation of an object.
f) __cmp__ is called when you compare object, Python will call your __cmp__ when you use == to compare objects
g) __len__ is called when you call len(instance). The len function is a built-in function that returns the length of an object
h) __delitem__ is called when you call del instance[key]
i) To compare the physical memory location, use object1 is object2, to compare value, use ==
j) The __call__ method lets a class act like a function, allowing you to call a class instance directly.
5 Class attributes
a) class attributes are available both through direct reference to the class and through any instance of the class
b) In python, only class attributes can be defined immediately after the class definition, data attributes are defined in the __init__ method
c) There are no constants in Python, everything can be changed if you try hard enough
6 Private functions
a) If the name of a Python function, class method, or attribute starts with (but doesn't end with) two underscores, it's private. Everything else is public
b) Python has no concept of protected class methods.
c) In Python, all special methods (like __setitem__) and built-in attribute (like __doc__) follow a standard naming convention: they both start with and end with two underscores.
June 18 Python study notes 31 Using optional and named arguments
a) Python allow function arguments to have default values, if the function is called without the arguemnt, the argument gets its default value
b) Pattern: def info(object, spacing=10, collapse=1):, object is required, spaceing and collapse are optional
c) In Python, arguments can be specified by name, in any order
2 Using type, str, dir and other built-in fuctions
a) The type function returns the datatype of any arbitrary object.
b) type takes anything: integers, strings, modules, functions....
c) The str function coerces data into a string. Every datatype can be coerced into a string
d) dir returns a list of the attributes and methods of any object: modules, functions, strings, lists, dictionaries...
e) the callable function takes any object and returns True if the object can be called, or False otherwise. Callable objects include functions, class methods, even classes.
f) type, str, dir and all the rest of Python's built-in functions are grouped into a special module called __builtin__, python will automatically import it.
3 Getting object references with getattr
a) you can get a reference to a function without knowing its name until run-time, by using the getattr function
b) Pattern: getattr(object,"name")
c) getattr isn't just for built-in datatypes. It also works on modules.
d) A common usage pattern of getattr is as a dispatcher
e) getattr has a third argument, it is a default value that is returned if the attribute or method specified by the second argument wasn't found
4 Filtering Lists
a) Mapping lists is combined with a filtering mechanism, where some elements in the list are mapped while others are skipped entirely
b) pattern: [mapping-expression for element in source-list if filter-expression]
c) count is a list method that returns the number of times a value occurs in a list
5 The peculiar nature of and and or
a) and and or perform boolean logic as you would expect, but they do not return boolean values; instead, they return one of the actual values they are comparing.
b) When using and, values are evaluated in a boolean context from left to right. 0, ' ', [], {}, and None are false in a boolean context, everything else is true
c) If all values are true in a boolean context, and returns the last value
d) If any value is false in a boolean context, and returns the first false value
e) If any value is true, or returns that value immediately.
f) If all values are false, or returns the last value.
g) or evaluates values only until it finds one that is true in a boolean context, and then it ignores the rest.
6 Using lambda function
a) Python supports defining one-line mini functions on the fly.
b) Pattern: lambda x: x*2 no parentheses around the parameter and no return keyword
c) split without any arguments split on whitespace.
d) ljust(n) pads the string with spaces to the given length. If the given length is smaller than the length of string, ljust will simply return the string unchanged.
June 17 Python study notes 21 Dictionaries
a) One of Python's built-in datatype is the dictionary, which defines one-to-one relationships between keys and values.
b) A dictionary in Python is like an instance of the Hashtable class in Java
c) pattern: d={"key1":"value1","key2":"value2"} search pattern: d["key1"]
d) Assigning a value to an existing key will wipe out the old value
e) You can add new key-value pairs at any time. This syntax is identical to modifying existing values.
f) Dictionaries have no concept of order among elements and keys are case-sensitive
g) Dictionary values can be any datatype, the values don't all need to be the same type; Dictionary keys are more restricted, but they can be strings, integers and a few other types.
h) del lets you delete individual items from a dictionary by key, clear deletes all items from a dictionary.
2 Lists
a) A list in Python is like an instance of the ArrayList class in Jave
b) pattern: l=["value1","value2","value3"] search pattern: l[0]
c) A negative index accesses elements from the end of the list counting backwards. The last element of any non-empty list is always l[-1]
d) You can get a subset of a list, called a "slice", by specifying two indices. Starting with the first slice index, up to but not including the second slice index.
e) l[:n] will always return the first n elements, and l[n:] will return the rest, regardless of the length of the list
f) append adds a single element to the end of the list, it takes one argument, which can be any data type, and simply adds it to the end of the list
g) insert inserts a single element into a list.
h) extend concatenates lists, extend always takes a single argument, which is always a list.
i) index finds the first occurrence of a value in the list and returns the index, if the value is not found in the list, Python raises an exception.
j) To test whether a value is in the list, use in, which returns True if the value is found or False if it is not.
k) remove removes the first and only the first occurrence of a value from a list. If the value is not found, Python raises an exception.
l) pop removes the last element of the list and it returns the value that it removed.
m) len() returns the length of a list
n) list=list+otherlist has the same result as list.extend(otherlist), extend is faster
o) Python supports the += operator, and the * operator works on lists as a repeater.
3 Tuples
a) A tuple is defined in the same way as a list, except the the whole set of elements is enclosed in parentheses instead of square brackets, pattern: t=("a","b")
b) search pattern: t[0], slicing works too, just like a list.
c) you can't add/remove/find elements in a tuple. you can, however, use in to see if an elements exists in the tuple
d) Tuples are faster than lists. If you are defining a constant set of values and all you're ever going to do with it is iterate through it, use tuple
e) Tuples can be used as keys in a dictionary.
f) Tuples can be converted into lists using list(tuple), lists can be converted into tuples using tuple(list)
4 Declaring variables
a) When a command is split among sevaral lines with the line-continuation marker('\'), the continued line can be indented in any manner.
b) You never declare a variable, you just assign a value to it
c) The built-in range function returns a list of integers. It takes an upper limit and returns a zero-based list counting up to but not including the upper limit
5 Formatting Strings
a) Pattern: "%s=%s" % (a,b)
b) A comma after the last element is required when defining a tuple with one element. (a,)
c) Trying to concatenate a string with a non-string raises an exception
d) String formatting works with integers by specifying %d instead of %s
e) %f string formatting option treats the value as a decimal, and prints it to six decimal places. Some modifiers can be used to format the number
6 Mapping Lists
a) List comprehension provides a compact way of mapping a list into another list by applying a function to each of the element in the list
b) Pattern: [elem*2 for elem in li]
c) List comprehension do not change the original list, and it is safe to assign the result of a list comprehension to the variable you are mapping
d) items() function returns a list of tuples of all the data in the dictionary
7 Joining Lists and Splitting Strings
a) The join method joins the elements of the list into a single string, with each element separated by any string.
b) split reverses join by splitting a string into a multi-element list. The delimiter will be stripped out completely.
c) split takes an optional second argument , which is the number of times to split. anystring.split(delimiter,1) is very useful
June 16 Python study notes 11 Declaring functions:
a) Python has functions like most other languages, but it does not have separate header files like c++
b) It does not have interface/implementation mode like Pascal. When you need a function, just declare it like:
def function(param):
c) Functions doesn't not define a return datatype. It even don't specify whether or not return a value
2 Python's datatypes:
Python is a dynamically typed and strongly typed language.
3 Documenting functions:
Triple quotes signify a multi-line string:
def function(param):
"""doc string"""
4 Everything is an object
a) A function, like everything else in Python, is an object.
b) "import test" imports the test program as a module. When you want to use functions defined in imported module, you need to include the module name: test.func()
c) sys module is a built-in module written in C.
d) sys.path will list the search path it is looking for. You can add a new directory to Python's search path at runtime by appending the directory name to sys.path
e) Everything is an object in the sense that it can be assigned to a variable or passed as an argument to a function.
5 Indenting Code
a) Python function have no explicit begin or end, and no curly braces to mark where the function code starts and stops.
b) The only delimiter is a colon(:) and the indention of the code itself.
c) White spaces is significant and must be consistent.
d) Indenting starts a block and unindenting ends it.
e) Python uses carriage return to separate statements and a colon and indentation to separate code blocks
6 Testing modules
a) parentheses are not required around the if expression, if statement ends with a colon and is followed by indented code.
b) all modules have a built-in attribute "__name__". If you import the module, then "__name__" is the module's file name. If you run the module directly as a standalone program, the "__name__" will be "__main__". You can use this trick to develop and debug new modules before intergrating them into a larger program.
September 25 RCP中引入Web Browser RCP工程中import进org.eclipse.ui.browser包
打开Web Browser的代码片断:
其中createBrowser中style的参数在IWorkbenchBrowserSupport下
try { IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport(); IWebBrowser browser = support.createBrowser(IWorkbenchBrowserSupport.LOCATION_BAR|IWorkbenchBrowserSupport.NAVIGATION_BAR, "test", "test", "test"); browser.openURL(new URL(("http://www.google.com"))); } catch (PartInitException e1) { e1.printStackTrace(); } catch (MalformedURLException e2) { e2.printStackTrace(); } September 05 Eclipse CDTEclipse的CDT可以支持c/c++开发,对于很钟爱eclipse的c++ developer是个不错的选择。
不过CDT本身是不带编译器的,需要MinGW或者Cygwin支持。MinGW目前版本是5.1.3,SourceForge上有的下,但是默认是不带gdb的,必须手动下,否则没办法debug. (不过传说3.0的老版本是有gdb的)
CDT的纠错功能做的和vc一样差,远远比不上eclipse java IDE的纠错,Ctrl+1永远告诉你No Suggestion Available... 不过出错定位倒是做的还可以,但是也只能在build之后才能看到,不像java IDE那样随时出错随时报告。错误信息应该是依赖于编译器的。
代码提示似乎做的不全,std::endl竟然没有-_-!
继续体验.....
August 21 c++ roadmap 最近边写iBuild installer脚本边拼命从java向c++转型,今天看到一篇学习C++的文章,特转过来,也作为我的roadmap吧
什么时候才能修炼到文中的第六层呢....加油吧!
浅谈C++程序员的学习(zz)
C++,一个响当当的名字,自从贝尔实验室走出来之后,便成为了事实上的工业标准。即使在今天各种新技术不断涌现的年代里,作为一名专业程序员,掌握C++举足轻重。那么,我们该怎么深入的学习这一门语言呢?
第一方面当然是语法了。我认为对于语法,不应该去死记硬背,而应该透过语法现象看到语言的本质。关于语法这一部分,一本好书便能使我们事半功倍,在此我推荐《C++ Primer》和《The C++ Programming Language 》(中文名:C++程序设计语言),另外《Thinking in C++》(中文名:C++编程思想)也不愧为一本佳作。这三本书基本都是属于那一种讲述C++全貌的,所以只要认真研读一本基本就够了。
第二方面是C++的标准库,这一部分也是C++的精华所在,然而国内的很多C++ Fans竟然都不经常使用(^_^也包括本人在内),实在是浪费。通过这一部分的学习,不但可以在C++的应用中如虎添翼(尤其是STL),而且还可以加深对C++语法的理解。用C++标准库写出的程序不仅性能和效率高,而且移植性很好。因此,作对一个对C++深入学习的程序员来说,这一部分绝对不能错过。这部分我推荐《C++ STL》这本书!
第三方面是关于C++的一些经验之谈的,这一部分应该主要是个人的经验积累。不过如果有别人好的经验总结的话,我们为什么不直接吸收呢?有两本书不得不提,《Effective C++》和《More Effective C++》。
第四方面可以说是关于C++语法深层的机制,让我们深入了解C++的对象机制,更好的了解C++语法现象背后的本质。在这一方面我推荐的是《Inside C++ Object Model》(中文名:深入探索C++对象模型)。
第五方面是COM,COM作为今天很多大型软件的基础,发挥了很大的作用,理解了COM,对于学习OLE和ActiveX将是打下了坚实的基础。虽然COM不是C++所特有的,但通过C++,可以更好的阐述。当然在今天也有很多好的语言可以很好的描述COM,但通过C++学习COM可以让更加深入的了解COM,将来再学习其它语言的时候,在COM这一方面你将比其它的程序员理解的更深。况且现在很多好的COM书籍也是用C++描述的,国外的有《Inside COM》(中文名:COM技术内幕)和《Essential COM》(中文名:COM本质论),国内则有潘老师写的《COM原理与应用》,最好先看《Inside COM》或者《COM原理与应用》,之后再看《Essential COM》。
第六个方面是进行Windows程序设计,这估计也是C++学习和应用的一个主要方面了。学习Windows程序设计,除了Windows的基本编程思想和事件模型之外,重要的也就算学习库了,这里指的库主要包括三个,一个是基础的Win32API函数库,我认为这也是要掌握Windows程序设计不可不学的一个方面。另外要数到Microsoft公司的MFC类库和Borland公司的OWL类库了,关于两者的优劣就不说了,其实它们两个都是对Win32API函数的封装,不过除了封装Win32API之外,也加入了很多的特性和思想,而且一般情况下用C++开发Windows程序也都是用它们两个。关于用Win32API开发的好书当然是推荐Windows之父写的《Windows Programming》(中文名:Windows程序设计),关于MFC也有《Windows Programming with MFC》《MFC Windows程序设计》和候先生著的《深入浅出MFC》。另外MSDN也是学习Windows程序设计少有的好材料,内容丰富,功能强大!
当然C++也不是停止不前,在今年四月份,C++标准委员会又通过了十项程序库标准化议案。还有Microsoft在.NET中推出的Managed C++(托管C++),因此学习将是永远不止的事。
最后我想说的除了我们传统认为的技术之外,还有很多我们需要注意的地方。一方面是向关于编码规范的,在我看《C++编码规范》之前,认为编码规范无非就是起变量名和缩行,不过看后,才真正知道什么是编码规范。另外一个方面是关于设计模式的部分,这也是将C++升华的部分,《Design Patterns》(中文名:设计模式)不得不提,这也是从一个程序员到设计员的转变。还有向介绍C++的发展史的《The Design and Evolution of C++》(中文名:C++的设计和演化),更是带领大家通过时间的长河让我们又重温了C++的发展史,里面也回答了很多读者对于一些语法现象产生疑问的回答。以上的书大部分都是国外人所著,因此都有英文影印原版,如果英文好的读者还是看英文的好,即使英文不好的读者,也应该试着阅读原版的,万事开头难嘛!
可能有的读者会说,你懂行真多呀,其实我也只是将大家好的意见给放在一起,做个大家的话筒而已!有一些书其实我也没有看过(不好意思,书真的太多,再说俺的MONEY也不够呀),所以难免产生偏差。以上纯属个人观点,仅供参考。也做为对于我开始学习C++从其它前辈得好建议的一种感谢吧!! July 29 一年消费总结。。。。去年7月20号来上海,24号正式上班。。。奋斗一年。。。和mm两人消费粗略明细:
房租:1900*6 + 1330*6 = 19380 外加若干水电煤气费2000左右 共计21380
上网:130*12 = 1560
吃饭:和mm两人每天平均50(不夸张。。而且是吃食堂, 食堂套餐*4+早餐牛奶包子+零食水果什么的)外加周末腐败一把 一共平均每月2000 2000*12 = 24000
机票:回了4趟家,我平均每趟往返2000,mm回北京的机票便宜些1500左右,所以机票花费大概2000*4+1500*4 = 14000。 不坐火车主要考虑花费时间太多,我回家火车单程就得17个小时,最多7天假,这样两天就得扔路上了。。。。
超市:一般2周去一次家乐福,每次花费200,一年52周,剥去不在上海的时间就算去20回吧:200*20 = 4000
商场购物:主要是衣物鞋帽,平均每月算300吧(两件衣服吧),300*12 = 3600
旅游:刚来上海时把市内的有名的地方都转了转,一年内还去了趟无锡,南京,杭州,消费共计2000左右
电话费:我和mm两人每月共计100左右,100*12 = 1200
市内交通费:每月就算每人坐2次地铁往返加5次公交车(上班有班车,不过有时候赶不上):(4*2*2 + 5*2)*2*12 = 624
亲戚结婚上礼:1000
mm雅思考试:1500
书籍及shanghai daily:每月平均50吧,50*12 = 600
电影:和mm看电影两人一次要100,一年内看过变形金刚,加勒比海盗,蜘蛛侠,忍者神龟,茄菲猫,黄金甲:100*6 = 600
mm消费:化妆品,taobao上的小玩意,平均每月共100吧,100*12 = 1200
psp:买这个确实有点奢侈。。。不过给生活增添了不少乐趣。。。2000。。。
其他消费:节日消费(过年,情人节,生日.....),mm养的两只小仓鼠,生病等等等等消费,一共算2000吧
总计。。。。。。。。。。81264。。。。。。。。。。。。
总结:
1. 上海真是一个吃人的地方。。。。
2. 明年争取从机票,饮食,娱乐性消费上有所缩减 July 09 辞职信。。。Dear Sesh, Song, Freddy: It takes me lots of time to struggle on this decision of leaving Infosys. It is hard and making me feeling so sorry to you. I’ve been always dreaming to do the research work. But since Infosys is the greatest software outsourcing company in the world, it is mainly focusing on how a framework or tool can be used to fulfill the customer’s requirement rather than doing researching on new frameworks which can be reused by the whole IT industry. Now luckily a chance comes to me to realize my dream, and I just don't want to let it go. I think it is so nice that my managers are you who can definitely understand my feelings. So I really appreciate you kindly approve my resignation request. For the Maker Checker project, I think you definitely have the best team in HTDM: Griffin, Yu Liu, and Robin. I’ve transferred all my knowledge of this project to them and they have enough capability to make everything delivered along with high quality. For the SAMA SARIE Integration project, I’ve implemented all the core modules and everything is working fine in the integration test till now. If you agree, I wish I can help until July 31st which will be my last day in Infosys. I'll do everything to reduce the effect of my quit and make any work transition of this project smoothly. I gained a lot during the whole year in HTDM. You are always encouraging me and trusting me which makes me really moved. I always feel gratitude to you who give me those chances to apply my skills & passion to work. I just want to say “Thank you”. Thanks for your understanding. Best regards Lincoln July 07 跳槽充满了各种感情交织的跳槽之路终于有了答案,我也迎来了人生的下一站:National Instruments(美国国家仪器)
把这段经历记录下来,算是留念吧。
离开Infosys的念头起源于1个月前,不是因为薪水,不是因为项目做的不开心,是因为我看不到Infosys中国的未来。也许Murthy最初决定将Infosys这艘IT outsourcing的航母带入中国的时候也不曾想过Infosys会遇到今天这样大的困难:在Infosys在全球市场疯狂扩张,年收入超过20亿美元,年利润增长70%的时候,Infosys中国却暗淡的交上了一份亏损的年报。我深深的理解James和Ranga肩头现在所承受的压力:连年的亏损,居高不降的员工流失率,客户的报怨。面对这一切的一切,很遗憾,我看不到公司能拿出什么根治的解决方案。最初入住中国后在本土化过程中占略性的决策失败造成了今天无人可用的局面,也许10年以后Infosys中国会凭借自身的价格和项目管理优势在IT服务界打出自己的一片天,但我真的不愿意继续浪费掉我人生中最宝贵的10年在这里了。在6月初的某一天,我郑重地投出了我的第一份简历,开始了从最初焦虑,紧张,被鄙视到最后喜悦,收获的一个月.....
(一) SAP
SAP是我投的第一家公司,自己人在里边就是比较方便,Andrew和Jefferson帮了很大的忙帮我通过了candidates多如牛毛的java developer的简历筛选,在投出简历后一周后的一个上午,接到了SAP HR的电面,主要就是核对简历信息,简单的英文电面。由于语言是优势,轻松搞定。二面在不到一周之后,纯技术,也许是面试的人实在是太多了,技术问得很深,从J2SE问到设计模式,算法,加上面试管咄咄逼人的气势,发挥甚不理想,出来后估摸着就挂了。SAP的经理很好,友善的把我送出公司大门,一路上和我说着我的笔试题答得如何之好,英文如何之好之类的赞美之词,我也只能苦涩的笑笑。之后的一个星期便杳无音信,虽无据信,但也知是被鄙视了。
抱歉了Andrew和Jefferson, 没给你们挣到奖金了:)
(二) IBM
呵呵,又是IBM,与IBM似乎总是打断了骨头连着筋。从AIX,DB2的认证,到IBM的全国优秀学生,到SOA竞赛,到一年前和IBM的面试官跨国电面至今都还历历在目... IBM的确给了我很多,但似乎总是无缘走到一起。那次电面时面试官委婉的告诉我本科生进IBM很难做核心产品的研发,建议我考虑测试或是技术支持,我的坚持造成了最后的擦肩而过。这次托Jason帮忙内推也没有报很大的希望,而且投了两个对资历要求比较深的职位,所以最后面试都没有得到一点也不意外。
(三) HP
其实并不是太中意HP,只是最初看周围人都在面HP也就随意的投了一个职位。没想到第二天一早竟然收到据信...GF嘲笑我说她都把HP据了我却连个面试都没有...很是崩溃,不过上HP网站一看,原来这个职位人已招满,心理舒了口气....后来也没再投别的职位,插曲罢了。
(四) eBay
eBay是整个过程中经历时间最长的,前后8轮面试加一轮笔试。虽然最后拿到offer,但由于已经签了NI,觉得没有太大必要反悔,很抱歉的对eBay的HR说了sorry。也许eBay早两天给我offer, 我人生的下一站就是那里了。
其实eBay GDC是非常好的地方了,做的基本都是eBay核心框架和产品的研发,而且待遇不菲,我的offer里除去一份很有竞争力的薪水外还有大概价值18w的股票。更重要的eBay的人都很好,从前台接待到面试官到经理到HR,每一个人都在微笑的同我交谈。虽然最后放弃,但eBay真的是一个很好的地方。祝福eBay。
(五) 其他一些地方
还陆陆续续的投了一些地方:Google, 中国移动上海分公司, Morgen stanley IT部, Oracle, NCR. 最后由于各种原因都没什么太深入的接触。
(六) National Instruments
呵呵,终于到NI了。本来没有敢对NI产生任何的幻想,里边十有八九都是Top10名校中研究生里的尖子,而且和自己的专业背景又不大相符,职位所要求的C++更是放下好多年了,以至于在我走在去面试的路上都在考虑是不是不要去面了免得丢人。
可结果,这个世界是充满了意外的惊喜与奇迹的。在我走进NI公司的6个小时后,我收到了NI一份无法让人拒绝的offer。
NI给我最深的感触是他们的高效与对人的重视。一星期前某天晚上投了NI, 第二天一早便预约了电话面试。电面后2个小时接到第二轮面试安排。经历了连续5个多小时的车轮面试+机试的20分钟后,NI的经理通知我我被录用了。我相信这样的招聘效率对任何一家公司都是很难做到的。更难得的是,我是Java背景的developer,当我很坦诚的告诉他们我C++的水平时,他们告诉我他们相信我很快可以把C++学好。人在被鼓励和信任时是最容易被打动的,有了这样的信任,我丝毫不犹豫的做出了这次选择。
从二面开始到最后书面offer签字,一共不到24个小时。我职业生涯的新章,将从这里书写。
选择离开Infosys是很不舍的,尤其是在印度的7个月,交到了很多对我非常重要的朋友,更得到了我人生中的另一半。不管走到哪里,我都会铭记这段日子:我的第一次出国,我的第一份工作。祝福Infosys,祝福我在这里的朋友们,我爱你们。
August 10 锄草啦半年没更新了....................自己都觉得说不过去 -_-! 以后勤劳一点,大家常来玩啊
工作了大半个月,我还算比较幸运的,一进来就有项目做,还是两个一起...............一个是给沙特的中央银行做的支票跨行支付的系统,倒是不复杂,java swing,2年以前甚为熟悉,n个包都被我研究烂了,可无奈好长时间不写布局现在几天时间捡起来那个费尽阿,后来看griffin用eclipse的插件designner,托托拽拽就成型了......更是无休止的给我灌输Jgoodies有多流行,听得我不停感慨ide的发展速度.......想当初写什么都得用记事本阿..................pm说出了问题就得把你送到沙特去,听了一身冷颤 -_-!
另外一个是加拿大的NCR的一个监控模块,现在pm每天逼我做prototye. 两边时差12个小时,我们下班前做完给onsite的人,他们7点上班就看,等我睡醒了updated过的requirement就出来了,唉,完全轮轴转。不过技术贼无聊,他们用ps画好了ui扔过来,照葫芦画瓢coding就行了。
恩,上海的生活也蛮爽的,租了一套100+平米的房子,由于交通不便所以租金还算便宜,1900/m,不过我们上班骑车子才10分钟,每天下班自己做饭,锅碗瓢盆油盐酱醋,小日子过的还是很滋润地~~~~~
留个新的联系方式,没来的及联系的更新一下拉:
mobile: 13482222805
tel: 021-61055500-4148
home: 021-50799016
March 06 程序员该做的事(zz) 程序员每天该做的事 1、总结自己一天任务的完成情况 最好的方式是写工作日志,把自己今天完成了什么事情,遇见了什么问题都记录下来,日后翻看好处多多 2、考虑自己明天应该做的主要工作 把明天要做的事情列出来,并按照优先级排列,第二天应该把自己效率最高的时间分配给最重要的工作 3、考虑自己一天工作中失误的地方,并想出避免下一次再犯的方法 出错不要紧,最重要的是不要重复犯相同的错误,那是愚蠢 4、考虑自己一天工作完成的质量和效率能否还能提高 一天只提高1%,365天你的效率就能提高多少倍你知道吗? (1+0.01)^365 = 37 倍 5、看一个有用的新闻网站或读一张有用的报纸,了解业界动态 闭门造车是不行的,了解一下别人都在做什么,对自己能带来很多启示 6、记住一位同事的名字及其特点 你认识公司的所有同事吗?你了解他们吗? 7、清理自己的代码 今天完成的代码,把中间的调试信息,测试代码清理掉,按照编码风格整理好,注释都写好了吗? 8、清理自己的桌面 当日事当日毕,保持清洁干劲的桌面才能让你工作时不分心,程序员特别要把电脑的桌面清理干净 程序员每周该做的事 1、向你的老板汇报一次工作 让你的老板知道你在做什么,这很重要。可以口头、书面、邮件,看你老板的工作方式而定 2、进行一次自我总结(非正式) 这周之内自己表现得怎么样?该加分还是扣分? 3、制定下周计划 把下周要做的事情列出来,一样要分清楚优先级 4、整理自己的文件夹、书柜和电脑文件 把桌面以外的地方也要清理干净,电脑的文件夹,收到的邮件,把过时的垃圾全部清理掉 5、与一个非公司的朋友沟通 它山之石,可以攻玉 6、看一本杂志 找一本适合自己的专业杂志 7、纠正自己或同事一个细节上的不正确做法 《细节决定成败》看过了吗?没看过强烈建议先看看 程序员每月该做的事 1、至少和一个同事一起吃饭或喝茶 不光了解自己工作伙伴的工作,还要了解他们的生活 2、自我考核一次 相对正式地考核自己一下,你对得起这个月的工资吗? 3、对你的同事考核一次 你的同事表现怎么样?哪些人值得学习,哪些人需要帮助? 3、制定下月的计划,确定下月的工作重点 4、总结自己工作质量改进状况 自己的质量提高了多少? 5、有针对性地对一项工作指标做深入地分析并得出改进的方案 可以是对自己的,也可以是对公司的,一定要深入地分析后拿出自己的观点来。要想在老板面前说得上话,做的成事,工作上功夫要做足。 6、与老板沟通一次 最好是面对面地沟通,好好表现一下自己,虚心听取老板的意见,更重要的是要了解老板当前关心的重点 程序员每年该做的事 1、年终总结 每个公司都会做的事情,但你真正认真地总结过自己吗? 2、兑现给自己、给家人的承诺 给老婆、儿子的新年礼物买了没有?给自己的呢? 3、下年度工作规划 好好想想自己明年的发展目标,争取升职/加薪、跳槽还是自己出来干? 4、掌握一项新技术 至少是一项,作为程序员一年要是一项新技术都学不到手,那就一定会被淘汰。 掌握可不是看本书就行的,要真正懂得应用,最好你能够写一篇教程发表到你的blog 5、推出一种新产品 可以是一个真正的产品,也可以只是一个类库,只要是你创造的东西就行,让别人使用它,也为世界作点贡献。当然如果真的很有价值,收点注册费也是应该的 6、与父母团聚一次 常回家看看,常回家看看 February 19 MySqlyesterday i installed the MySQL database, here's some thought of differences between oracle and MySQL after a simple use of it.
size:
Oracle : 2.8G MySql: 64MB
memory cost:
Oracle : no idea, but the computer becomes extremely slow once you start the oracle server
MySQL: about 42MB
command syntax:
in Oracle the query syntax to display all the tables is "select * from tabs;" while in MySql it is "show tables".
data type:
the numeric type in oracle is "number" while in MySql is "int"
sql syntax:
i found the vendor of the two database gives different sql syntax, but there's not much differences.
in oracle the constraint specification can be added in the column specification or after the column specification:
CREATE TABLE
tbl_name(create _definition,......)create_definition:
column_definition [CONSTRAINT [symbol]] PRIMARY KEY for example
create table test(
a number constraint test_primary_key primary key
);
but in MySql most of the constraint specification can only be added after all the column definition.
CREATE TABLE
tbl_name(create _definition,......)create_definition: column_definition | <!--please pay attention here is a "|" --> [CONSTRAINT [symbol]] PRIMARY KEY (index_col_name,...)the equivalent syntax of the upper example:
for example
create table test(
a number,
constraint test_primary_key primary key (a)
);
here's some problems that i've ever faced during the last two days:
1: when you want to start the MySql server, an error message displays :could not start the service MySql4. Error: 0
solution:
First of all you have to remove the service, if it exists. From DOS prompt:
sc delete "name_service" Then you must remove the log files from mysql/data directory: *ib_logfile0 *ib_logfile1 *ibdata1 2: the jdbc driver of MySql is seperate from the MySql installation file, you need to down by yourself.
3: if you want to insert Chinese character into your table and find you are failed to do this, lunch the MySql instance config wizard, change the character set of your Database to "gb2312"
February 12 被alex点名
点名么。。。。先不点了,等我想起来了再说
|
|
|