Noob Coding
This is the repo of my notes. Now live on https://www.noobcoding.com/!
Goal
Teach: Try to develop a fast-learning process to help others grasp programming as quickly as possible. Focuses on speedrun so it does not guarantee insightful knowledge and is by no means comprehensive. However, some interesting stuff would be provided marked optional.
Teach Myself: Should be able to review or preview many important topics in our industry.
Improve: Since we are working in a fast-changing industry, the ability of fast-learning, or revolutionizing ourselves, is the most valuable asset in ourselves. Hopefully, a system of fast-learning could be established within this project.
Method
Pick any topic you want. But I would recommend (with bias):
For data scientists or anyone who wishes to learn AI (Trending):
Python
->Big Data
->Machine Learning
For those who want to build a website:
LNMP
For those who want to have some fun and see immediate feedback:
Frontend
For students or those who wish to find jobs:
Java
->LeetCode
For architects:
PowerPoint
For architects who want to write some real code besides PowerPoints:
C++
/Java
->Search Engine
/Distributed Systems
Basic
Effectiveness
A few tips and tools to boost development effectiveness.
Environment: Instead of working as root with too much privilege and too many folders, I prefer creating several linux users to seperately manage projects when I get my hands on a new machine.
Next time log in as 'ocean' and start messing around.
Command Line: The simplest way to improve command line usability is to modify the
~/.bashrc
file. Always add your working directory as aliases or use bashmarks..bashrc PS1 generator is a good site to create useful bash prompt style. My favourite:
And some useful aliases:
Vim: I use The Ultimate vimrc with some personal settings in
~/.vim_runtime/vimrcs/my_configs.vim
:Samba/FTP
Useful Commands
Version Control
Install git:
sudo yum install git
If you are using CentOS, other checkout git download pageSetting up git:
Github user: There are two kinds of url to clone your project: HTTPS and SSH. I recommend (the SSH way)[https://help.github.com/en/github/using-git/which-remote-url-should-i-use#cloning-with-ssh-urls] since it helps you type your Github password less in the future:
Get your local SSH keys:
Add your private SSH key to the ssh-agent:
Add your public SSH key to your Github account:
For each project, use a
.gitignore
file to avoid submitting sensitive/large/unwanted files to git: https://github.com/github/gitignore
Github
Java
Grasp Java Programming in a few days with a simple online tutorial.
Installation
Download JDK (I would recommend Java SE Development Kit 8) from the Oracle website.
Java Development Kit > Java Runtime Environment > Java Virtual Machine
.java ->
$javac
-> .class ->$java
byte
,short
,int
,long
: 1, 2, 4, 8 byte(s) length integerfloat
anddouble
: 4, 8 byte(s) length decimal(6/7 decimal digits, 15 decimal digits). Always suffix float value with the "f" else compiler will consider it as doublechar
: 2 bytes lengthboolean
:true
andfalse
with lowercase initialsNon-primitive: Arrays and Strings
"Unique" Grammer
Enhanced for loop:
do-while loop
Object-Oriented Programming
this.
Inheritance: With
extends
. Multiple inheritance is not allowed in Java.Polymorphism: Apart from method overriding, Java allowed method overloading within a class using different method signature (same method name, different parameters).
Abstract Method: Method with only signature no body (declared but not defined) or declared using the abstract keyword.
The class that inherits must provide the implementation of all the abstract methods of parent class else declare the subclass as abstract.
These methods cannot be abstract: Constructors, Static methods, Private methods, Methods that are declared "final".
Abstract Class: An abstract class outlines the methods but not necessarily implements all the methods.
Cannot be instantiated.
A class derived from the abstract base class must implement those methods that are not implemented(means they are abstract) in the abstract class.
Interface: With
interface
.Can contain only constants and abstract methods.
Cannot be instantiated.
Can only be implemented by classes or extended by other interfaces.
Java does not support Multiple Inheritance, however a class can implement more than one interfaces.
All methods in an interface are implicitly public and abstract. Using the keyword abstract before each method is optional.
An interface may contain final variables.
When a class implements an interface it has to give the definition of all the abstract methods of interface, else it can be declared as abstract class.
An interface reference can point to objects of its implementing classes.
Access Specifiers:
public
/private
/protected
/Default(Package Level scope)
C++
Also, start with any tutorial like this one from cplusplus.com. But you should realize that C++ IS HARD, because it's both old and powerful.
Useful tips:
string null terminated: https://stackoverflow.com/questions/4711449/what-does-the-symbol-0-mean-in-a-string-literal
Many ways to loop on every character of a string: https://stackoverflow.com/questions/9438209/for-every-character-in-string
Various way to init a 2D array: https://www.techiedelight.com/initialize-two-dimensional-vector-cpp/
There is no empty char: https://stackoverflow.com/questions/18410234/how-does-one-represent-the-empty-char
Full Stack Dev
Limit on url length (that affects the lengths of your GET uri and parameters unless you know what you are doing): unbounded. But being less than 2000 char would be most compatible. source.
Last updated