「appengine」的搜索结果

  • 周末玩玩技术

    我很久以前玩过一段时间的google appengine,用它来连接rss填补google reader的空白。前两天趁着周末又捡出来把玩了一下,现在的感觉却不怎么好用了,难怪google的云计算赶了个大早,却被后来者azure居上。

    简单的crud应用,比如todo或者记事本甚至是proxy,appengine还是可以用一用的。但是它有几个问题,一个是standand环境的编程比较复杂,开发者要了解一大堆东西,总算把google datastore在nodejs上跑了起来,但是运行起来才发现javascript版本的rss parser不给力,不如python的feedparser成熟。而python想找一个在appengine稍微能用的blog或者cms几乎是不可能的,大多数的github项目都是11、12年甚至零几年的。另外的问题是如果不付费很多功能都阉割了,即使google cloud赠送了300美元一年的试用,可是我不想浪费时间在这个没落的平台上了。

    于是又想到了新型的平台zeitnetlify,它俩都支持连接到github直接拽代码部署,命令行直接搞定,试用了一下部署一个coreui的angular demo棒棒哒。如果是纯js项目可以考虑这两个平台。

    做toy project的开发者还可以考虑heroku,这个老牌平台虽然有着google cloud同样的缺点,但是它上面一些开源项目却很实用,比如部署了一个下载youtube视频的应用在上面,还可以支持v2,前面挂上cloudflare那就可以特殊情况下应应急。

  • 2012年2月编程技术新闻更新

    最近在readitlaterlist上收集的技术文章链接,在这里把精华部分总结一下。

    https://gist.github.com/1834789 Microlight – a very compact Lua utilities module,这里面有不少有用的功能,另外可以使用penlight

    http://blog.benjamin-cabe.com/2012/02/10/lua-development-tools-now-available-as-a-standalone-product koneki是基于eclipse的一个Lua IDE

    https://bugzilla.mozilla.org/show_bug.cgi?id=542074 Analyze implementation of closures in Lua and LuaJIT 一个简要分析Lua实现闭包机制的短文

    http://oredev.org/2010/videos 这里面的视频还是蛮有价值的,推荐挂上vpn然后学习之

    http://googleappengine.blogspot.com/2012/02/bugsense-hybrid-app-experiences-using.html 在google appengine上使用clojure

    http://chill.com/scott/collection/the-ultimate-steve-jobs-collection 乔布斯的视频大合集

    http://www.bobtacoindustries.com/Content/Devs/CsToCpp-ASomewhatShortGuide.pdf C#开发者如何快捷学习C++

    http://docs.oracle.com/javase/specs/index.html The Java Language Specification, Java SE 7 Edition,The Java Virtual Machine Specification, Java SE 7 Edition

    http://itunes.apple.com/in/itunes-u/multicore-programming-primer/id341597759 Multicore Programming Primer

    http://leafo.net/posts/lua_on_heroku.html –> http://github.com/leafo/heroku-buildpack-lua.git

    http://moonscript.org/ 0.2.0版本出来了,这就是Lua版本的coffeescript,代码不是很好懂啊

    http://www.cubrid.org/blog/dev-platform/understanding-jvm-internals/ understanding JVM internals

    http://www.mediawiki.org/wiki/User:Sumanah/Lua_vs_Javascript 这是Lua开发最近一个大新闻,维基百科使用Lua作为模板语言

    http://pytools.codeplex.com/ python tools for visualstudio v1.1发布了,这个免费工具把VS2010变成Python的IDE。另外支持Pyvot这个Python使用Excel的库。http://pytools.codeplex.com/wikipage?title=Pyvot

     

  • 如何开发高质量软件?及软件测试观点

    也许是因为我经常在twitter上鼓吹“代码质量来自code review和单元测试”,老赵的这篇文字 http://blog.zhaojie.me/2012/01/a-case-requirement-to-practice-unit-testing-or-tdd.html 也at我一下,抱歉的是最近欠债太多,正在着手完成答应侯伯薇的那篇关于appengine的文字。

    趁着兴头和最近的一些工作简单谈谈我的软件测试观点。

    上周五小组对前一阵的一个项目做了整体的代码review,然后对单元测试代码也简单review了一下,大概二十几个测试用例完全通过,mstest中一条条绿杠杠让人很开心。

    今天英语加技术学习,看了这篇 http://net.tutsplus.com/tutorials/ruby/the-intro-to-rails-screencast-i-wish-i-had/ 其中正好讲解了如何使用TDD开发rails程序,酷毙了,其中guard,rspec,capybara这些Ruby的好玩意让我等DotNet程序员羡慕不已。

    如何进行高质量软件开发?是我这大半年一直在思考和研究的问题。对于我们大部分项目的流程,简单总结起来就是,前期需求review,设计review,风险评估,开发中期review,代码结束review,维护阶段。

    前期review主要是保证项目不要过早的投入编码,设计上不够成熟或者没有考虑的很清晰。我发现不少人是以编码代替设计,或者说还没有想好怎么设计,代码就号称写完百分之八十了,很无语。前期review以主力程序员担当设计和主要技术攻关,并且反复确认设计中不清晰的地方。在前期设计阶段也会对任务进行分派,其中有程序实现,单元测试实现,手动测试实现,代码review等不同角色。理论上说单元测试应该由程序实现者完成,但是由于项目特点决定,我们对于某些项目的单元测试是有另外的程序员实现,稍大一些的项目(或者说story)就需要有三个人熟悉设计和代码实现,大致是一到两个实现者,一到两个代码review人员,这样有些人担心的“对项目不熟悉代码不熟悉,怎么进行code review?“的问题就不存在了,而且也很好的保证了万一有人请假有事,其他人也可以很快完成任务。

    开发中期review,主要是对整体思路再次检查一遍,另外确保项目整体质量是OK的,上个月就在中期review的时候,果断叫停某个质量很低的项目,调入一个主力程序员重新设计,虽然浪费了一些时间,但是代码质量比前一个版本要好很多。

    代码结束review,是整个小组对项目实现进行逐行的分析解读,貌似这样会比较浪费时间。但是我们现在团队初建,很多技术甚至是常识都需要反复强调,这种小组review很有必要,也是很好的学习过程。

    再着重谈谈单元测试。通过比较NUnit和MSTest后选择MSTest作为测试框架,另外也会选择集成测试或者是接口测试等不同测试级别,主要是看项目需要,并不拘泥于非要单元测试。现在的问题是单元测试本身设计的还不够,基本上只考虑”正常、异常、上临界、下临界、空值、复杂值“这些情况,没法做到很好的代码覆盖率,希望这个在以后能慢慢提高。MSTest的使用很简单,基本上跟Nunit没啥区别,好处是可以直接集成在VS2010高级版中,另外也可以通过mstest命令行调用,持续集成也很容易。

    我们基本上会在项目设计阶段就对测试用例同时进行设计考虑,然后会留出大约百分之三十到四十的时间给单元测试或者自动测试。这个比例根据项目重要程度或者复杂程度也会相应地调整。

    另外一个很关键的问题是”如何测试GUI?”对于asp.net mvc,我们基本上只会自动测试controller,对于view部分,是准备使用自动的browser测试框架来做,现在还是以手动测试为主;对于wpf程序,主要是测试viewmodel部分,但是现在也主要以手动测试为主。对于需求倾向于前端的应用,基本上不会考虑单元测试。但是为了很好地保证质量,我们会把关键的需求点作为测试用例,然后有人专门做手动测试。也开发了一个自动记录回放的小软件,但是效果一般,基本没用。

    团队初建,我个人经验不足,所以很多也是在摸索调整,希望以后能有更完整高效的开发流程可以分享给各位。

  • 一些有用的开源project

    主要是Google AppEngine上的(GAE):twitter相关;multi-chat相关;飞信或者短信相关。
    还有新浪SinaAppEngine及新浪微博相关。

    http://code.google.com/p/youngking/downloads/detail?name=mail2sms_beta_20100919.zip&can=2&q=

    http://code.google.com/p/pranav

    https://code.google.com/p/channel-tac-toe/

    *** mirrorrr-plus

    twitter-oauth-login-proxy

    jaikuengine

    jsonbot

    twitteroauth-python

    http://code.google.com/p/gtap

    *** google-app-engine-samples/multi-chat

    http://github.com/superfeedr/notifixlight

    *** google-app-engine-samples/crowdguru

    twitalker

    *** https://github.com/gh05tw01f/twitalkerplus

    *** gae-rproxy

    https://github.com/metachris/feedmailer

    https://github.com/crabasa/Twitter2Mail

    http://code.google.com/p/appengine-mapreduce/

    http://code.google.com/p/gae-bbs/

    https://bitbucket.org/keakon/yui/

    https://bitbucket.org/keakon/doodle

    http://code.google.com/p/xian-min/

    http://code.google.com/p/google-app-engine-samples/

    http://code.google.com/p/rietveld/

    http://www.allbuttonspressed.com/projects/django-nonrel

    http://code.google.com/p/google-app-engine-oil/

    http://code.google.com/p/tipfy/

    http://code.google.com/p/kay-framework/

    https://github.com/xuming/micolog

    https://github.com/steffentchr/twitterengine

    https://github.com/initpy/selficious

    https://github.com/flosch/simpleapi

    https://github.com/garethr/appengine-bugs

    https://github.com/toomore/goristock

    https://github.com/livid/picky

    https://github.com/pelle/talk.org

    https://github.com/garethr/appengine-imified

    http://code.google.com/p/typhoonae/

    https://github.com/k7d/approcket

    http://ihere.appspot.com/

    https://github.com/mcroydon/html2text-appengine

    ======================
    http://apidoc.sinaapp.com/sae/SaeTOAuth.html

  • 高级软件工程师面试问题 Interview SeniorSoftwareEngineers

    hanselman这篇文章很有意思,尽管不是每个问题都很值得作为面试问题出现,但是很多都值得去仔细想想。

    一个优秀的面试问题,尤其是针对Senior Engineer的面试问题,不应该仅仅是问某个api的用法,某个很容易从帮助中找到的内容。有发散性,可以基于问题进行扩展的问题才是一个比较好的问题。

    下面是一个非常长的问题列表,主要是关于面向对象设计,设计模式,以及一些实际工程中会用到概念,都是比较基本的,但是也非常能考察一个高级工程师的水平,因为会牵涉到非常多方面。

    另外要说明的是下面很多概念性问题可以直接从wiki维基百科上找到答案。另外我会标记出个人觉得比较值得问的问题。

    原文在这里 http://www.hanselman.com/blog/NewInterviewQuestionsForSeniorSoftwareEngineers.aspx

    # What is something substantive that you’ve done to improve as a developer in your career?

    有没有做过什么比较实质性的事情来提升你的程序员职业水平?

    好问题。我的回答:这个很难说,我的做法是坚持学习,坚持写技术类博客。另外有些经验在这里提到过http://sunxiunan.com/?p=1799

    # Would you call yourself a craftsman (craftsperson) and what does that word mean to you?

    不敢叫自己大师啊,那得多牛逼?!

    # Implement a <basic data structure> using <some language> on <paper|whiteboard|notepad>.

    用某种语言在纸面上实现一个基本的数据结构。(用近似真实格式的伪代码来表达?)

    好问题。我的回答,找一本基础的数据结构书籍吧,比如这一本《数据结构与算法分析:C语言描述(原书第2版)》

    # What is SOLID?

    参考http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29

    这个solid不是说“结实的”,而是面向对象五大原则的简称:单一责任原则,开闭原则,莱西科夫替换原则,接口分离原则,依赖倒置原则。

    好问题。这几个原则的确应该背下来,太基础了。

    # Why is the Single Responsibility Principle important?

    为什么单一责任原则重要?

    好问题。我的回答,因为职责明确,设计就不容易混乱,即使有后续变化也是可控的。

    # What is Inversion of Control? How does that relate to dependency injection?

    参考http://en.wikipedia.org/wiki/Inversion_of_control

    实际中的例子,通知开会,一种可以打电话通知到每个人(这属于中心控制型的,必须有个controller/manager之类的);也可张贴一个告示,大家自己来看,这属于事件响应型的。

    # How does a 3 tier application differ from a 2 tier one?

    三层应用与两层应用的区别是什么?

    我只知道MVC三层应用。

    # Why are interfaces important?

    为什么接口重要?

    好问题。接口的重要在于消费者(客户端)不需要了解生产者(服务端)的细节,接口相当于合同,当合同不变的时候,谁生产如何生产都不是消费者关心的问题。

    # What is the Repository pattern? The Factory Pattern? Why are patterns important?

    关于设计模式的问题,

    第一个参考http://msdn.microsoft.com/en-us/library/ff649690.aspx

    工厂模式基本上是众人皆知的模式了。

    为何模式重要?我不觉得模式重要,模式的重要性在于让你能“喔!原来是这个”。但是对于一个没有几年编程经验的开发者而言,模式只能让你更混乱。

    设计模式很多情况下是通过加入一个抽象层来解决耦合之类的问题,但是层次越多越复杂,就好比单位中领导的级别越多越官僚一样。

    # What are some examples of anti-patterns?

    反模式?少用模式,多写点清晰的代码吧。

    # Who are the Gang of Four? Why should you care?

    四人组,名字叫不上来,但是他们是设计模式的总结者。

    # How do the MVP, MVC, and MVVM patterns relate? When are they appropriate?

    这也是微软特色,大家只要知道MVC就行了,其实大家现在用的都是MVC,但是由于水平高低,效果就是千差万别。

    啥MVP,MVVM我不知啊(也不是不知,只知道MVVM是wpf的一个概念,可我也不用wpf啊)

    # Explain the concept of Separation of Concerns and it’s pros and cons.

    参考http://en.wikipedia.org/wiki/Separation_of_concerns

    我也不是了解的很细。

    # Name three primary attributes of object-oriented design. Describe what they mean and why they’re important.

    封装/继承/多态?

    参考这里吧http://en.wikipedia.org/wiki/Object-oriented_programming

    学C++这几个概念是基础啊

    # Describe a pattern that is NOT the Factory Pattern? How is it used and when?

    不是工厂模式,我知道个单件模式。还有模板模式/facade模式/strategy模式,具体也要翻翻书,很少有意识的套用。

    # You have just been put in charge of a legacy code project with maintainability problems. What kind of things would you look to improve to get the project on a stable footing?

    第一步,先把代码用最大警告级别编译一遍,然后fix所有值得fix的warning。

    好问题。

    # Show me a portfolio of all the applications you worked on, and tell me how you contributed to design them.

    如果光是看文档,很难说到实质上。

    好问题。

    # What are some alternate ways to store data other than a relational database? Why would you do that, and what are the trade-offs?

    好问题,很多啦,内存/文件/云存储/nosql等等。tradeoff就看你的应用需求了。blabla。。。

    # Explain the concept of convention over configuration, and talk about an example of convention over configuration you have seen in the wild.

    好问题。

    我能想到的就是买车开车,很少有人买到车以后,拿着说明书调试这个那个,一般都是直接上路,因为汽车厂会给你一个比较不错的默认配置,也就是所谓的“方便”。

    这个方便也保证了你开其它车,基本上都差不多,不用重新配置或者学习什么。

    所谓方便”convention“就是把相对不错/比较普遍适用的配置都内置好了,用就是了。

    # Explain the differences between stateless and stateful systems, and impacts of state on parallelism.

    解释有状态与无状态系统,以及有状态系统在并行上的影响。

    好问题。这个说不好。有状态系统因为保持状态,并发运行时的访问/修改需要有锁同步机制。

    # Discuss the differences between Mocks and Stubs/Fakes and where you might use them (answers aren’t that important here, just the discussion that would ensue).

    跟TDD相关的问题。不会哦。

    # Discuss the concept of YAGNI and explain something you did recently that adhered to this practice.

    解释“YAGNI”。

    最简单的例子是当我们定义接口,会特意预留出一两个参数,说是为了将来使用,其实,没有将来。屁嘞!你根本不需要它!

    不是说不考虑可扩展性,但是要基于可预测的基础上。

    # Explain what is meant by a sandbox, why you would use one, and identify examples of sandboxes in the wild.

    比如把虚拟机比如vmware virtualbox作为沙箱,用起来可以隔离风险。大不了重启,或者删除之。

    # Concurrency

    * What’s the difference between Locking and Lockless (Optimistic and Pessimistic) concurrency models?

    * What kinds of problems can you hit with locking model? And a lockless model?

    * What trade offs do you have for resource contention?

    * How might a task-based model differ from a threaded model?

    * What’s the difference between asynchrony and concurrency?

    这些问题不错。并发相关的问题,设计多用户高性能系统必知。

    # Are you still writing code? Do you love it?

    我喜欢编程。

    # You’ve just been assigned to a project in a new technology how would you get started?

    如果是我,先了解这个技术的风险。小心求证,尽量缩小使用范围,否则是很致命的。

    # How does the addition of Service Orientation change systems? When is it appropriate to use?

    不懂。

    # What do you do to stay abreast of the latest technologies and tools?

    我跟的很紧哦!

    # What is the difference between "set" logic, and "procedural" logic. When would you use each one and why?

    不懂要问什么。

    # What Source Control systems have you worked with?

    ClearCase.很难用。最近不少问题都是跟CC相关的。

    # What is Continuous Integration? Have you used it and why is it important?

    持续集成。这个概念跟TDD也挂钩。

    # Describe a software development life cycle that you’ve managed.

    涉及的还是传统模型,不是scrum型的。

    # How do you react to people criticizing your code/documents?

    批评没问题,但是要有道理有根据。

    # Whose blogs or podcasts do you follow? Do you blog or podcast?

    这就很多了,看我以前写的文章吧。

    # Tell me about some of your hobby projects that you’ve written in your off time.

    主要是Lua和Py的,appengine上的比较多。

    # What is the last programming book you read?

    最近看得是《C++ FAQs》中文版。翻译的一般,内容也比较陈旧。更坚定了我使用C风格的C++的决心。

    # Describe, in as much detail as you think is relevant, as deeply as you can, what happens when I type "cnn.com" into a browser and press "Go".

    尽可能详细深入的描述,当你在浏览器敲网址然后go后面的技术细节。

    好问题。很发散,绝对能看出面试者的技术厚度。

    # Describe the structure and contents of a design document, or a set of design documents, for a multi-tiered web application.

    # What’s so great about <cool web technology of the day>?

    # How can you stop your DBA from making off with a list of your users’ passwords?

    # What do you do when you get stuck with a problem you can’t solve?

    参考这里计算机编程新人入行指导 

    http://sunxiunan.com/?p=961

    # If your database was under a lot of strain, what are the first few things you might consider to speed it up?

    先profiling哦!

    # What is SQL injection?

    # What’s the difference between unit test and integration test?

    单元测试应该是程序员做。集成测试就牵扯到tester了。

    # Tell me about 3 times you failed.

    # What is Refactoring ? Have you used it and it is important? Name three common refactorings.

    我一直在重构自己的代码。重构原则参考这里

    C++项目代码规范(偶自用)http://sunxiunan.com/?p=1787

    # You have two computers, and you want to get data from one to the other. How could you do it?

    命名管道,socket,共享文件夹,路子还是很多的。

    # Left to your own devices, what would you create?

    # Given Time, Cost, Client satisfaction and Best Practices, how will you prioritize them for a project you are working on? Explain why.

    这个很值得问。

    # What’s the difference between a web server, web farm and web garden? How would your web application need to change for each?

    # What value do daily builds, automated testing, and peer reviews add to a project? What disadvantages are there?

    都是为了提升代码质量,但是会延长工期。

    # What elements of OO design are most prone to abuse? How would you mitigate that?

    # When do you know your code is ready for production?

    看bug fix的统计曲线。