Coder Social home page Coder Social logo

bingyan-test's People

Contributors

leigh-p avatar

bingyan-test's Issues

Tuesday, March 27, code review

Good

  1. 能用 markdown 写 Readme 了,值得肯定

  2. 爬取了数据还是不错的,看得出下了功夫

  3. 对模块化有了一定认识和了解了

  4. git log 有了规范性尝试,这个真的不错!希望继续保持,详细的规范建议是参考社区规范(比如某些开源库的写法)

Improve

先补充一下昨天忘记了的几点

  1. 首先你如果用不同的浏览器(包含手机)开发会发现页面初始的样式是不一样的,这时候我们应当对 css 进行一次初始化,google 搜索关键词: css reset, normalize.css

  2. 依然代码规范的问题,制表符一定要 2 空格!制表符一定要两空格!制表符一定要两空格!

  3. body>div 这样的父子选择器,建议中间用空格 body > div

  4. js 文件用到了 commonjs 规范,这个你会发现浏览器运行不了的,这是社区规范,详情可以看 阮老师的博客 以及 seajs 作者谈模块化 等,模块化是前端工程化非常重要的一部分!

  5. js 里面 require 的一些包,建议先使用原生 js 开发以了解刀耕火种的开发方式同时也能方便后面的框架和库的学习与使用

  6. 捕捉到的数据,其实那个 status 对于爬数据的时候其实不重要,这个是后端返回前端的一个状态码而已,暂时不用管

  7. 爬取到数据的方式或路程建议记录下来,代码也好,工具也罢都可以记录到 Readme 中

Suggestion

  1. 了解前端工程化(只做了解),重点是理解前端模块化,

  2. 上面的一条可能目前比较远,所以重点还是 js 的基础,一定要把原生 js 的基础打牢

  3. 可以尝试 google 关键词:nodejs,commonjs,amd,cmd,es6 modules,http 以及 前后端分离

总体而言,今天学到的绝不会无用,爱上这个自学的过程!

Monday, March 26, code review

Good:

  1. flex 布局鼓励一下
  2. 代码量挺大的再鼓励一下
  3. 图片能上矢量图值得表扬
  4. viewport 值得表扬

Improve:

  1. css
    • 部分用了 ID 选择器,css 控制样式尽量少用 ID 选择器
    • 父子选择器之间要用空格喔
    • 单一 css 文件过大,可以适当进行拆分
    • flex 用到了,但是兼容性可能存在问题哦
    • 关于响应式布局,可以采用 flex + rem 弹性布局配合 media query
  2. html
    • html 语义化可以实践一下(虽然我写的最多也是 div...)
    • 标题至少应该换下呀
    • 格式略微有点问题

Suggestion:

  1. 可以尝试深入学习 js 内容了哦,这样才会有更多有趣的动态内容
  2. 代码风格有点问题,尽量使用 2 空格也就是设置一下编辑器的 tab 成两空格
  3. 提交内容可以 pull request
  4. git log 格式可以参考资料给的链接

总体可以的,加强点 js 就是了~

Wednesday, March 28, code review

Good

undefined

Improve

undefined

Suggestion

undefined

总的来说,希望把之前的代码重构下,之前提到过的问题应当及时调整

code review (补周四)

看到有 commit 原型链和继承,看的出对 js 有下很大功夫,表扬一下。

思考题

(之前准备的面试题)请实现以下的 extends 函数并思考为什么 es6 的 class 是语法糖~

function A(name, age) {
    this.name = name
    this.age = age
}
A.prototype.sayHi() {
    console.log(`Hello! I'm ${this.name} and ${this.age} years old.`)
}
/*
 *  extends one class from another one class
 *  @param  {function} contructor
 *  @param  {object} methods set
 *  @return {object} instance
 */
const B = extends(A, {
    sing() {
        console.log(`${this.name} is singing`)
    },
    dance() {
        console.log(`${this.name} is dancing`)
    }
})
const instanceB = new B('Mondo', 21)

instanceB.sayHi()	//  Hello! I'm Mondo and 21 years old.
instanceB.sing()	//  Mondo is singing
instanceB.dance()	//  Mondo is dancing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.