We all know apps. They come in varying shapes, sizes, colors and uses, along with the occasional glitch or bug. But how much do we actually know about apps? If you asked most people how they're favorite app worked, (I'll use Flappy Bird as an example) they would simply say you tap the screen to make the bird jump and avoid various obstacles. If you asked to explain deeper, they would be confused. The basic building blocks of apps are often viewed as confusing and other worldly, but it can be as simple as translating a sentence or command.
Using the MIT app generator and Scratch programs, I have been studying the basics of coding and app building. While these click and drags aren't quite the 0's and 1's of binary, they still get the job done to make a functional app. I have used the MIT generator program to construct a color pallet generator for Android phones.
Before I explain the app, I'm going to explain the different parts--or "roles"--of code. There are 8 different roles commonly referred to while constructing an app:
1. Fixed variable. Fixed variables are things that never change in an app or program. No matter what else is happening, this variable remains as it is set, unless changed by hand. An example of this is colors of the bird; It stays the same color throughout the game.
2. Accumulator. This makes a running total of numbers. This is used in Minecraft when materials are picked up.
3. Aggregator. This creates a running list of numbers, actions, colors, or commands. Instant messaging software runs heavily on aggregators to save the conversation.
4. Walker. The elements of an iterator. This simply means a large list of code (or blocks with the app inventor) that go with a specified action or command.
5. Stepper. A stepper is a predetermined sequence of events. Steppers are used in a lot of horror games. Say you click a button to open the door. That action opens the door, then sends a command for a table to fall, or a monster to appear, or something like that.
6. Best-so-far. This one is pretty self explanatory. This is what makes score boards possible, with the highest number isn't removed until a higher number is reached.
7. One way flag. One way flag is a term for an action or change that will occur in the app or program, and will only be reset by starting over, clearing, or performing another specified action. This can be as simple as hitting the "try again" button on most games.
8. Most recent. This is a variable that contains a number, color, or command that was performed last. The simplest most-recent variable is the copy-paste function.
My app, called PickAPallet, is designed for artists who don't know what colors to use, or are trying to experiment with different colors. Simply click the Generate button, and six random colors will appear on screen. You can save a pallet you like by clicking the Keep Pallet button, and clear both pallets by clicking clear.
My pallet is extremely simple as far as the code. It is basically the same three or four lines repeated with some numbers changed here and there, but it gets the job done. It contains three one-way flags, one for each button. This is because nothing will happen in the program until a button is clicked.
This app contains six different fixed variables for the generated pallet--color1 to color6-- that are each assigned different RGB values whenever the generate button is clicked. The RGB values are three numbers between 0 and 255, one for green, red, and blue. With these three numbers, the computer can generate every color.
The Keep button simply transfers the color codes from the top to the bottom of the screen, The color for ball1 goes to ball7, ball2 to ball8 and so on.
The Clear button simply sets the colors for all 12 of the balls to white--their original setting.
This program shows just how simple some programs are, but also makes it clear how complex others are. If my app contained a large code mostly made from duplicating a few blocks for three buttons, how complex is the coding behind some games like World of Warcraft or Call of Duty?
-written by Meghan Hansen
What HTML5 looks like, probably.
FOR MOST, code is probably the mystical language of the internet gods who bring us web pages and YouTube videos and animations and pretty much everything else we don't really know how to explain.
"What even is code?" you may be asking. "It sounds scary and unusual and I don't like scary and/or unusual things!"
Well, code as a concept is pretty easy to grasp: using letters, numbers, and whole lot of semicolons, programmers, (the mystical people behind all of the Internet) are able to make things happen on a computer.
Code, like human communication, comes in a variety of languages. These languages are just like the languages we speak, but in a very different way. Every coding language has its own rules and operations.
The same phrase in say HTML, a very popular coding language, may do something totally different in Flash, a different coding language. Or it may just do nothing at all and cause your code to fail.
Like a great linguist, some programmers take the time to learn a few different languages. Then, of course, the challenge is to not accidentally mix them up.
So if you frequent the Internet, you may have heard of this little site called YouTube. Chances are you use it at least 5 times a week, though probably more. It's become synonymous with videos themselves. So maybe you've heard hushed rumors about this scary, foreign thing called....
HTML5 dun dun DUN! *thunder crash*
HTML5 is shrouded in a veil of mystery and uncertainty.
"Are our channels safe?! What about [insert YouTube channel name]?! Will I still be able to watch their videos?! Is this the FALL OF YOUTUBE?!"
No. It's not. What is happening to YouTube, most notably, but also a whole slew of popular websites, is that they are adapting their code from HTML4 or other coding languages, to HTML5. This is a good thing! HTML5, a more updated, advanced, and versatile language, means programmers can do much, much more and make their websites easier to use and more flashy. People are calling HTML5 the language of the future, and saying it will revolutionize coding.
"Change?! But I hate change!"
But this change is really, really good. HTML5 means coding will be easier, more efficient, more versatile, and better looking. Videos on YouTube can run faster, smoother, and at a better quality. HTML5 can support a bigger load of people, which means less crashing and more fuel for everyone's Internet addiction!
So never fear! HTML5 is leading us to a bright new, sparkly Internet. Probably something like this-
But probably not.
-written by Caleb Goldberg