Coder Social home page Coder Social logo

hurteng / quickcoding Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 864 KB

🔮快速学习并掌握一门新的编程语言, Quickly learn and master a new programming language(Java, Kotlin, JavaScript, Python, Dart, Go...)

License: Apache License 2.0

Java 25.13% Kotlin 16.30% Dart 16.18% Go 15.03% JavaScript 12.21% Python 15.14%
java kotlin javascript python dart go programming-language error-code

quickcoding's Introduction

English | 简体中文

💎 Project Introduction

The project address: GitHub

What do you generally do when you start learning a new language? Write a Hello World and print it out? I believe everyone is familiar with this scene, but just printing a simple Hello World will allow you to quickly learn a new language? The answer is no.

Programming languages are similar, except that the syntax is different, but the focus of programming is on the logical implementation of the code and the algorithm. Therefore, learning a new language needs to be combined with actual coding. By implementing a program function, you can familiarize yourself with the syntax of the programming language and enable you to quickly master the language.

In this project, I used Java, Kotlin, JavaScript, Python, Dart, Go to implement a small program that generates csv text corresponding to the language code.

✨ Function Description

This is a small program that reads text and generates code.Its function is as follows:

  • Read the text of a csv
  • Parse the data line by line
  • Extract and split the content of each line to generate metadata
  • Generate these data into the constant class and enumeration code of the corresponding language.

Contents of csv text:

csv csv-prettify

Generated file:

output-list

Generated code:

  • Java

code-java-constant code-java-enum

  • JavaScript

code-javascript-constant

  • Kotlin

code-kotlin-enum

  • Python

code-python-enum

  • Dart

code-dart-constant

  • Go

code-go-enum

🔑 Realization Principle

principle

The table contains two-dimensional data, and the data is organized by rows and columns.

  • The first row is the header row, and the cells in it represent related attributes
  • The first column is the index column, where the cells represent the relevant names
  • Each row of the table represents a set of data (can be understood as an object, each cell represents the relevant attributes of the object)

After parsing the data according to the above rules, we can generate corresponding constant classes and enumeration classes through character templates.

📖 Knowledge Comb

The knowledge involved in this is:

  • Reading and writing files
  • Asynchronous programming
  • Exception Handling
  • String processing
  • Regular expression
  • Logical control flow
  • Class, variable, method function definitions
  • Variable scope
  • Basic data types
  • Collections (arrays, lists, mappings)
  • Traversal of collections
  • Optional and default parameters
  • Enumeration
  • Structure

❤️ Special Note

Although the function of this program is simple, it covers a series of basic programming language knowledge points, through which you can quickly learn and master a new language. No need to write simple Hello World, try to complete this small program with code. When you implement this small program, you will find that mastering a language is not as difficult as you think.

This project is just an introduction, for your reference. If you find that the code is not written well, or if there are other new language implementations, you are welcome to contribute the code to PR. I hope everyone can learn useful things from this project. If you like this project, you can order it ⭐️️ Star Favorites

⚖️ Project License

Copyright 2020 HurTeng

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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.