• 瓶颈期,求指点. at 2013年09月07日

    #95 楼 @crazyitman http://book.douban.com/subject/2334288/ 通俗易懂 作者的大话系列都非常赞

    其实我让新手看设计模式只是让让他们在写代码之前会考虑怎么组织自己的思想,我刚学的时候我就挺纠结这个问题,问身边的人也没有给出满意的答案。当时的第一感觉就是要把方法写短。在之后的学习中,才意味到什么叫面向对象,把代码中的结构分离,在之后遇到了设计模式,使得对需求的改动对原有的代码不会造成任何影响。其实这对我来说最大的好处是更方便别人维护。我不喜欢我写的代码,别人看到之后有种想辞职的冲动。

  • 瓶颈期,求指点. at 2013年09月06日

    #91 楼 @liwei78

    个人对这种野生的程序员很畏惧

    事实证明不是只有所谓的 野生的程序员 写的代码不堪入目。

    还有就是我跟楼主一样什么都不懂就开始学 Ruby, 很显然我也是你口中的 野生的程序员

  • 瓶颈期,求指点. at 2013年09月06日

    #86 楼 @liwei78 你这话我就不爱听了,就算有计算机基础没有编码经验,没有理解面向对象的含义,也没看过设计模式,一样会写出 又臭又长 的代码。

    重点在于思考: 为什么别人的代码那么干净利落,而我的结构复杂,而且非常的长,什么逻辑都塞到一起

  • 瓶颈期,求指点. at 2013年09月06日

    @lgn21st 此贴建议加精,理由如下:

    • 每个人在每个阶段都会遇到瓶颈期。
    • 集中讨论瓶颈期,可参考的也比较多。
  • 瓶颈期,求指点. at 2013年09月06日

    #51 楼 @RainFlying #52 楼 @search

    让时间去验证把

  • 瓶颈期,求指点. at 2013年09月05日

    我 09 年接触 Ruby 的,跟你一样什么都不懂就开始玩儿 ruby,虽然到现在技术也不咋地,但是还是可以分享点经验的,

    • 建议你先学下 设计模式 再学 Ruby ( Programming Ruby 绝对是一本 翻不完 的书,有些只是带过的一句话都是发人深省).

    • Rails 中运用了很多的设计模式。如果源码有些地方看不懂的话可以在社区建议开个板块,代码相关的,然后发帖问下。

    我也是经常遇各种坑,没基础不可怕,可怕的是别人在玩,你玩比别人更嗨皮。

  • class UtilObserver < ActiveRecord::Observer
      observe :model1, :model2
    
      def before_save(record)
        record.slug = record.slug_format
      end
    end
    
    module Model1
      def slug_format
        self.title.gsub(' ', '-').downcase
      end
    end
    
    module Model2
      def slug_format
        self.name.gsub(' ', '-').downcase
      end
    end
    
  • 19 屋开源组织正式成立 at 2013年09月01日

    👍

  • 👍

    • 兼容 select2 吗?

    建议: 感觉区域级联的应该交给 js 来处理,如果一定要用 rails 的话可以只给个 task 任务导出当前的省市区固定的 json 格式的文件

    比如:https://code.google.com/p/tex-website/source/browse/trunk/Web/Js/LinkageSelect.js?spec=svn6&r=6

  • 程序员不易找对象的原因 at 2013年08月30日
  • 程序员不易找对象的原因 at 2013年08月30日

    #66 楼 @chairy11 咱们可以互相理解下 😄

  • 程序员不易找对象的原因 at 2013年08月30日

    现在发现以前在学校很容易找个妹纸谈恋爱是因为都太天真了,现在发现很不容易找个妹纸谈恋爱是因为都太现实了。

  • 一小段代码重构 at 2013年08月12日

    交给格式化把。

    class Bob
      def hey(words)
        @parser = WordsParser.new
    
        if      @parser.silent?(words)      then "Fine. Be that way!"
        elsif   @parser.shout?(words)       then "Woah, chill out!"
        elsif   @parser.question?(words)    then "Sure."
        else "Whatever."
        end
      end
    end
    
  • 👍

  • Array.wrap(params['foo']).include?('bar')
    
  • module Foo
      attr_accessor :foo
      def foo
        @foo ||= 'zzz'
      end
    end
    class Bar
      include Foo
    end
    
  • +1

  • 我觉得电话通知要好点,起码能告诉面试者哪方面不行,希望以后加强技术之后还能再来面试之类的。

  • 人也太多了把

  • #2 楼 @hpviewer 自己写 cron

  • osascript -e 'tell application "Messages" to send "Hello world." to text chat "email | username"'
    
  • t[/(\d|:)+\b/] = $&.gsub(':','-')
    
  • 安装 ruby-debug 时报错 at 2013年07月13日
  • 删掉账号貌似可以把

  • Mad Dog 域名不能转移吗?? at 2013年07月11日

    早知道转移域名这么麻烦就不在那续费了

  • Mad Dog 域名不能转移吗?? at 2013年07月11日

    Our support staff has responded to your request, details of which are described below:

    Discussion Notes Support Staff Response Dear Sir Or Madam,

    Thank you for your response. We do not charge to transfer a domain name from us to another Registrar. You should contact the company that will receive the domain(s) to start the process and find out what they may require from you. Please note that if you have recently registered your domain or made a change to the registrant contact information, you will not be able to transfer the domain away for a period of 60 days from the registration date or most recent contact change.

    To make a domain name available to transfer away from us, you will need to unlock the domain, obtain the domain name authorization code, and remove private registration (if you have selected this option).

    To 'lock' or 'unlock' your domain name, follow the directions below:

    First, log into your account:

    • Go to our Login Page
    • Log in using your account username (which may be the same as your customer number) and password.

    If you have trouble logging in, our Account Retrieval System may help you. You can use this to retrieve your customer number and/or reset your customer account password. You can find this system by selecting 'Click Here' next to 'Forgot Your Password?' on the 'My Account' login page.

    Once logged in, follow these steps:

    • From 'My Products', click 'Domain Manager.'
    • Check the box next to the domain(s) you wish to manage.
    • Click the 'Locking' button from menu above.
    • Select the option next to 'Lock' or 'Unlock'.
    • Click the 'Ok' button to process the change.

    After making changes to the domain’s settings, some features of your domain management will be disabled briefly while the updates are being processed. While you can make changes to nameservers, etc. within a few minutes of unlocking a domain, 48 hours may be required if you are unlocking the domain to transfer to another registrar.

    To obtain the Authorization Code for your domain, please follow these directions:

    • Select 'Domains' from the 'My Products' menu.
    • Click on the domain you need to retrieve the Authorization Code for to select it.
    • Under the 'Domain Details' section you will see 'Authorization Code: Send by Email'.
    • Click on the 'Send by Email' link.
    • Click on the 'Ok' button to have the Authorization Code emailed to the Administrative Contact email address.

    If you do not have private registration enabled on the domain name, this is all that will will need to be done on our side to allow the domain name to be transferred.

    If you have privacy enabled on your domain name through Domains by proxy you will need to remove this before the domain name can be transferred away.

    The private registration for your domain is managed through Domains By Proxy, while the domain registration is managed by us.

    You will need to log into your account with Domains By Proxy in order to cancel the privacy service. We have received the following instructions from Domains By Proxy for canceling private registration service for a domain:

    • Go to domainsbyproxy.com and click on 'My Account'.
    • Log in to your Domains by Proxy account.

    -If you do not remember your Domains by Proxy login information, click on the 'Forgot your password?' link to retrieve your customer number and reset your password

    • Once logged in, click on 'My Domains'.
    • Check the box next to the domain(s) you wish to cancel private registration for.
    • Click on 'Continue'.
    • Confirm that you wish to cancel the registration by selecting YES.
    • Click the 'Submit' button.

    You will then receive an email regarding the cancellation. The domain will no longer appear in your Domains by Proxy account, and the cancellation will not affect any other services on the domain such as DNS or email. Please remember that cancellation of the private registration is not refundable.

    If you have any other questions regarding the cancellation of your private registration, please contact the Domains By Proxy support staff using the following URL:

    http://domainsbyproxy.com/Support.aspx

    Please let us know if we can assist you in any other way.

    Regards, Bob C. Online Support Team

  • 已经解决好了。我使用的是软连接,忽视了配置文件中的注释的后果。

  • 中毒了 at 2013年07月01日

    原来是没毒