ben40d9 / extra-proj Goto Github PK
View Code? Open in Web Editor NEWdata manipulation w/ a csv file
data manipulation w/ a csv file
opening index.js is kind of stressful now. it is scary and hard to read. there is enough going on in this project now that we should organize it into folders, files, and modules. i'm also going to add new datasets with new problems to this repo, so it would be good to housekeep before then.
organize this code however you see fit. experiment with different ways of splitting it up, keeping in mind that your main objective is to make it modular and easy to use in different places. look at what other node projects do to get some ideas, but the only wrong answers here are ones that don't make it any easier for you to pass code between files or build on it without modifying the existing code too much. abstraction is key, it's just easy to over-abstract too, so be careful.
make your normalized csv data reusable. what i mean by this is only read the file and parse the stuff into a workable format once, and export that data from the file using module.exports so we can require it elsewhere. dont use import/export because we have not enabled es6 for this project, it is still commonjs.
put each problem in its own file. put comments describing the problem and your thought process in the solution you came up with or any relevant notes.
vscode sets up eslint stuff for you out of the box but make sure you have this extension installed.
"what the fuck is a linter? don't i have prettier already?"
eslint we will use for linting. prettier we use for formatting.
linting makes sure your code will run without errors. it makes sure you're following the language's rules to varying degrees.
formatting is just checking subjective code style preferences. it checks against your own rules.
in short:
you set linters and formatters up with config files usually. think .prettierrc.js/json/etc
and/or .eslintrc.js/json
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.