Documente Academic
Documente Profesional
Documente Cultură
On Entrepreneurship
DuckDuckHack
Create instant answer plugins for DuckDuckGo
duckduckhack.com
3
Curator Hacker Monthly is the print magazine version
Lim Cheng Soon of Hacker News — news.ycombinator.com, a social news
website wildly popular among programmers and startup
Contributors founders. The submission guidelines state that content
Nikos Michalakis can be “anything that gratifies one’s intellectual curios-
Andrew Chen ity.” Every month, we select from the top voted articles
Chris Strom on Hacker News and print them in magazine format.
David Valdman For more, visit hackermonthly.com
Justin Kan
Alexandru Nedelcu
Harvey Green
Hynek Schlawack
Advertising Published by
James Hague
ads@hackermonthly.com Netizens Media
Andreas Zwinkau
46, Taylor Road,
Joe Peacock
11600 Penang,
Tommy MacWilliam
Contact Malaysia.
Lou Montulli
contact@hackermonthly.com
Proofreaders
Emily Griffin
Sigmarie Soto
Printer
MagCloud
Hacker Monthly is published by Netizens Media and not affiliated with Y Combinator in any way.
4
Contents
FEATURES
06 On Entrepreneurship
By Elon Musk
STARTUPS
5
FEATURES
On Entrepreneurship
By Elon Musk
6 FEATURES
interest and getting a little bit of to the main cable, which gave us improvement to do things with
money from them. There were only our internet connectivity for like a it. It’s really just an entry in the
six of us at Zip2: three sales people hundred bucks a month. So we had database.
we hired on contingency by putting just an absurdly tiny burn rate as Since the paper form of money
an ad in a newspaper; myself; my well as a really tiny revenue stream. is really only a small percentage
brother, who I convinced to come However, since we actually had of all the money that’s out there,
down from Canada; and a friend of more revenue than expenses, we why not innovate financial services
my Mom’s. were able to say we had positive on the Internet? So, we thought
Things were pretty tough in the cash flow when we talked to VPs. of a couple of different things we
beginning because I didn’t have That helped, I think. could do. One of the things was to
any money. In fact, I had negative combine all consumers’ financial
money because of huge student Founding of PayPal services needs into one website,
debts. At one point, I had to choose I automatically wanted to do some- such as banking, brokerage, and
between renting a place to live thing more after Zip2. Immediately insurance. And that was actually
or an office, so I rented the office after the sale, I’d normally take quite a difficult problem to solve,
instead because it was cheaper than time off, but I wanted to find other but we solved most of the issues
renting a place to stay. For awhile, I opportunities in the internet since associated with that.
slept on the futon and shouted the it was early 1999. I noticed there Then, we had a little feature that
YMCA on Paige Mullen. It was the hadn’t been a lot of innovation in took us about a day. It was about
best shape I’ve ever been in. the financial services sector. And emailing money from one customer
There was a small ISP on the when you think about it, money to another. Basically, you could type
floor below us, so we drilled a hole is low bandwidth. You don’t need in an email address or, actually, any
through the floor and connected some sort of big infrastructure unique identifier, and transfer funds
7
or conceivably stocks or mutual case, they would send money to a We also took a similar approach
funds from one account holder friend and, essentially, recruit that to building both companies by
to another. If you tried to transfer friend into the network, so we had having a small group of very tal-
money to somebody who didn’t this exponential growth. The more ented people and keeping it small.
have an account in the system, it customers, the faster it grew. It was PayPal, at its height, probably had
would forward them an email invit- like bacteria in a Petri dish; it just 30 engineers for a system that, I
ing them to open an account. keeps going like an S-curve. would say, is more sophisticated
When we would pitch the idea I ran PayPal for about the first than the Federal Reserve clearing
to investors for a central financial two years of its existence. By the system. I’m pretty sure it is actually
services portal for consumers, we’d end of year two, we had a million because the Federal Reserve clear-
tell them how much effort it took customers. It gives you a sense ing system sucks.
to develop the convenient features. of how fast things grow in that So, what else is there? Gener-
And people would go, “Hmmm.” scenario. And we didn’t have a sales ally, both Zip2 and PayPal operated
We would throw the email pay- force. Actually, we didn’t even have as your canonical “Silicon Valley”
ment feature in as an afterthought a VP of Sales or a VP of Marketing. start up. You know, a pretty flat
and they would say, “Wow!” After And we didn’t spend any money on hierarchy. And anyone could talk to
this reaction, we focused the com- advertising. anyone. We have to go for the best
pany’s business on email payments. idea as opposed to a person pro-
In the early days, our company Selling PayPal posing an idea that is considered
was called X.com. There was also In 2002, PayPal went public. We to be a winner just because of who
another company called Confinity, were the only internet company they are.
which started out from a differ- to go public in the first part of Obviously, everyone was an
ent area. Confinity had Palm Pilot that year. It went reasonably equity stake holder. If there were
cryptography and the demo appli- well, although we had more SEC two paths that, let’s say, we had
cation they were using had the rewrites than any company I can to choose between and one wasn’t
ability to beam token payments imagine. I think we set a record on obviously better than the other,
from one Palm Pilot to another via SEC rewrites. This was right around then instead of spending a lot of
the infrared port. They also had a the time when there were all sorts time trying to figure out which one
website named PayPal where users of corporate scandals. So, they was slightly better, we would just
could reconcile the beamed pay- put us through the ringer. Shortly pick one and do it. Sometimes we’d
ments. It didn’t take too long for thereafter, about June or July, we be wrong and we’d pick ourselves
them to notice the website portion struck a deal and sold the company up. But often it’s better to pick a
was actually far more interest- to eBay for over $4 billion. But that path and do it than to just vacillate
ing to users than the Palm Pilot was when eBay’s stock price was endlessly on a choice. We didn’t
cryptography. about $55 and they hadn’t split. So, worry too much about intellectual
They started leaning their busi- I guess, in today’s dollars we were property, paperwork, or legal stuff.
ness in that direction, and in early about $3 billion. So it worked out We were really just focused on
2000, X.com acquired Confinity. pretty well. building the best product that we
About a year later, we changed possibly could.
the company name to PayPal. And Comparing Zip2 and PayPal Both Zip2 and PayPal were very
that’s a summary of the evolution I guess both Zip2 and PayPal product-focused companies. We
of the company. involved software as the heart of were incredibly obsessive about cre-
the technology, even though Zip2 ating something that would provide
Success through Viral Marketing was servicing the media sector and the best possible customer experi-
PayPal is really a perfect case PayPal was servicing the financial ence. And that was a far more effec-
example of viral marketing, just like sector. However, the heart of it was tive selling tool than having a giant
Hotmail. In this case, customers act really the software and the internet sales force or thinking of marketing
like a sales person for you by bring- Both companies were also in Palo gimmicks or twelve-step processes,
ing in other customers. In PayPal’s Alto, where I live. or whatever.
8 FEATURES
“Really liking what you do is important
because even if you’re the best of the
best, there’s always a chance of failure.”
The Right Time to Sell payment system. It was certainly like it, life is too short. And if you
We had several offers from a very challenging. There were times really like what you’re doing, you
number of different entities for when it felt like we were trying to think about it even when you’re not
PayPal, and in fact, the closer we win a land war in Asia and they working. It’s something that your
got to IPO, the more offers we got. kind of set the ground rules, or mind is drawn to and if you don’t
However, we always felt that those trying to beat Microsoft in their like it, you just really can’t make it
offers undervalued the company own operating system. It’s really work. n
and subsequently we went public. pretty hard and it took a lot of our
I think the public markets kind of effort to actually beat eBay on their Elon Musk is the co-founder of SpaceX,
indicated the value of the company, own system. One of the long-term Tesla Motors and PayPal.
and that’s one of the good things risks for the company was that eBay
about public markets. It’s difficult would one day prevail, and one way Originally appeared on Stanford Technology Ven-
tures Program (STVP) Entrepreneurship Corner in
for private companies to say how to retire that risk obviously was to video format: hn.my/elon (ecorner.stanford.edu)
much they’re worth because they sell to eBay.
need some kind of metric. Are you Photograph by Brian Solis (briansolis.com)
9
How To Train Your
Robot
By Nikos Michalakis
L
— Ray Kurzweil
ast Sunday, I taught hadn’t heard about programming Learning how to program is going
6 kids ages 5 to 7 languages. It was because (a) I to be the most useful new skill we
how to program. “In thought programming was boring, can teach our kids today. More than
what programming and (b) no one had told me why I ever our lives depend on how smart
language?” you may ask. Well…I should bother. In fact, my computer we are when we instruct comput-
didn’t use a programming language, teacher in high school had told me ers. They hold our personal data
at least none that you know of. In “you don’t need to waste your time and they make decisions for us.
fact, I didn’t even use a computer. learning how to program. Now we They communicate for us, and they
Instead, I devised a game called have visual tools to build programs. are gradually becoming an exten-
“How To Train Your Robot.” Before Programming languages are already sion of our brains. If we don’t learn
I explain how the game works, let obsolete.” That was in 1994 and programming as part of our child-
me tell my motivation. he was referring to Visual Basic. hood, we will never evolve. As the
I learned how to program during Luckily for me, MIT wiped all that famous futurist, Ray Kurzweil, put
my freshman year at MIT when nonsense away in a matter of weeks. it “The only second language you
I was 19. It’s not because I didn’t But does one need to wait to go to should worry about your kids learn-
have a computer at home or I college to get the proper education? ing is programming.”
10 FEATURES
How To Train Your Robot
The game works as follows:
every kid is turned into a
“robot master” and their
mom or dad becomes their
“robot.” I give each kid a kid name
“Robot Language Diction-
ary” and explain to them
that this is the language
their robot understands.
The dictionary has symbols
for “move left leg forward,”
“turn left,” “grab,” “drop,” etc.
The goal is for the robots
to go through an obstacle
course, pick up a ball, and
bring it back. The kids have
to write a program that will
tell the robot how to do all
that. Every time they write
a program, they hand it to
their robot, and the robot
executes it. To do that, I give
each kid a pen and paper
where they copy symbols Empty space
for inventing
from the dictionary to write new commands
their programs and off their
robots go!
11
The fun part begins when each However, I was pleasantly sur- ■■ Abstraction: “Run in a circle, then
robot retrieves the ball. Now I let prised on how much more the kids say “I’m dizzy!”, then call this the
kids invent their own moves and learned. On their own they fig- “Run Dizzy” program and do it
symbols that they add to their dic- ured out the following things (in a 100 times. (For some reason, kids
tionary and then teach their robots. 30-min session): loved making their parents repeat
There is no limit to what the kids stuff 100 times over.)
■■ Program Parameterization: Instead
come up with.
of putting a forward step ten ■■ Unit testing: They’d write a
I designed the class to teach some
times, they put a 10 in front of test program to get the parents
very basic principles of computer
the “step” symbol (A five-year-old moving a few steps, have their
science and programming:
figure it out and asked me if she parents run it, then fix it and run
■■ Programming languages are just could do it). it again, and then add a few more
another way to communicate to steps until they reach the goal.
■■ Composition: Grouping of a set
an entity (via programs).
of moves (“move left leg forward,
■■ Programs are recipes for automat- then move right leg forward and
ing stuff. do this combo 10 times”)
12 FEATURES
mom robot is running
the “lie down, hug and
kiss me” program
I’ve ran the class twice now and I hope we learned something
I’ve seen the same patterns, which useful today,
support my belief that when kids
DrTechniko n
have fun, they get very smart and
creative about programming. Many
Nikos Michalakis graduated from MIT with
of the parents plan to play the
a degree in Electrical Engineering and
game at birthday parties. If you Computer Science. As DrTechniko, in his
have questions about how to set up spare time he teaches kids about computer
the game, don’t hesitate to write. science and technology through storytell-
You can find my contact info at ing and games. He lives in Brooklyn with
facebook.com/drtechniko his wife and their son and works for Knew-
You can also find instruc- ton, an education technology startup.
tions on how to teach the class
as well as materials I used here Reprinted with permission of the original author.
First appeared in hn.my/drtechniko (drtechniko.com)
[hn.my/robotm].
Photographs by Nikos Michalakis.
13
STARTUPS
“
Over at Pixar… ■■ The process of coming up with a
Matt Silas, a long-time Pixar Pixar movie starts with the story,
My product isn’t employee offered to take me on a then the storyboard, then many
Y
long drive from Palo Alto to mately make.
ou’ve said this before. We Emeryville, Matt showed up while
■■ They have a daily “build” of their
all have. I was admiring a glass case full of
movies in progress so they know
Anyone working on Oscars, and started a full tour.
where they stand, with sketches
getting their first product out to I’ve always been a huge fan of
and crappy CGI filling holes
market will often have the feel- Pixar — not just their products,
where needed. Compare this to
ing that their product isn’t quite but also their process and culture.
traditional moviemaking where
ready. Or even once it’s out and There’s a lot to say about Pixar and
it’s only at the end.
being used, nothing will seem as their utterly fascinating process
perfect as it could be, and if you for creating movies, and I’d hugely ■■ Sometimes, as with the original
only did X, Y, and Z, then it would recommend this book: To Infinity version of Toy Story, they have
be a little better. In a functional and Beyond [hn.my/pixarbook]. It to stop doing what they’re doing
case, this leads to a great roadmap gave me a kick to know that Pixar and restart the entire moviemak-
of potential improvements, and uses some very collaborative and ing process since the whole thing
in a dysfunctional case, it leads iterative methods for making their isn’t clicking. Sound familiar,
to unlaunched products that are movies — after all, a lot of what right?
endlessly iterated upon without a they do is software. Here are some
The other connection to the tech
conclusion. quick examples:
world is that Steve Jobs personally
About a year ago I visited Pixar’s
■■ Pixar’s teams are ultimately a oversaw the design of their office
offices and learned a little about
collaboration of creative people space. Here’s a great little excerpt
this product, and I wanted to share
and software engineers. This is on this, from director Brad Bird
this story:
reflected at the very top by John (who directed The Incredibles):
Lasseter and Ed Catmull.
14 STARTUPS
“Then there’s our building. In the center, A company like Pixar, who undoubt-
he created this big atrium area, which edly produces some of the most beloved
seems initially like a waste of space. The and polished experiences in the world,
reason he did it was that everybody goes ultimately still cannot produce an
off and works in their individual areas. outcome where everyone on the team
People who work on software code are thinks it is the best. And after thinking
here, people who animate are there, and about why, the reason is obvious and
people who design are over there. Steve simple: to have the foresight and the
put the mailboxes, the meetings rooms, skill to refine something to the point of
the cafeteria, and, most insidiously and making it great also requires the abil-
brilliantly, the bathrooms in the center ity to be hugely critical. More critical, I
— which initially drove us crazy — so think, than your ability to even improve
that you run into everybody during the or resolve the design problems fast
course of a day. [Jobs] realized that enough. And because design all comes
when people run into each other, when to making a whole series of tradeoffs,
they make eye contact, things happen. ultimately you don’t end up having what
So he made it impossible for you not to you want.
run into the rest of the company.”
The lesson: You’ll always be unhappy
Anyway, I heard a bunch of stories
What I took away from this conversation
like this and more. As expected, the tour
is that many of us working to make our
was incredible, and near the end, we
products great will never be satisfied.
stopped at the Pixar gift shop.
A great man once said, your product is
There, I asked Matt a casual question
shit, and maybe you will always think it
that had an answer I remember well, a
is. Yet at the same time, it is our creative
year later:
struggle with what we do that ultimately
Me: “What’s your favorite Pixar makes our creations better and better.
movie?” And one day, even if you still think your
product stinks, you’ll watch a customer
Matt: *SIGH* use it and become delighted.
And for a brief moment, you’ll forget
Me: “Haha! Why the sigh?” what it is that you were unhappy about. n
Matt: “This is such a tough question, Andrew Chen is a blogger and entrepreneur
because they are all good. And yet at focused on consumer internet, metrics and user
the same time, it can be hard to watch acquisition. He is an advisor/angel for early-
one that you’ve worked on, because you stage startups and is also a 500 Startups mentor.
spend so many hours on it. You know
all the little choices you made, and all Reprinted with permission of the original author.
First appeared in hn.my/shit (andrewchen.co)
the shortcuts that were taken. And you
remember the riskier things you could
have tried but ended up not, because
you couldn’t risk the schedule. And so
when you are watching the movie, you
can see all the flaws, and it isn’t until
you see the faces of your friends and
family that you start to forget them.”
Wow! So profound.
15
How I Tricked Myself into
Being Awesome
By Chris Strom
say this:
I am awesome.
I am
an introvert, so it is hard to
16 STARTUPS
The Psychology of
Tackling Hard Problems
By David Valdman
17
What Good is Experience?
By Justin Kan
18 STARTUPS
19 STARTUPS
PROGRAMMING
S
■■
ome use-cases for
classifier:
building a
20 PROGRAMMING
■■ 2 events are independent when 1.2. Conditional Probabilities and 1.3. The Naive Bayes Approach
they can happen at the same the Bayes Theorem Let us complicate the problem
time, but the occurrence of Let’s take one example with the above by adding to it:
one event does not make the following stats:
■■ 25 emails out of the total contain
occurrence of another more or
■■ 30 emails out of a total of 74 are the word “viagra.”
less probable. For example, the
spam messages.
second coin-flip you make is not ■■ 24 emails out of those have been
affected by the outcome of the ■■ 51 emails out of those 74 contain marked as spam.
first coin-flip. the word “penis.”
What’s the probability that an
■■ 2 events are dependent if the ■■ 20 emails containing the word email is spam, given that it contains
outcome of one affects the other. “penis” have been marked as both “viagra” and “penis”?
In the example above, clearly spam. Shit just got more complicated,
it cannot rain without a cloud because now the formula is this
So the question is: what is the
formation. Also, in a horse race, one:
probability that the latest received
some horses have better perfor-
email is a spam message, given that
mance on rainy days.
it contains the word “penis”?
What we are concerned with These 2 events are clearly And you definitely don’t want
here is the difference between dependent, which is why you must to bother with it if we keep adding
dependent and independent events use the simple form of the Bayes words. But what if we simplified
because calculating the intersection Theorem: our assumptions and just say that
(both happening at the same time) the occurrence of penis is totally
depends on it. So, for independent independent from the occurrence
events, calculating the intersection of viagra? Then the formula just got
is easy: much simpler:
Some examples:
■■ If you have 2 hard-drives, each of
them having a 0.3 (30%) prob- With the solution being:
ability of failure within the next
year, that means there’s a 0.09
(9%) probability of them failing
To classify an email as spam,
both within the next year.
you’ll have to calculate the condi-
■■ If you flip a coin 4 times, there’s tional probability by taking hints
a 0.0625 probability of getting a from the words contained. And the
tail 4 times in a row (0.5 ^ 4). The above example is simple so Naive Bayes approach is exactly
you can see the result without com- what I described above: we make
Things are not so simple for
plicating yourself with the Bayes the assumption that the occurrence
dependent events, which is where
formula. of one word is totally unrelated to
the Bayes Theorem comes into play.
the occurrence of another, to sim-
plify the processing and complexity
involved.
This does highlight the flaw of this method of classi- 2.4. Getting Rid of Stop Words / Stemming
fication, because clearly the 2 events we picked (viagra First of all, you must get rid of the junk. Every lan-
and penis) are correlated and our assumption is wrong. guage has words that are so commonly used that they
But this just means our results will be less accurate. become meaningless for any kind of classification you
may want to do. For instance, in English, you can safely
2. Implementation strip out such words as “the,” “to,” “you,” “he,” “only,” “if,”
I’ll mention it again: you can take a look at the source- and “it” from the text.
code published at github.com/alexandru/stuff-classifier I’ve compiled a list of such words in this file:
stop_words.rb. You can compile such a list by yourself
2.1. General Algorithm
if you’re using a language other than English. Head
You simply get the probability for a text to belong to
over to Project Gutenberg [gutenberg.org], download
each of the categories you test against. The category
some books in the language you want, count the words
with the highest probability for the given text wins:
in them, sort by popularity in descending order, and
keep the top words as words that you can safely ignore.
Also, our classifier is really dumb in the sense that it
Do note that above I also eliminated the denomina- does not care about the meaning or context of a word.
tor from our original formula because it is a constant So there’s a problem: consider the word “running.”
that we do not need (called evidence). What you want is to treat this just as “run”, which is
the morphological root of the word. You also want to
2.2. Avoiding Floating Point Underflow
treat “parenting” and “parents” as “parent.”
Because of the underlying limits of floating points, if
This process is called stemming and there are lots of
you’re working with big documents (not the case in
libraries for it. I think currently the most up-to-date
this example), you do have to make one important
and comprehensive library for stemming is Snowball.
optimization to the above formula:
It’s a C library with lots of available bindings, including
■■ Instead of the probabilities of each word, you store for Ruby and Python, and it even has support for my
the (natural) logarithms of those probabilities. native language (Romanian).
Take a look at what I’m doing in tokenizer.rb,
■■ Instead of multiplying the numbers, you add them
where I’m getting rid of stop words and stemming the
instead.
remaining words.
So instead of the above formula, if you need this
each_word('Hello world! How are you?')
optimization, then use this one:
# => ["hello", "world"]
22 PROGRAMMING
2.5. Implementation Guidelines Final Words
When classifying emails for spam, it is a good idea My example involved spam classification, but this is
to be sure that a certain message is a spam message. not how modern spam classifiers work. Because the
Otherwise, users may get pissed by too many false independence assumptions are often inaccurate, this
positives. type of classifier can be gamed by spammers to trigger
Therefore it is a good idea to have thresholds. This is a lot of false positives, which will make the user even-
how my implementation looks: tually turn the feature off.
But it is general purpose, being useful not only for
def classify(text, default=nil)
spam detection, but also for lots of other use-cases, and
# Find the category with the highest probability
it’s enough to get you started. n
max_prob = 0.0
Alexandru is an experienced software developer that ventured
best = nil
across anything he found interesting. Besides trying to make
people’s lives better, he also enjoys cooking and spending time
scores = cat_scores(text) with his toddler. He lives in Romania and works remotely for U.S.
scores.each do |score| based startups.
cat, prob = score
if prob > max_prob Reprinted with permission of the original author.
max_prob = prob First appeared in hn.my/bayes (bionicspirit.com)
best = cat
end
end
scores.each do |score|
cat, prob = score
next if cat == best
return default if prob * threshold > max_prob
end
return best
end
23
Coding Tricks of Game
Developers
By Harvey Green
24 PROGRAMMING
impossible to cut content down to Plan Your Distractions another characteristic: PhysicalOb-
memory budgets, and that many –Jay Barnson jects could take damage. The air
projects had come close to failing The Internet is one of the great- strikes did enough damage in a
because of it. So now, as a regular est tools ever invented for both large enough radius that they were
practice, he always put aside a nice improving and destroying produc- quite literally “killing” the camera.
block of memory to free up when tivity. Twitter and forums and blogs I did fix the bug by ensuring
it’s really needed. and instructional websites can be that cameras couldn’t take damage,
He walked out of the office and extremely motivational and educa- but just to be sure, I boosted their
announced he had reduced the tional, but they can also be a dis- armor and hit points to ridiculous
memory footprint to within budget traction that completely destroys all levels. I believe I can safely say we
constraints. He was toasted as the hope of ever getting anything done. had the toughest camera in any
hero of the project. One thing I’ve done in the past game.
As horrified as I was back then which has proven pretty successful
about such a “barbaric” practice, I is to stick to a plan for when I can The Blind Leading the Blind
have to admit that I’m warming up spend some minutes checking email –Maurício Gomes
to it. I haven’t gotten into the frame and Twitter, or play a quick game At university, there was a team that
of mind where I can put it to use or something. Either at the comple- made a FPS flash game. For some
yet, but I can see how sometimes, tion of a task, or after a period of bizarre reason, the programmer,
when you’re up against the wall, time (say one five-minute break instead of checking if the character
having a bit of memory tucked every hour). Otherwise, the brows- was colliding with the wall to keep
away for a rainy day can really er’s only use is for reading reference you from going there, he did the
make a difference. Funny how time manual pages, if necessary. That inverse: he checked if there was a
and experience changes everything. way I turn a potential distraction wall, and only allowed you to move
into a motivating tool. parallel to it!
Cache It Up –Andrew Russell This sparked a bizarre bug: in
To improve performance when Collateral damage crossings or T junctions in the level,
you are processing things in a tight –Jim Van Verth you could not actually cross, only
loop, you want to make the data for Don’t know how many remem- turn to the passage on your left or
each iteration as small as possible, ber Force 21, but it was an early right. The deadline was closing, and
and as close together as possible in 3D RTS which used a follow cam they had no idea on how to fix it.
memory. That means the ideal is to observe your current platoon. Then the team writer fixed the
an array or vector of objects (not Towards the end of the project issue; he told the artist to add an
pointers) that contain only the data we had a strange bug where the animation of hands touching the
necessary for the calculation. camera would stop following the walls, and then he added in the
This way, when the CPU fetches platoon — it would just stay where background story that the main
the data for the first iteration of it was while your platoon moved character was blind and needed to
your loop, the next several itera- on and nothing would budge it. The constantly touch the walls to know
tions worth of data will get loaded apparent cause was random because where he was going.
into the cache with it. we couldn’t find a decent repro
There’s not really much you case. Until, finally, one of the testers You Wouldn’t Like Me When I’m
can do with using fewer and faster noticed that it happened more Angry –Nick Waanders
instructions because the CPU is often when an air strike occurred I once worked at THQ studio Relic
as fast as it’s going to get, and the near your vehicles. Using that info I Entertainment on The Outfit,
compiler can’t be improved. Cache was able to track it down. which some may remember as one
coherence is where it’s at. This article Because the camera was using of the earlier games for the Xbox
[hn.my/coherence] contains a good velocity and acceleration and was 360. We started with a PC engine
example of getting cache coherency collidable, I derived it from our (single-threaded), and we had to
for an algorithm that doesn’t simply PhysicalObject class, which had convert it to a complete game on
run through data linearly. those characteristics. It also had a next-gen multi-core console in
25
about 18 months. About 3 months It’s Not a Bug,It’s a Feature! if(__builtin_expect(entity-
before shipping, we were still run- –Philip Tan >extremely_unlikely_flag, 0)) {
ning at about 5 FPS on the 360. I worked on an RPG in which we // code that is rarely run
Obviously this game needed some were trying to get the NPCs (Non- }
severe optimization. player Characters) to spot when
I’ve seen a 10-20% speedup with
When I did some performance you were in range, walk up to you,
proper use of this.
measurements, it became clear and strike up a conversation with
that as much as the code was slow you by activating the dialog system.
Objective Oriented Programming
and very “PC,” there were also We forgot to add code to distin-
–Anonymous
lots of problems on the content guish NPCs from PCs (Player Char-
Back at a game studio, I think it was
side as well. Some models were acters), so we’d walk into town and
near the end of the project, we had
too detailed, some shaders were all the NPCs would be talking with
an object in one of the levels that
too expensive, and some missions each other. Because all NPC AI
needed to be hidden. We didn’t
simply had too many guys running code used the same dialog template,
want to re-export the level and we
around. they actually got a few sentences
did not use checksum names. So
It’s hard to convince a team of in before the conversations became
right smack in the middle of the
100 people that the programmers nonsensical. And because character
engine code we had something like
can’t simply “fix” the performance dialog was broadcast, you could
the following:
of the engine, and that some of read everything they said if you
the ways people had gotten used were in range. if(level==10 && object==56 )
to working needed to change. We decided to turn that bug into {
People needed to understand that a major feature. HideObject();
the performance of the game was }
everybody’s problem, and I figured Dirty Deeds –Tim Randall
The game shipped with this in.
the best way to do this is with a bit The engine team at Gremlin Inter-
Maybe a year later, an artist
of humor that had a bit of hidden active used to keep a single glove in
using our engine came to us very
truth behind it. their office. When someone asked
frustrated about why an object in
The solution took maybe an why it was there, they were told it
their level was not showing up after
hour. A fellow programmer took was only used when someone was
exporting. The level they had a
4 pictures of my face: one really about to type some really dirty
problem with resolved to level 10. I
happy, one normal, one a bit angry, code. It wasn’t so much a case of
wonder why?
and one where I am pulling my hair not wanting to leave fingerprints
out. I put this image in the corner but rather not wanting to actually
Stack vs. Heap
of the screen, and it was linked to touch the dirtiest fixes!
–Torbjörn Gyllebring
the frame rate. If the game ran at
Stack allocation is much faster than
over 30fps, I was really happy, if it Explicit Conditional Hinting
heap allocation since all it really
ran below 20, I was angry. –ZorbaTHut
does is move the stack pointer.
After this change, the whole FPS A very, very low-level tip, but one
Using memory pools, you can get
issue transformed from, “Ah, the that can come in handy: most com-
comparable performance out of
programmers will fix it.” to, “Hmm, pilers support some form of explicit
heap allocation, but that comes
if I put this model in, Nick is going conditional hinting. GCC has a
with a slight added complexity and
to be angry! I’d better optimize this function called __builtin_expect
its own headaches.
a little first.” People could instantly which lets you inform the compiler
Also, stack vs. heap is not only a
see if a change they made had an what the value of a result prob-
performance consideration; it also
impact on the frame rate, and we ably is. GCC can use that data to
tells you a lot about the expected
ended up shipping the game at optimize conditionals to perform as
lifetime of objects. The stack is
30fps. quickly as possible in the expected
always hot, and the memory you
case, with slightly slower execution
get is much more likely to be in
in the unexpected case.
26 PROGRAMMING
cache than any far heap allocated Remove Unnecessary Branches without doing anything. Since
memory. –tenpn the handler was called multiple
The downside of the stack is that On some platforms and with some times per second, the player never
it is actually a stack. You can’t free a compilers, branches can throw noticed, and the crash was fixed.
chunk of memory used by the stack away your whole pipeline, so even
unless it is on top of it. There’s no insignificant if() blocks can be Meet My Dog, “Patches”
management — you push or pop expensive. –Mick West
things on it. On the other hand, The PowerPC architecture (PS3/ There’s an old joke that goes some-
the heap memory is managed: it x360) offers the floating-point thing like this:
asks the kernel for memory chunks, select instruction, fsel. This can be
Patient: “Doctor, it hurts when I do
maybe splits them, merges them, used in the place of a branch if the
this.”
reuses them, and frees them. The blocks are simple assignments:
stack is really meant for fast and Doctor: “Then stop doing it.”
float result = 0;
short allocations.
if(foo > bar){ result = 2.0f; } Funny, but are these also wise
else { result = 1.0f; } words when applied to fixing bugs?
I’m a Programmer, Not an Artist
Consider the load of pain I found
–Damian Connolly Becomes:
myself in when working on the port
For indie/solo developers who are
float result = fsel(foo-bar, of a 3D third person shooter from
working on an iPhone or Android
2.0f, 1.0f); the PC to the original PlayStation.
game on their own, while you’re
Now, the PS1 has no support for
looking for an artist, you should be When the first parameter is
floating point numbers, so we were
developing your game at the same greater than or equal to 0, the
doing the conversion by basically
time. Use programmer art, stand- second parameter is returned, else
recompiling the PC code and over-
ins, free sprites — anything. Most the third. The price of losing the
loading all floats with fixed point.
of the time, before even thinking branch is that both the if{} and
That actually worked fairly well,
about final assets, I just want some- the else{} block will be executed,
but where it fell apart was during
thing up and running quickly to see so if one is an expensive operation
collision detection.
if it’s fun. Prototype the crap out of or dereferences a NULL pointer,
The level geometry that was
it and find the game. Then, when this optimization is not suitable.
supplied to us worked reasonably
the gameplay’s locked down, you Sometimes your compiler has
well in the PC version of the game,
can start putting in the proper art. already done this work, so check
but when converted to fixed point,
Doing it the other way around leads your assembly first.
all kinds of seams, T-Junctions, and
to lost money, and work that needs
other problems were nudged into
to be redone multiple times, which Hack the Stack –Steve DeFrisco
existence by the microscopic dif-
aside from harming your project, I was one of a few interns at
ferences in values between fixed
sucks your motivation to finish it IMAGIC in 1982-83. We were all
and floats. This problem would
(and if you’re making a game to get doing Intellivision carts. One of the
manifest itself in one case with the
a job, showing that you can finish a programmers had to leave to go
main character touching a particu-
project is a good thing). Another tip back to school, and I was chosen
lar type of door in a particular level
if you’re lacking upfront finance is to fix the random crash bug in his
in a particular location; rather than
to find a freelance game artist who game. It turned out to be a stack
fix the root cause of the problem,
will accept a revenue sharing deal, overflow in the timer interrupt han-
I simply made it so that if he ever
e.g. typically something like 30% of dler. Since the only reason for the
touched the door, then I’d move
game revenue, payable once it gets handler was to update the *display*
him away, and pretend it never hap-
published to the AppStore. of the on-screen timer, I added
pened. Problem solved.
some code to test the depth of the
Looking back I find this code
stack at the beginning of the inter-
quite horrifying. It was patch-
rupt routine. If we were in danger
ing bugs and not fixing them.
of overflowing the stack, return
27
Unfortunately the real fix would In the afternoon, we make the Then, as quickly as despair swept
have been to go and rework the last build with the last few game- over us, we realized how we could
entire game’s geometry and colli- balancing tweaks, and do one last fix this on time for the gold can-
sion system specifically with the playthrough session when disaster didate release. We opened up the
PS1 fixed point limitations in mind. strikes: the game crashes hard! We text file responsible for the conflict,
The schedule was initially aggres- all run to our workstations, fire up added a space at the end, and saved
sive, and since we always seemed the debugger, and try to figure out it. We looked at each other with
close to finishing, the quick patch what’s going on. It’s not some- huge grins on our faces and said:
option won over against a compre- thing trivial, like an assert, or even “Ship it!”
hensive (but expensive) fix. something moderately hard to track The extra space meant the
But it did not go well. Hundreds down, like a divide by zero. It looks CRC32 checksum of the text file
of patches were needed, and then like memory is garbage in a few was altered and therefore no longer
the patches themselves started places, but the memory reporting conflicted with the other resource.
causing problems, so more patches comes out clean. What’s going on?
were added to turn off the patches One dinner and many hours later, HexEdit to the Rescue
in hyper-specific circumstances. our dreams of getting out on time –Ken Demarest
The bugs kept coming, and I kept shattered, we manage to track it Back on Wing Commander 1 we
beating them back with patches. down to one data file being loaded were getting an exception from our
Eventually I won, but at a cost of in with the wrong data. The wrong EMM386 memory manager when
shipping several months behind data? How’s that possible? Our we exited the game. We’d clear
schedule, and working 14 hour days resource system boiled down every the screen and a single line would
for all of those several months. asset to a 64-bit identifier made out print out, something like “EMM386
That experience soured me of the CRC32 of the full filename Memory manager error. Blah blah
against “the patch.” Now I always and the CRC32 of all the data blah.” We had to ship ASAP. So I
try to dig right down to the root contents. That was also our way of hex edited the error in the memory
cause of a bug, even if a simple, and collapsing identical resource files manager itself to read “Thank you
seemingly safe, patch is available. into a single one in the game. With for playing Wing Commander.”
I want my code to be healthy. If tens of thousands of files, and two
you go to the doctor and tell him years of development, we never had 8-bit Audio Stomper –Toonse
“it hurts when I do this,” then you a conflict. Never. For a launch product of a certain
expect him to find out why it hurts, Until now, that is. console I had a nasty bug report
and to fix that. Your pain and your It turns out that one of the from QA that took 20+ hours to
code’s bugs might be symptoms of innocent tweaks the designers had reproduce. Finally (with 24 hours
something far more serious. The checked in that afternoon made it left to go to hit console launch)
moral: treat your code like you so a text file had the exact same tracked it down to some audio
would want a doctor to treat you; filename and data CRC as another drivers in the firmware that were
fix the cause, not the symptoms. resource file, even though they were erroneously writing 1 random byte
completely different! “somewhere” at random times
Identity Crisis –Noel Llopis Our hearts sank to our feet where the “somewhere” was always
This scene is familiar to all game when we recognized the problem. in executable code space. I finally
developers: It’s the day we’re send- There’s no way we could change figured out that any given run of
ing out the gold candidate for our the resource indexing system in the game that “somewhere” was
Xbox 1 game. The whole team is such a short period of time. Even always the same place, luckily. 1st
playtesting the game all day long, if we pulled an all-nighter, there party said sorry, can’t fix it in time
making sure everything looks good. was no way to know for sure that as we don’t know why it’s being
It’s fun, it’s solid, it’s definitely a go everything would be stable in the caused! So I shipped that game
in our minds. morning. with stub code at the very start of
main that immediately saved off
the 1 byte from the freshly loaded
28 PROGRAMMING
executable in the place I knew it Bit Shifting Magic
would overwrite for that particular –Steven Pigeon
version of the exe. There was then In order to avoid stalls in the proces-
code that would run each frame after sor pipeline due to branching, one
audio had run and restore that byte can often use a branchless equivalent,
back to what it should be just in that is, code transformed to remove
case it had been stomped that frame. the if-then-else’s and therefore jump
Good times! We hit launch. prediction uncertainties. For exam-
To this day I still feel very, very ple, a straightforward implementa-
dirty about this hack, but it was tion of abs( ) in C might be:
needed to achieve the objectives and
inline int abs(int x)
harmed no one.
{
return (x<0) ? -x : x;
Rainy Day Server Pool
}
–Potatolicious
I used to work for a company that Which is simple enough but
had a horrific hardware requisition contains an inline if-then-else. As the
policy. If your team needed a server, argument, x, isn’t all that likely to
it had to go through a lengthy and follow a pattern that the branch pre-
annoying approvals process — and diction unit can detect, this simple
even then, it took months before function becomes potentially costly
Infrastructure would actually provide as the jump will be mispredicted
said servers. quite often.
In other words, when a project How can we remove the if-then-
gets handed down from above to else, then? One solution is to use the
launch in, say, 3 months, there’s no right shift operator (>>) and the bit-
way in hell you can get the servers wise XOR operator (^) as following:
requisitioned, approved, and installed
inline int abs_no_branch(int x)
in that time. It became standard
{
practice for each team to slightly
int m = (x >> (8 *
over-request server capacity with
sizeof(int)-1));
each project and throwing the excess
return ((x ^ m) - m);
hosts into a rainy day pool, immedi-
}
ately available and repurposeable as
required. Where the expression (8 *
New servers will still get requested sizeof(int) - 1) evaluates to 15,
for these projects, but since they took 31, or 63 depending on the size of
so long to approve, odds are they’d integers on the target computer. n
go right into the pool whenever they
actually arrived, which sometimes Harvey Green has spent the past few years
took up to a year. developing in .NET and C# for the Oil & Gas
Of course, it was horrifyingly inef- and related industries. He believes that core
ficient. Just on my team alone I think language skills plus good domain knowl-
we had easily 50 boxes sitting around edge has been the key to most of the proj-
ects he’s worked on.
doing nothing (and powered on to
boot) waiting to pick up the slack of
Reprinted with permission of the original author.
a horrendously broken bureaucracy. First appeared in hn.my/game (dodgycoder.net)
29
Python Deployment
Anti-Patterns
By Hynek Schlawack
30 PROGRAMMING
Use virtual environments default? Do I have to fix all my gunicorn-config.py settings/pro-
Gentlepeople, if you’re deploying applications before upgrading our duction.py
software, always use virtualenv. servers? Or what if I need to deploy user=yourapp
Actually, the same goes for local an app to an older server? Do I directory=/apps/yourapp
development: look into virtualen- have to rewrite it so it runs with
You add the file to /etc/super-
vwrapper which makes handling older packages? I prefer not to.
visor/conf.d/, make a supervi-
them a breeze. So never install I really wish the Linux distribu-
sorctl update and your service is
into your global site packages! The tions wouldn’t ship anything more
up and running. It’s a no-brainer
only exception is the aforemen- than the Python interpreter and
and much easier than juggling rc.d
tioned virtualenv, which in turn virtualenv. Anything else just lever-
scripts. Crash recovery and optional
installs pip in each environment it ages bad behavior.
web interface included.
installs to. The only good they may be doing
Test your software against certain is automatically updating packages
Configuration is not part of
versions of packages, pinpoint with security vulnerabilities that
the application
them using pip freeze and be you may have missed. That said,
Your production configuration
confident that the identical Python I’m convinced that if you deploy
doesn’t belong in the (same)
environment is just a pip install software to the net, you have
source repository. There are
-r requirements.txt away. For the responsibility to monitor them
configuration management tools
the record, I split up my require- yourself anyway. Relying on your
like Puppet [puppetlabs.com]
ment files; more on that in the distribution gives you just a false
or Chef [opscode.com/chef] that
next installment. sense of security; if your customer’s
do exactly that for you — just
Also, use real version pinning data gets hacked, they don’t care
better and more reliably. While
like package==1.3. Don’t do pack- that Ubuntu was to slow to issue a
installing the configuration, Puppet
age>=1.3, it will bite you eventu- security update.
can make sure that the directories
ally, just as it has bitten me and
always have certain permissions.
many others. Don’t run your daemons in
Configuration templates make
a tmux/screen
it perfect for mass deployments.
Never use Python packages It seems to be part of everyone’s
Some service IP changed? Just fix
from your distribution evolution to do it, so be the first
it in Puppet’s repo and deploy the
This one is in fact an extreme ver- one to skip it!
changes. Eventually all services
sion of the previous anti-pattern. Yes, tmux is full of awesome
will catch up. If you want, you can
First of all, there’s no reason to (and way better than screen),
always trigger a run, for example
succumb to a dictate of your distri- but please don’t just ssh on your
using a simple Fabric [fabfile.org]
bution which version of a package host and start the service in a tmux
script.
to use. They don’t know your appli- or screen. You have nothing that
But don’t use Fabric for actual
cation. Maybe you need the latest brings the daemon back up if it
deployments! This is the perfect
version, maybe you need a slightly crashes. You can’t restart it on 10
example of the battle between
older one. servers without ssh’ing on 10 serv-
“simple” and “easy.” At first, it’s
ers, get the screen and Ctrl-C it.
1. If I write and test software, I do it easier to put everything inside of
Granted, it’s easy in the beginning,
against certain packages. Packages the repo and run a Fabric script that
but it doesn’t scale and lacks basic
tend to change APIs, introduce does a git pull and restarts your
features that simple-to-use tools
bugs, etc. daemon. In the long run, you’ll
have to offer.
regret it like many before you did.
2. My software is supposed to run My favorite one is supervisord
Just to stress this point: I love
on any UNIXy platform as long [supervisord.org]. A definition for a
Fabric and couldn’t live without
as the Python it’s written against service looks as simple as:
it. But it’s not the right tool for
is present.
[program:yourapp] orchestrating deployments — that’s
What if the next Ubuntu ships command=/path/to/venv/bin/guni- where Puppet and Chef step in.
with a different SQLAlchemyby corn_django --config deploy/
31
Look into alternatives to
Apache + mod_wsgi setups This is Why You Spent All that
Time Learning to Program
Many people go for Apache
and mod_wsgi by default,
because everybody has already
heard about Apache.
To me, Apache feels like By James Hague
a big ball of mud, and I find
T
the modular combination
of gunicorn [gunicorn.org] here’s a standard When I sit down to work on
or uwsgi [hn.my/uwsgi] format for local TV a personal project at home, it’s
together with nginx much news broadcasts that’s much simpler.
more pleasing and easier easy to criticize. I don’t have to follow the
to control. There’s an initial shock-value familiar standards of whatever
teaser to keep you watching. kind of app I’m building. I don’t
Enough negativity News stories are read in a dra- have to use an existing application
I don’t claim that I’ve discov- matic, sensationalist fashion by as a model. I can disregard history.
ered the sorcerer’s stone. How- attractive people who fill most of I can develop solutions without
ever, I’ve developed a system the screen. There’s an inset image people saying “That’s not how it’s
for us that proved solid and over the shoulder of the reader. supposed to work!”
simple in the long run. Periodically there’s a cutaway to That freedom is huge. There
The trick is to build a a reporter in the field; it’s often are so many issues in the world
debian package (but it can be followed-up with side-by-side that people complain about, and
done using RPMs just as well) images of the newscaster and there’s little chance of fixing the
with the application and the reporter while the former asks system in a significant way. Even
whole virtualenv inside. The a few token questions to latter. something as simple as reworking
configuration goes into Puppet, There’s pretend banter between the local news is out of reach. But
and Puppet also takes care that newscasters after a feel-good story. if you’re writing an iOS game, an
the respective servers always You get the idea. Now what if I HTML 5 web app, a utility that
have the latest version of wanted to change this entrenched automates work so you can focus
the DEB. structure? on the creative fun stuff, then
The advantage is that such a I could get a degree in journal- you don’t have to fall back on the
DEB is totally self-contained, ism and try to get a job at the existing, comfortable solutions
doesn’t require having to build local TV station. I’d be the new that developers before you chose
tools and libraries on the target guy with no experience, so it’s simply because they, too, were
servers, and, paired with solid not likely I could just step-in and trapped by the patterns of the
Puppet configuration, it makes make sweeping reforms. All the solutions that came before them.
consistent deployments over a other people there have been You can fix things. You can
wide range of hosts easy, fast, doing this for years or decades, make new and amazing things.
and reliable. But you have to do and they’ve got established Don’t take that ability lightly. n
your homework first. n routines. I can’t make dozens of
people change their schedules James Hague has been Design Director
Hynek is a wine-loving software and habits because I think I’m for Red Faction: Guerrilla, editor of “Hal-
engineer from Berlin/Germany, cre- so smart. To be perfectly fair, a cyon Days: Interviews with Classic Com-
ating robust systems for a living at drastic reworking of the news puter and Video Game Programmers,”
Variomedia and hacking FOSS for would result in people who had co-founder of an indie game studio, and
fame at home. He occasionally blogs no issues with old presentation a published photographer. He started his
at hynek.me and regularly tweets as blog “Programming in the 21st Century,”
getting annoyed and switching
@hynek in 2007.
to one of the other channels that
Reprinted with permission of the original author. does things the old way. Reprinted with permission of the original author.
First appeared in hn.my/pydev (hynek.me) First appeared in hn.my/spent (dadgum.com)
32 PROGRAMMING
Programmers underestimate the dif-
Faster than C
ficulty to write correct macros like
they underestimate the difficulty to
write correct concurrent programs.
A language designer should think
about meta programming. Some-
By Andreas Zwinkau thing Turing-complete like C++
templates, seems to be beneficial
J
for performance.
udging the performance This mechanism helps in some
Runtime Optimization
of programming languages, cases, but not in our example.
At runtime there is dynamic
usually C is called the leader, Fortran semantics say that func-
information which is not available
though Fortran is often faster. New tion arguments never alias and there
to a static compiler. Any specific
programming languages commonly is an array type, where in C arrays
example could be duplicated by
use C as their reference, and they are pointers. This is why Fortran
a C program, but usually it is not
are really proud to be only so is often faster than C. This is why
feasible. The trick of profile-guided
much slower than C. Few language numerical libraries are still written
optimizations solves only a small
designer try to beat C. in Fortran. However, it comes at the
part of the problem.
What does it take for a language cost of pointer arithmetic.
What becomes especially easy at
to be faster than C? A language which wants to
runtime is whole-world optimiza-
be faster than C should provide
tion. While this is possible statically,
Better Aliasing Information semantics where aliasing can be
the C semantics (compilation units)
Aliasing describes the fact that two better analyzed by the compiler.
and the mandatory preprocessor
references might point to the same
make it difficult for the compiler.
memory location. For example, con- Push Computation to
Even Python can beat C by inlining
sider the canonical memory copy Compile-Time
across file borders.
(not memcpy from stdlib.h!): Doing things at compile time
Of course, there are downsides
reduces the run time. Of course, C
void* memcopy(void* dst, const to using a JIT and especially in
compilers do this for trivial cases
void* src, size_t count) { systems and embedded program-
like 1+2, where the addition is
while (count--) *dst++ = ming it is not appropriate. So there
already handled at compile time.
*src++; might be examples where Java, C#,
However, languages with nice
return dst; or others beat C, but they do not
meta-programming support enable
} threaten C’s niche.
the programmer to do similar
Depending on the target architec- application specific optimizations. A
Conclusion
ture, a compiler might perform a lot simple example, we could optimize
Aliasing information is the only one
of optimizations with this code. For fib(20) to 6765, without the compiler
where I am certain about speed
example, on a modern x86 with the knowing about Fibonacci numbers.
improvements, because it is impossi-
SSE instruction MOVDQU, it could For a real example, the Eigen
ble to reach Fortran-speed in C. The
copy 16 Byte blocks instead of 4 C++ library for linear algebra uses
other ideas are more about making
Byte (sizeof(void*)). Unfortu- C++ templates to avoid copies and
it easier to write faster programs. n
nately, no. Due to aliasing, dst could be lazy about computations. Of
for example be src+1. In this case, course, Lisp is the grandfather of this
Andreas Zwinkau is a doctoral researcher at
the result must be the first word technique with its macro system.
the IPD Snelting since 2010. He is working
*src repeated count times at dst. For example, there is a nice anecdote on the libFirm compiler within the InvasIC
The compiler is not allowed to use [hn.my/jsobel] about a student using project. However, this is only true, while he
MOVDQU due to the semantics of C. Scheme for an assignment. Basically, is not occupied with managing and teach-
In C99 the restrict keyword the programmer can modify the ing students at the KIT, Germany’s finest
was added, which we could use abstract syntax tree during compila- university for computer science.
here to encode that src and dst are tion. The trade-off with such meta Reprinted with permission of the original author.
different from all other references. programming features is complexity. First appeared in hn.my/fasterc (beza1e1.tuxen.de)
33
SPECIAL
34 SPECIAL
The words rang in my head. And now, 17 years later, life is He nodded. "Okay,” he said.
Those exact words — I remem- fantastic. I belong to a studio full “This isn’t just conversation, this
bered hearing them. A lot. He of amazing people who were all is important,” I said. “You listening?”
didn’t explain why she thought weird, just like me. I get to meet He nodded again. “I’m listening,”
he was weird. He didn’t have to. I freaks from across the nation who he replied with a look that con-
knew the feeling very, very well. all love anime and comics, just like vinced me that he was.
“Come on now,” one of the guys me. I get to talk to people who read I took a deep breath. “Right now,
said. “Don’t let her get to you.” my weird stories about my weird you’re in high school in a small
“No, she’s right,” he said. “I don’t life and relate to it because, just like suburban town,” I started.
have any friends. Not at school, me, they’re weird. He nodded.
anyway.” His face got really sad. “I There are thousands — no, “Everyone you know looks
really am weird.” hundreds of thousands — of us. the same and acts the same,” I
I was weird, back before I realized All weird. All strange. All over, explained. "They may dress differ-
I wasn’t. And it resulted in some everywhere. ently from each other or belong
extremely lonely times in my young We all went to school and hated to different crowds, but they’re all
life. My entire elementary and everyone because they didn’t the same. Hipsters, brainiacs, jocks,
junior high school tenure was spent understand us. We dealt with the so-called “geeks” — they’re all so
with no friends. In tenth grade, I bullying and the isolation and the caught up with not being left out
“There
found my tiny group of four friends. feeling that we were the weird that they’re changing who they are
to fit in with whoever it is that will
accept them.
All weird. All strange. no idea what it’s like to think for
themselves. So they try to make
35
websites and tours the world talk- when I looked at them, they both
ing to people about his anime cel nodded and smiled.
collection. Trust me, I know all So I put the cap on the whole
about being weird.” thing. “And I know your parents are
He shrugged and said, “It just right there, but I’m going to say it
sucks, you know?” anyway: Fuck. Them.”
“Oh, I know,” I said with a smile. I kept my eyes on him, but could
"And here’s the little bit of bad see just behind him that his mom
news — It’s gonna suck for a little reacted a little to my vulgarity. His
while longer. But one day, you’ll get dad placed his hand on her shoul-
out of school and go somewhere der and just let it be.
besides the small town you’re in The guys in the group all nodded
and you’re going to discover that and agreed with me and began talk-
there are groups of people just like ing to him about their perspectives
you — not that they do what you on the situation (which, in previous
do or act how you act, but that they conversations over the years, I knew
refused to change who they are to be similar to mine). His parents
to fit in, and that makes them just came up to me and thanked me for
like you. And when you find them, talking to him.
you’re finally going to feel at home. “He just thinks the world of you
“It might be college, or it might guys,” his mom said. “He talks about
be visiting another city. Hell, it coming here all the time to work
might even be on the internet. But out with you.”
at some point you’re going to find “He really needed to hear that,”
them. And it’s going to be great.” his dad said. “We try to tell him that
He smiled. “That would be awe- high school is just that way, but you
some,” he said. know how it is...”
“It WILL be awesome!” I replied. “No teenager wants to listen to
“But until then, it’s going to be his parents,” I said. “Hell, I’m an
lonely and frustrating. You’re going adult and I still don’t.”
to do stupid things thinking it’s They both laughed.
going to impress them or change “He’s a great kid,” I said. “He’s
their opinion of you, and it won’t, going to be just fine in a few years.”
and you’re going to get sad. Just “Well, thank you,” the dad said.
know that it does end. It ends the “It means a lot.”
day you realize that you never “Hey,” I said with a shrug, “That’s
wanted to be them in the first place what we’re here for. We’re his
because they are losers. They lost friends.” n
the battle to be themselves. You’re
the winner.” When he's not teaching the Internet how
I paused for a second, because to fist-fight, why being weird is awesome
it had just occurred to me that, at or how to self-publish your own books,
some point during my little moti- Joe Peacock tours the world, showing his
vational speech, his parents had extensive "Akira" art collection. He has 13
cats and loves you.
walked up and were waiting a short
distance behind him. I presumed it
was to give him enough space to let Reprinted with permission of the original author.
First appeared in hn.my/friends (joethepeacock.blogspot.com)
the conversation be his own, but I
knew they had heard me because
36 SPECIAL
What I’ve Learned about
Smart People
By Tommy MacWilliam
37 SPECIAL
I am widely credited as the
inventor of the <blink> tag. For
those of you who are rela-
tively new to the Web, the <blink>
tag is an HTML command that
to display many of the HTML
extensions that we were propos-
ing. I also pointed out that the only
text style that Lynx could exploit
given its environment was blinking
the arcane knowledge of blink-
ing leaked into the real world and
suddenly everything was blinking.
“Look here,” “buy this,” “check this
out” — all blinking. Large advertise-
causes text to blink, and many, text. We had a pretty good laugh ments blinking in all their glory. It
many people find its behavior to at the thought of blinking text and was a lot like Las Vegas, except it
be extremely annoying. I won’t talked about blinking this and that was on my screen, with no way of
deny the invention, but there is a and how absurd the whole thing turning it off.
bit more to the story than is widely would be. The evening progressed In the end, much was said —
known. pretty normally from there, with a most of it in the form of flaming
Back in 1994, I was a founding fair amount more drinking and me posts to various discussion boards,
engineer at Netscape, and prior meeting the girl who would later and the <blink> tag will probably
to that I had written the Lynx become my first wife. be remembered as the most hated
browser, which predated all of the Saturday morning rolled around of all HTML tags. I would like to
other popular browsers at that and I headed into the office only publicly state that at no time did I
time. Lynx had been and still is to find what else but blinking text. actually write code or even seri-
a text-only browser and is com- It was on the screen blinking in all ously advocate the <blink> tag. It
monly used in a console window on its glory and in the browser. How is true that I put forth the initial
UNIX machines. At Netscape we could this be, you might ask? It inspiration, but it really was merely
were building software that used a turns out that one of the engineers a thought experiment. I am not
graphical user interface and could liked my idea so much that he left going to name any names of the
express vastly more text styles the bar sometime past midnight, people who coded the dastardly
and layouts as well as images and returned to the office, and imple- deed. If they wish to step forward,
other media. We spent a lot of mented the blink tag overnight. He they will need to do it themselves.
time thinking about the future of was still there in the morning and In the end, the thing that I am truly
the web and new technologies that quite proud of it. sad about is that Lynx never did
would enable new classes of docu- At the time there were 3 ver- get to blink. I am also sad to report
ments, applications, and uses. A few sions of the browser that ran on that the St James Infirmary burned
examples were HTML tables, SSL UNIX, Windows, and Mac operat- to the ground in 1997. It was a
for secure communications, plugins ing systems. For a short 12 hours great place to hang out and will be
for extensions, and JavaScript to the blinking was constrained only to missed.
enable dynamic HTML. the UNIX version, but it didn’t take
<blink> on,
Sometime in late summer I took long for the blinking to spread to
:lou n
a break with some of the other Windows and then Mac. I remem-
engineers and went to a local bar ber thinking that this would be a
Lou Montulli is a programmer who is well
on Castro Street in Mountain View. pretty harmless Easter egg; that
known for his work in producing web
The bar was the St. James Infirmary no one would really use it, but I browsers. He co-authored a text web
and it had a 30 ft Wonder Woman was very wrong. When we released browser called Lynx and programmed the
statue, among other interesting Netscape Navigator 1.0 we did not networking code for the first versions of
things. At some point in the eve- document the blink functionality the Netscape web browser. He is currently
ning I mentioned that it was sad in any way, and for a while all was working on a new Enterprise class cloud
that Lynx was not going to be able quiet. Then somewhere, somehow storage service at a company named Zetta.
Reprinted with permission of the original author. First appeared in hn.my/blink (montulli.org)
38 SPECIAL