Giter VIP home page Giter VIP logo

clean-code-javascript's Introduction

Olá 👋

clean-code-javascript's People

Contributors

allansiqueira avatar brunofamiliar avatar claudiomborges avatar edkf avatar esganzerla avatar felipe-augusto avatar flyri0 avatar leocavalcante avatar lnfnunes avatar pedroapfilho avatar renatocfrancisco avatar suissa avatar ubirajaramneto avatar wandersonwhcr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clean-code-javascript's Issues

[code] Não otimize demais

  • Neste trecho, o exemplo não está invertido? Imagino que o correto seja o abaixo.
  • Outro detalhe é sobre o argumento que foi feito em cima de browsers antigos, porém a maioria dos códigos estão em ES2015, o que perde um pouco o sentido do argumento. Talvez seja melhor escrever de outra forma...

Ruim:

// Em navegadores antigos, cada iteração de `list.length` não cacheada seria custosa
// devido a recomputação de `list.length`. Em navegadores modernos, isto é otimizado.
for (let i = 0; i < list.length; i++) {
  // ...
}

Bom:

for (let i = 0, len = list.length; i < len; i++) {
  // ...
}

Deveríamos traduzir nomes de variáveis?

O que vocês acham, os nomes de variáveis precisam ser traduzidos? Digo isso porque em algumas seções talvez seja de grande ajuda a tradução do nome para entender melhor o que está acontecendo, por exemplo, na seção Não adicione contextos desnecessários:

const Car = {
  carMake: 'Honda',
  carModel: 'Accord',
  carColor: 'Blue'
};

function paintCar(car) {
  car.carColor = 'Red';
}

Ficaria:

const Carro = {
  marcaCarro: 'Honda',
  modeloCarro: 'Accord',
  corCarro: 'Azul'
};

function pintaCarro(carro) {
  carro.corCarro = 'Vermelho';
}

Outras ideias para melhorar o código

Learn with Jquery how to use the vanilla javascript

Bad:

var a = document.getElementById("a")
var b = document.getElementById("b")
var c = document.getElementsByClassName("c")
var d = document.getElementsByTagName("body")[0]

Good:

const $ = (v) => document.querySelector(v)

let a = $("#a")
let b = $("#b")
let c = $(".c")
let d = $("body")

Stop repeating console.log

Bad:

console.log(a)
console.log(b)
console.log(c)
console.log(d)

Good:

const log = (v) => console.log(v)

log(a)
log(b)
log(c)
log(d)

Sugeri estas ideias no repositório inglês, mas não aceitaram.
Se quiser adicionar apenas na versão português...

Opinião do bot gringo:

  • Hey there! I only want to add subsections that have a corresponding one in the book Clean Code. I don't think this one does.

Minha opinião:

  • Is the goal to write cleaner code, or philosophize about the book?

Moniwell's code

1

MØÑĮ WĘŁL


2 I'm still learning
3
welcome to GitHub

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.