botbotbot 's blog

Grammar check

Web Based

  1. FrazeIt - checking phrase from top writers
  2. LanguageTool - proof­reading program
  3. Grammarly makes you a better writer

Tools

  1. Vim Spell-Checking
  2. Using Spell Checking in Vim

Open/closed principle Example in Python

FizzBuzz Problem

  • print any number divisible by three with the word “fizz” instead of the number.
  • print any number divisible by five with the word “buzz” instead of the number.
  • print any number divisible by seven with the word “bang” instead of the number.

FizzBuzz Nested If

FizzBuzz OCP

References:

  1. แนะนำปฏิทิน SOLID Principle
  2. Python SOLID
  3. Open/closed principle
  4. Fizz buzz

Coding

Good Code

  1. Clean code
  2. Semantic method naming

Design Pattern

  1. Design Pattern ตอนที่ 1 ภาพรวมของการออกแบบ
  2. Design Pattern ตอน 2 Singleton
  3. Design Pattern ตอนที่ 3 Facade
  4. From STUPID to SOLID Code!
  5. The SOLID Principles Example in PHP
  6. The SOLID Principles in 5 minutes
  7. Tell, Don’t Ask

Functional Programming

  1. การเขียนโปรแกรมเชิงฟังก์ชันเบื้องต้น ตอนที่ 1
  2. การเขียนโปรแกรมเชิงฟังก์ชันเบื้องต้น ตอนที่ 2
  3. การเขียนโปรแกรมเชิงฟังก์ชันเบื้องต้น ตอนที่ 3
  4. Statement vs. Expression
  5. การเขียนโปรแกรมเชิงฟังก์ชั่น (Functional vs. Imperative Programming)

Pair Programming

  1. Pair with Me
  2. Power of Pair Programming by roofimon
  3. Some thoughts on pair-programming styles
  4. Effective Navigation in Pair Programming
  5. All I really need to know about pair programming I learned in kindergarten

TDD - My Talk about TDD

One of the ironies of TDD is that it isn’t a testing technique (the Cunningham Koan). It’s an analysis technique, a design technique, really a technique for structuring all the activities of development. - Kent Beck’s “Test-driven development: by example”:

  1. TDD :: ถ้าอยากเดินให้เร็ว วิ่งให้ไว ต้องเริ่มจากเลือกเส้นทางให้ดีก่อน
  2. TDD ง่ายๆ สั้นๆ (Java)
  3. TDD with Java Slide
  4. Coding Dojo - TDD - Lesson 1 (Java)
  5. Understanding Test Driven Development
  6. TDD is dead. Long live testing.
  7. 5 Questions Every Unit Test Must Answer

    Next time you write a test, remember to answer all the questions:

    1. What are you testing?
    2. What should it do?
    3. What is the actual output?
    4. What is the expected output?
    5. How can the test be reproduced?

Testing Story

  1. มาดูกันว่า Mock, Stub และ Dummy แตกต่างกันอย่างไร ?
  2. The Testing on the Toilet (TotT) series
  3. Testing on the Toilet: Test Behaviors, Not Methods
  4. Testing on the Toilet: Test Behavior, Not Implementation
  5. TotT: Better Stubbing in Python
  6. Unit testing best practices
  7. Good Test, Bad Test
  8. TestDouble - Martin Flower
  9. Testing on the Toilet: Know Your Test Doubles
  10. Understanding Test Doubles (Mock vs Stub)
  11. Mocks Aren’t Stubs
  12. Unit Tests Are FIRST Fast, Isolated, Repeatable, Self-Verifying, and Timely
  13. A Set of Unit Testing Rules
  14. Why Most Unit Testing is Waste By James O Coplien
  15. Test-induced design damage

    When you stop driving your design first, and primarily, through your tests, your eyes will open to much more interesting perspectives on the code. The answer to how can I make it better, is how can I make it clearer, not how can I test it faster or more isolated. - DHH

  16. Testing like the TSA - Thinking Skills Assessment

    Should read in “Seven don’ts of testing” topic

  17. We don’t (always) need no stinkin’ testing framework

Diagram

  1. Ascii Flow - Online Ascii Diagram
  2. Ditaa - Ascii Diagram To Image Diagram
  3. TextDiagram - drawing Ascii UML sequence diagram in pure text
  4. Mermiad - Diagrams and flowcharts from textsimilar to markdown
  5. JS-Seq-Diagram - Turns text into UML sequence diagrams

Story

  1. How 500px serves up over 500TB of high res photos
  2. Software Design Steps - User Interface to Data Model then API
  3. How Mashape Manages Over 15,000 APIs & Microservices
  4. Backend Developer สำหรับ Game Studio ต้องทำอะไรบ้าง?

Better Programmer

  1. Programming Is Terrible
  2. Software needs to be better — FunFunFunction #1
  3. “How do I learn to write simpler, more efficient code with fewer lines?”
  4. How does one quickly understand a large code base and start contributing to it?
  5. Be the worst programmer at your company.
  6. Algorithm skills doesn’t make a good programmer.
  7. Staying relevant as a programmer
  8. Developer ควรลดความซับซ้อนของ code ลงบ้างนะ
  9. Googling does not make you a good developer

    nowadays, the most important quality of a developer is ability to learn new things quickly.

    It is a pitfall to read everything.

  10. Manifesto Software Craftsman

UX

  1. ตำแหน่งไหนบ้างที่ใช้ UX แล้วงานลดลง

Software Company

  1. Don’t Destroy Your Dev Team By Growing

    9 women and 1 month do not a baby make

    Junior engineers also don’t become senior engineers in a vacuum.

  2. Coding is boring, unless…

    If a developer starts feeling too comfortable or too specialized, it’s time to rotate.

    Knowing exactly what to code before coding transforms an intellectual and creative process into a mechanical process; in other words, it turns developers into code monkeys.

  3. How Much For This Software?

    To summarize, this is wrong (because there is no “there”): Hey driver, how much will it cost to get there? And this is right: Hey driver, how much do you charge per mile, and do you have a map?

Make your open sources

  1. How to contribute to large open source projects like Docker (LinuxCon 2015)
  2. Open Source Development: a few guidelines
  3. Contributing to Big Bad Open Source
  4. How To Write A Great README
  5. 8 New Steps for Fixing Other People’s Code
  6. Code Review
  7. Open Source Protocol

ETC

  1. Awesome Awesomeness
  2. How to name things: the hardest problem in programming
  3. How to Hire a Developer
  4. Function vs Method vs Procedure
  5. Terrible Code or Cyber Terrorism - Which Will Kill You Faster
  6. RubyConf 2015 - Hacking Spacetime for a Successful Career by Brandon Hays

    Vision: Industy/Socienty Connection: People Technical skill: computer

    Entrepreneur: Invention & Vision Manager: People & Strategy Technician: Tools & Tactics

  7. WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice
  8. What is a Full Stack developer?
  9. สร้างเว็บอย่าง Wongnai กับโจทย์ล้านแปดที่ต้องแก้ (ตอนที่ 1)

All about Secure Shell

SSH

SSH Alias Config

# .ssh/config
# use $ssh <hostname> to connect
# Host * //setting for every host
  Host <hostname>
  HostName <ip>
  User	 <username>
  Port  <port>

Using SSH ProxyCommand to Tunnel Connections

# .ssh/config
#ProxyCommand ssh someserver -W %h:%p
#  With the newer versions of openssh-client you can also use the -W option to forward the connection.
#LocalCommand
#  Specifies a command to execute on the local machine after successfully connecting to the server
#DynamicForward
#  Specifies that a TCP port on the local machine be forwarded over the secure channel, and the application protocol is then used to determine where to connect to from the remote machine.
#IdentityFile
#  Specifies a file from which the user's DSA, ECDSA, Ed25519 or RSA authentication identity is read

  Host <proxy>
  HostName <ip>
  User <user>
  ProxyCommand ssh <destination> -W %h:%p 2> /dev/null
  IdentityFile <ssh_key>

SSH login with key-based authentication

# Client: generate key
$ ssh-keygen -t rsa -b 4096

# Server: put client key
# copy ~/.ssh/id_rsa.pub into ~/.ssh/authorized_keys in server
# (option: server denies passed auth)
$ sudo vim /etc/ssh/sshd_config

SSH Login with Password

# /etc/ssh/sshd_config
PasswordAuthentication no

Match address 192.0.2.0/24
    PasswordAuthentication yes

SSH Proxy with SOCKS5

$ ssh -N -D 8080 user@server -p 443
# should using port 443 to avoid blocking port 22
# setting proxy  on your browser
# sock host 127.0.0.1 port 8080
# .ssh/config
# use $ssh -N <proxy> -p 443
Host <proxy>
  HostName <ip>
  User <user>
  DynamicForward 8080

SSH Skip known_host

$ ssh -o "StrictHostKeyChecking no" user@host

Resources

  1. Setup and Setting SSH
  2. SSH Crash Course – Fun With Remote Shells, From The Ground Up
  3. SSH: Best practices

All about Latex

Install Latex OSX (mactex)

$ brew cask install mactex

Figures

Label

\caption{Close-up of a gull\label{fig:gull}}

Landscape

\usepackage{pdflscape}

\begin{document}
\begin{landscape}
.
.
.
\end{landscape}
\end{document}

Math Equation

# inline equation
$ a + b $ #equation
$$ a + b $$ #equation in new line

# equation
\begin{eqaution}
\end{eqaution}

# equation array
\begin{eqnarray}
\end{eqnarray}

Table

Spreadtab - Calculatable Table latex

Separate compilation of child documents

  • Subfiles

    use setting from master latex

  • Standalone

    have own setting not using from master latex

Tips

IEEE Paper

  1. How to add the IEEE copyright and publication id on a IEEETran conference .tex file
  2. How to write a conference paper (IEEE, ACM) using Latex
  3. LaTeX tutorial: How to cite references/paper/articles in Latex

    # cite to bibtex references
    \usepackage{cite}
    \cite{sample1234}
       
    # referecnes from bibtex
    \bibliographystyle{IEEEtran}
    \bibliography{file_of_bibex}
    

BibTex

Latex Slide (Beamer)

Beamer Theme

Resouces

  1. Thai Latex User Group
  2. Thai LaTeX and MATLAB
  3. ShareLaTeX Blog
  4. Latex Online Editor - Overleaf , ShareLatex

Video

  1. Techpush LaTex Beginner Tutorial Guide
  2. Video Tutorials - Overleaf

Book

  1. The Not So Short Introduction to LATEX2ε
  2. LATEX2ε Cheat Sheet

Example

  1. IEEE Example Conf/Journal

Latex Docker

ETC.