Better HN
topnewbestaskshowjobs
Log inSign up

PezzaDev

149 karma · joined Jun 22, 2018 (8y ago) · 19 submissions

Submissions

comment 3y ago · link · parent

No. Precision and Accuracy have very specific definitions in the world of science and engineering. https://en.m.wikipedia.org/wiki/Accuracy_and_precision

comment 5y ago · link · parent

Automated testing is hard to justify for games because you are not simply finishing features and moving on. You are constantly experimenting. Throwing out features and ideas and reworking them is part of the creative process. Automated testing adds overhead to iteration and isn't free, so you have to be very selective. At the end of the day it is more important for the game to be fun than it is stable.

comment 6y ago · link · parent

You made me realise that term "dumb code" isn't exactly what I mean. I want to advocate writing code that is very easy to statically understand. You should be able to look a piece of code without needing to read too much around it to understand what it is doing. One of the best ways of doing this in my experience is keeping things simple (or "dumb" as I put it earlier). Using simple abstractions, keeping code organised and avoiding global state also help in this regard.

comment 6y ago · link · parent

No coding approach will ever solve an issue caused by a lack of discipline.

comment 6y ago · link · parent

And everyone wishes they hadn't :P Even modders that use Lua have to write code that avoids allocations, caching and reusing all the objects they can. I can't stress enough how much time is spent on optimising code to avoid GC pauses. The main goal of my C# coding style is avoiding unnecessary allocations at all costs. I'm not exaggerating.

comment 6y ago · link · parent

I'd love to try Golang, but as a game developer, the gc makes it a no go due to perf. I begrudgingly accept C# due to unity. GC is a different topic altogether, but has also always been a pain. You end writing code to avoid allocations, which at that point you ask "Why am I not just writing C++?" I also discovered GC makes bad programmers worse by allowing them not to care about ownership, enabling them to develop systems in an adhoc way. Some programmers need a segfault screaming at them to make them realise they are writing terrible code.

comment 6y ago · link · parent

After years of experience writing code for games, I find that the dumbest code is the best code. It doesn't matter if it's C# or C++, whenever I've used something like reactive extensions or template metaprogramming, it has been a terrible mistake every single time. Make your code simple, dumb and verbose all the time. Avoid using any complex abstractions or any overcomplicated syntactic sugar and you'll have a codebase that anyone can jump into and quickly be able to add features without introducing bugs (at least less likely). This matters more than anything else.

comment 6y ago · link · parent

Try bluring your vision or moving further away from your screen.

comment 6y ago · link · parent

What are the advantages of this other than showing the language is competent enough that you can write a compiler for itself? Would it be better to keep a compiler written in a highly portable language such as c? Genuinely curious.

comment 7y ago · link · parent

I feel zig is now experiencing feature creep now too sadly. Async and await and coroutines are being added to it, because it's the new-ish hotness I guess? Stopped paying attention to the language after that. I was hoping for a more streamlined language.

comment 7y ago · link · parent

It frustrates me too. I'm always on the look out for languages that implement modern performance approaches into their design. I'd love to see a language that focuses on data orientated design, auto-vectorisation and possibly something like reference capabilities for concurrent programming. That language would truly be "blazingly fast".

comment 7y ago · link · parent

AOT (ahead of time) is your code is turned into machine code before you run it.

JIT (just in time) is your code turning into into machine code as you run it. Machine code is what your CPU directly processes, so it can be very fast.

AOT languages can use more expensive techniques to make super optimised machine code since the cost is upfront when compiling the code, not when running it. But JIT languages can have features that exploit the fact that machine code is made on the fly.

AOT programming languages: C++, C, Rust

JIT programming languages: C#, Javascript, Java

comment 7y ago · link · parent

I didn't take me long to get this abomination https://imgur.com/a/gI8Vlla

comment 7y ago · link · parent

After seeing callbacks cause a lot of "hard to debug" scenarios for me and for others, I'm starting to believe they are gotos in disguise.

comment 7y ago · link · parent

I realise the irony of claiming I only lurk by writing this, but I'm fighting my habits to help illuminate those interested.

For me personally, I just don't care and don't get any reward in the idea of conversing with some random person on the internet. The chances are, I'll never see you again on here or irl, remember your online name (I remember faces, not names), or you will have any real impact in my day to day life. This is how I feel about every commenter online. I don't talk to random people on the street, so why would I talk to random people on the internet? To me, there is little difference.

I value face to face communication much higher than text chat. I really enjoy reading peoples faces and expressions when chatting, to the point where I find talking to others online is the equivalent of having a conversation where everyone has a paper bag on their head when.

If I think someone is wrong on the internet, I just don't care. I read their comment, think to myself "They are wrong/an idiot" and get on with my day. I see no value in correcting a stranger on the internet.

I much rather have conversations irl, and I do, so I have no time/energy left for an online conversation. I'd much rather spend my time with my girlfriend, programming or anything else.

Everything feels so permanent online. I know I'm going to regret things I've said in this post in the future, my mind will change, maybe I won't lurk anymore after writing this!? The permanent nature of online communication goes the against how I should be as person, my opinions shifting and changing as I experience more of life, not held back by some random thing I said on a forum 5 years ago.

When I post, I open myself up to being attacked by people online. I can avoid this simply by never saying anything online.

To illustrate a point, I finally got round to creating an account on stackoverflow about half a year ago, and I still have only one point. I just wanted to vote on questions, but I can only do that if I have at least 15 points on my account, and that requires writing comments/questions (I think). For me, that means contriving 15 comments that succeed at playing some social game, that I simply don't have the time or energy for, so I've given up on ever voting on stackoverflow.

comment 8y ago · link · parent

Do you know where I could find details about how to optimise for SteamPipe?

comment 8y ago · link · parent

Tessellating a sphere is one of those never ending areas of study because no solution feels 100% satisfying

comment 8y ago · link · parent

I don't see how a new language can claim to fast and efficient when it does nothing to encourage data-oriented programming.