 Hi guys, my name is Michael, Michael Chang. Today I will be talking about how to master any programming language. Just to be a background, that's me. Defining an authorizer on GitHub and my blog site. You know, take a quick picture of this and give it a log. Okay, so a little bit about me. I'm a self-learned friend and backend IOS developer. I've been building websites since 2001. I started the PHP user group back in 2006. I also co-founded IOS DevSculpt, which is a developer group for IOS developers in Singapore. And I worked in a couple of startups. What I found back in 2010 and big 33, now for me back in 2012. I recently joined about a year ago, almost a year ago. I joined a company called New Innovate. So basically we do agile shop, we do Ruby on Rails and stuff. I started out as a PHP developer back in 2010, 21 brother. And I've been working on various types of websites. Stuff I've built on my own using PHP. Stuff on WordPress or Drupal and whatnot. So I started as a web designer. But I kind of picked up programming as I went along. Because I found I have a natural curiosity of how things, asking questions about how things work. So the first language I actually learned was actually co-fusion. Have anyone here used co-fusion before? Cfml, text for the win. So anyway, that was the first language I ever learned. That's what we're building websites because I was working with a bunch of developers who were using that straight out of Singapore Polytechnique. And there were girls, three girls teaching me how to code in Cfml. Which is kind of interesting. Anyone with that? I think it's great. And we need more of them. Indeed they are. Because they are very patient. They are very patient. So anyway, so I started as a PHP developer. So I was a Cfml developer. And then I went to PHP. And then from there I went on to learn JavaScript and all the other stuff. And Objective-C. It was quite an interesting job because I was trying to complete where the mobile developer was leaving the company. So it was like the CEO looked at me and said, hey, you can do mobile, right? No. You can learn, right? Yes. Let's do this. So I think I was a developer using Objective-C native only, depending on what I was asking. And since last year, I've been doing Ruby on Rails professionally for the last one year. So I guess I come with a fabulous experience in learning in switching from language to language. So I want to share with you a little bit about my experiences in doing so. So first thing I need to know when I come to any program language, recently I've been learning a little bit about Go. Anyone use Go? Go lang? Cool. So first thing I want to ask myself, how do I print stuff on screen? The fundamental Hello World app, right? How do you get stuff printed on screen? So with our PHP, you just do echo something or print something. Ruby is pretty much the same thing. It puts something and it ends up on screen, right? So that's the first thing you learn, how to get stuff printed on screen. The second thing you do is to learn about the data types. What are the different types? How do you represent information in that programming language? Like string, numbers, floats, right? So you ask yourself those kind of questions. How do I represent a string? How do I represent a number? So usually in the string, it will be a single quote, a double quote, around that piece of word or something you were writing. Wait, just show of hands. How many of you are actually developers here? Okay. How many of you are non-developers here? Okay. So I suspect this is kind of your shared experience as well. So if I'm speaking to Nubish level or something, please kick me in the ass, right? So how do you represent floats? How do you represent data? Date, date time. In my current job, we have a big puha about date time and date and time zones and shit. Ruby is pretty much soft, but it's a bit of a nightmare because our client doesn't want data to be stored in GNT time. We store it in SGT, which is kind of a crazy bit. Number three, so you'll learn about how to output stuff on screen. You will learn about how to represent data of different types like strings, integers, floats and stuff like that. Third is how do you pass information around, right? So basically how do you pass information? We read the same script from one script to another script and so on and so forth, right? So that's how you pass data around. When to use which one? Like variables. When you use variables, when you use constants, constants are immutable, unchangeable usually. Variables are mutable, can be changed. Arrays, caches and variable scopes. Variable scopes being the visibility scope. Can I actually use that variable in this function or in this file or something like that? Or has it been declared or instantiated? Stuff like that. So how do you pass stuff around? So in the PHP script, you have things like a super global array, which is the dollar sign underscore get, dollar sign underscore post, which represents what you send in a form post or what you send in URL. So that's really much how you pass data from one file to another file. In the Ruby or Rails app, there will be programs attribute, which you can then get stuff from the form post or whatnot, right? So that's one of the ways you can pass data around. Before, how do you add artificial intelligence? Stuff like if else, control structures, how do you control the flow of the code, right? So code usually reads from top to bottom, right? Sequentially. So how do you break the flow such that it will skip certain parts of the code? So that's one thing that you need to learn. In any vocabulary, you just, I think, should have this. Should have. So there's intro structures, flow control, in-out statements, switch cases, and stuff like that. So learn about this. How do you know you do that in that particular language? So it's so every language has the same concepts, but they represent it differently. And the last part is don't repeat yourself later too often, right? So stuff like functions. How do you create functions? You have functions and a group of programming code that's grouped together and it can be called together and the results can be returned and used in a subsequent piece of code. So functions. How do you get classes? Classes are another way of not repeating yourself, right? So everyone has the behavior of a piece of code. You can duplicate it or instantially create objects from these classes. So the classes are like the blueprints of how to create an object, right? And this object will contain all the behaviors that you will need in the piece of code. And I'll do things that serve as inclusions, right? So require, include. How do you import code from other places? So that's the, in a nutshell, the five simple tips of how to learn any programming language. Anyone, you all understand, right? Okay, right? Great. See, I'm speaking to a room of, you know, a room of converts. Anyway, so some specifics here. So on the left, you'll see PHP code. On the right, you'll see Ruby code. So, you know, strings. You have a string like this with a dump code. Same thing. Same thing in Ruby. It is how you do variables with all the sign. And this is variables in Ruby. Basically, you don't have to do anything. It's just declare something, write something. Name, for example. So to make it appear in a string, this is what we call a string interpolation. It's a variable interpolation into the string. So the name appears inside the string. So that's how you do that in Ruby. And this is how you do that in PHP. So pretty straightforward. Numbers, loads. This is how you represent variables with dollar sign in front. So anything with dollar sign in front in PHP represents a variable container. Ruby, let's say that way around. Ruby also has a dollar sign prefix as well. This is more for global variables. So it will be available throughout the entire app. Classes, static variables, constants. More specifics about flow control. For example, in PHP, you have the each segment with some condition. The condition returns true. Returns to do something inside the pre-spot code. Same thing in Ruby. Ruby has a very nice syntax. If you have a question mark behind it, it's sort of like a Boolean. Which means it's true or false. So it's true, prints the word hello. Good morning, by the way. So it puts hello, yeah. So this is a different way of presenting it. And of course, the information can also be stored as one layer. Or it can be composed as a complex composited layer. As in multiple information is stored together. So like an array, for example. So this is an array of objects, of numbers, an array of numbers. We call this an associative array. An associative array in PHP. This is what we call a hash in Ruby. Pretty much the same concept. You have a reference to it. Another key reference to it. And then you have the values inside. In IOS, or in Objective-C, it's called dictionary. I think Java, some Java devs here will probably know what that is. Hashes. Okay, got it. More specifics. In PHP, it's how they do classes. So this class extends the parent class. So there's an inheritance involved. So it's learning about all these concepts as well. In different programming languages. How do you do OOP? In Ruby, a less standard sign basically represents the inheritance as well. Some more language-specific goodies. So what do you need to learn to be good at any programming language? First of all, learn about package management. How do you include open source code into your application? So that's really cool. Like in PHP, there's Quick Guess Composer, which is a package management tool. In Ruby, there's Gems. You can do that as well. Different tooling available. What kind of text editors can you use? And lastly, how do you get help? Basically, find out. Go to Google, start the workflow. Go for screencasts on the web. Your internet connection is not very fast. Go get some books. Another way is to find a senior. Find a really good senior that can basically teach you how to program with you. That's all I have. Oh yeah, my company is hiring. So we're looking for Python. We do Python. We do Ruby. We do Scala right now. Node.js, everything else. So we're hiring. Go check this out. That's all I have. Thank you. Do you have any languages besides the ones that you talked about? Like for fun at all. For fun. I've done some Arduino stuff before. So it was quite interesting. So basically, if you go to the hackerspace later, there is this little door accessing. It's an infrared network testing. It's done as an Arduino setup. So double the built app. Yeah. It's even a concept as well. How do you create a variable? How do you pass stuff in? In programming for Arduino, there's a startup. There's a start. And then there's the loop. And then there's nothing else. It's different. It has an event loop, like JavaScript. So you've got to think about, okay, how do I get in and out of the event loop? There's no stuff in the event loop. It's interesting. Do you use some structure like design pattern for programming? I think design pattern comes a bit later. Once you've started getting familiarizing with the basics, like what I've shared with the five basic points, once you've understand the basics, you can bring those design concepts in, like design patterns, how you do MVC pattern, active record pattern, stuff like that, factory pattern, everything else. So I think those are more like helping you write code in a way that is smart. And that's what I talk about, reading other people's code. Learning about using a package manager lets you import code from other people who are doing open source stuff. So this is how you do this properly in the open source world, kind of thing. So I mean, open source contributors here, you're writing your open source libraries, it's out in the world. It's out in the world. Awesome stuff. Okay, that's all. Let's thank Michael. Thank you.