Skip to content

Commit 273fe6a

Browse files
add more text all over the place and cleanup the structure
1 parent b7478a8 commit 273fe6a

6 files changed

+186
-171
lines changed

_posts/2023-10-25-making-unity-a-decent-employee-0.md

Lines changed: 64 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,28 @@ published: false
1212
# target publish date: december
1313
---
1414

15-
[hook with jeff, that stupid asshole]
15+
It's a cloudy monday morning. Your jeans are soaked from the rain on the way to the office. There's only a sip of cold coffee left in your mug as you are leaving your desk with your presentation notes.
16+
17+
Your heart is pounding, as you open the door to the meeting room, knowing that a dozen of people sit there, waiting.
18+
Jeff, the coworker you teamed up with, nods and smiles, reassuring that everything is prepared. Everyone's staring at you.
19+
20+
"So, this is the fantastic game Jeff and I worked on", you say nervously.
21+
"Jeff, could you please put it on the Screen?"
22+
23+
Jeff goes "Alright!" and plugs his Laptop in. Everyone sees the cat trying to eat cotton candy, his desktop background.
24+
"Jeff could you please open the Game?" What is he waiting for?
25+
26+
"No, I cannot open the Game", Jeff explains calmly, "the attachment in your mail last week was corrupted, so of course I don't have it. I didn't want to get in your way."
1627

1728
### WTjeFf?!
1829

1930
You take a deep breath. Isn't that wonderful. What a bold move, Jeff.
2031

21-
Think about it for a second: If your human colleague was doing what Unity does, you'd dig up their dead pet cat called Pumpkins, and plant its severed head on their bed while they're sleeping. Well, at least I would.
32+
Think about it for a second: If your human colleague was doing what Unity does, you'd dig up their dead pet cat called Pumpkins, and leave the stiff body on their bed while they're sleeping. Well, at least I would.
2233

23-
![image of pumpkins the cat. if you are reading this instead of seeing the image: he was cute, trust me.]()
24-
<!-- maybe leave this image without a link intentionally? -->
34+
![image of pumpkins the cat. if you are reading this instead of seeing the image: he was cute, trust me. not in this image though. this is a picture of the exhumined cat.](<!-- leave this image without a link intentionally, might be funny -->)
2535

26-
Let's shift perspectives: What would you have done in Jeff's position?
36+
Let's shift perspectives: What would you have done in Jeff's position? What would be the right thing to do? What would be the nicest thing you could imagine?
2737

2838
![graphic to make them pause and actually think about it](TODO)
2939

@@ -44,14 +54,14 @@ If anything goes wrong, they will try to pretend that nothing happened. Happily
4454

4555
<!-- meme idea: this is fine -->
4656

47-
BUT don't give up! You and me, we are clever developers, we will not restrain from employing dark magic to squeeze Unity into something we can work with.
57+
BUT don't give up! Let me tell you: You and me, we are clever developers, we will not restrain from employing dark magic to squeeze Unity into something we can work with.
4858

4959
> If your strategy was instead to switch to Unreal (what are you doing here??!), please let me know how it went in the comments. I might envy you :>
5060
51-
# Are you series
61+
# Why so series
5262
<!-- TODO: this section is as focused as the drawer in your kitchen that contains both the scissors and the banana shaped tupperware. delete everything except the table of contents? -->
5363

54-
Now, in my handful of years of fulltime Unity development, I have learned one or two things, that I'm happy to share today. Maybe this stuff is widely known, maybe it's a secret, maybe I'm an Idiot lol. All I know is that I'm writing the blog posts I wish I had read when starting to developing real projects in Unity.
64+
Hi! I'm Johannes. In my handful of years of fulltime Unity development at [SWCode](https://swcode.io), I have discovered one or two goodies, that I'm happy to share with you now. Maybe this stuff is widely known, maybe it's a secret, maybe I'm an Idiot lol. All I know is that I'm writing the blog posts I wish I had read when starting to developing real projects in Unity.
5565

5666
> I can't be the only one thinking that Unity is horribly unreliable. I often wondered how all the professional studios deal with that, and my colleagues did too. In case you know, hit me up in the comment section!
5767
@@ -63,43 +73,72 @@ The key strategy is to find problems sooner in the development workflow, instead
6373

6474
Learning from statically typed languages, we will add checks that run while Unity is building your application. We will automate error prone manual processes. We will craft our own C#, with blackmagic and hooks! We will exploit Unity's feature of adding scripts to the Editor to make up for missing functionality, which is actually a very neat feature of Unity c:
6575

76+
![a fantastic meme with bender making his own stuff](assets/image/make-our-own.jpg)
77+
6678
While I'm at it, let me dial back a bit on my rant. Don't let me shit on Unity for something we can easily add ouselves. I just wish it was there by default.
6779

6880
> Disclaimer: I'm working in a rather unconventional project environment. For example, we embed a Unity View into an existing Android/iOS App. That's because we at [SWCode](https://swcode.io) build an app that uses AR, called [SoesTour](https://www.so-ist-soest.de/de/tourismus/sehenswertes/soestour.php). The app aims to revive historical sites that long vanished, by digitally showing them at their exact locations in the real world. Due to this complicated setup, I had to touch with some nasty Unity bits that most people might not have to touch. I want this article to be generally applicable, so don't worry about it. It might be fun either way!
6981
70-
Oh MY GOD JOHANNES STOP talking already! Let's get GOING!
82+
Oh my GOD JOHANNES STOP talking already! Let's get GOING!
7183

7284
The Four Strategies
7385
-------------------
7486

7587
0. [YOU ARE HERE] Introduction
7688

7789
1. Write better code (duh!)
78-
- Raise the level of abstraction
79-
- Utilize basic C# language features because Unity doesn't
80-
- Add obvious missing C# language features using black magic
81-
- Create your high level Domain, instead of fiddling with unnecessary details all the time
8290

91+
In addition to utilizing the boring old clean code strategies, we will add missing basic features to both Unity and C#. Everything else builds on those.
92+
8393
2. Use code instead of assets (the controversial one)
84-
- generate at compile time
85-
- avoid using the editor to hook up objects
94+
95+
We will use code to control Unity, generating and modifying assets, instead of manually editing them by hand.
8696

8797
3. Smoothen the overall workflow (the one you might have expected)
88-
- Automate import processes
89-
- Automate setting the settings
90-
- Automate clicking the clickies
91-
- Seriously, let me press ONE button and then give me twenty minutes to pet my cat ... UHHHH work on something else.
98+
99+
Also we will automate clicking the clickies.
100+
Seriously, let me press ONE button and then give me twenty minutes to pet my cat ... UHHHH work on something else.
92101

93102
4. Perform rigorous checks at build time (the banger! also black magic)
94-
- Check asset data
95-
- Check settings
96-
- Check code
103+
104+
This one is huge. We will make sure that you notice bad project files before waiting for the 20 minute long build process to complete.
105+
I've not seen this one anywhere else yet, but I'm sure any serious developer MUST be doing that... right?
106+
107+
These are rather large topics and I want to go into detail about them, so this will probably be more than one article. Goo look for a link at the end of this blogpost in case I forgot to go back here and edit this text before I click the juicy UPLOAD BUTTON! :D <!-- Note to future self: definitely don't ever remove this, I think it's cute -->
108+
109+
Within each topic, I will first describe the problematic situation that you too might have encountered in Unity. Afterwards I'll present my attempt at making it less horrible. I'll also try to share my experiences that I made after working with those solutions for quite some time. There will be code! Maybe a lot of it! Some will be controversial!
110+
111+
## Find the Jeff
112+
<!-- todo: maybe move this hint from the introduction to a surprise at the end? -->
113+
> In each post, I'll challenge you to find the hidden Jeff.
114+
To find him, you'll have to find the matching code section for that posts Jeff story. If you find him, just be proud of yourself. Take the first character of each heading where Jeff's code section appears. These four letters are the secret code.
115+
<!-- TODO what to do with the code? GIMME SOMETHING -->
116+
117+
This introduction does not contain a Jeff.
118+
<!-- because he hid in this markdown comment! congrats! :D there, get him!!
119+
<-- --<< JEFF (hiding) >>-- -->
120+
121+
(Sorry if your name is Jeff, I had to choose a name. Visit me in Soest and the beer is on me!)
122+
123+
## A note on performance
124+
<a name="performance"><!-- link to this anchor using `post-url/#performance` --></a>
125+
126+
We're still not starting with the real content. Here's why:
127+
128+
A recurring theme in this series will be performance. So let me get this straight, once, and link to this section a thousand times from those indivudal blog posts:
129+
130+
- of course performance matters
131+
- but only in a fraction of the code
132+
- and developer time is more important
133+
- so use abstractions first, and optimize only where you've __measured__ a performance bottleneck
97134

98-
These are rather large topics and I want to go into detail about them, so this will probably be more than one article. Goo look for a link at the end of this blogpost in case I forgot to go back here and edit this text before I click the juicy UPLOAD BUTTON! :D <!-- Note to future self: I definitely don't ever want to remove this, I think it's cute -->
135+
We will use crazy Reflection and LINQ and write horribly inefficient code. That is, if you were to run it every frame unconditionally. But it's only used in tests, or once at initialization, or on build time. So get ready to unlearn those annoying for-loops and write better code in less time!
99136

100-
Within each topic, I will first describe the problematic situation you too might have encountered in Unity. Afterwards I'll present my attempt at making it less horrible. I'll also share my experiences that I made after working with those solutions for quite some time. There will be code! Maybe a lot of it! Some will be controversial!
137+
All the time you save by choosing high-level abstractions, you gain for later optimization. It pays off. If this ever didn't work out for you, meet me outside, in the comment section.
101138

102-
If there is one thing I hate more than badly designed software, it's blog posts that promise a wonderful world, but then never get to the point, leaving you hyped up. That's why I personally made sure, for you specifically, that this blog posts has some real code in it, and you're not left with a hollow promise yet again: The first blog post of this series is already online!
139+
## The code is now.
140+
If there is one thing I hate more than badly designed software, it's blog posts that promise a wonderful world, but then never get to the point, leaving you all hyped up. That's why I personally made sure, for you specifically, that this blog posts has some real code in it, and you're not left with a hollow promise yet again: The first blog post of this series is already online!
103141

104142
[Show me the code already!!1 Jesus...](TODO)
105143

144+
Here you go, have fun! :)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy