News for hackers. Stuff that matters.
Re:Palm OS developer releases source to classic games, 20 ye... by sniperjzp on Wednesday June 15, 2022 @01:10AM (#31749341)
I'm wondering how to test those thousands lines of C++ code, a lot of them are compute-intensive, I don't see any unit test.
Re:Palm OS developer releases source to classic games, 20 ye... by ido on Wednesday June 15, 2022 @01:12AM (#31749355)
Not sure if this is a joke but unit testing is generally not used in games, definitely not in plam games 20 years ago.
Re:Palm OS developer releases source to classic games, 20 ye... by Gigachad on Wednesday June 15, 2022 @01:42AM (#31749498)
Games use integration tests. You push a new build to steam and check reddit to see if it worked.
Re:Palm OS developer releases source to classic games, 20 ye... by Jagerbizzle on Wednesday June 15, 2022 @02:00AM (#31749606)
Hilarious post that's also sadly quite accurate.
Re:Palm OS developer releases source to classic games, 20 ye... by throwaway742 on Wednesday June 15, 2022 @01:58AM (#31749593)
That's the same way Microsoft tests their updates.
Re:Palm OS developer releases source to classic games, 20 ye... by sk0g on Wednesday June 15, 2022 @01:43AM (#31749503)
Unit testing is not too rare in (modern) games.

There's a comment on HN from a Rare employee going into how they do their testing, for example - https://news.ycombinator.com/item?id=14802509

Edit: It's a 5 year old thread and I have a few comments in there... Fuck I'm old.

Re:Palm OS developer releases source to classic games, 20 ye... by maccard on Wednesday June 15, 2022 @06:08AM (#31751012)
> Unit testing is not too rare in (modern) games.

In my experience, unit testing is _incredibly_ rare, and Rare are pretty much the only studio that I'm aware of that do it.

Re:Palm OS developer releases source to classic games, 20 ye... by jokethrowaway on Wednesday June 15, 2022 @03:00AM (#31749942)
Unit tests are a relatively recent concept (last 15-10 years?).

I know plenty of old developers who crank out pretty awesome software without versioning and without any kind of automated testing.

For most applications (especially UIs or 2d / 3d rendered), I think there is a benefit in having a few well chosen tests but overall I think TDD does more harm than good.

I understand the mantra started in the web world, where your services needs to maintain the promised compatibility or someone else may get an error. A lot of other software can afford to be more flexible and the ability to break the API without having to fix hundreds of tests is invaluable.

Even in web services, I think the TDD religion guilt trips developers into writing more useless tests than they should.

Re:Palm OS developer releases source to classic games, 20 ye... by fer on Wednesday June 15, 2022 @04:21AM (#31750415)
> Unit tests are a relatively recent concept (last 15-10 years?).

I was writing unit tests 20 years ago. I generally see SUnit considered as the birth of unit testing frameworks, and that's 30 year old art to solve something that was being done before anyway.

I guess one can say that Extreme Programming made it more popular in the mid 2000s, which is when relatively new languages started including built-in/standard unit testing libraries/frameworks/semantics (Python, Ruby, D...)

Re:Palm OS developer releases source to classic games, 20 ye... by memsom on Wednesday June 15, 2022 @04:42AM (#31750534)
I was seeing Extreme programming being a thing and using DUnit for Delphi in the late 90's (possibly early 2000, but I left the Job I was using this for by mid 2000.)
Re:Palm OS developer releases source to classic games, 20 ye... by simne on Wednesday June 15, 2022 @06:29AM (#31751095)
> A lot of other software can afford to be more flexible and the ability to break the API without having to fix hundreds of tests

This is really question of good high level system design, so you don't need to change all code in case of small changes in overall behavior.

Other name of this is tight coupled vs loose coupled system.

Re:Palm OS developer releases source to classic games, 20 ye... by pjmlp on Wednesday June 15, 2022 @02:08AM (#31749653)
Those games are written in C, and unit tests 30 years ago?!?

The only tests were actually playing the game, over and over again.

Re:Palm OS developer releases source to classic games, 20 ye... by blobbers on Wednesday June 15, 2022 @01:02PM (#31755916)
Can confirm! Palm devices were generally tested for things like memory leaks by just running them for a really long time.

1 phone call, 1 email per minute… for a week.

I wrote some core dump readers that would look for memory patterns in crashed devices for Palm back in the day, but our QA was largely manual testers. 5-6 QA folks for every dev.

Re:Palm OS developer releases source to classic games, 20 ye... by pengaru on Wednesday June 15, 2022 @01:17AM (#31749384)
> I'm wondering how to test those thousands lines of C++ code, a lot of them are compute-intensive, I don't see any unit test.

That's not C++ code.

Re:Palm OS developer releases source to classic games, 20 ye... by stpe on Wednesday June 15, 2022 @08:34AM (#31752031)
Re:Palm OS developer releases source to classic games, 20 ye... by captaincaveman on Wednesday June 15, 2022 @04:53PM (#31759346)
Used that at the time, I've never seen other platforms use that approach.