Profile

Cover photo
Peter Kasting
Works at Google
Attended Harvey Mudd College
Lived in Akron, OH
4,763 followers|1,648,080 views
AboutPostsPhotosYouTube+1'sReviews
People
Have him in circles
4,763 people
Cyrille Karmann's profile photo
Tropical LifeIsFun's profile photo
Daniel Kurtz's profile photo
diego moisset de espanes's profile photo
Steven Garcia's profile photo
Johannes Grad's profile photo
Jill Pries Clapp's profile photo
Antonino Caternicchia's profile photo
Abdul Kader Sagar (A K Sagar)'s profile photo
Collections Peter is following
Education
  • Harvey Mudd College
    Computer Science, 1997 - 2001
    Concentration in music. Graduated with High Distinction.
  • Sequim Senior High School
    1993 - 1997
    Valedictorian.
  • Sequim Middle School
    1989 - 1993
  • Helen Haller Elementary School
    1988 - 1989
  • Firestone Park Elementary School
    1985 - 1988
Basic Information
Gender
Male
Relationship
Married
Other names
Zero|DPX
Story
Tagline
Christian, husband, engineer, musician, and many other hats
Introduction
In addition to the rest of the stuff on this page, I'm keyboard player and congregation president of St. Paul Lutheran Church in Mountain View.  I like listening to and (every several years) composing music, going wakeboarding and snowboarding, reading, playing games of all forms, drinking tasty beverages, arguing about random crap, and spending endless hours on the computer.  I have a beautiful wife, a dog and a cat, and a house in San Jose.  I'm far from perfect, but God has been good to me, and life has gotten better over the years.  If you're in the Bay Area, I'd probably be happy to hang out :)
Bragging rights
Chrome team founding member; designed and built the Chrome Omnibox.
Work
Occupation
Senior Software Engineer, Chrome UI team
Skills
Detail focus, doing grungy things, complaining and being grouchy
Employment
  • Google
    Software Engineer, 2006 - present
    Firefox 2: Find bar work, spellcheck attribute, "all tabs" dropdown. Chrome: design and implementation for omnibox, original (pre-Safari-for-Windows) scrollbars, BMP and ICO decoders; implementation for browser frame, fullscreen mode, content settings UI, other image decoder work; endless code cleanup, yak shaving, warning fixes, etc.
  • Green Hills Software
    Software Engineer, 2001 - 2006
    Owner, MIPS, SH, FR, CORE1 compiler backends. MULTI integration for ARC, TI.
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Previously
Akron, OH - Sequim, WA - Claremont, CA - Santa Barbara, CA - Mountain View, CA - San Jose, CA
Links
Other profiles
Contributor to

Stream

Peter Kasting

Shared publicly  - 
 
Direct to the point of aggression, but incredibly informative and well-researched article about GMO foods, worth reading by both sides.

http://www.slate.com/articles/health_and_science/science/2015/07/are_gmos_safe_yes_the_case_against_them_is_full_of_fraud_lies_and_errors.html

Let me explain why I think GMO opponents should read this article, despite the fact that its tone will feel hostile:
(1) The author shares many of the goals of GMO opponents.  At one point he lists values like "environmental protection, public health, community agriculture" as worthy.
(2) The author is not a blind shill for GMOs.  The last section of the article looks at how they've been involved in increased herbicide resistance.  This isn't done as a concession to opponents but as a serious illustration of the complexities involved in the topic.
(3) This is not a mere opinion piece.  The article contains literally hundreds of links to studies and other literature, from both sides, so that interested parties are welcome to go further down the rabbit hole.  In fact I can't recall another article I've read on the internet with so many source links embedded in it.
(4) The consequences are important.  Opposing GMOs could mean you get dosed with more pesticides, that companies like Monsanto make more money, that the environment is harmed, and that people die of malnutrition.  Many of these are precisely the sorts of outcomes that GMO opponents fear GMOs will lead to, which means that determining what course of action will actually cause them is in everyone's interest.

Overall, the article is a damning indictment of most aspects of the anti-GMO campaign.  The section on Bt corn in particular demonstrates a blatant willingness on the part of organizations like Greenpeace to simultaneously put forth contradictory arguments, presumably in hopes that someone will believe at least one of them.  It also highlights a number of cases of arguing that (genetically-engineered) Bt production is dangerous by using data that actually came from studies on Bt sprays -- the very thing that would be used far more if the GMO corn wasn't grown.

The problem with opposing GMOs is that it focuses on a tool rather than focusing on an outcome.  As the article repeatedly makes clear, labeling GMOs doesn't actually tell you what you want to know: it doesn't tell you that your food is safer, or that the environment has been helped, or that local or needy growers rather than large corporations have made money.  Instead, fighting over GMOs wastes time, money and energy that could be used to address these problems, and it actively harms a number of beneficial cases.
Is genetically engineered food dangerous? Many people seem to think it is. In the past five years, companies have submitted more than 27,000 products to the Non-GMO Project, which certifies goods that are free of genetically modified organisms. Last year, sales of such products nearly tripled. Whole Foods will soon...
22
16
Daniel Erat's profile photoRohit Korrapolu's profile photo
Add a comment...

Peter Kasting

Shared publicly  - 
 
This is one of the dumber opinions I've seen since my college literature classes.  (Note: In said classes, I was frequently the one with the dumb opinions.  Literature classes and I don't get along.)

http://www.theguardian.com/commentisfree/2015/jul/14/google-doodles

No, Google doodles are not a surreptitious attempt to brand all of human history as belonging to Google, or leading to it, or something.  Who peed in your cornflakes anyway?  Jeez.

Of all the things I've ever heard people complain about when it comes to Google, this one seems the wackiest.  And for once, comments on the article seem to agree with me.
They may look cutesy, but the 15 years of homepage drawings are a corporate attempt to co-opt human progress from cave paintings to the digital age
8
1
Lars Fosdal's profile photoAngus Ferguson's profile photoMalthe Høj-Sunesen's profile photoHenning Brune's profile photo
3 comments
 
Phil Hoad writes about cinema and globalisation

Maybe he should stick with that. 
Add a comment...

Peter Kasting

Shared publicly  - 
 
An exhaustive article about the disagreement between the FBI (and other law enforcement agencies) and pretty much the entirety of the tech and security community on adding backdoors to encryption systems.

http://www.dailydot.com/politics/encryption-crypto-war-james-comey-fbi-privacy/

This is an important issue that has gotten little mainstream media coverage, and while the article is long, I think it's worth reading.  The worst case here is very, very bad: common encryption systems are broken by hackers who now have free access to emails, bank accounts, etc., AND foreign governments worldwide (especially repressive ones) similarly gain access to everyone's communications.

In fact it's difficult to overstate the severity of the downsides of the FBI's call for backdoors, and the article slowly makes clear just how isolated and out of touch the opinion that these sorts of access points are a good idea is in the larger community of experts.
The U.S. government wants to stop terrorists and criminals from 'going dark.' But at what cost?
31
15
Ayman Nedjmeddine's profile photoNick Piepmeier (Pieps)'s profile photoWilliam Uther's profile photoChristopher Hoover's profile photo
2 comments
 
shows that he simply does not understand the problem domain

Or, understands-but-does-not-care.
Add a comment...
Have him in circles
4,763 people
Cyrille Karmann's profile photo
Tropical LifeIsFun's profile photo
Daniel Kurtz's profile photo
diego moisset de espanes's profile photo
Steven Garcia's profile photo
Johannes Grad's profile photo
Jill Pries Clapp's profile photo
Antonino Caternicchia's profile photo
Abdul Kader Sagar (A K Sagar)'s profile photo

Peter Kasting

Shared publicly  - 
20
3
Jarkko Yli-Heikkuri's profile photoDaniel “dictvm” Heitmann's profile photo
Add a comment...

Peter Kasting

Shared publicly  - 
 
Summer Games Done Quick (SGDQ) starts tomorrow at 10 AM PDT!

SGDQ is one of two annual Games Done Quick marathons.  Each marathon runs 24 hours a day and lasts for seven days, raising money for a worthy cause.  During the marathon, some of the best game players from around the world play through video games shockingly fast, demonstrating amazing skill learned through endless practice.  The stream is free to watch but donations are always accepted!

This year's schedule is available for viewing at https://gamesdonequick.com/schedule .  As you can see there are a variety of games from many different videogame eras, and runs range from "any%" (fastest completion possible, game-breaking glitches may or may not be allowed) to "100%" (finish all levels, achieve all goals, or similar) to "glitched" (serious game-breaking glitches), with some runs being races (multiple simultaneous runners competing to finish first).  VODs of the runs will be made available after the event as well as almost immediately in Twitch archives, but it's more fun to watch live, especially if you donate and then get to hear your donation read onstream.

SGDQ benefits Doctors Without Borders (Medecins Sans Frontieres or MSF), which provides medical assistance around the world wherever there is great need.  MSF was a key part of the response to the most recent Ebola outbreak.  You can find out more about MSF at http://www.doctorswithoutborders.org/ .
Date and Time, Game, Runners, Console, Estimate, Setup, Comments, Couch Commentators, Prizes, Twitch Channels. 7/26/2015 12:00:00, Super Mario World 2: Yoshi's Island, Trihex, SNES, 2:55:00, 0:15:00, 100%, Trihex. 7/26/2015 15:10:00, Sonic Boom: Rise of Lyric, mieDax, Wii U, 0:50:00, 0:05:00 ...
4
Add a comment...

Peter Kasting

Shared publicly  - 
 
Dear C++ programmers: please learn what "size_t" is and use it where appropriate.  Stop using "int" instead.

for (int i = 0; i < vec.size(); ++i) foo(vec[i]);  // WRONG
for (size_t i = 0; i < vec.size(); ++i) foo(vec[i]);  // CORRECT

Now, in this trivial example it likely doesn't matter much that you used the wrong type.  Unfortunately, as such code proliferates, people tend to pass around the value of |i| itself, not just vec[i], and so we start getting APIs that use ints for "index" and "length" values instead of using size_t.  This leads to implicit or explicit casts on both sides of the API calls, and can also lead to broken code that doesn't properly detect and handle negative values for these ints (because if they were size_ts they couldn't have been negative to begin with).  Or it leads to comparisons of size_ts with ints, which may not do what the coder intended.  Compilers warn about this sort of thing for a reason, but unfortunately people just disable the warnings, and even have the temerity to argue (in the case of the people working on FFMPEG, for whom my respect is that much lower now) that not fixing the warnings actually leads to better, safer code.

(And don't get me started about the perils of environments where size_t is 64-bit and int is 32-bit, and this sort of sloppy implicit converting between the two can introduce major functionality and security problems!  I'm sure +Justin Schuh would have things to say on that front.)

I ran into this today in Chromium's copy of the re2 library, which we currently have to compile with various warnings disabled.  Check out https://code.google.com/p/chromium/codesearch#chromium/src/third_party/re2/util/stringpiece.cc&sq=package:chromium&type=cs&l=81&rcl=1437161995 .  See that "if (pos > length_)"?  |pos| is a size_t and |length_| is an int.  So what happens if length_ == -1?  Well, that doesn't make sense, you say, because a string can't have negative length.  Except other places (e.g. the find() implementations above this) defend against this, and it turns out you can have negative string length: the class exposes a set() call that lets callers pass in an integer length value, and it's stored in |length_| completely unchecked.  Want to set("foo", -500)?  Sure, that's cool.

This should never have happened.  |length_| should be a size_t, and set() should take a size_t.  The fact that substr() itself takes size_ts but these other APIs take and return ints is just bizarre and broken.  When I see this sort of thing over and over and over, I thump my head on my desk.

This seems to especially happen with Googlers, apparently because people have gotten it into their heads that the Google style guide broadly bans all unsigned types.  In fact, the style guide's proscriptions on unsigned types are largely about avoiding gratuitous use of "unsigned int" and the like just because some variable happens to never be negative, and it explicitly approves using size_t "when appropriate".  So when is it appropriate?  Basically, any time you're working with sizes, lengths, counts, or indexes of objects contained in memory.  Think, "what would the STL do?" and you'll usually get the right type.  And you should definitely use size_t if you're actually working with the STL APIs that use it!

In fact, size_t is so frequently the correct type that in my own code, I often use it more commonly than int.

In any case, what's the correct thing to do for the particular piece of code cited above?  My first thought was to copy find() and convert the first comparison to:

if (length_ <= 0 || pos > static_cast<size_t>(length_)) ...

That will mean that if |length_| is negative, we'll always end up returning a zero-length substring instead of something seemingly arbitrary... although it will still be a stringpiece with a very strange base pointer.  Hmm.  Maybe I should special-case this to just:

if (length_ <= 0) return StringPiece(ptr_, 0);
...

Ugh... I shouldn't need to worry about this...
An open-source browser to help move the web forward.
32
8
Paul Eubanks's profile photoTimo Reimann's profile photoIan Rogers's profile photoMarkus Breitenbach's profile photo
18 comments
 
It seems pretty clear to me.  If you were to take "do not use" to mean "ever at any time" the guide would clearly be self-contradictory as it tells you just above that you can, in fact, use size_t.  This suggests that you need to look at the context of the section, which is laid out pretty directly at the start of the section.  I don't have a proposal for the style arbiters.  If you have one you're welcome to propose it to them?
Add a comment...

Peter Kasting

Shared publicly  - 
 
Well, that got disturbing.

http://imgur.com/gallery/drI3f

Facebook fitness quotes on pictures of people drinking.
Imgur: full of all the magic and wonders of the Internet.
24
8
Juha Kopsa's profile photoPawel Aleksander Fedorynski's profile photo
Add a comment...

Peter Kasting

Shared publicly  - 
31
12
Christina Hitz's profile photoJulian Pastarmov's profile photoprsj2kplus's profile photoMartin Torres's profile photo
 
That's so much more awesome than I expected 
Add a comment...

Peter Kasting

Shared publicly  - 
 
Fascinating 1999 article about smallpox -- how it kills, a brief history, and vaccination and bioweapons efforts.

I'd be curious to see a similar article now cover what, if anything has changed in the last 15 years.

http://cryptome.org/smallpox-wmd.htm

h/t +Daniel Erat 
17 July 1999. Source: Hardcopy The New Yorker, July 12, 1999, pp. 44-61. Thanks to Richard Preston and The New Yorker. See also: "The Bioweaponeers": http://cryptome.org/bioweap.htm. A REPORTER AT LARGE. THE DEMON IN THE FREEZER. How smallpox, a disease of officially eradicated twenty years ago, ...
8
1
Alexander Lent's profile photo
Add a comment...

Peter Kasting

Shared publicly  - 
 
If you played Portal 2, and you're up for a more difficult set of puzzles, you should enjoy this fantastic free-to-play separate campaign:

http://store.steampowered.com/app/317400/

A full-length community-developed mod years in the making, Portal Stories: Mel is extremely impressive.  I just finished playing through tonight.  The game can become quite challenging, but for the most part I was able to solve things.  On one of the very last (and, interestingly, shortest/simplest in terms of the number of moving parts) puzzles I did have to finally break down and look at a walk through after a good hour or more got me utterly nowhere.  Otherwise everything was solved on my own.  General tip: many puzzles require strategically destroying a cube (usually by requesting a new one) at the right time.

There are a few glitches, mostly voice triggers that can kick in even when you don't manage to do what's supposed to activate them, but for the most part things feel professional.  Recommended!
17
2
Elias Pinto's profile photoMasterchief268 8's profile photoTobias Thierer's profile photoEli Gamer's profile photo
3 comments
 
At rhe end you fight aeigis destroy his memory bank and leave
Add a comment...
Peter Kasting's +1's are the things they like, agree with, or want to recommend.
The Greatness of Ron Paul
www.theatlantic.com

By introducing moral imagination to the foreign-policy conversation, the Republican candidate is doing the nation an important service.

Public - 3 years ago
reviewed 3 years ago
Public - 3 years ago
reviewed 3 years ago
Public - 3 years ago
reviewed 3 years ago