Live data from Hacker News

Your hex editor should color-code bytes

simonomi.dev

81–90 of 165 posts

Re: Your hex editor should color-code bytes

#81
post #23

For anyone who regularly has to look at/analyze binary files, i highly recommend ImHex [1]. Its a hex editor built with imgui and has a lot of built in tools. Imo the best feature is the data structure editor. You can write a data type definition similar to C and it overlays it on the hexdump and parses it in a structured way while you type. It also has a node based editor. 1: https://github.com/WerWolv/ImHex

Plus the built-in parsers for well known formats!

Re: Your hex editor should color-code bytes

#83

When you're going to color-code bytes in a hex dump, I would expect each ASCII character in the right column to have the same color as the hex byte in the left column, making it easier to pair them. I wonder why that wasn't done here.

I came in here to comment the same. Our brains are wonderful pattern recognition engines and the reader would absolutely be able to more readily see the correlation between hex and character representations this way. It might even accelerate learning hex values in the process.

Re: Your hex editor should color-code bytes

#85
post #35

Everything should try do some basic syntax highlighting IMO. Not too much, or it just becomes a sea of formatting that doesn't help at all. It is surprising how much difference just a little splash of colour can make if it isn't overdone. If possible, always include configuration options for the user though, so those with colour-blindness issues can tweak things to their needs, those who are just fussy can make the o…

I'd recommend for every developer to get one or more colourblind friends. I have some, and regularly send them screenshots of what I'm working on to get feedback what they can see and what they can read/can't read. They've been absolutely invaluable for making sure their kind of people can't use my apps properly.

> I'd recommend for every developer to get one or more colourblind friends.

In the absence of any naturally occuring colour-blind friends, do you have any tips about surrptitious damaging someone's eyes to create one? :-)

Though there are simulation tools avaliable which do a reasonable job, I'll probably stick to those where I have a concern. That feels less drastic.

Re: Your hex editor should color-code bytes

#86
I find it funny that I found the "single C0" pretty much instantly.

I grant that the post largely has a point, mind you. But scanning for a needle in a haystack is something that you just don't often do?

I am, of course, now very curious how often folks are using hex editors. And itching for an excuse to open a file that way. :D

Re: Your hex editor should color-code bytes

#87
post #35

Everything should try do some basic syntax highlighting IMO. Not too much, or it just becomes a sea of formatting that doesn't help at all. It is surprising how much difference just a little splash of colour can make if it isn't overdone. If possible, always include configuration options for the user though, so those with colour-blindness issues can tweak things to their needs, those who are just fussy can make the o…

I'd recommend for every developer to get one or more colourblind friends. I have some, and regularly send them screenshots of what I'm working on to get feedback what they can see and what they can read/can't read. They've been absolutely invaluable for making sure their kind of people can't use my apps properly.

> They've been absolutely invaluable for making sure their kind of people can't use my apps properly.

Why would you do that?

Re: Your hex editor should color-code bytes

#88
post #39
post #35

Earlier quoted context omitted.

I'd recommend for every developer to get one or more colourblind friends. I have some, and regularly send them screenshots of what I'm working on to get feedback what they can see and what they can read/can't read. They've been absolutely invaluable for making sure their kind of people can't use my apps properly.

8% of the male population has some form of colorblindness (for women it’s around 0.5%). I have deuteranomaly colorblindness. If you search for images on the internet related to that type of colorblindness you’ll find representations of how we see color and how we see the world. It is not a fun condition to have, and leads to lots of problems in my everyday life. This blog post accidentally accentuated that issue, sin…

> 1 in 12 men and 1 in 200 women go through the same sorts of experiences,

Almost everyone to an extent loses some colour definition in their vision as we age, even those lucky enough to have excellent colour vision to start with, some lose a lot more than others and it is gradual so mostly not noticed at first. The is one of the reasons many grandparents have the saturation oddly high on their TVs (the other main reason, of course, being they've just never changed it from the default that is picked to make the display “pop” under bright show-room lighting conditions).

Re: Your hex editor should color-code bytes

#89
post #67
post #65

Earlier quoted context omitted.

> It was too random to be encrypted That's a rather odd remark.

You would still expect some amount of file structure, ex byte headers or something at the beginning/end of file. no?

That would be expected for encodings or container file formats. Straight-up encryption like AES produces results that are visually indistinguishable from random data.
Post reply on HN