Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Fallacies of Doom - RivieraDEV 19
Search
Mahmoud Abdelghany
May 16, 2019
Programming
0
190
Fallacies of Doom - RivieraDEV 19
https://rivieradev.fr/session/618
Mahmoud Abdelghany
May 16, 2019
Tweet
Share
More Decks by Mahmoud Abdelghany
See All by Mahmoud Abdelghany
Fallacies of Doom - JavaZone 18
blackbeard334
0
420
Fallacies of Doom - Devoxx BE 17
blackbeard334
0
210
Other Decks in Programming
See All in Programming
GPUを計算資源として使おう!
primenumber
1
290
Git Sync を超える!OSS で実現する CDK Pull 型デプロイ / Deploying CDK with PipeCD in Pull-style
tkikuc
4
480
プロダクトという一杯を作る - プロダクトチームが味の責任を持つまでの煮込み奮闘記
hiliteeternal
0
290
Claude Code で Astro blog を Pages から Workers へ移行してみた
codehex
0
160
Android 16KBページサイズ対応をはじめからていねいに
mine2424
0
760
Quality Gates in the Age of Agentic Coding
helmedeiros
PRO
1
110
QA x AIエコシステム段階構築作戦
osu
0
220
レトロゲームから学ぶ通信技術の歴史
kimkim0106
0
140
効率的な開発手段として VRTを活用する
ishkawa
1
180
AI時代の『改訂新版 良いコード/悪いコードで学ぶ設計入門』 / ai-good-code-bad-code
minodriven
24
10k
slogパッケージの深掘り
integral0515
0
160
ご注文の差分はこちらですか? 〜 AWS CDK のいろいろな差分検出と安全なデプロイ
konokenj
4
710
Featured
See All Featured
A better future with KSS
kneath
238
17k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Optimizing for Happiness
mojombo
379
70k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Agile that works and the tools we love
rasmusluckow
329
21k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Facilitating Awesome Meetings
lara
54
6.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
Done Done
chrislema
184
16k
A Modern Web Designer's Workflow
chriscoyier
695
190k
Transcript
Lessons learned from porting Doom 3 to Java
@blackbeard0x14e @blackbeard0x14e Boring intro: history • id Software: Unusual company
creating ‘innovative’ games ◦ (Rover, Dave, Keen, Wolf3D, Doom, Quake...etc • Self taught era, efficient coding style(s) ◦ Nerd rage anecdote • Djoom3==fun • So why the boring awesome intro?
@blackbeard0x14e @blackbeard0x14e Boring intro: history • id Software: Unusual company
creating ‘innovative’ games ◦ (Rover, Dave, Keen, Wolf3D, Doom, Quake...etc • Self taught era, efficient coding style(s) ◦ Nerd rage anecdote • Djoom3==fun • So why the boring awesome intro?
@blackbeard0x14e
@blackbeard0x14e wishlist “ C++ protects against accident, not against fraud.
” Bjarne Stroustrup
@blackbeard0x14e
@blackbeard0x14e @blackbeard0x14e Operator overloading cout << ”Total price: “ <<
price*quantity << endl; p2 = anchor + 32.0f * coneVector - master->GetWorldOrigin(); p2 = anchor.oPlus(coneVector.oMultiply(32.0f).oMinus(master.GetWorldOrigin())); p2 = anchor.oPlus(coneVector.oMultiply(32.0f)).oMinus(master.GetWorldOrigin()); [2] https://www.cs.virginia.edu/~evans/cs655/readings/steele.pdf
@blackbeard0x14e @blackbeard0x14e Operator overloading idMat3 a, b, c, z; z
= a + b * c; z = a.oPlus(b).oMultiply(c); z = b.oMultiply(c).oPlus(a);//technically correct
@blackbeard0x14e >>>
@blackbeard0x14e @blackbeard0x14e Unsigned primitives Runtime or compile-time error??
@blackbeard0x14e @blackbeard0x14e Unsigned primitives
@blackbeard0x14e @blackbeard0x14e Unsigned primitives Microbenchmark alert:
@blackbeard0x14e
@blackbeard0x14e @blackbeard0x14e Immutability; const vs final
@blackbeard0x14e @blackbeard0x14e sizeof( )
@blackbeard0x14e @blackbeard0x14e sizeof( )
@blackbeard0x14e
@blackbeard0x14e @blackbeard0x14e Enum
@blackbeard0x14e @blackbeard0x14e Enum
@blackbeard0x14e @blackbeard0x14e Enum
@blackbeard0x14e @blackbeard0x14e Super.super...inheritance?
@blackbeard0x14e
@blackbeard0x14e @blackbeard0x14e Pointers
@blackbeard0x14e @blackbeard0x14e Pointers
@blackbeard0x14e @blackbeard0x14e Pointers
@blackbeard0x14e (thank God we don’t have this…)-list System.out.println( (byte)~(char)-(int)+(long)-1 );
@blackbeard0x14e @blackbeard0x14e Death by Macros [3] https://blogs.msdn.microsoft.com/oldnewthing/20050106-00/?p=36783 [4] https://youtu.be/4cCeUfzH-No?t=23m
@blackbeard0x14e
@blackbeard0x14e @blackbeard0x14e Death by Macros
@blackbeard0x14e @blackbeard0x14e Death by Macros
@blackbeard0x14e
@blackbeard0x14e @blackbeard0x14e Hungarian Camels [5]https://www.joelonsoftware.com/2005/05/11/making-wrong-code-look-wrong/ [6] https://steve-yegge.blogspot.nl/2006/03/execution-in-kingdom-of-nouns.html
@blackbeard0x14e Hungarian Camels
@blackbeard0x14e @blackbeard0x14e Unholy union
@blackbeard0x14e @blackbeard0x14e Unholy union: SDL_events.h
@blackbeard0x14e Unholy union
@blackbeard0x14e @blackbeard0x14e Unholy union
@blackbeard0x14e nice to have -list “ Object-oriented design is the
roman numerals of Computing. ” Rob Pike
@blackbeard0x14e
@blackbeard0x14e @blackbeard0x14e Destructor • Deconstructors • Finalize(@deprecated) • Autocloseable++
@blackbeard0x14e Default arguments
@blackbeard0x14e @blackbeard0x14e string::insert, string::swap
@blackbeard0x14e @blackbeard0x14e Inlining
@blackbeard0x14e weird(tips...tricks...pitfalls) -list Integer a = 42; Integer b =
42; System.out.println(a == b); Integer c = 666; Integer d = 666; System.out.println(c == d); String e = “666”; String f = “666”; String g = new String(“666”); System.out.println(e == f); System.out.println(f == g);
@blackbeard0x14e @blackbeard0x14e The memory watcher
@blackbeard0x14e @blackbeard0x14e 5.1.2. Widening Primitive Conversion(...aka read the JLS!)
@blackbeard0x14e @blackbeard0x14e Pop goes the callstack
@blackbeard0x14e @blackbeard0x14e Floating point operator precedence
@blackbeard0x14e @blackbeard0x14e Floating point operator precedence
@blackbeard0x14e
@blackbeard0x14e @blackbeard0x14e Floating point operator precedence
@blackbeard0x14e @blackbeard0x14e Floating point operator precedence
@blackbeard0x14e @blackbeard0x14e Conditional breakpoints
@blackbeard0x14e @blackbeard0x14e Conditional breakpoints •Sloooow(interpretive) Microbenchmark alert:
@blackbeard0x14e @blackbeard0x14e A backwards compatible story?
@blackbeard0x14e @blackbeard0x14e Sometimes the bug isn’t in your code...T_T
@blackbeard0x14e @blackbeard0x14e
@blackbeard0x14e Questions...while the Demo loads? https://github.com/blackbeard334/djoom3