Hey Automattic, I’m Farez

This is an “application post” for a Summer 2013 internship at Automattic.

Hey Automattic, I’m a senior computer science student at the University of British Columbia who would love to work on any of the following WordPress ideas. These ideas are in no particular order of preference or importance and are simply things I found missing from WordPress when I was looking for them.

YouTube Channel plugin

This plugin will update either a page with some predetermined number of YouTube videos (from a channel or playlist) or create a new post draft with a YouTube video embedded in it. We could even have custom control in the dashboard that allows for video selection rather than automatically importing all new videos. Some sites/channels post a large amount of YouTube content and they may not want all videos on their website.

I did find a WordPress.org plugin that accomplished part of this but that plugin would import videos every 24 hours and it did not check for duplicates. This resulted in a large number of duplicate post drafts.

Why?

This works very well for sites that rely heavily on video content because they can bring additional discussion to their own website rather than YouTube comments which aren’t monitored very well. This may also contribute to the site’s SEO. I’m by no means an expert on SEO but I imagine increased comment activity on your own site creates meaningful discussion which in turn helps your SEO score.

Photo Albums for Media Libraries

I was recently moving an old HTML site to WordPress.com (see bhyvc.com) and while doing so I came across a large number of photos I had to import. While creating galleries was helpful as I was embedding photos in posts, I couldn’t find a way to “save” those galleries as albums. Having albums saved would be quite helpful because it enables an easy way to search for that specific album (or a photo in that album) if it’s needed in the future.

Search Categories and Tags

Large websites post a lot of content and their tag and category collection quickly becomes hard to manage. With a search function, site editors can enforce proper usage of the existing collection of tags and categories. This eliminates duplicate category and tag creation and keeps the meta data collection easy to manage.

The above ideas come from problems I’ve encountered while working with WordPress sites over the last couple of years but I am more than happy to work on anything WordPress, whether that be theme, mobile or plugin development.

I’m familiar with both WordPress.com as well as self hosted solutions via WP.org and I do understand a theme’s structure at a high level (thanks to Yoast). I recently completed a relational database course and a SQL project at school and I’m positive I could pick up PHP and MySQL easily.

I look forward to hearing from you and meeting some WordPress enthusiasts at WordCamp Vancouver this year.

What is low-level programming?

So in order to understand what low-level programming is, one must know about the language stack. To put it briefly, computers don’t understand high level languages like Java, C++, C# etc. Processors understand bits which exist in two states; 0 and 1. There are multiple software mechanisms (aka compilers) that convert high level languages to machine code and then to zeros and ones.

Somewhere in the depths of bits and switches, low-level code looks like this (credit to CPSC 213 at UBC). We have instructions that perform small steps like load (read), store (write) and jump/branch (functions, if statements, and loops) using registers which are essentially temporary storage devices for the processor. Load and store operations also use memory directly, so they’re incredibly fast, but also very dangerous if used incorrectly. Consider the following snippet:

ld $5 r0        // loading the value 5 in register 1
ld $4 r1
ld $3 r2
not r1          // r1 = - r1 = -4
add r0 r1       // r1 = r0 + r1 = 1
bgt r1 b1       // jump to label b1 if r1 > 0
else: add r2 r0 // execution of this instruction depends on conditional branch
st  r0          // r0 = 8
b1: st  r0      // r0 = 5

The first three lines simply load values into registers. Performing subtraction requires 4 steps (lines 1,2,4 and 5) and a comparison requires 5. Keep in mind, we could easily have a pointer to a variable defined earlier (via it’s memory address) in line 1 where we load 5 into register 1. “Else” and “b1″ are labels, they don’t mean anything. Assembly programmers use labels to identify conditional statements and branches.

It’s important to realize that the values in these registers are arbitrary. I’m trying to show how small each operation is. Every instruction performs a very small task. While a higher level language may simply compare the value of a variable to zero in order to perform a conditional task, low-level languages have to go through multiple steps to carry out the same task. This is part of the translation process from a high level language, to machine code, something the processor understands.

The processor specification (set of rules, protocols etc.) defines what code each of those operations gets. Imagine machine code defined by 4 digits. The first identifies the type of instruction. Let arithmetic operations have a machine code of 5, the “add” operation can be defined as a 2, and the last two are register numbers. Line add r0 r1 can simply be represented as 5201. Processors can therefore, understand what operation to perform using which registers via this simple machine code.

Low level programming is quite powerful due to the various opportunities to optimize performance, such as reusing register values. Perhaps we need register 2′s value somewhere later in our program so we don’t reassign it. Assembly languages and processor specs will also define rules to optimize performance, such as using certain registers for the same purpose all the time so we don’t end up performing unnecessary reads and writes (which slows things down).

Comp sci and the biology of life

0101actgI was deeply interested in biology & chemistry throughout high school and my first year and a half of university (and I still am, to some extent) but after a poorly executed semester of organic chemistry that denatured my GPA (zing!), I decided to switch my major to computer science.

This decision was made with a couple things in mind. I love technology, computers and everything that falls under the nerdumbrella and I just don’t see myself working as a pharmacist.

So after a year and a half of computer science, some self taught Photoshop & WordPress knowledge, I finally feel like I’m making progress towards some marketable skills I can add to my resume.

Like every epiphany ever conceived, I was sitting under a tree when an apple decided it was time to fall.exe on my head. The concussion that followed led me to realize the similarities between basic computer science & genetics.

At the very atomic level, computers rely on small inputs, which form logic gates which form “circuits” which make up your grandma’s old dell that you desperately tried to play CS 1.6 on when you were 11.

The beautiful thing about these small inputs is that they’re very simple. They exist in two states. On or off. True or false. 0 or 1. When translated to hex & other forms of number representations, these inputs can make up instruction sets. These sets are essentially a set of rules to facilitate the translation of user input to processor input (your overclocked Sandy bridge doesn’t understand you just yet).

In the biology of life, genetic instructions make you who you are. You know those people that say things like “your experiences make you who you are”? Yea, they’re lying. And remember that time your mom said you were special? She lied. Sorry about that.

These genetic instructions also rely on small inputs. Except these inputs exist as chemicals. Specifically adenine (A), cytosine (C), thymine (T) and guanine (G). DNA is read in groups of three bases known as “codons.” For instance, TAG is one of the “stop” codons that stops further translation. Four base pairs read in groups of three results in 64 possible codon combinations. This forms the genetic instruction set.

Another thing that blows my mind is how DNA is read. Some parts of these DNA sequences, known as introns are spliced out during transcription. They’re essentially ignored during the reading process, very much like code comments. Exons are expressed, just like the core code is translated by a compiler.

And things get complicated when mutations (equivalent of bugs in software) are introduced during the translation process and much more, but I’ll leave that for later.