I got the go-ahead from Mark to start porting my Python code to PHP. When I found out that Wikimedia’s code base was PHP, I was a bit apprehensive. I liked learning new languages (in theory), but PHP always seemed to just look weird to me. Maybe it was because of the $’s,
An interesting side story about my history with PHP: I actually tried learning it in my teens. I can’t say exactly when, but it must have been when I was 14-15 years old, nearly 10 years ago (where does the time go?!). I had found the world of text-based role-playing games and my platform of choice was using forums. Back then I had already been somewhat indoctrinated in HTML and CSS, but then I saw .php extensions and thought, wow, I should learn that too!
It’s important to note that back then, I didn’t even know about the concept of programming, so as you can imagine, it was basically flew over my head. I looked at it and tried it out for a few hours, scourging up tutorials and basically gave up.
Now that I’m a more seasoned programmer who has learned weird languages like lisp, prolog, and R, I thought PHP wouldn’t be so bad. Mark said it was supposed to be similar to C/C++, I like C/C++, I should like this.
I have to confess, PHP isn’t exactly on the top of my “I want to program in this language” list. I tried looking at some PHP code and it honestly transported me back to being 15 years old and trying to learn a programming language.
To be honest, it probably isn’t so bad. It just feels that way. I think my trajectory for learning a new language is this:
- Ooh, a new language! Let’s roll up our sleeves and get going.
- Okay, so this is what it looks like. Why does it look so weird? Where are all the things I’m used to?!
- BLARGLEFLARGLE!!!! WHY DOESN’T THIS WORK?
- Oh! Yay, it runs! … but it returned the wrong objects/output
- I feel like crying…
- More tinkering and some semblance of a program emerges. YAY!!
- NOOOO, BUGS.
- More bugs.
- Fixed the bugs.
- Work on a different part of the program
- Repeat 2-10 until you manage to cobble together something that works(ish) or have already given up and is enjoying a glass of beer or wine or shots.
I’m probably over-exaggerating, but that’s about how it feels like. I’m sure it feels like that to many people (right?!).
In any case, I’ve decided to try going through PHP’s Language Reference first because I just want to get acquainted with the look of PHP before I get overwhelmed with trying to directly translate my Python code to PHP.
Crossing my fingers and hoping that it’ll start looking less like chicken scratch and more like code.
OH! If anyone has some additional resources for PHP, let me know. I’m thinking that maybe a book is the way to go because online tutorials never really seem to help me much.