依靠语言和依靠图书馆
What fun I'm having. I'm collaborating on a project for work. We're still using Visual Studio 2003 and .NET 1.1, but we're still wildly productive.
我有什么乐趣。 我正在合作一个工作项目。 我们仍在使用Visual Studio 2003和.NET 1.1,但我们的生产力仍然很高。
One interesting thing I've learned is that I lean on the libraries, while Paul, my counter-part leans on the language. He knows what language constructs to use and I know what BCL methods to use. Together we make an effective pair, but this realization helped us both better understand our weak areas. One can write lots of C in C#, if you know what I mean.
我学到的一件有趣的事情是,我依靠图书馆,而我的对口保罗则依靠语言。 他知道使用哪种语言构造,我知道使用哪种BCL方法。 我们在一起创造了有效的一对,但是这种认识帮助我们俩更好地了解了我们的薄弱环节。 如果您知道我的意思,则可以用C#编写很多C语言。
Do you lean on the language or the libraries?
您是依靠语言还是图书馆?
We've been doing some fun stuff with XML lately, you might have noticed. We've used:
您可能已经注意到,最近我们一直在用XML做一些有趣的事情。 我们使用了:
XmlBookmarkReader - An XmlReader implementation that lets you rewind. A Helena Kupková production.
XmlBookmarkReader-一个XmlReader实现,可让您倒带。 HelenaKupková的作品。
StringWriterWithEncoding - A StringWriter that is a schtickle smarter about text encoding.
StringWriterWithEncoding-一个StringWriter,它对文本编码更为熟练。
Abstract BoilerPlate HttpHandler - Re-ripping off Phil's Improved Rip-off of me.
Abstract BoilerPlate HttpHandler-重新窃取Phil改进后的Rip-off。
- XmlFragmentWriter - Serializing objects to fragments of XML.XmlFragmentWriter-将对象序列化为XML片段。
- XmlNamespaceUpgradeReader - Deserializing objects from fragments of XML.XmlNamespaceUpgradeReader-从XML片段反序列化对象。
- SgmlReader - An XmlReader implementation that reads in SGML and autocloses tags. Then SgmlReader -XmlReader实现,可读取SGML并自动关闭标签。 然后,we changed how the autoclosing worked.我们更改了自动关闭的工作方式。
- A cheesy-but-working-so-far-not-quite-SGML-writer-derived-from-XmlWriter-but-really-using-HtmlTextWriter. (Code below, for educational purposes)一个从XmlWriter派生出来的俗气但还算不错的SGML编写器,但确实使用了HtmlTextWriter。 (以下代码用于教育目的)
We've also used Helena's Xml Diff to do differences on the infoset, rather than the syntax.
我们还使用了Helena的Xml Diff对信息集(而不是语法)进行了区别。
Also. we're using:
也。 我们正在使用:
TestDriven.NET, NCover, NCoverExplorer with TDD
带有TDD的TestDriven.NET , NCover , NCoverExplorer
CodeRush with Refactor Pro
CodeRush与Refactor Pro
I awoke today to see that a new version of CodeRush and Refactor was released. It includes 11 new refactorings and my favorite new feature - it paints a tiny number to the left of each method that is the Cyclomatic Complexity for that method. Brilliant.
我今天醒来,看到发布了新版本的CodeRush和Refactor。 它包括11个新的重构和我最喜欢的新功能-它在每种方法的左侧绘制了一个很小的数字,即Cyclomatic Complexity 对于那种方法。 辉煌。
class KindOfPartialSgmlButMoreOfAnOfxXmlWriter : XmlWriter
class KindOfPartialSgmlButMoreOfOfOfOfXXmlWriter:XmlWriter
{
{
public KindOfPartialSgmlButMoreOfAnOfxXmlWriter(TextWriter w)
公共KindOfPartialSgmlButMoreOfOfOfOfXXmlWriter(TextWriter w)
{
{
_htmlWriter = new HtmlTextWriter(w);
_htmlWriter =新的HtmlTextWriter(w);
}
}
public override void Close()
公共重写void Close()
{
{
_htmlWriter.Close();
_htmlWriter.Close();
}
}
private Stack _tags = new Stack();
专用Stack _tags = new Stack();
private HtmlTextWriter _htmlWriter = null;
私人HtmlTextWriter _htmlWriter = null ;
private bool _suppressNextEndElement = false;
私人布尔值_suppressNextEndElement = false ;
private bool _suppressNextText = false;
私人布尔_suppressNextText = false ;
private string _previousElement = null;
私有字符串_previousElement = null ;
public override void WriteStartElement(string prefix, string localName, string ns)
公共重写void WriteStartElement(字符串前缀,字符串localName,字符串ns)
{
{
_htmlWriter.WriteFullBeginTag(localName);
_htmlWriter.WriteFullBeginTag(localName);
_previousElement = localName;
_previousElement = localName;
_tags.Push(localName);
_tags.Push(localName);
}
}
public override void WriteString(string text)
公共重写void WriteString(字符串文本)
{
{
if (_suppressNextText == false)
如果(_suppressNextText == false )
{
{
_htmlWriter.Write(text);
_htmlWriter.Write(text);
_suppressNextEndElement = true;
_suppressNextEndElement = true ;
}
}
}
}
public override void WriteEndElement()
公共重写void WriteEndElement()
{
{
string endtag = _tags.Pop() as string;
字符串endtag = _tags.Pop()作为字符串;
if (_suppressNextEndElement && endtag == _previousElement)
如果(_suppressNextEndElement && endtag == _previousElement)
{
{
_suppressNextEndElement = false;
_suppressNextEndElement = false ;
}
}
else
其他
{
{
_htmlWriter.WriteEndTag(endtag);
_htmlWriter.WriteEndTag(endtag);
}
}
}
}
public override void Flush()
公共重写void Flush()
{
{
_htmlWriter.Flush();
_htmlWriter.Flush();
}
}
public override void WriteWhitespace(string ws)
公共重写void WriteWhitespace(字符串ws)
{
{
_htmlWriter.Write(ws);
_htmlWriter.Write(ws);
}
}
public override void WriteRaw(string data)
公共重写void WriteRaw(字符串数据)
{
{
_htmlWriter.Write(data);
_htmlWriter.Write(data);
}
}
public override void WriteChars(char[] buffer, int index, int count)
公共重写void WriteChars( char []缓冲区, int索引, int计数)
{
{
_htmlWriter.Write(buffer, index, count);
_htmlWriter.Write(buffer,index,count);
}
}
public override void WriteQualifiedName(string localName, string ns)
公共重写void WriteQualifiedName(字符串localName,字符串ns)
{
{
_htmlWriter.WriteBeginTag(localName);
_htmlWriter.WriteBeginTag(localName);
}
}
public override void WriteEndAttribute()
公共重写void WriteEndAttribute()
{
{
_suppressNextText = false;
_suppressNextText = false ;
}
}
public override void WriteStartAttribute(string prefix, string localName, string ns)
公共重写void WriteStartAttribute(字符串前缀,字符串localName,字符串ns)
{
{
_suppressNextText = true;
_suppressNextText = true ;
}
}
public override void WriteRaw(char[] buffer, int index, int count)
公共重写void WriteRaw( char []缓冲区, int索引, int计数)
{
{
_htmlWriter.Write(buffer,index,count);
_htmlWriter.Write(buffer,index,count);
}
}
public override void WriteProcessingInstruction(string name, string text)
公共重写void WriteProcessingInstruction(字符串名称,字符串文本)
{
{
_htmlWriter.Write(text);
_htmlWriter.Write(text);
}
}
#region Stubs
#region存根
...here are overriden versions of everything else from XmlWriter, stubbed and not used. Removed for tidiness
...这里是XmlWriter中所有其他内容的替代版本,已存根且未使用。 因整理而移除
#endregion
#endregion
}
}
翻译自: https://www.hanselman.com/blog/leaning-on-the-language-and-leaning-on-the-libraries
依靠语言和依靠图书馆相关推荐
- 商品管理系统c语言功能模板,C语言课程报告图书馆管理系统可做模板套用.doc
课 程 报 告 课 程 名 称: 程序设计实践 专 业 班 级 : 学 生 姓 名 : 学 号 : 任 课 教 师 : 学 期 :2010-2011学年第二学期 课程报告任务书 题 目 图书信息管理系 ...
- c语言程序设计图书管理,C语言程序设计报告 图书馆信息管理系统
C语言程序设计报告 图书馆信息管理系统 2011 年第二阶段课程设计成果报告实训项目: 程序设计技术课程设计 学号: 0112959 姓名: 张麦华 专业: 信息管理与信息系统 实训日期:2011 年 ...
- c语言课程设计作业图书管理系统,C语言课程设计图书馆管理系统程序代码.doc
C语言课程设计图书馆管理系统程序代码.doc includestdio.h includewindows.h includestring.h includeconio.h define M 100 s ...
- c语言项目实践--图书馆管理系统
一.目的与要求 1.目的: (1)要求学生达到熟练掌握C++语言的基本知识和技能: (2)基本掌握面向对象程序设计的基本思路和方法: (3)能够利用所学的基本知识和技能,解决简单的面向对象程序设计问题 ...
- C语言课程设计——图书馆查询系统
为了方便图书查询,我们编写了这个图书馆查询系统,通过将图书的信息输入进这个系统,我们便可以直到图书的相关情况.图书管理员存入图书信息,使用者可以通过选项实现查询图书借阅信息,借取图书,归还图书,查看图 ...
- c语言编写的图书馆管理系统
总共有八个功能:1.借书,2.还书,3.查看图书,4.查询图书,5.增加图书,6.删除图书,7.学生借书情况查询,8.退出系统. #include <stdio.h> #include & ...
- C语言课程设计图书馆管理系统
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<ctype.h> // ...
- c语言图书信息图书馆销售系统,C语言图书销售管理系统.doc
.. PAGE 资料 目录 TOC \o "1-3" \h \z \u HYPERLINK \l "_Toc299616449" 图书销售管理系统设计 PAGE ...
- 辽宁大学软件工程C语言课设-图书馆图书管理系统
library.h #define RMAX 40 typedef struct bookinfo {int bookId;char name[20];double price;char borrow ...
- c语言课程设计图书馆管理系统例子,C语言课程设计图书馆管理系统源程序
审计. 消防执法执法工作轮换消防实践执法,晋升,重新培训退休关键时间同步场所审计机制,自我敦促自我约束,消防执法,自我保护. 1.3预防性消防督促当前的消防执法腐败涉及违法执法的呈上升趋势,从近年来的 ...
最新文章
- Android学习笔记18-自定义Seekbar拖动条式样
- Sql Server编程
- db_files 不要设置的太大,否则影响内存的使用
- 扩展Spring Batch –步骤分区
- outlook+app+android,微软Outlook Web App抢占Android平台
- ★LeetCode(196)——删除重复的电子邮箱(MySQL)
- “服务器发送了一个意外的数据包。received:3,expected:20“问题的解决方法
- 如何在 Mac 上的“地图”中自定地图视图?
- HDU1029 Ignatius and the Princess IV
- 三步教会你在solidworks中画铝型材
- Django项目部署到腾讯云服务器
- swift编程语言和c,Swift与Objective C对比:选择更快的开发语言
- 菜单栏、工具栏、状态栏——QT
- 兼顾时尚与商务? ThinkPad Z 重新定义“商务本”
- 13.华为秋招一二面
- ICCV2021|你以为这是一个填色模型?其实我是检索模型!
- 秉火429笔记之六按键检测
- Linux下tree命令的安装与使用
- 用python将中文/汉字写入文本文档或者从文本文档读取中文信息
- mybatisplus-性能分析插件