HNHacker News
TopNewBestAskShowJobs

ggambetta

6,991 karma · joined August 12, 2013

Member of Technical Staff at prometheus.ai. Ex-Google, ex-Synthesia, ex-Improbable. Author of "Computer Graphics from Scratch" (http://gabrielgambetta.com/computer-graphics-from-scratch). Used to run a game development studio and teach Computer Graphics in university. Tech website: http://gabrielgambetta.com

Actor / filmmaker: http://gabrielgambetta.biz

submissionscomments
ggambetta··on In Jordan, a ‘stunning’ discovery under Petra’s ancient stone
That's the cup of a carpenter.
ggambetta··on Ask HN: Who wants to be hired? (October 2024)

    Location: Zürich, Switzerland
    Remote: Yes
    Willing to relocate: No
    Technologies: C++, Python, Java, JavaScript, HTML, Django, SQL, PHP
    CV: 7 years at Google, 4 years at Improbable, taught Computer Graphics, published a book, founded and ran a gamedev company for 10 years. More details at https://www.linkedin.com/in/gabrielgambetta
    Email: gabriel.gambetta@gmail.com
I'm a generalist, full-stack in the original sense of the term. I've done a little bit of everything in the last 30 years. I left Google a few months ago and I'm looking for something to do -- it's one of these "I'll know it when I see it" situations.

Ideally looking for something I haven't done before -- I'm curious about AR/VR, robots, drones, fintech. I'm not particularly interested in AI, blockchain or web3. I can write code, I can write for humans, I can lead teams, I can teach and mentor.

If you're working on something interesting, let's have a chat!

ggambetta··on Ask HN: Did you personal website help you get hired? Tell about it
Happy to hear :)
ggambetta··on Ask HN: Did you personal website help you get hired? Tell about it
It kind of did. Back in 2008 or so I wrote a series of articles about multiplayer networking [1], which over time became suprisingly popular, but nothing much happened otherwise. Until 2014, when they directly led to Improbable [2] reaching out and ultimately poaching me from Google (at least for a few years).

[1] https://gabrielgambetta.com/client-server-game-architecture....

[2] https://improbable.io

ggambetta··on Ask HN: Resources for Learning Graphics Programming
If you're interested in understanding the graphics algorithms and implementing them yourself, as opposed to using an engine or a library, check out https://gabrielgambetta.com/computer-graphics-from-scratch It guides you through writing a software rasterizer and a raytracer, and most of what you learn can be applied to GPU programming.
ggambetta··on NASA spacecraft to probe possibility of life in Europa's salty ocean
We send Bruce Willis and a ragtag team of lovable, drilling-expert misfits?
ggambetta··on I wish I didn't miss the '90s-00s internet
I left Windows for Linux in 1999 and I do NOT miss how difficult everything was to get working, even with the reasonably user-friendly Red Hat (5? 6?). I even became the maintainer of a Linmodem driver by accident (it was abandoned, the author was uncontactable, and I needed the modem to dial).

I'll take present-day Ubuntu any day. I install it on my desktop, and it just works, GPU and all. I install it on my weird laptop with a touchscreen that swivels 360 degrees and can rotate to a portrait desktop, and it also just works.

ggambetta··on The Case for Hypochondria
Or The Black Knight https://www.youtube.com/watch?v=ZmInkxbvlCs
ggambetta··on Vampires and Arithmomania
I bet you were counting on this.
ggambetta··on Ask HN: What are you working on (August 2024)?
Re. client side prediction and server reconciliation, may I recommend https://gabrielgambetta.com/client-server-game-architecture....? Even if you don't roll your own solution, it might be worth understanding the theory so you can use these libraries correctly.
ggambetta··on On Writing Well
Yeah, it's surprisingly poorly written for an article about writing well :-/
ggambetta··on A different kind of keyboard (2021)
That doesn't sound decent to me, haven't measured but I'm sure I can swipe a lot faster than that on a phone.
ggambetta··on How Olympic Timing Works
Wondering if it would make more sense to award shared gold/silver/bronze to athletes whose times fall within a certain distance of each other. The difference between 10.00 and 10.01 is much smaller than the difference between "gold" and "silver".

Put it another way, both (10.00, 10.01) and (10.00, 20.00) map to (gold, silver), despite being qualitatively very different.

ggambetta··on How WASD became the standard PC control scheme (2016)
I grew up in a Spanish-speaking country, reading computer magazines in Spanish, and at the time Spain was hugely into ZX Spectrum videogames. I feel like OPQA rolls off the tongue easier than QAOP when you say it in Spanish, so maybe that's all there is to it?
ggambetta··on How WASD became the standard PC control scheme (2016)
OPQA, who's with me?
ggambetta··on How to build highly-debuggable C++ binaries
Could have been that, honestly I'm not sure. 20-ish years :)
ggambetta··on How to build highly-debuggable C++ binaries
About a million years ago (OK, more like 20) I was making casual videogames in C++ and I wanted a cross-platform (Linux, Mac, Windows) way to get a stack trace whenever a game crashed. What I ended up doing was adding a macro to the first line of every function, let's call it STACKTRACE, which was something like

  #define STACKTRACE GLOBAL_STACK_FILE[GLOBAL_STACK_IDX] = __FILE__; GLOBAL_STACK_LINE[GLOBAL_STACK_IDX++] = __LINE__; StackTraceCleaner stc;
StackTraceCleaner was a class that didn't do anything but execute GLOBAL_STACK_IDX-- in its destructor.

So at any point in time I could inspect GLOBAL_STACK_FILE and GLOBAL_STACK_LINE and have a complete stack trace of the game.

Obviously this only worked because these games weren't performance-critical and because they were essentially single-threaded, but it did the job at the time. We're talking about a time when Visual Studio 6's support for templates was half-broken, and the STL wasn't exactly S, to the point that I had to roll out my own string, smart pointers, containers, etc -- made twice as hard because of the aforementioned broken template support in VS6 :(

I do miss these simpler, more innocent times, though.

ggambetta··on Teaching Programming with Basic
I'd avoid using BASIC for anything serious these days, but I'm part of the "BASIC was my first language when I was 5" club, so I have to respect it as a teaching language (although I'd go for Python nowadays).

I wonder how much of the spaghettiness BASIC is infamous for is due to the language, and how much is about the programmer's mental models -- my recent raytracer for the ZX Spectrum [0] is a pretty straightforward transliteration of my JS ones.

[0] https://gabrielgambetta.com/zx-raytracer.html

ggambetta··on Russia Leverages AI-enhanced "Meliorator" software for foreign malign influence
And now, 30 years later, the name of this Disney character finally makes sense to me: https://disney.fandom.com/wiki/Taurus_Bulba
ggambetta··on What You Get After Running an SSH Honeypot for 30 Days
If you say it 3 times in front of a mirror, it summons Stallman
ggambetta··on Perspective-Correct Interpolation
An alternative explanation: https://gabrielgambetta.com/computer-graphics-from-scratch/1...
ggambetta··on Francis Ford Coppola's “Godfather Notebook”
I learned this fact because I had a first date with a girl who suggested that place, knowing I'm a writer. Five years later I chose that same spot to propose :)
ggambetta··on 2D Rigid Body Collision Resolution
I'm thinking of changing my surname to Gambettski so I can also make cool online demos, so you're probably fine :)
ggambetta··on Scandal at America's top science fair
Or even better, the passive form, "mistakes have been made" :)
ggambetta··on Scandal at America's top science fair
Unfortunately very similar to Uruguay, where I grew up. One of the many reasons I haven't lived there for a while now :(
ggambetta··on How to fix bugs in 24 hours or less
Turns out it was only 2 weeks, but it felt like 3 months :) See my other comment.
ggambetta··on How to fix bugs in 24 hours or less
At a previous company, we were in the early stages of building a massively distributed simulation platform that would power MMOs and government/military simulations. The platform was written in Scala and used Akka extensively (because of reasons). We had a test environment that spun up a decently big game world, and had a bunch of bots run around and do things. It would run overnight.

At some point it was discovered that every once in a while, bots that were supposed to just go back and forth the entire game world forever would get stuck. It was immediately obvious that they were getting stuck at machine boundaries (the big game world was split into a grid, and different machines would run the simulation for different parts of the grid). This suggested the bug was in the very non-trivial code that handled entity migration between machines.

This was a nightmare to debug. Distributed logging isn't fun. Bugs in distributed systems have a tendency to be heisenbugs. We could reproduce the bug more or less reliably, but sometimes it took hours of running the simulation until it manifested; worse, not manifesting for a few hours wasn't a clear signal that the bug had been fixed.

My investigations were broad and deep. I looked at the Kryo serialization protocols at the byte level. I scrutinized the Akka code we were using for messaging. I rewrote bits and pieces of the migration code in the hope it would fix the bug. Many other engineers also looked at all this and found nothing. A Principal Engineer became convinced this had to be a bug in Scala's implementation of Map. I was very close to giving up multiple times.

At some point there was a breakthrough -- another engineer discovered a workaround. A violent but effective one: flushing every cache and other bits of internal state except the ground truth would get the entities unstuck. We added a button to the debug world viewer appropriately labelled YOLO RESYNC. We were so desperate about this bug, we seriously discussed triggering a YOLO RESYNC periodically.

But if YOLO RESYNC fixed the issue, it meant that there was some sort of problem with the state of the system. I spent some more days and weeks diffing the state before and after YOLO RESYNC (more difficult than it sounds in a not-entirely-deterministic distributed simulation) and narrowed it down more and more until I finally found a very subtle bug in our pubsub implementation. I don't remember exactly what the issue was, but there was some sort of optimization to prevent a message from being sent to a recipient under certain conditions that would "guarantee" the recipient would have gotten the message in some other way -- and the condition was very subtly buggy. Fixing it was an one- or two-line change.

I still remember the JIRA ticket: ENG-168. It tested my sanity and my resilience for longer and harder that anything else before or after.

[EDIT] I saved this ticket as a PDF as a traumatic memory. It was in January 2015 so I got some details wrong, the main one being that it only took about two weeks from the bug report (Jan 28) and the fix (Feb 10). I swear it felt like 3 months.

ggambetta··on How to fix bugs in 24 hours or less
Yes, that was my reaction as well. I'm still traumatized by an insidious bug in a distributed system that took me around 3 months of nearly exclusive work to diagnose and fix (one-line fix, of course). ENG-168. Never forget.

"How to fix bugs in 24h", LOL.

ggambetta··on Notes on Japan
Anything can be offensive if you try hard enough!
ggambetta··on DOS game “F-15 Strike Eagle II” reverse engineering/reconstruction war stories
May I pimp my own book about 3D rendering, covering both rasterization (including 3D projection) and ray tracing? There's a complete, free version at my website, https://gabrielgambetta.com/cgfs
← PreviousPage 4 of 34Next →