Live data from Hacker News

Twenty years later I wrote a Tetris again

blog.levit.be

31–40 of 43 posts

Re: Twenty years later I wrote a Tetris again

#31
I like how she starts with Windows and QBasic - probably available out of the box on 90% of the PCs at that time and then achieves 2016 code with better 'maintainability' running on an exotic stack barely known.

At which point did we remove learning curve from maintainability?

Re: Twenty years later I wrote a Tetris again

#33

Earlier quoted context omitted.

Check out https://github.com/mafintosh/tetris . This is a Node.js based Tetris clone, with only 46KB of dependencies. Please provide an example of a Node.js project which downloads 500MB of deps.

One? LOL, here are some that I know require ~600MB of dependencies: - http://rungoterminal.com/ - https://github.com/shockone/black-screen - https://github.com/nylas/N1 And there are hundreds of them, specially if they require Babel which by itself requires a significant amount of disk space, but since you were lazy to find these projects by yourself, I will be lazy too and just list three of them, I will leave the r…

snap!

Re: Twenty years later I wrote a Tetris again

#34
post #31

I like how she starts with Windows and QBasic - probably available out of the box on 90% of the PCs at that time and then achieves 2016 code with better 'maintainability' running on an exotic stack barely known. At which point did we remove learning curve from maintainability?

To me your question is the most important thing on this page

Re: Twenty years later I wrote a Tetris again

#35

Yes because with improved tools we are expected to do more things to achieve the same goals. Doesn't this mean we are becoming more inefficient ? I wouldn't agree with calling those tools "improved", in that case. About the size of the code: the code I wrote this time is roughly one third of the size of my original code which probably means it has less bugs and is more maintainable That neglects to consider the fact…

By "more things" the author doesn't mean "inefficient work that produces no value." She actually gives the example that her old code produced solid squares with a border & the new ones are generated with some visual effects.

Realistically, she could have produced some blur effect twenty years ago, but there were no good toolsets for doing it. Because of the "improved tools", developers can now create that effect with one or two lines of code.

Summary: "improved tools": These tools enable easy access to advanced functionality. "expected": Users expect beautiful tetris, not just solid color with a border "achieve the same goals": Really, the goal is to create a playable terris. The definition of playable has apparently evolved in these twenty years.

As an aside, generally I agree with your comments about the bugs. Libraries are implemented in python (bugs here), python is implemented in C (bugs here), C has a compiler (bugs here), ...

Re: Twenty years later I wrote a Tetris again

#36
"I remember very distinctly that the QBasic code I wrote wasn't very maintainable"

This hits home, I just recently found my old Tetris game written in Purebasic 10 years ago and uploaded it to GH. https://github.com/kennycason/blocks

My other larger games in basic were even worse. :)

Re: Twenty years later I wrote a Tetris again

#37
post #35

Yes because with improved tools we are expected to do more things to achieve the same goals. Doesn't this mean we are becoming more inefficient ? I wouldn't agree with calling those tools "improved", in that case. About the size of the code: the code I wrote this time is roughly one third of the size of my original code which probably means it has less bugs and is more maintainable That neglects to consider the fact…

By "more things" the author doesn't mean "inefficient work that produces no value." She actually gives the example that her old code produced solid squares with a border & the new ones are generated with some visual effects. Realistically, she could have produced some blur effect twenty years ago, but there were no good toolsets for doing it. Because of the "improved tools", developers can now create that effect with…

Yeah, it's much more defensible a statement if you read it as "our expectations from code have grown exponentially" than if you read it as "it's exponentially more complex to achieve the same goal".

A hacked-out Tetris clone in QBasic is easily doable even today, just head on over to qbasic.net and download the old interpreter and away you go.

I would like to see, for comparison, "how many things" you need to do to build (from scratch, in QBasic) an entire new version along with bitmapped artwork and it's own custom control hardware.

Re: Twenty years later I wrote a Tetris again

#38

"One night in May of 1996 I was bored and wanted to play Tetris very badly..." now this is how a great programming story should start :-)

Hey, that's literally why I wrote my Columns clone (and in QBasic, probably in 1996 too!). I'd sold my Sega and wanted to play it. :)

Re: Twenty years later I wrote a Tetris again

#39
post #15

I think any re-implementation of something you are fond of is a great exercise. It reminds me of a small project in undergrad for a networking course. Our professor's assignment for the quarter was to implement a basic TCP stack using the UDP protocol. It wasn't perfect and had quirks but it worked for a basic client/server model and gave me a huge appreciate for what happens when we use the internet. I think the hig…

> I think any re-implementation of something you are fond of is a great exercise This is basically my procedure for learning a new programming language. I have a list of things that I like to have on hand that cover a fair amount of possible paradigms, and re-implement them. Things like FFT, linear algebra methods, numerical root finding/optimization algorithms, etc. Project Euler (and now also exercism.io) are great…

I second project Euler, but for a different use case. It is a great tool to learn the lower level workings of a computer language. Work through the first 100 or so exercises in a new programming language, and you have got a good understanding of how to write efficient code. Most of the problems are solvable in less than 1s in most languages with the non-naive brute Force approach. I remember doing it in a functional style using scheme. At about problem 50 I had a good understanding for how to write in a way that avoided excess allocations/collections.

Ah the frustration when someone was generating primes with a worse approach than I had, and my code was 2 or more times slower.

Re: Twenty years later I wrote a Tetris again

#40
post #3

Earlier quoted context omitted.

"... so I connected my laptop to the internet, searched github, and within minutes I found several great implementations" ;)

"... so, keeping mind that this is 1996, I started to connect my Gateway 2000 Pentium Pro to the dial-up internet. After the fax screech, and only within a few hours, I found several great shareware implementations on usenet." ;)

Yeah "shareware" on usenet. People were sharing "shareware".
Post reply on HN