News for hackers. Stuff that matters.

doty

Re:“Clean” Code, Horrible Performance on Wednesday March 01, 2023 @08:58AM (#34982437)
> Look, most modern software is spending 99.9% of the time waiting for user input, and 0.1% of the time actually calculating something.

I'm sorry to say that this argument is not even wrong.

As programmers, it is not useful to us to think about that 99.9% of time. The 0.1% of the time is literally our entire job.

"Most of the universe is not Earth, so why do we spend so much time thinking about things on Earth?"

Re:Moving Away from UUIDs on Tuesday November 22, 2022 @01:03AM (#33702569)
Am i mis-reading this article?

BESIDES not having any particular way to validate a token without asking the service, making the rate a hell of a lot slower than 2^64 tokens per second (lol wut) doesn’t it also assume that you have 2^46 valid tokens in existence? Isn’t that 70 TRILLION valid tokens, or nearly 9000 tokens per human on earth?

From the post:

> The same doesn't apply to the player sprite, as Aseprite takes minutes to compile the atlas for the nearly 1000 frames we have.

Why does compiling a sprite atlas for the player take 60ms/frame?

Re:Tesla, electric SUVs get poor scores from Consumer Reports on Sunday November 21, 2021 @07:12PM (#29301148)
I say- it’s like they hooked a computer to a car. At first I thought “oh man, look! They hooked a computer to a car! Think of all the cool things you can do!”

A few months later I had learned how to reboot the drivers side door latch because of a software failure, somewhere… and I thought “oh yeah, right. It’s like they hooked a computer to a car.”

Re:One year of C on Saturday June 02, 2018 @07:15PM (#17216941)
BTW that code has a security vulnerability in it: the size computation can overflow and you can end up shrinking your buffer, and you will end up smashing your heap, and then bad things.
Re:Network Protocols on Friday June 02, 2017 @09:30AM (#14469700)
If you are subscribed, the footer of the page reads as follows:

You can share this article! This URL can be posted anywhere you like, including in public. Anyone clicking on it can read the article without logging in. The URL is specific to your subscribed account, but no one outside of Destroy All Software can identify your account simply from the URL.

Re:New Features in C# 7.0 on Thursday March 09, 2017 @07:09PM (#13835097)
Don't the tuples with named values do that for you?

    (string first, string middle, string last) LookupName(long id)
I think this PYNQ is Python Productivity for ZYNC (http://www.pynq.io/), not "Python Implementation of Linq" (https://github.com/heynemann/pynq), as suggested by the title.
Re:Braid Code Cleanup (part 1) on Tuesday July 19, 2016 @03:20PM (#12124116)
From http://number-none.com/blow/blog/programming/2016/07/07/brai...:

The game Braid originally shipped to the world in 2008, and after some ports in 2009, I have only worked significantly with the code on a few occasions. But I want to maintain this game indefinitely into the future; in the back of my mind, there have always been some clean-ups that I have wanted to perform on the code. Often when shipping a game, the best answer to a problem isn’t evident, and we are under time pressure, so we solve the problem in some way that is sufficient but sub-optimal. Other times, we need to design the game to meet technical constraints of systems we want to deploy on, but as the years go on, these systems become irrelevant, so the code can be cleaned up. I figured it would be interesting to talk about some of these things in a blog (and the blog will help motivate me to think about these situations and clean some of them up!)

Re:Bug: Cat sitting on keyboard crashes lightdm on Saturday November 14, 2015 @04:49PM (#10567414)
I am reminded of JWZ's "On Toolkits" (https://www.jwz.org/xscreensaver/toolkits.html):

"Let's suppose that down in the bowels of some particular version of some particular toolkit library, there lurks a bug. Let's suppose that the nature of this bug is something relatively obscure: say that it's something like, if you hold down 5 keys on the keyboard for 10 seconds then drag the middle mouse button, the text entry widget gets a SEGV. (In fact, I'm not making this up: I saw this very bug once, years ago.)

Now, that's the sort of bug that is not likely to be noticed or fixed, because it's the sort of thing that people "never" do. If that bug was reported against, say, a web browser, nobody would much care: User: "I can crash my web browser by doing this crazy thing!" Developer: "Uh, don't do that then." And that's not a totally unreasonable response.

However, in the context of security software, it matters, because then it's not merely a cute trick that crashes the program: now it's a backdoor password that unlocks the screen."

Older »