“Hey Shamus! You should do the hide and seek quest! You should do the pie quest! You should Slam your face in a car door!”
You people and your constant demands for me to abuse myself for your amusement.
“Hey Shamus! You should do the hide and seek quest! You should do the pie quest! You should Slam your face in a car door!”
You people and your constant demands for me to abuse myself for your amusement.
Typical non-programmer question: Why are there so many programming languages? Why doesn’t everyone just pick the best one and use that?
Fair enough.
The definition of the term “computer language” can be really nebulous if you encounter someone who is in the mood to engage in social griefing through pedantry. Instructions for a machine to follow? Does that include 19th century player pianos? Machine code? Flipping switches and wiring on those first-gen electric computer-type contraptions? Considering over half the “language” consists of dragging and dropping icons, does Scratch count?
Let’s just sweep that all aside and assume languages began with the idea of stuff like COBOL and FORTRAN and we don’t care to refine the definition further. Humor me.
It’s pretty much standard practice to do the “Hello World” program when you’re learning a new language. The goal is to simply print the worlds “Hello World!”, and that’s it. It’s basically the simplest possible program that can still do something observable and meaningful for someone new to the language.
Here is the program in assembly language:
_start:
mov edx,len
mov ecx,msg
mov ebx,1
mov eax,4
int 0x80
mov eax,1
int 0x80
section .data
msg db 'Hello, world!',0xa
len equ $ - msg
Here is a functionally identical program, written in standard C:
#include <stdio.h>
int main(void)
{
printf("hello, world\n");
return 0;
}
And in BASIC:
10 PRINT "Hello, world!"
The first is incomprehensible to anyone who doesn’t understand assembler. The second is tricky, but you might be able to intuit what it does. The last one is simple and obvious. So why would you ever use anything other than BASIC?
Here is how the trade-off works: On one end you have a powerful, flexible language that makes highly efficient code. It can be used to make anything and the code will always be extremely speedy and have the lowest possible memory overhead. (Setting aside the issue of individual programmer skill.) On the other end you have a language that’s easy to use and understand. Some languages are optimized for specific tasks. If you happen to be doing one of those tasks, then your work as a coder will be easier.
Let’s say you want to write a program to take a given number and perform two tasks:
1) Print the number normally in base ten. So, ten and a half would look like: 10.5
2) Print the number in a base-6 number system and use an @ symbol instead of a decimal point. So, ten and a half would look like: 14@3. I don’t know why you would want a program that does this, but I promise this isn’t really any more arbitrary or goofy than a lot of crazy stuff a boss might assign the hapless coder.
The first task is conventional and almost all languages will have a shortcut for making that happen. The second task is unconventional and thus we’re not likely to have a lot of built-in language tools for doing it.
In assembler, these two tasks will be of a similar level of difficulty. You’ll have to write your own number-printing code from scratch, but when you’re done the two bits of code will be about the same level of complexity (very complex) and the same level of efficiency. (Highly optimized. (Again, this is assuming you know what you’re doing.))
In C, the first task will be trivial, and the second will take some extra effort. Printing the base ten number will be much, much faster than printing in base 6 with @ symbols. (Although both will be so fast on modern computers you’d have trouble measuring them. Still, if you had to print out a LOT of numbers, the differences between base 10 and base 6 would become apparent.)
In BASIC, the first task would be super-trivial. One line of code. The second task would require pages of code. 99% of your programing time would be spent on the second task, and it would be much, much slower than the first task.
Assembly is referred to as a “low level” language. You’re down there interfacing with the machine on a pure, fundamental level. Every line of code is basically an instruction carried out by the processor. BASIC is a very high level language. You’re writing things in abstracted, human-friendly terms, and a single line of code might represent hundreds or even thousands of processor instructions. Generally, the higher the level of the language, the more tasks become either trivially easy, or impossible.
The C / C++ language seems to be the “sweet spot” in this particular tradeoff. Most software on your computer was written in that language. But despite its dominance, there are still a tremendous number of situations where other languages are better for specific tasks. Some examples:
10 PRINT "My chosen computer language is better than yours!"
20 GOTO 10
* There. Now we can be friends again.
Link (YouTube) |
I never noticed that.
I will note that most of those movies are from “early” Disney, before it became Mega-Disney. You don’t see any of their work from the last two decades in there. Most of it looks like stuff from the 50’s and 60’s. Still, it is amazing that they re-used so many sequences of movements. Makes me wonder what techniques they used to generate the sequences that made this an attractive option.
And then at 1:13 when they recycled the same terrible racist stereotype. Arg. I’ll bet they wish they could take that one back.
EDIT: People are questioning the stereotype charge. See, I have it in my head that the guy playing the drums is an Asian stereotype: Squinty eyes, buck teeth, and I swear I have this memory of him talking in an exaggerated Chinese accent. Maybe having some sort of “Confucius say” shtick?
But it's a childhood memory. So many people are questioning the stereotype that I'm now doubting myself. Maybe I'm confusing it with another character.
You’ve heard me sing this song before, but it bears repeating. The article came to fruition while I was playing LOTRO and I suddenly had to gain 20 levels of being a warrior so I could continue my career as a chef. I needed to kill one particular boar, ignoring the thousands of boars in the world that I could slaughter without effort. (Or that fact that “raise pigs” is not exactly an advanced technology.) The excuse given for why I needed the level 40 boar would do was… an excuse.
I managed to get a player from my kinship (Knights of the Third Age) to help me out. And by “help” I mean, he did it for me and I followed him around and tried to not get one-shotted to death by any of the monsters. So the task was either impossible or effortless. In either case, what exactly was the point of the exercise again? Neither option enriched my enjoyment of the game, and I’m still fantasizing about a gameworld which simply doesn’t presume to tell me how to have fun.
No joke today. I play it straight and say goodbye to Robert Culp.
Okay, one joke. But it’s not mine. Seen in a forum somewhere:
Cast members to have died so far while waiting for Episode 3: 1
![]() |
toasty asks:
Observation: Apparently there has not yet been released a working Crack for Assassin's Creed 2. I know this because where I live currently (Bangladesh) only pirated games are sold.
While I do not LIKE the method of DRM put in place on Assassin's Creed 2, what would you say if this method of DRM provided Publishers with an effective means to prevent piracy. I still maintain my belief that crackers and hackers will eventually crack/hack the game, but… what if they don't? Would you take this method of DRM (always being connected to the Internet) as “acceptable” if it allowed PC gaming to flourish without fear of piracy?
Some have claimed to have seen the game running. Others claim that it does not work at all. It’s possible the former are pirates trying to save face and claiming they have a crack that does not exist. It’s possible the people who claim the game remains un-cracked just had a bad version or lacked some technical secret to make the thing go. Rather than call one a liar by endorsing the other, I’ll just pull a Gandalf and admit ignorance by naming it caution.
But let’s play “what if” and assume the Assassin’s Creed 2 DRM remains un-cracked.
Continue reading 〉〉 “Ask Me a Question: Unbeatable DRM”
My picks for what was important, awesome, or worth talking about in 2015.
Since we're rebooting everything, MASH will probably come up eventually. Here are some casting suggestions.
A music lesson for people who know nothing about music, from someone who barely knows anything about music.
Who is this imbecile and why is he wandering around Europe unsupervised?
Why was this classic adventure game so funny in the 80's, and why did it stop being funny?
My picks for what was important, awesome, or worth talking about in 2014.
What is this Vulkan stuff? A graphics engine? A game engine? A new flavor of breakfast cereal? And how is it supposed to make PC games better?
WAY back in 2005, I wrote about a D&D campaign I was running. The campaign is still there, in the bottom-most strata of the archives.
Sometimes software is engineered. Sometimes it grows organically. And sometimes it's thrown together seemingly at random over two decades.
Crysis 2 has basically the same plot as Half-Life 2. So why is one a classic and the other simply obnoxious and tiresome?