Ma shuwen

Ma shuwen的weblog,做最好的自己。

各位小盆友节日快乐

2月30日  星期一  晴

今天一天都没有出太阳,真不好,爸爸买回两条金鱼,养在水缸淹死一条,我很伤心。

老师评语:我也很伤心,我活了这么大,2月还从来没有遇上过一个30号呢!也从来没有见过不出太阳的晴天,更没见过会淹死的金鱼。

祝各位笑得很开心的小朋友六一儿童节快乐!

发这条消息证明两点:1、我还活着;2、我又有心情和精力去写点东西了。

看见的几个css制作小知识

  • CSS 的十六进制颜色代码缩写。习惯了缩写及小写,这才知道,原来不是推荐的写法,为的是减少解析所占用的资源。但同时会增加文件体积。孰优孰劣,有待仔细考证。
  • 无边框。推荐的写法是 border:none;,哈哈,我一直在用这个。 border:0; 只是定义边框宽度为零,但边框样式、颜色还是会被浏览器解析,占用资源。
  • 不要使用过小的图片做背景平铺。这就是为何很多人都不用 1px 的原因,这才知晓。宽高 1px 的图片平铺出一个宽高 200px 的区域,需要 200*200=40, 000 次,占用资源。
  • 慎用 * 通配符。所谓通配符,就是将 CSS 中的所有标签均初始化,不管用的不用的,过时的先进的,一视同仁,这样,大大的占用资源。要有选择的初始化标签。
  • 样式放头上,脚本放脚下。不内嵌,只外链。
  • 坚决不用 CSS 表达式。
  • 使用 引用样式表,而不是通过 @import 导入。
  • 一般来说,PNG 比 GIF 要小,小得多。再者,GIF 中有多少颜色是被浪费的,很值得优化。
  • 千万不要在 HTML 中缩放图片,一者不好看,二者占资源。
  • 正文字体最好用偶数,12px、14px、16px,效果非常好。特例,15px。
  • block、ul、ol 等上下留出至少一倍行距,左侧至少两倍行距,右侧随意。
  • 段落之间,至少要有一倍行距。
  • 强行指定某些元素的 line-height,正文 1.6 倍于文字大小,标题 1.3 倍。
  • 中文标点用全角。英文夹杂在中文中,左右空格,半角。
  • 中文字体的粗体和斜体,远离较好,利民利己。

排版的规则

1.在所有标点符号后面只加一个空格

2.恰当地使用破折号

3.使用真正的引号和单引号

4.对于所有大大写字母,使用稍小的字体

5.对于大写字母文字,或部分字母为大写同时大写字母尺寸稍小的文字,增大其字符间距离

6.在合适的地方尽量使用经典数字字体

7.在经典数字字体不能用的时候,对数字采用稍小的字号

8.不要过量使用粗体,仅仅在真正重要的少数文字上使用

9.尽量避免带下划线的文字风格

10.版权或商标声明的字体一般也用较小的,有时候小到50%,具体看字体如何

11.使用真正的省略号,而不是几个句号

12.勾选框的尺寸稍微用小一点

13.除了黑点风格的要点提示符号外,也考虑考虑其他的

14.在文本中使用行间空白字符提高可读性

15.Sans serif字体比serif要清晰

16.把正文字体比你想象的设小一个点

Google Chrome 浏览器--漫画书

Google Chrome 是 Google的浏览器项目; 这些漫画来自 Google, 是由Scott McCloud绘制的。 这些图片的传播要遵循“署名-非商业性使用”的创作共用协议

计算机编程的21条“规律”

每个有经验的程序员都知道,在软件开发中存在着一些规律。但是,破坏了这些规律并不会得到惩罚,相反会有些许奖励。

  • 1.任何一个程序一旦发布就意味着它已经过时了。
  • 2.让需求根据程序调整往往要比让程序根据需求调整来得容易。
  • 3.如果一个程序是有用的,那它必将被改变。
  • 4.如果一个程序是无用的,那它必须被注释。
  • 5.在任何一个程序里只有10%的代码会被执行。
  • 6.软件会无限扩张以占用所有的系统资源。
  • 7.任何有价值的程序都会包含至少一个错误。
  • 8.一个演示版的程序完美无瑕的几率和关注它的人数成反比,最终要花费的金钱的数量是原数量的平方。
  • 9.一个程序的致命错误要到其发布至少半年后才会被发现。
  • 10.不可检测的错误是无穷无尽的,并以各种形式存在;相反,可检测的错误从理论上讲是有限的。
  • 11.随着时间的推移,修正某个错误所需花费的精力会成指数级增加。
  • 12.程序的复杂度会一直增长,直到超出维护它的程序员的能力为止。
  • 13.一段你自己写的代码如果几个月不曾看过,那很有可能其他人也会写出相同的代码。
  • 14.在每个小程序里都会有一大段代码想要破壳而出。
  • 15.你越快开始编写代码,就会需要越长的时间。
  • 16.一个项目如果没有精心策划,那将需要比预期多出两倍的时间来完成它;相反的,如果项目是精心策划过的,就只需要多出一倍的时间。
  • 17.向一个落后于进度的项目添加程序员只会让项目更加落后于进度。
  • 18.一个程序的完成程度总在90%到95%之间。
  • 19.如果你让一团糟糕的代码自动化,那你就会得到一团自动化的糟糕的代码。
  • 20.建立一个连傻瓜都会使用的程序,而只有一个傻瓜才想要去使用它。
  • 21.用户直到他们使用了一个程序之后才知道他们究竟想要的是什么。

中国政治坐标系测试(北大未名版)

测试你是左派还是右派:中国政治坐标系测试
我的测试结果如下:

  • 政治立场坐标(左翼<->右翼)0.1
  • 文化立场坐标(保守<->自由)0
  • 经济立场坐标(左翼<->右翼)-0.7

结论,经济立场有点偏左。

附录:

秦晖:《极左、左派、右派、极右的区分与现状》

无头的三栏风格又回来了!

无头的三栏风格又回来了!

不知道对于这样的一个名字谁还有什么印象,之前我曾经share过这样的一个zblog的模板。这是我做过第一个zblog博客模板,也是唯一一个。制作的时间是刚来北京的2006年。

前一段把06年开始07年结束的一个blog和08年开始写的另外一个进行了合并,但是模板没有转过来,而是在网上随便找了一个。之所以没有转,主要是怕zblog升级了那么多版本,模板不好迁移。今天试了一下,没想到很容易就转过来。

转换过程修改了一下CSS文件,从中也看到了里面的很多不足和幼稚之处,但是毕竟那是两年前的东东,权且就当作怀旧一下吧。过几天抽时间我会把这个模板重写一下,以使代码更加简洁和规范,同时,我也会使页面自适应宽度,然后使页面的显示和展现能够更加美观。完成之后效果好的话我还会share出来给大家分享,有喜欢的到时候可以留意一下。

最好,贴一下CSS文件中之前的注释文件,算是自我怀旧一下吧。

/*
Title : Mashuwen.com CSS Style
Author : Ma Shu Wen
URL : http://www.mashuwen.com
Description : The first style of mashuwen.com
Created : June 18 2006
Copyright : Some Rights Reserved
PS:
Lastupdate:August 21 2008
*/

做最好的自己

新的一周的一天又快过去了,刚刚回到家中,没有做饭,晚点再吃吧。

周末的两天本想好好休息一下,然后去趟UCD书友会还书的,只是可惜,计划没有变化快。周六加了整整一天的班,直到晚上8点才回到家,还是强行走了,要不然估计晚上11点都回不了家的。害我家小猪在家待了一天都没有吃上饭,真的好心疼的。

周日一早起来去鸟巢看奥运会的女子马拉松比赛,由于机会难得,也就没有去睡懒觉。经过层层的安检之后到了鸟巢国家体育场,里面人很多,场面也很热烈。终于算是感受了一次奥运的气氛,真的很兴奋。不理解的是,那么多人拿了公司给的票,竟然没有去看比赛,真不知道这帮人怎么想的,不去看还抢着要票。

新的一周的第一天,感觉很累,也有点烦,希望明天尽快好起来吧。

克服自己的惰性,坚持,摆正好心态,不为没必要的事情生气,做最好的自己。

逝者如斯夫,不舍昼夜

两年前,我被赶出了来北京之后的工作的第一家公司,真正的原因不知道,只是人事的一个小女孩说我能力达不到公司的要求。

具体是这样的:我的试用期三个月已经满了,我提交了一份转正申请给我的领导,他说了句“先放这里吧”,然后就没下文了。过来几天他去外地出差,然后人事的小姑娘把我叫出去说跟我聊聊,问我“你感觉在这边工作怎么样?”我说,“还好啊,挺好的,感觉能够胜任的”。那小姑娘说了,“我通过别人的反应说你能力不行,达不到我们这里的要求”。我听明白了她的意思,说了一句“让我走是吧?没事,直说就好了。今天有点晚了,明天我过来交接一下后天就不来了!”

就这样,我离开了来北京后的第一家公司,也是我所下决心离开山东的理由,没有半点忧伤,只是对那个以山东人自居的东北人leader感到不齿。几天前,在QQ上面和他打招呼,他问我是谁,我说我是马树文,他说不认识。我说了句“三年前,化工报”,那人最终也就不开口了。

化工报的中国化工新闻网(现在的中化新网)是我来北京之后工作的第一个地方,也是工作的最不愉快的地方,离开两年的日子,留下几句牢骚,算是对当初的离开表达庆幸之感。

顺便说一句,在被赶出来的当天下午我就遇到了我上家公司的一凡,最终加盟了彩客,在那里度过了愉快的大半年时间,同时也学到了很多很多,为我最终加盟TOM奠定了技术的坚实基础。

逝者如斯夫,不舍昼夜~~~~~~~~~~~~~~~~~~~~~

15 Tools to Help You Develop Faster Web Pages

Response times, availability, and stability are vital factors to bear in mind when creating and maintaining a web application. If you’re concerned about your web pages’ speed or want to make sure you’re in tip-top shape before starting or launching a project, here’s a few useful, free tools to help you create and sustain high-performance web applications.

I’ve tried to include a wide variety of tools that are easy to use, and have tried to keep them as OS and technology-independent as possible so that everyone can find a tool or two.

1. YSlow for Firebug

YSlow for Firebug - Screenshot

YSlow grades a website’s performance based on the best practices for high performance web sites on the Yahoo! Developer Network. Each rule is given a letter grade (A through F) stating how you rank on certain aspects of front-end performance. It’s a simple tool for finding things you can work on such as reducing the number of HTTP request a web page makes, and compressing external JavaScript and CSS files. A worthwhile read is the Ajax performance analysis post on IBM developerWorks that outlines practical ways of using YSlow in your web applications.

2. Firebug

Firebug - Screen shot

 

Firebug is an essential browser-based web development tool for debugging, testing, and analyzing web pages. It has a powerful set of utilities to help you understand and dissect what’s going on. One of the many notable features is the Net (network") tab where you can inspect HTML, CSS, XHR, JS components.

3. Fiddler 2

Fiddler 2 - Screen shot

Fiddler 2 is a browser-based HTTP debugging tool that helps you analyze incoming and outgoing traffic. It’s highly customizable and has countless of reporting and debugging features. Be sure to read the "Fiddler PowerToy - Part 2: HTTP Performance" guide on the MSDN which discusses functional uses of Fiddler including how to improve "first-visit" performance (i.e. unprimed cache), analyzing HTTP response headers, creating custom flags for potential performance problems and more.

4. Cuzillion

Cuzillion - Screen shot

Cuzillion is a cool tool to help you see how page components interact with each other. The goal here is to help you quickly rapidly check, test, and modify web pages before you finalize the structure. It can give you clues on potential trouble-spots or points of improvements. Cuzillion was created by Steve Saunders, the ex-Chief Performance at Yahoo!, a leading engineer for the development of Yahoo’s performance best practices, and creator of YSlow.

5. mon.itor.us

mon.itor.us - Screen shot

monitor.us is a free web-based service that grants you a suite of tools for monitoring performance, availability, and traffic statistics. You can establish your website’s response time and set up alerts for when a service becomes unavailable. You can also set-up weekly, automated benchmarks to see if changes you’ve made impact speed and performance either positively or negatively.

6. IBM Page Detailer

IBM Page Detailer - Screen shot

The IBM Page Detailer is a straightforward tool for letting you visualize web components as they’re being downloaded. It latches onto your browser, so all you have to do is navigate to the desired site with the IBM Page Detailer open. Clicking on a web page component opens a window with the relevant details associated with it. Whenever an event occurs (such as a script being executed), the tool opens a window with information about the processes.

7. Httperf

Httperf is an open-source tool for measuring HTTP server performance running on Linux. It’s an effective tool for benchmarking and creating workload simulations to see if you can handle high-level traffic and still maintain stability. You can also use it to figure out the maximum capacity of your server, gradually increasing the number of requests you make to test its threshold.

8. Pylot

Pylot - Screen shot

Pylot is an open-source performance and scalability testing tool. It uses HTTP load tests so that you can plan, benchmark, analyze and tweak performance. Pylot requires that you have Python installed on the server - but you don’t need to know the language, you use XML to create your testing scenarios.

9. PushToTest TestMaker

PushToTest TestMaker - Screen shot

PushToTest TestMaker is a free, open-source platform for testing scalability and performance of applications. It has an intuitive graphical user interface with visual reporting and analytical tools. It has a Resource Monitor feature to help you see CPU, memory, and network utilization during testing. The reporting features let you generate graphs or export data into a spreadsheet application for record-keeping or further statistics analysis.

10. Wbox HTTP testing tool

Wbox HTTP testing tool - Screen shot

Wbox is a simple, free HTTP testing software released under the GPL (v2). It supports Linux, Windows, and MacOS X systems. It works by making sequential requests at desired intervals for stress-testing. It has an HTTP compression command so that you can analyze data about your server’s file compression. If you’ve just set up a virtual domain, Wbox HTTP testing tool also comes with a command for you to test if everything’s in order before deployment.

11. WebLOAD

WebLOAD - Screen shot

WebLOAD is an open-source, professional grade stress/load testing suite for web applications. WebLOAD allows testers to perform scripts for load testing using JavaScript. It can gather live data for monitoring, recording, and analysis purposes, using client-side data to analyze performance. It’s not just a performance tool – it comes with authoring and debugging features built in.

12. DBMonster

DBMonster - Code Screen shot

DBMonster is an open-source application to help you tune database structures and table indexes, as well as conduct tests to determine performance under high database load. It’ll help you see how well your database/s will scale by using automated generation of test data. It supports many databases such as MySQL, PostgreSQL, Oracle, MSSQL and (probably) any database that supports the JDBC driver.

13. OctaGate SiteTimer

OctaGate SiteTimer - Screen shot

The OctaGate SiteTimer is a simple utility for determining the time it takes to download everything on a web page. It gives you a visualization of the duration of each state during the download process (initial request, connection, start of download, and end of download).

14. Web Page Analyzer

Web Page Analyzer - Screen shot

The Web Page Analyzer is an extremely simple, web-based test to help you gain information on web page performance. It gives you data about the total number of HTTP requests, total page weight, your objects’ sizes, and more. It tries to estimate the download time of your web page on different internet connections and it also enumerates each page object for you. At the end, it provides you with an analysis and recommendation of the web page tested – use your own judgment in interpreting the information.

15. Site-Perf.com

Site-Perf.com - Screen shot

Site-Perf.com is a free web-based service that gives you information about your site’s loading speed. With Site-Perf.com’s tool, you get real-time capturing of data. It can help you spot bottlenecks, find page errors, gather server data, and more - all without having to install an application or register for an account.

分页:[«]1[2][3][4][5][6][7][8][9][10][11][12][13][14][15][»]

Powered By Z-Blog 1.8 Arwen Build 81206 Code detection by Codefense

Copyright © 2009 mashuwen.com All Rights Reserved. 鲁ICP备06004530号