DSL, Can It Simplify The Complexity Of General Development? (1)

Do you know DSL technology? I think DSL is a bridge to adapt to the changing business logical rules and the stably need for the back system.

DSL,Domain Specific Language.

DSL, can it simplify the complexity of general development? Is there any ultimate weapon in the end? From DOS to the cloud, the software development is more and more complex.

Developing a visual web system, it very consume resource for customizing some business scenarios. Simple examples such as report center, each report needs to define data sources, presentation formats, and calculation rules, permissions, and so on.

Implement these features by the program to report developers is a good idea, A lot of commercial report products are also done. But I think the complexity of this system and the details that to consider are very complex.

We’ve used Oracle’s BIEE before, powerful but the user experience is very bad. The result is a long time to make a report. If you need to change something, most of the business logic needs the user who use the report tell to the programmer who develop the report.

Go round and begin again. Software for the public, even Microsoft Office, also needs the learning curve. And Microsoft does not customize function for common users, because Office has the powerful macro language VBA to do this.

We are going to make a new reporting system, but we do not provide a visual editing system, doesn’t provide the database connection tool, of course, there is no need for users to have too much knowledge of SQL.

Use DSL. Provide a simple description near the natural language, then by parsing, generate the reports that the user needs. The main work we have to develop is design the DSL and the parsing engine. Of course, a shell that contains the main function is still needed.

In fact, we have practiced on some report system, traditionally called Dashboard. From the concept to the present, it has been four years. In the latest project, through a slightly rough DSL, it is automated from the database to the interface. In the traditional sense, design web pages, cutting to html and css, and writing SQL are basically semi automated through the DSL. Thanks to my smart colleagues.

The next challenge is getting bigger. How to build a more easy to use DSL, used in more complex scenes, improve the efficiency of parsing and so on. We are not satisfied to only build web interface, stationary user features and connect database.

Easy to talk, these are many years of rethink on the design of a business system. The complexity and variability of the business logic of the system are the facts in addition to the familiar middleware and increasingly sophisticated and cloud technology.

Artificial intelligence can do too much other than face recognition, and the big data is not just the six letters of Hadoop. They are the real foundation of automation, reasoning and deduction.

Talk about it next time.


你知道 DSL 技术么?我认为 DSL 是适应目前多变的业务需求和需要稳定的底层系统的一座桥梁。

DSL,Domain Specific Language,领域特定语言。

DSL,是否可以简化常规开发的复杂度?到底是否存在终极武器?从 dos 年代到现在的云,开发越来越复杂。

开发一个可视化的 web 系统,来完成一些业务场景的定制,其实是非常耗费资源的。简单的例子如报表中心,每一份报表需要定义数据来源、呈现格式和计算规则、查看权限等,通过程序来实现这些功能,提供给报表制作人员的确是一个很好的注意,很多的报表类产品也是这样做的,但是我觉得这样系统的复杂度以及本身要考虑的细节非常之多。我们之前使用过 Oracle 的 BIEE,功能强大,但是用户体验很不好,造成的结果是制作一个报表的时间很长,如果需要修改的话,大部分的业务逻辑需要使用报表的人员向制作报表的人员提出,周而复始。面向大众的软件,即便是 Microsoft Office,也是需要学习曲线的,并且微软基本上也不会为用户来做功能定制,因为 Office 软件有强大的 VBA 来完成这些。

我们要做一个报表系统,但我们不是提供一个可视化的编辑系统,也不提供复杂的数据库连接工具,当然也不需要用户有太多 SQL 的知识。用 DSL,提供一种简单的接近自然语言的描述,然后通过解析,生成用户所需要的报表。我们开发这个系统的工作量主要是设计 DSL 以及解析引擎,当然一个包含主要功能的外壳还是需要的。实际上,我们已经在一些报表呈现,传统上所说的 Dashboard 上进行了实践,从概念到如今,也有四年之久,在最近的一个项目中,通过还略显粗糙的 DSL,从数据库连接到界面呈现,都自动化完成,传统意义上制作页面、切页面、写 SQL 都通过 DSL 的原理基本半自动化了。很感谢这些聪明的同事们。接下来的挑战自然越来越大。如何构造一套更加容易使用的 DSL、用在更加复杂的场景、提高解析效率等。只是用 DSL 来构造用户界面、固定的用户操作以及数据库连接,我们不太满足。

说说容易,以上这些是对于业务系统设计多年的反思,除了耳熟能详的那些中间件和越来越成熟也越来越复杂的云技术以外,系统业务逻辑的复杂和多变是事实,人工智能除了人脸识别以外可以做的事情太多了,而大数据不光是 hadoop 这六个字母,他们是真正的自动化、推理、演绎的基础。


Flake8 Rules

The standardization of writing in programming languages is very important, good programming practices can prevent a lot of bugs.

Python is a language with more freely formatting, so it’s important to follow the famous flake8 rules.

The following article explains in detail every rule of the Flake8, it’s worth learning.

The Big Ol’ List of Rules

I like Pycharm because it can automate monitoring of these rules, so we can write the elegant Python program.

Pycharm 2017.3 发布


Pycharm 就是这样一款产品。Pycharm 2017.3 今天正式发布了,这次主要提升的是各类性能、科学计算、Rest 调试工具等,详细情况可以到 JetBrains 官网查看。


最近开始尝试用 Go 语言来进行服务端的测试,我始终不太喜欢 Java 的啰嗦。JetBrains 的 Go 语言工具目前还是在测试中,希望能够尽快提升功能和稳定性,现在这样一个月一个的早期测试版本使用起来也不是很方便。

I always think it’s a wonderful thing to keep upgrades in an agile way, because of the continuous promotion of features and performance and the close to the market, the product will be very competitive.

Pycharm is such a product. Pycharm 2017.3 was officially released today. The main promotion is all kinds of performance improved, scientific computing, Rest debugging tools, and so on. The details can be examined on the JetBrains website.


Recently I started trying to test writing server with the Go language. I don’t love Java verbose. JetBrains’s Go language tool is still in the early beta test, hope to improve the function and stability as soon as possible. It is not very convenient to use an early test version that I need update every month.


Flask, Sanic and Eve, Three Good Web Frameworks For Python

Prepare to improve my English writing ability. I know my English is very stiff, grammar also has many problems. But I still try to persist it. Thanks and sorry for my poor English

In recent years, the performance of Python has been greatly improved. Base on highly asynchronous event processing ability, web framework of Python have been greatly improved. After continued follow-up.  I think the following frameworks are worth future study.

In normal working hours, We use Flask as a web service framework. So I have some preference for flask-like type.

  1. Flask. http://flask.pocoo.org/  We all know, flask has long history and has stable performance. It’s a micro framework and has a lots of extensions. So it’s lightweight and configurable. I believe we will continue to use flask as the mainly web service framework for a long time. The latest version is 0.12.2.
  2. Sanic. https://github.com/channelcat/sanic This is a magical tool, it’s improve the web service performance by using asynchronous technology by Python 3.5+. In practical application, I think flask is enough. Flask can easily do hundreds concurrent in basic server on the cloud. But I believe it, The performance improvement is endless. In particular, the introduction of more and more Micro-Services framework requires that web service framework has strong ability. Sanic web framework much like flask, therefore, the learning and migration costs are relatively low.The latest version is 0.6.0.
  3. Eve. https://github.com/pyeve/eve Eve framework is based on flask, and mainly target is Restful API. As mentioned above, Restful API based design has became the standard in today’s internet application. Eve framework through the configuration file to quickly setup the restful api program. Design of Eve is very smart, we can learn a lots of python programming skill from it.

Currently, based on Flask, I’m studying Sanic and Eve, first, improve program skill of web service. Second, improve my English. At last, python is a profound script language, we will study lots from these famous frameworks, and I will continue share my study notes here. Looking forward to everyone’s correction.



刚毕业的时候,很有冲劲,几乎一个人完成了一本书,耗时一年,当时写的 Visual Basic 的书和工作并不太大关系,现在看看这个书写的很幼稚,也充满了老气横秋的语句。


然后出了零星的文章以外,就发表的少了。从2003年开始 blog,喜欢这种不受拘束的形式。


从2015年初开始重新学习 Python 到各类实践,以及同事们在机器学习方面的探索。为了把 Python 研究的更加好,参与了一些内部培训材料的编写。当然也发现外面各类鱼目混珠的教材太多了。且大多数国人不太有分享精神。我们并不是因为自己厉害,而是愿意分享,总是有人需要入门。特别是机器学习方面,国内要么只说结果,要么翻译一些国外的课件,鲜有真正的原创分享。技术从来不应该是保守的敝帚自珍。


老朋友 一起吃蟹

一个是 2003 年,我刚到汽车网时候招进来的,和我们一起度过了一段最辛苦的日子。他应该是 2005 年离开的。职业生涯很不错。离开的时候我们已经从曹安路搬到了淮海路,去年年初我父亲住院的时候,很巧在当时的办公楼下面吃了饭,记得以前叫做唐朝,现在名字都换了。

还有一个也是 2003 年吧,因为记得也是曹安路时代了,当时他来算实习,手脚麻利,创了一个发新闻的记录。然后 2005 年后,或许碰到一些瓶颈,离开了,投奔了上面这个。2008 年或者 2009 又回来了,那时候我还在汽车网,可惜的是,物是人非,已经在走下坡路了。

第三个,差不多 2007-2008年吧,那时候我们在江苏路太平洋,搬去江苏路是汽车网最辉煌的时候,然后一年后撑不下去了,搬到肇嘉浜路那里。他来的时候正好是我们搬家。








这次去了圣地亚哥、UCSD 和旧金山,在旧金山的渔人码头逛了一下,也去了金门大桥,可惜时间不够,听说圣地亚哥的风景非常好。