旧金山的小公司Highrise招人面试文档

旧金山的小公司Highrise招人非常高效。他们对每个职位都有一个文档,让经理和组员罗列出好的求职者的特点与差的求职者的特点;每来一人应聘就按这个文档面试,干脆利落又有的放矢。

下面附有文档摘要,有需要的朋友可以借鉴。我感觉使用习惯后,完全不需要人去面试了。

“You can have a rough idea or you can really know. And that clarity is when you can do what you really want to do.”

原文链接

阅读自湾区日报

 

Role-doc

1524112678903

1524112696966

1524112710849

1524112726325

1524112742614

1524112766958

Advice from 30 year old me to 20 year old me

1_o0u3Eh5ruRcWkosV_Y7z2A

11 things that I wish I knew when I was 20.

I recently turned 30. For some very odd reason I’ve not warmed to the idea of it just yet. However as I began to evaluate my 20s I realised how many mistakes I’ve made and things I’ve learned in a decade of life.

I took some time to write myself some advice.

1) Travel

You have very little responsibility so go and travel. When you get to 30, you’re going to want to travel slightly differently, spend a little more, do slightly more expensive things, eat at slightly better restaurants. So work for a year and save enough money to experience the world on the cheap.

How do you know what you want to do if you don’t know what’s out there to do?

Don’t just travel to the obvious places.

Travel to the tough places.

Travel to learn.

Travel to discover.

Travel to the places that will challenge who you think you want to be.

2) Build things

Don’t spend too much time working on other people’s visions or in other people’s meetings. Spend time figuring out what your own world view is (see point 1) and where you want to take your own life.

Meetings are where ideas go to die.

If you find yourself in a corporate job that you wish you could leave then do it. Leave. If you don’t have a corporate job yet see point 5.

3) Read

Read every day. Read everything you can. Don’t just read about things you know about. Read about people. Read people.

4) Stop Watching Television

Right now. Stop it. It’s not helping you get better at anything.

5) Career

Do not take that corporate job. Just don’t do it (see point 2).

6) Trust

Even if it kills your relationships. Even if it destroys your ideas. Even if you lose your friends. Even if it means you end up getting hurt.

Trust people until they give you a reason not to.

But don’t be naïve. Some people are out to fuck you.

7) People

People are the best and worst thing that will happen to you. Some will help you go further, faster. Others will pull you down to their level and help you lose. Most are OK. Many are average. Some are excellent.

A few people will change your life forever. Find them.

You don’t need a lot of friends or people around you. You need amazing people who do for you as you do for them.

It’s simple really, a lot of average friends will leave you feeling alone when you need to feel surrounded by people who care.

8) Value Time

Don’t waste time on people who you don’t trust. Don’t waste time with lovers who cheat on you. Don’t waste time with friends who don’t treat you the way you treat them (see point 7).

Do not be late.

Value other people’s time. That means that if you’re late, you don’t give a shit about them or their time and that you think you’re worth more and therefore can keep them waiting.

Some people will tell you that it’s OK to be late. It’s not. Some people will tell you that it’s just the way they are. Then you need to reevaluate them (see point 7 above).

9) Fail

Fail a lot. Fail often. Fail at love. Fail at sex. Fail at socialising. Fail at making friends. Fail at work. Fail at business. Fail with family. Fail with existing friends.

Fail. But do it quickly and learn a lesson.

If you don’t learn something every time you fail then all you’ve done is failed. If you learn something, then you’ve grown. Every time you grow and learn and fail, you get better at figuring out how the hell to succeed.

10) Success

There is no point at which you will have succeeded. Not in your twenties. Not ever.

Get over that fact and start building things (see point 2 and combine with point 9).

11) Patience

Be patient. Nothing worth doing is worth doing quickly. Nothing worth building is worth building in a rush. Nothing of value is formed in a minute.

Plan in decades. Think in years. Work in months. Live in days.

命名规则

命名规则类似Java,Javascript的通用的命名规则可以参考此处。下文提到的小Small Camel是指首字母小写Camel命名规则;Big Camel首字母大写Camel命名规则。

类型 规则
命名空间 全小写,子空间使用英文点号‘.’分隔
Big Camel
类方法 Small Camel(不含命名空间)
常量 全大写,下划线分隔词
局部变量 Small Camel
全局变量 Small Camel,首词为小写g
全局函数 Small Camel
文件 1.       文件中包含0个或多个类则使用命名空间作为文件名2.       文件中为单一类则使用类全名(含命名空间)作为文件名

3.       源码中仍有不符合上述命名规范的文件,它们多为占位文件,

a)       占位文件是AdService编译后会生成的同名文件,通常只有一句,下图中的‘ads.trunk.js’就是一个占位文件。

b)       exp.js用于实现为小流量平台的流量切换;

c)       app.js用于流量交换详细页面;

d)       sdk.ios.js是iOS平台加载的Native接口文件;

e)       另外一些不符合规范的文件是各种JS库文件

5.6 时序

MySQL内置函数uuid和uuid_short简析

有同学问到MySQL的uuid这个函数。简要介绍一下。
用法
简单看到,这个值,每次执行都是不同的。
生成规则
第1 2 3 段是与时间有关的。
  www.2cto.com  
time_low、time_mid、time_high_and_version转成16进制后分别对应第1 2 3段。这个时间是从1582-10-15 00:00:00.00到当前时间的100ns值。(实际上系统只能取到精确us,再乘以10)。所以你短时间连续执行的话,比较可能只有第一个值在改, 实际上1 2 3都可能会改变。
第4段是你启动这个MySQL后第一次执行select uuid()时的随机数,每次重启会改变。
第5段是mac值转过来的,同一个机器多实例的一般相同。如果mac值获取不到,则是一个随机值。
所以这个值可以认为是每次执行都不相同。并且不同实例之间也只有极微小概率重复。
Uuid_short
         与uuid返回固定长度字符串不同, uuid_short的返回值是一个unsigned long long类型。MySQL启动后第一次执行的值是通过server_id << 56 + server_start_time << 24来初始化。server_start_time单位是秒。 之后每次执行都加1。
         由于每次加1都会加全局mutex锁,因此多线程安全,可以当作sequence来用,只是初始值有点大。
Sequence
         MySQL没有Oracle那样的sequence,在不是很精确的情况下,可以考虑上面提到的uuid_short。有一些不足:  www.2cto.com
1、初始值太大,无法重设
2、存在一个问题是每次重启后第一次执行的值不是重启前的那个值+1
3、而且如果重启在1s内完成,可能出现不单调递增(虽然这个可能性微乎其微)。
         要满足上面的需求,可以考虑用udf实现。

关于全局唯一ID生成方法

唯一ID生成的主要目的是:为一个分布式系统的数据object产生一个唯一的标识。
一般对于唯一ID生成的要求主要这么几点:
  • 毫秒级的快速响应
  • 可用性强
  • prefix有连续性方便DB顺序存储
  • 体积小,8字节为佳
目前看到过的唯一ID生成方法主要有以下几种:
UUID:
优:java自带,好用。
劣:占用空间大
Snowflake: timestamp + work number + seq number
优:可用性强,速度快
劣:需要引入zookeeper 和独立的snowflake专用服务器
Flikr:基于int/bigint的自增
优:开发成本低
劣:如果需要高性能,需要专门一套MySQL集群只用于生成自增ID。可用性也不强
Instagram:41b ts + 13b shard id + 10b increment seq
优: 开发成本低
劣: 基于postgreSQL的存储过程,较为偏门

The package does not contain an Info.plist

Q:  Xcode displays an “The package does not contain an Info.plist” message when validating or submitting my app. How do I fix it?

A: Note

If you are getting this message while submitting a hosted In-App Purchase product, see I am unable to upload my hosted content to iTunes Connect with Xcode 6 for details on how to resolve it.

You may be getting this message for one or more of the following reasons:

  • Your app’s Info.plist file does not contain a CFBundlePackageType (Bundle OS Type code) key, which specifies the type of bundle being created. Add this key to your Info.plist, then set it to APPL to resolve your issue as shown in Figure 1. See CFBundlePackageType for more information.
Figure 1  Setting CFBundlePackageType to APPL

iOS 最新版 CocoaPods 的安装流程

iOS 最新版 CocoaPods 的安装流程
1.移除现有Ruby默认源
$gem sources --remove https://rubygems.org/
2.使用新的源
$gem sources -a https://ruby.taobao.org/
3.验证新源是否替换成功
$gem sources -l
4.安装CocoaPods
(1) $sudo gem install cocoapods 备注:苹果系统升级 OS X EL Capitan 后改为$sudo gem install -n /usr/local/bin cocoapods
(2) $pod setup
5.更新gem
$sudo gem update --system
6. 新建工程,并在终端用cd指令到文件夹内
$pod search 第三方
7.新建文件 vim “Podfile”,
$vim Podfile
写入以下内容并保存 小提示:(终端vim文件 按 i 可编辑 ,esc 退出编辑,:wq  可保存退出)
platform:ios, '6.0'   
pod 'AFNetworking', '~> 2.3.1'    <-------第三方
8.导入第三方库
$pod install
9.退出终端
以下是我用以前的安装流程安装时出现的一些错误
终端  cocoapods 下载bug调试:
错误1:
Error fetching http://ruby.taobao.org/:
bad response Not Found 404 (http://ruby.taobao.org/specs.4.8.gz)
解决方案:把安装流程中 $gem sources -a http://ruby.taobao.org/   ---改为---->$gem sources -a https://ruby.taobao.org/
错误2:
ERROR:  While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/pod
解决方案:苹果系统升级OS X EL Capitan后会出现的插件错误,将安装流程 4.安装CocoaPods 的 (1)sudo gem install cocoapods ——>改为sudo gem install -n /usr/local/bin cocoapods
错误3:
[!] Unable to satisfy the following requirements: - `AVOSCloud (~> 3.1.6.3)` required by `Podfile`
Specs satisfying the `AVOSCloud (~> 3.1.6.3)` dependency were found, but they required a higher minimum deployment target.
解决方案:安装流程:Podfile文件 中   platform:ios, ‘6.0’  后边的 6.0 是平台版本号 ,一定要加上

iOS cookbook NSLabel 下划线、中划线

  //显示下划线

        //中划线

//        NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};

        //下划线

        NSDictionary *attribtDic = @{NSUnderlineStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};

        NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:oldStr attributes:attribtDic];

        oldPriceLabel.attributedText = attribtStr;

自体血液疗法与传统血液净化大不相同

810a19d8bc3eb1356115d50da31ea8d3fc1f44b1

早在3000年前人们就试图通过“洗血”的方式来达到增强体质、驱除疾病的目的。直到1861年,一位叫做格拉哈姆的科学家和他的团队共同发现血液透析的原理, 并于1945年由科尔夫医生成功将这项技术应用于急性肾衰竭患者。此后“血液净化技术”在现代医学治疗中得到了迅猛的发展。而“血液疗法”也随着该技术的发展慢慢被应用于临床治疗。