oakland / tecblog

My tech blogs
4 stars 0 forks source link

说说一些比较虚的东西 #72

Open oakland opened 6 years ago

oakland commented 6 years ago

SICP 荒废了一段时间了,今天开始又重新捡起来。希望每天早上可以早起一小时学习。现在看到第二章:数据抽象。今天看的 2.2 Hierarchical Data and the Closure Property,第一张图和第二张图就很有意思,尤其是第二张图让我想起了之前看过的胡子大哈在知乎上的一个回答,所以就又把知乎这个问答打开看了下,发现这个问题的有效信息量非常大,真的值得多看看。

有哪些新手程序员不知道的小技巧里面有很多可以学的东西。

比如胡子大哈的回答有 3.6K 的赞

编码的时候只思考同一个思维层次的逻辑,在这层完成之后再思考下一层。

还有 ershou 的回答中有一点说的特别好

  1. 做十件事不如做好一件事,夺取话语权只有一条路径,就是超出别人的预期;

如何阅读源码

How to read source code,这篇文章不错。

如何提 issue

https://github.com/facebook/react/issues/10307 就是按照套路来提的,以后提 issue 也可以按照这个套路来提。

面向过程 VS 面向对象

这个问答中“在好”的回答不错,虽然有些玄,但是还挺有启发的。尤其是关于高内聚、低耦合的这个例子,让我对于这个概念又有了新的更加直观的理解。比如一辆汽车,高内聚,就是表示空调是空调,空调的主要部分和原理都是放在空调这个内部去完成的,而不是放在其他地方,如放在车厢里,或者后备箱。这个就是高内聚。而低耦合表示,空调只有一个节点的接口,还有一个进气出气的口,和汽车的其他部分之间的联系比较少。如果一个车不要空调了,仅仅摘除几根线就可以从车中整体拿出来了,这就是低耦合,空调的启用和废弃不会对汽车的其他部分产生影响,导致汽车完全无法驾驶。这就是低耦合,就是和系统中的其他内容之间的联系不是复杂。 这里面还提到了“依赖注入”这个概念,感觉也是说的很清晰和透彻。

模块化的概念

其实模块化的概念,就是类似社会的社会分工一样,让专业的人去做专业的事情,而不是让一个人成为全才。从这个角度来看,其实职业发展也是一样的,我需要有一个非常精通的技能,这个技能可以让所有人想到这个事情的时候就想到我。我需要做这个事情。

编程中的 inflection point

v2ex 上有人发帖提到了 The key to accelerating your coding skills 这篇文章,写的不错,这篇文章又散发出了另外的几篇文章,都写得不错。这个网站也不错。

事故报告

经过几次服务器宕机之后的经验,每次出现事故都应该有一个事故的报告发出。大体可以按照以下的大纲写:

  1. 事件描述
  2. 排查过程
  3. 事件原因
  4. 解决方案

一个模块或者一个文件最多应该有多少行代码

之所以提出这个问题,是因为之前做 X 的时候,写发布页面时,js 文件内容很多,大概有将近 1000 多行代码,除了 bug 之后,leader 过来帮我看问题,打开文件一看:说怎么这么长?我说就是这么多功能呀。他说把这个代码抽一抽,把一些独立的功能抽成单独的 js 文件,然后引入进来。恍然大悟!然后我问他一般一个文件多少行代码比较合适,他说不知道,看着感觉太长了就可以把一些功能模块单独独立出来了。这两天做 TDPS,发现自己的 jsx 文件又变得很长了,然后就突然想起这个问题。顺便去 google 了一下,发现对于这个问题还真的有一些说法。暂时不打算细读,但是先记录下来,这个应该也算是一些技巧了。 https://dzone.com/articles/rule-30-%E2%80%93-when-method-class-or https://softwareengineering.stackexchange.com/questions/176999/at-what-point-range-is-a-code-file-too-big https://stackoverflow.com/questions/611304/how-many-lines-of-code-should-a-function-procedure-method-have google 的搜索结果

怎么才算 fix bug

要可以稳定复现的 bug,修复了才算真的 bug fix,如果自己都不能复现,就靠猜来解决问题,这不算 bug fix

如何写好业务代码

这篇文章很不错。下面的评论有一句也非常好

好的业务是:需求明确,后期规划明确,需求迭代明确

如何提升自己

Some software engineers stay inside their comfort zone once they find their footing. These types of programmers are known as maintenance programmers– not something you should strive to be. Instead, you should strive to go outside your limits every single day. learn-to-code-and-be-self-reliant

领域驱动设计

这个概念之前没有听过,最近是打算把单元测试引入到项目中,然后在群里问了下大家,有人贴出来的文章。这个文章特别好。ddd-fe-demo 这个用户除了这篇文章之外还有一个博客,博客里的一些文章质量也很高,值得一读。

debug

最近的 debug 能力得到了提升。但是有时候还是会被困在一个死局里面出不来。就是这个局里怎么看都是对的。怎么看都没有 bug。那这个时候就要学会变通,看看这个局里有没有什么独特的元素和内容。从这个独特的内容出发再去寻找一个新的局,或者新的解决方案。如果在一个局里面限死了就要学会放弃这个这个局,重新开辟一个局。

最近看到一个大佬开了个问答

https://v2ex.com/t/613460?p=1,摘录几条

@EminemW 代码优化分为几个层次。 初期的优化主要集中在功能上,不写 bug。 然后是鲁棒性,在异常情况下不写 bug。 然后是性能,提高系统吞吐量,或者执行降低延迟。 然后是可维护性,在团队开发过程中降低其他人的理解难度,再做好一些,通过设计做到模块解耦,降低删除无用代码的难度。 然后是可扩展性,能够预测系统或者业务的发展方向,提前设计好锚点,让系统能够通过扩展而不是修改的方式增加功能。 再往后就是各自的境界了,我至今也还没参透……

@xwkkk 老师您好,我问一个非技术问题,组里招应 java 届生更看重什么? 我在另一个招聘贴里也说了( https://www.v2ex.com/t/613136 ) 我们招人的标准是好奇心=能力>经验,大部分人在上一份工作中只是遵照上级的要求写完了代码,但是既没有了解更深的原理,也没有达到“用技术改变了什么”的程度。我认为这部分同学就算来了我这里,对于个人发展或者团队进步来说,不会有什么大的帮助(我们期望的是“更好”),因此卡掉了不少人。 校招其实也类似。

健壮性,鲁棒性

的特点之一就是记得做非空判断,或者数据类型判断

执行力

最近在看《小狗钱钱》,里面的第一章给我了一个很好的启发,做一件事情之前先要列出你要实现的目标或者说愿望,如果这些愿望太大太多,就先挑出 3 个最重要的然后开始。这样不会因为一件事件很大或者很难而完全不想进行。天下难事,必作于易;天下大事,必作于细。特别是和计算机相关的内容,都是从一点一点的小事开始的。

oakland commented 3 years ago

https://jobs.lever.co/italic/3d6161cb-6545-4bf9-a8e1-6d5966a821b9

最近看到一个英文的招聘链接,里面除了文字写的很好之外,一些价值观我也很认可。贴在这里,是不是可以看下。

Technology The Technology department at Italic builds and maintains three core products for our customers and merchants: Consumer is our digital customer experience and storefront; we are constantly thinking through discoverability, storytelling, modularity, and site performance across thousands of SKUs, Portal is our proprietary software that Italic Merchants and internal stakeholders use to develop and launch new products, and Platform powers the infrastructure behind our other software that allows our teams to ship & scale features better, faster, cheaper.

Role

Italic is seeking a Front-End Software Engineer to join our Consumer Engineering team. The ideal candidate is passionate about architecting systems, taking products from concept to finish, and crafting the perfect e-commerce experience for customers.

This is a critical role that is paramount to the growth of our business and requires that you think creatively on complex technical challenges such as scaling an application to millions of users, optimizing daily content delivery for terabytes of assets, building a headless commerce stack. Responsibilities Work closely with Product Managers and Designers to build the next iteration of Italic's marketplace storefront Ship experiments and measure improvements to storefront usability and conversions Build the critical infrastructure that enables Italic to develop robust customer profiles and a firm understanding of our customer journey Implement a front-end framework and consistent UI style library in React Lead engineering discussions and mentor others on engineering best practices Partner with our Platform Engineering team to access the universal data model for orders, customers, collections, and products and surface that on the storefront

Requirements 3+ years experience as a full-stack or frontend software engineer at a fast-growing consumer company Extremely entrepreneurial and fast-thinking. You must have a bias for action and must be able to work independently without significant guidance. Demonstrable experience with front-end engineering with frameworks such as React, Redux, GraphQL, or Typescript required Comfortable working with RESTful APIs, Amazon Web Services, and Docker containers; GraphQL experience a plus Excellent written and oral communication skills, able to support decisions made in your code Proficiency in SQL and understanding of relational database schemas a plus Experience working on SCRUM teams using agile methodologies preferred Degree in Computer Science or equivalent from a top university preferred

About Italic

Italic is building the next generation "everything store." We offer quality goods straight from the same manufacturers as top brands but at 50-80% lower prices. Behind the scenes, we empower manufacturers with a full-stack solution of technology, operational network, payment orchestration, and distribution to a global consumer base so that they can become merchants themselves.

Italic is an equal opportunity employer and we value diversity. We do not discriminate on the basis of race, religion, color, national origin, gender, sexual orientation, age, marital status, veteran status, or disability status. We don't care about where you went to college or what fancy names are on your resume. Instead, we're looking for good people: good at work and have a good heart.

Our Values

Our culture is centered around high performance and high conviction. We value teamwork over ostentation, fulfillment over balance, and autonomy over compliance. We care deeply about surrounding ourselves with ambitious, exceptional individuals and believe that our culture is our greatest advantage against our competitors as well as thriving as the industry changes.

Service Culture Service is the bedrock on which our business is built and we believe a culture that fosters servant leadership is a truly differentiated, long-term moat that can only be built through trust. In short, nobody cares what you said, only how you made them feel.

Dare to be bold We believe that the greatest accomplishments in history come from small, under-resourced teams facing insurmountable odds. We buck the status quo and actively seek out challenges that others would claim to be impossible.

Fear averages Italic competes in a hyper-competitive industry where benchmarking against competitors is the norm. The danger of averages is in scenario where a 10% improvement over the status quo is celebrated internally but is still be a poor experience for a member or a merchant.

Team, teammate, self Our greatest asset, and the foundation to our long-term success, is our people. We believe in small egos delivering big impact. We are encouraging, trusting, and kind, intending to inspire and empower our teammates to become the best version of themselves.

Play the long game Our business is dependent on spinning a flywheel: the more merchants we support, the more products we can offer; the more products we offer, the more members we can attract and delight, and so on and so forth.