JavaScript As a Second Language

hello-1502369_960_720

Week eight at Code Chrysalis was a little different.

Until this week, Javascript was the language we used to learn software engineering. It was picked for several reasons, but there has always been the understanding that we are learning how to program, not how to program in JavaScript. At the beginning of last week we were asked to pick a programming language other than JavaScript and create something. Until the day we picked our language I thought I might explore a language like Rust or Go, mostly because I knew very little about them, but in the end I went with PHP.

Luckily my some of my classmates picked Go and Rust so I got to learn a little about those languages too, but for the most part my week was spent programming in and learning about PHP.

For some of the CC4 cohort, this week gave them a third language to learn more about.  Code Chrysalis is taught in English and in the tech world I am lucky to have English be my first language. Everything at CC is taught in English and it is spoken by everyone, but from the beginning there has been a lot of conversation about language differences. Not a day goes by when we don’t share an idiom or interesting word from English or Japanese (and sometimes German and Chinese).

You can never understand one language until you understand at least two.

Geoffrey Williams

Explaining what the idiom “carrying your own weight” or 三日坊主 means to a non-native speaker helps us understand our own languages better. This linguistic exchange is yet another thing I didn’t expect to learn when I started Code Chrysalis.

This week I learned that some of the idioms from JavaScript don’t translate to PHP and vice-versa. The languages do have a lot in common, but the syntax and how they are used seems very different.

On Monday I knew nothing about PHP and by Friday I had written a blog posting site using PHP and a rich framework called CakePHP.

Screen Shot 2018-06-03 at 10.43.12 PM

I spent a log of time reading documentation and setting up a environment to program in PHP. There is really too much for one blog post so I’ll just go with ten things I learned about PHP this week.

10 – You can make variable variables

9 – There is a lot of PHP out on the internet – mostly version 5.4 even though 7.1 has been out for a while now.

8 – You don’t need Apache to have a dev environment, but it helped me understand how things worked a little better

7 – Connecting to database is baked into the language. The phpMyAdmin is great for managing mySQL, but it needs to be updated to look like a modern tool.

6 – There are a lot of built in functions. Which is probably a good thing, but makes learning the language from scratch time consuming. There are 11 different sort functions.

5 – PHP is an open source language, but there are some interesting business models that can turn it into a paid product

4 – If your web server is expecting version 5.4, version 7.1 or 5.3 might not work. Also, there was no version 6.

3 – They made some weird syntax choices in the 90’s. I’m looking at you ->

2 – I can build something pretty quick that looks like a decent application just using PHP and HTML

1 – PHP used to stand for Personal Home Page, but now it means PHP(PHP Hypertext Preprocessor) Hypertext Preprocessor

Leave a comment