Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Secrets to Mastering Any Programming Language

The Secrets to Mastering Any Programming Language

Presented at FOSSAsia 2015, Singapore.

Michael Cheng

March 14, 2015
Tweet

More Decks by Michael Cheng

Other Decks in Programming

Transcript

  1. About Me • Self-learned front-end / back-end / iOS developer

    • Building web apps since 2001 • Started Singapore PHP User Group in 2006 • Co-founded iOS Dev Scout (2012) • Worked in startups: Foound (2010) and mig33 (2012) • Joined Neo Innovation Inc. in March 2014 3
  2. Strings, numbers, floats, date, datetime 2) What are the data

    types available & how to present them? 5
  3. Variables, constants, arrays, hashes and variable scope 3) How do

    u pass data around? When to use which channel? 6
  4. Specifics… 9 “A string” “Hello, $name” 42 3.146 $variable $obj->variable

    Klass::$static_var SOME_CONSTANT Klass::SOME_CONST “A string” “Hello #{name}” 42 3.146 local_variable $global_var Klass.class_var SAME_CONSTANT Klass::SOME_CONST
  5. Specifics… 10 if($morning == true){ echo “Hullo” } if ($morning)

    echo “Hullo” if morning? puts “Hullo” end puts “Hullo” if morning?
  6. Specifics… 11 array(10, 20, 30) array(1, 2, 3, 4, 5)

    array( “a” => “Apple”, “b” => “Banana” ) [10, 20, 30] [1..5] { a: “Apple”, b: “Banana” }
  7. Specifics… 12 class Tea extends Beverages{ private $water private $milk

    public function __construct(){ $this->water = true; $this->milk = true; } public function is_good(){ return true; } } class Tea < Beverages def initialize @water = true @milk = true end def good? true end private def secret “hello” end end
  8. Language specific goodies... • Package management • Read open source

    code (other people’s code - learn best practices) • Tooling • IDE / text editor • TDD/BDD • Get help • Google, StackOverflow, Screencasts • Pair programming with a senior • Books 13