[技巧]如何合理有效的整理电脑中的文件

2012年1月7日 没有评论

原文:How to Organize Your Computer

如果你的电脑里有很多图片,文档以及其他的文件,它们可能会非常杂乱,你找的时候很不方便。所以,为了自己使用电脑的方便,最好按照下面的方法合理整理、分组你的文件。下面的介绍是以 Windows 操作系统为例,不过,这种方法同样适合其他的操作系统:

    1. 了解容易混乱的几个地方 
      首先需要了解系统中最容易变得混乱的几个区域,这样你才能开始有针对地整理。在 Windows 中,通常比较混乱的区域是:

      • 桌面(Desktop)
      • 我的文档(My Documents)
      • 系统中用户的文件夹(X:Documents and SettingsXXX)
      • 个人下载目录(X:Downloads)
    2. 找到并删除你不再需要的文件
      使用电脑时间长了以后,有很多文件是你不会再去使用的,把你确定不再使用的文件删除掉。
    3. 把通用的文件存放在一个大的目录
      例如,使用“我的文档”,或者自己新建一个文件夹,把所有同类的文件和文件夹放在这一个大的文件夹内。这样方便备份和查找。
    4. 创建其他一些目录分类存放文件
      根据自己使用的习惯和要求,创建一些有意义的目录,这些目录分别存放相应分类的文件(夹)。例如,你可以在磁盘根目录或者某一个总的文件夹内,再创建“工作”、“个人”、“朋友”、“家庭”等分类。你也可以按照日期和时间,相关的人、活动事件,文件类型,地点等等分类。只要让目录看起来更容易识别,方便你找到即可。
    5. 创建子目录合理存放文件
      在已经分好类的文件夹中,如果文件还是很多的情况下,要尽量根据文件的属性,创建一些子目录,然后把相关的文件分别存放到子目录中。创建子目录要注意的问题是,不要创建层次很深的目录结构,这样反而会使查找更困难。
    6. 对整理的文件进行排序
      有的时候,你的文件名可能是一些毫无意义的名字,例如,你从网上下载的歌曲名称,有时候会是一些毫无意义的数字。通过排序和重命名,重新整理文件夹中的文件,使他们看起来更整洁,一目了然。

 

  1. 整理你的快捷方式
    电脑使用时间长了以后,在“桌面”、“开始菜单”和“快速启动”栏里会有很多很乱的快捷方式。这些快捷方式你不可能都需要吧?在“快速启动”栏里只需保留你最常用的几个快捷方式(例如:internet,我的文档,word,excel)。把其他多余的快捷方式从“开始”菜单中拖到桌面,然后,在桌面新建一个文件夹,存放桌面上的所有的快捷方式。打开这个文件夹,删除不需要的快捷方式,只保留常用的。这样,你的桌面和开始菜单看起来或更清爽,反应速度也会更快。
  2. 最重要的一点
    在你下载文件或者新建文件时,不要图方便,都放到了桌面。确保你把它们都放在了有意义的文件夹中,这样才能避免混乱,保持电脑的整洁有序。

技巧:

  • 在你操作完上面的步骤后,你应该执行一下“磁盘碎片整理”,因为你整理文件的过程中,文件的索引会改变,磁盘会产生很多的碎片文件。
  • 使用 Ctrl 或者 Shift 键,方便选择多个文件,进行删除和移动的操作。
  • 如果使用 Shift + Delete 组合键,会彻底删除文件而不进入回收站。如果回收站满了的话,再删除文件就会直接删除。
  • 如果你的“快速启动”栏没有在使用,可以右键单击任务栏,在菜单中选中 “工具栏” — “快速启动”。
  • 你可以在“开始”菜单中,打开“所有程序”,右键点击打开的开始菜单,在弹出的菜单中,点击“按名称排序”,这样可以对开始菜单中的快捷方式进行排序。
  • 整理桌面的快捷方式,你可以借助Windows桌面清理,看看哪些快捷方式最少被使用,然后再整理。
  • 在整理完系统后,你也可以借助其他的系统清理软件,清除系统运行时产生的垃圾文件,这样可以让系统更快地运行。

警告:

  • 不要删除你还会使用的文件
  • 不要删除其他用户或属于其他人的文件
  • 不要删除重要文件(夹),例如 C:WINDOWS 或者 Documents and settings 目录
  • 不要删除注册表项和系统文件
  • 不要试图去整理文件(夹)名为Temp 或者 Temporary的文件,因为这些是系统或者应用软件使用过程中存放临时文件的地方,这里的文件其实并不需要整理。如果你非要去重新排序,按照分类整理,估计会花上你够长的时间。
分类: 存档文章 标签:

如何成为“10倍效率”开发者

2012年1月6日 没有评论

Brad Feld 的一篇文章 The Rise of Developeronomics 中提到了“10倍效率的开发者(10x developer)”的概念(伟大的开发者的效率往往比一般的开发者高很多,而不只是一点点),Adam Loving 在读了之后受到启发,并向多位大牛(Ben Sharpe、Collin Watson 和 Jonathan Locke)询问如何成为“10倍效率的开发者”,最后得到了以下的答案。

1. 只做需要做的工作 Only do the work that needs to be done

  • 使用敏捷方法;
  • 全心全意做 UX 设计;
  • 沟通第一;
  • 编码也许不是解决问题的办法;
  • 过早的优化是一切罪恶的根源;
  • 选择最简单的解决方案。

  2. 站在巨人的肩膀上 Build on the shoulders of giants

  • 使用开源框架;
  • 使用简洁语言(如 HAML、Jade、Coffeescript);
  • 不要做重复的事情(不要重新发明轮子);
  • 利用包管理器来进行公共和私有代码分配;
  • 不要任凭巨头(如微软)的摆布而修复库中的一个 Bug;
  • 不要让你的雇主逼你学习;
  • 自主学习并为自己设定新的目标。

  3. 了解数据结构和算法 Know your data structures and algorithm

如果你不知道什么时候应该使用快速排序、不懂辨认O(n2)程序、不会写递归函数,你将无法成为 10 倍效率的开发者。使用多种语言你才能清楚不同的框架是如何解决相同问题的。尽可能去了解底层命令(plumbing),以便能够作出明智的决定(Web 框架是怎么存储 session 状态的?Cookie 到底是什么?)。

4. 不要怕买工具,它可以节省你的时间 Don’t be afraid of buying tools that save you time

Ben 说:“昨天我花 50 美元买了一个位图字体工具,它帮我节省的时间成本绝对超过 200 元。”

5. 集中注意力 Find focus

不要整天开着你的电子邮件、Twitter、Facebook 等,在工作时将它们最小化或关掉它们,戴上耳机。Tiny hack 说:“即使不听音乐我也戴着耳机工作,这样便不会有人打扰到我。”

6. 尽早并且经常性地进行代码重构 Refactor early and often

有时,你不得不放弃漂亮的代码转而去寻找真正对项目有用的代码,但没关系,如果你的现有项目中有这样的代码,最好的方式便是不要看它,并重构。

7. 只管去做  Just do it

将你的业余项目分享到 Startup Weekend 中。在我开始转到 Unix 和 Ruby on Rails 上之前,我买了一台 Mac,使用 Windows 虚拟机花了一年时间做 .NET 项目。

8. 挑选一个编辑器,并掌握它 Pick an editor and PWN it

高效开发者喜欢用文本编辑器胜过 IDE 编辑器,因为这样可以学到更多东西。无论什么情况,尽量使用键盘快捷键,因为熟练使用一件工具的前提是熟悉它。

在选择编辑器时,认真考虑并挑选最好的(Emacs 或 Vim),因为它们是通用的。其次,挑选你的首选平台最支持的。使用宏,不断地写代码;使用 Mac 上的 TextExpander 为整个段落创建快捷方式;使用 Visual Studio 或 SublimeText 的自动补齐功能;使用支持按行/列分割窗口的编辑器,这样你便能同时看到单元测试和代码(或模型、视图)。

一定要想清楚后再写代码。Adam 说,“我有朋友在一个大项目组里工作,他们组里最高效的程序员是一个高位截瘫用嘴叼着棍子敲代码的人,他总是在写代码之前想得很仔细且很少出错。”

9. 整洁的代码胜过巧妙的代码 Clearness beats Cleverness

要想让其他人能够读懂你的代码,尽量使用最少的代码来完成任务。遵循 DRY(Don’t repeat yourself)的原则,使用明确定义的对象和库,将任务分解成小而简单的代码段。

10. 潜意识是强大的工具  Your sub-conscience is a powerful tool

离开 10 分钟往往就可以解决一个问题。控制编程时间,给自己一个多姿多彩的生活,劳逸结合能让你在工作时更高效、更愉悦。当然,即便是上了年纪的程序员也知道,以最少的时间完成最高效的工作是成为 10 倍效率开发者的必要条件。

作为一个程序员,我觉得在职业生涯中最好的一件事儿就是从电脑前站起来,去拜访那些在某一领域有所建树的人们。

11. 推动自身和团队进步 Refine your process as a team

重视批评,以包容的态度接受批评并提升自己是非常重要的事情。没有这个基础,你不可能成为一个高效的开发者。一位智者曾经说过:“聪明的人善于从自己的错误中学习,而智慧的人善于从别人的错误中学习。”

英文原文:http://adamloving.com/internet-programming/10x-developers

1. Only do the work that needs to be done. Use the agile process. Involve yourself in UX design. Communicate first. Coding might not be the solution. Premature optimization is the root of all evil. Choose the simplest solution that solves the problem.

2. Build on the shoulders of giants. Use open source frameworks. Use shorthand languages (HAML, Jade, Coffeescript) to go faster. Don’t re-invent the wheel. Leverage package managers for public and private code distribution. Don’t be at the mercy of Central Command (i.e. Microsoft) to fix a bug in a library. And don’t wait for your employer to let you learn it. Learn it on your own, and get a new job that pays twice as much.

3. Know your data structures and algorithms. Our profession is open to self taught tradesmen, but you can’t be a 10x developer if you don’t know when to use quick sort, identify an O (n2) routine, or write a recursive function. Be multilingual – so you can see how different frameworks solve the same problems over and over again. Know enough about the plumbing to be able to make informed decisions (how is this Web framework storing the session state? What is a cookie actually).

4. Don’t be afraid of buying tools that save you time.  Ben says: “I bought a bitmap font tool yesterday for $50. It easily saved me more than $200 of my time.”

5. Find focus. Don’t keep your email open all day. Same for Twitter, Facebook, HackerNews, and Techememe.  Minimize interruptions during productive moments.  Close email, turn off chat, put headphones on… whatever it takes to not be interrupted. Tiny hack:  I wear headphones at work even though I don’t listen to music because people don’t interrupt me.

6. Refactor early and often. Kill your darlings.  Sometimes you have to throw out clever code to do what’s right by the project, but that’s OK. If you have to touch code on an existing project, always leave it better than you found it.

7. Just do it. Think small. Do your weekend project, participate in Startup Weekend. I bought a Mac and worked in a Windows Virtual Machine on .NET projects for a year before I was able to fully leap to Unix and Ruby on Rails.

8. Pick an editor and PWN it. Some 10x devs prefer text editors to IDE’s because they find they learn more without the crutches. In any case, learn your keyboard shortcuts. There’s no faster way to look something up than to know it.

When picking an editor — seriously consider one of the greats (emacs or vim), they’re universal. After that, pick the best/most supported editor on your preferred platform. Use macros. Write code that writes code. Use TextExpander on the Mac to create shortcuts for entire paragraphs. Use auto-completion in Visual Studio or SublimeText.

Use an editor that supports splitting your window into columns or rows. This way you can see your both a unit test and the code it is testing (or a model and view) at the same time.

But think before you type. A friend in a large group said that the most productive coder in their group was a paraplegic who used a mouth stick to type. He had to really think things out before he started typing, he only rarely made mistakes.

9. Clearness beats Cleverness. Write your code so that the next person can read it, not so it uses the fewest characters possible. Strive to adhere to the DRY (Don’t repeat your self) principle. Re-use clearly defined objects and libraries. Break work into clean interfaces between components and developers. Break the problem into small simple tasks.

10. Your sub-conscience is a powerful tool. Stepping away for 10 minutes is often all that is required to solve a problem. Treat your self to a diverse life and limit your coding time. You will be able to work more effectively during your coding time because it will be more enjoyable. Of course, us older developers also know that a minimum effective dose of physical fitness is also a prerequisite to being a 10x developer.

Human networking is more important than computer networking. Practice your pong. I often feel the best thing I ever did for my career as a programmer was to step away from the computer and go meet some movers and shakers.

11. Refine your process as a team. One of the biggest things is to really pay attention and to be wide open to criticism and changing and refining your process. You can’t become a 10x anything without that foundation because it will take you too long to get better at it. A wise man once said “A smart man learns from his mistakes, but the truly clever man learns from the mistakes of others.”

分类: 存档文章 标签:

.Net 中的 ThreadState

2012年1月6日 没有评论

ThreadState成员
导致状态更改的操作

分类: 存档文章 标签: , ,

WinForm退出程序的几个方法

2012年1月6日 没有评论

1.this.Close(); 只是关闭当前窗口,若不是主窗体的话,是无法退出程序的,另外若有托管线程(非主线程),也无法干净地退出;
2.Application.Exit(); 强制所有消息中止,退出所有的窗体,但是若有托管线程(非主线程),也无法干净地退出;
3.Application.ExitThread(); 强制中止调用线程上的所有消息,同样面临其它线程无法正确退出的问题;
4.System.Environment.Exit(0); 这是最彻底的退出方式,不管什么线程都被强制退出,把程序结束的很干净。

分类: 存档文章 标签:

一号软件工作室

2012年1月3日 1 条评论

一号软件工作室,专注于软件定制、软件开发、提供自动化软件解决方案

分类: 站内新闻 标签: