Live data from Hacker News

FizzleFade

fabiensanglard.net

91–100 of 182 posts

Re: FizzleFade

#91
post #5

I have the feeling that knowledge about bits is lacking by a lot of younger coders. And I also think this is what causes bloatware. CPUs are powerful enough to use a naive fade transition. But coders who are aware of the internal workings can make it even faster on todays hardware. Great article and imho still relevant on todays much more powerful computers.

> I have the feeling that knowledge > about bits is lacking by a lot of > younger coders. And I also think > this is what causes bloatware From a management perspective, I wonder if people find older developers miss obvious solutions that involve throwing small amounts of money and/or hardware at business problems, and instead turn to "clever" solutions that are costly in terms of extra developer time needed for deve…

You'll find a lot of people of all ages that get lost in the problem instead of considering the cost/benefit and going with a good compromise between cheap and "perfect."

Of course you'll also find a lot of kids who overestimate the maintenance cost of 3 lines of weird code sitting in a corner doing their thing for 20 years ;)

Re: FizzleFade

#92

Earlier quoted context omitted.

Why? I mean if you look at the majority of work that programmers do today - frontend/backend web development and apps, there is no need to have knowledge about bits. In fact, if I see someone using binary operators in languages such as Java,JS,Ruby etc... I'll immediately consider it bad code, regardless of context - it's just not the right tool for the level of abstraction in these languages. The fact is that in the…

Just the other day I showed one of our junior devs how they could turn their 10 lines of somewhat slow and obfuscated code into a 3 arguably more readable lines using a bitwise operations. And this was a front-end webapp. Then again, more readable is subjective and some devs might see "<<" and get thrown off.

A reasonable 'compromise' of 3 lines of code with 7 lines of comment to explain what it's doing would be my preference.

Re: FizzleFade

#93
post #37

Earlier quoted context omitted.

And did knowledge of bits help solve the memory issue?

That was implicit. Of course it did! :-) And, cut server costs in half, too.

I like bits, too, but cutting it in half means it is still exponential ;-)

Re: FizzleFade

#94
post #51

as a "senior" business programmer with non-engineering studies (I have a deegree in byology), I'm feeling an impostor reading this and admitting that I'm unable to understand basically everything... even https://bigmachine.io/products/the-imposters-handbook/ not helped too much

Don't worry, it's rare to see manual bit level optimization these days as compilers are quite smart in optimization. It's kind of lost art. I work with embedded systems and even there bit manipulation is mostly used for controlling MCU registers, not writing optimized code. If you still want to understand such manipulations, it's mostly boolean algebra of which there's plenty of literature to choose from.

Re: FizzleFade

#95
post #5

I have the feeling that knowledge about bits is lacking by a lot of younger coders. And I also think this is what causes bloatware. CPUs are powerful enough to use a naive fade transition. But coders who are aware of the internal workings can make it even faster on todays hardware. Great article and imho still relevant on todays much more powerful computers.

> I have the feeling that knowledge about bits is lacking by a lot of younger coders. And I also think this is what causes bloatware.

I don't think this is true. I used to code in assembly and knowledge of bits is largely irrelevant the vast majority of the time now outside of graphics algorithms and low-level number crunching. Algorithmic growth and memory usage are always going to be important though.

Re: FizzleFade

#96
post #5

I have the feeling that knowledge about bits is lacking by a lot of younger coders. And I also think this is what causes bloatware. CPUs are powerful enough to use a naive fade transition. But coders who are aware of the internal workings can make it even faster on todays hardware. Great article and imho still relevant on todays much more powerful computers.

> I have the feeling that knowledge > about bits is lacking by a lot of > younger coders. And I also think > this is what causes bloatware From a management perspective, I wonder if people find older developers miss obvious solutions that involve throwing small amounts of money and/or hardware at business problems, and instead turn to "clever" solutions that are costly in terms of extra developer time needed for deve…

> From a management perspective, I wonder if people find older developers miss obvious solutions that involve throwing small amounts of money and/or hardware at business problems, and instead turn to "clever" solutions that are costly in terms of extra developer time needed for developer and maintenance.

Why do people feel the need to generalise about things developers of different ages do...?

Knowing when to save on developer time by spending money in some form definitely seems to be a learned skill though.

Re: FizzleFade

#97

What properties are required in an LFSR that it covers the whole range (2^n-1 numbers) before returning? Or are such configurations found experimentally?

There's a complete theory based on primitive polynomials on Z/2Z. Check any article on linear PRNGs for references.

"Experimentally" will work only with ridiculously small state spaces.

Re: FizzleFade

#98
post #37

Earlier quoted context omitted.

That was implicit. Of course it did! :-) And, cut server costs in half, too.

I like bits, too, but cutting it in half means it is still exponential ;-)

To be fair, the savings are way above 50%, honestly. But, I didn't want to claim a bigger number without digging in more, and 50% was a very conservative upper bound. But, yeah, you're right.

Re: FizzleFade

#99
post #4

Cool, I knew that LFSRs were used in ciphers. I was not aware that they were also useful for implementing old-school graphical effects. https://en.wikipedia.org/wiki/Linear-feedback_shift_register...

I'm not sure I'd call Wolfenstein 3D "old-school". But then I did start with computers in 1980.

Most of recent CS graduates weren't even born when this game was released, so it's not even "old-school" -- it's "ancient" for them.

Re: FizzleFade

#100

i am interested to know the particulars of any routines people have for reading and reviewing a codebase, as the author talks about doing in his spare time. do you take notes? add comments? step through with a debugger?

Given you are a seasoned programmer, most of the code written in familiar language should be obvious just by skimming it. But when it comes to a short and "smart" algorithms, especially including bit manipulations, I still find pen&paper the best tool to find out what's really happening.
Post reply on HN