Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Datatypes Infographic, is this correct?

Author
Message
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 15th Nov 2013 23:17 Edited at: 18th Nov 2013 23:09
I made this infographic about data-types but I'm not 100% sure if all the information is correct.

[updated]

After feedback I have made major revisions.

Relative sizes of types:


Casting between types:


Arrays and memblocks:
[wip]


Formerly OBese87.

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Nov 2013 02:39
That is the most confusing thing I've ever seen.

Dark Java Dude 64
Community Leader
13
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 16th Nov 2013 03:29 Edited at: 16th Nov 2013 03:31
I think you need to make the image even simpler, like Phaelax I have no idea what's going on there.

The shapes and area are great ideas, but I'd get rid of the complex fan shaped stuff, while it does look cool. Also, it might be a good idea to keep all of the data types the same color, always.

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 16th Nov 2013 13:43
What's complicated about it? Did I not explain it clearly enough?
* Shape is data-type
* Size is (relative) size in bytes
* Colour is assigned value


Formerly OBese87.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 16th Nov 2013 15:52
I think your trying to be too visual, like why not just use little squares to represent the number of bytes, a string might be best described as a strip of squares.

I think you could go into more detail about arrays, show how they can be 1D, 2D, 3D etc.

I am the one who knocks...
Dark Java Dude 64
Community Leader
13
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 16th Nov 2013 20:14
Aaah, color for value assigned is actually a great idea, I think I just skipped over the text that said that. I would actually swap some things. How about color for datatype, and the number of little fan thingies can represent the value, or something. But what Van B said with the squares is the best idea IMO.

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 16th Nov 2013 21:32
The idea behind the different shapes is like those toys for small children where you have shaped pegs and their corresponding holes. You can give an integer any value/colour and it will pass through the integer hole, but a float wont fit through; you could force it through, and get something mangled out the other end, or cast it, which would be literally melting the shape down and recasting it in a different shape.

Quote: "why not just use little squares to represent the number of bytes, a string might be best described as a strip of squares."

I am trying to get across the idea that one strip of bits would be read differently depending on the data-type. The structure is different, the most obvious and intuitive analogy to structure would be shape.

Quote: "I think you could go into more detail about arrays, show how they can be 1D, 2D, 3D etc."

Yes, that is a good suggestion.

Are my data-type sizes correct? I am using the DBC definitions but they were a bit ambiguous.

I think I have an idea of how to make it clearer.


Formerly OBese87.
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 17th Nov 2013 05:03
lego styled blocks would be better.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 17th Nov 2013 12:32
I think the shapes are a little misleading, they hide one of the most important points which is that all data types are made up of bytes. The shapes seem to portray them as completely different entities.

The sizes of the data types can vary between systems, the information is widely available online.

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 17th Nov 2013 21:06 Edited at: 17th Nov 2013 21:37
Quote: "lego styled blocks would be better."

Quote: "why not just use little squares to represent the number of bytes"

No, that would destroy the analogy. Drawing dozens of tiny squares and saying "this is a float" isn't intuitive at all.

Quote: "I think the shapes are a little misleading, they hide one of the most important points which is that all data types are made up of bytes. The shapes seem to portray them as completely different entities."

This highlights the same issue as above, and I see now that I haven't been clear enough about the "anatomy" of data-types. I think I need to add a preceding step explaining what a byte is and how they make up all data-types, then I can move up a layer of abstraction to my funky shapes without leaving anyone behind.

Thanks for the feedback.


Formerly OBese87.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th Nov 2013 21:55
Quote: " Drawing dozens of tiny squares and saying "this is a float" isn't intuitive at all."

Feels more intuitive than the random shapes above I think.

When looking at the various shapes, I would think the number of sides or points would represent how many bytes that data type has. Word and DWord look the same to me, what's the difference? Just the color? If the physical size means anything then dword would have to be drawn twice as large as word, but then all the other 4byte types would need to be the same size as well.

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 17th Nov 2013 23:01 Edited at: 18th Nov 2013 17:53
Quote: "When looking at the various shapes, I would think the number of sides or points would represent how many bytes that data type has."

Yes, that's something I will try to clarify. I specifically used abstract non-geometric shapes to try to avoid those kinds of interpretations, I guess I need to be more explicit that these are purely abstract representations, in the same way chess pieces don't have any physical properties that determine how they move on the board, a knight is whatever lump I put on the board and call a knight.

Quote: "Word and DWord look the same to me, what's the difference? Just the color? If the physical size means anything then dword would have to be drawn twice as large as word"

Dword is twice the size of word. Maybe the colours I used are playing tricks on your eyes.

Quote: "but then all the other 4byte types would need to be the same size as well."

They are. Well, their bounding boxes are the same area, I don't know enough calculus to get it really precise.

[edit]
I think I know what the problem is, by labelling the shapes I made it seem like only those specific shapes could represent those data-types, so it seemed you would have to learn all these shapes to follow the explanation, and that lead people to try to see some logical reason for the shapes being the way they were. An analogy has to be intuitive, if you need to read a primer to understand it then it's a crap analogy; I was worried that this was the case given the majority of the feedback but I think I understand why that happened, I made the analogy seem more complicated that it really is. I was trying to display three different ideas (relative sizes of data-types, shape as a metaphor for the different structures of data-types, colour as a metaphor for assigned values) in one image and that tripped me up.

I am now working on splitting that information up into three images. Here is a snapshot of the relative sizes WIP:



Formerly OBese87.

Attachments

Login to view attachments
ionstream
19
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 18th Nov 2013 08:01
Quote: "in the same way chess pieces don't have any physical properties that determine how they move on the board, a knight is whatever lump I put on the board and call a knight."


But the size of a datatype is the focal point of the infographic. It's very difficult to compare the area of two geometric shapes. The big thing is that the color and number of spikes don't seem to correlate to anything.

Also if we're being technical, the smallest string would be 1 byte - the empty string. There is also no such thing as the longest string.

Seditious
10
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 18th Nov 2013 08:23
As someone who understands the topic very well, I don't really understand the infographic. What does the diagram in the top-right represent? It looks like a sort of venn diagram that I can't understand. Why is the clover icon in the middle and much bigger than anything else?

I'm So Kawaii!
Dark Java Dude 64
Community Leader
13
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 18th Nov 2013 14:40
Quote: "Datatypes Infographic, is this correct?"
So for all practical purposes, I guess the answer to that question is unfortunately no. Your concept truly is awesome, though.

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 18th Nov 2013 18:13 Edited at: 18th Nov 2013 23:04
Quote: "Also if we're being technical, the smallest string would be 1 byte - the empty string. There is also no such thing as the longest string."

I was wondering about that. I checked the DBC help files and it said strings can be 0-255 bytes long, with an extra "size" byte that stores the length of the string, I guess that is unique to DBC. This makes me wonder how it works with unlimited string length.

From wikipedia:
Quote: "The string length can be stored as a separate integer (which puts a theoretical limit on the length) or implicitly through a termination character, usually a character value with all bits zero. See also "Null-terminated" below."

Öh! Of course, it seems obvious now.

[edit]
Hows this for showing the relative sizes then?



Formerly OBese87.

Attachments

Login to view attachments
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 18th Nov 2013 23:11
OP updated.


Formerly OBese87.
Dark Java Dude 64
Community Leader
13
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 19th Nov 2013 01:27 Edited at: 19th Nov 2013 01:57
Ah!!!! It looks very nice now, and is very easy to follow. I can see exactly what the demographic is trying to demonstrate. Nice job.

There's really just one thing I would change. When you condense the 2 or 4 dots into one dot of twice or quadruple the area, I would instead have a group of 2 or 4 of the single byte dots grouped together and inside of a black circle. It'd be easier for the brain to quantasize so and so many dots vs the area of the dot as compared to other dots. I'll make an image if you don't understand what I'm saying.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Nov 2013 16:14
Quote: "strings in DBPro can be of any length from 1 byte and up"


Can't have an empty string?

Seditious
10
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 19th Nov 2013 17:01
Quote: "Can't have an empty string?"


Yes, it will have a single byte for the null-terminator.

I'm So Kawaii!
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 19th Nov 2013 17:14
So there's no such thing as an empty string

I think that's very clear. Maybe if you go onto explain formats, you could just colour the dots - like for an image memblock, you could show the red, green, blue and alpha as different coloured dots. I think that would really help people understand memblocks and raw image formats.

I am the one who knocks...
ionstream
19
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 19th Nov 2013 20:43
I like the new infographic you just posted, it's a lot more clear! And maybe I'm wrong, I forgot that the infographic was targeted towards DarkBasic so maybe there are more different rules for strings.

Login to post a reply

Server time is: 2024-05-23 12:24:01
Your offset time is: 2024-05-23 12:24:01