Hacker News new | past | comments | ask | show | jobs | submit login

Everything is saved as plaintext, but it is not meant to be readable really. here's an excerpt from some of my code.

  #N canvas 340 73 884 380 10;
  #N canvas 0 0 1362 686 sendchord 0; 
  #X msg 241 135 60;
  #X msg 240 167 64;
  #X msg 241 200 67;
  #X obj 191 173 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
  -1 -1;
  #X obj 283 450 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
  -1 -1;



Hello world in Pd:

    #N canvas 0 0 100 100 100 10; 
    #X obj 0 40 print;            
    #X msg 0 20 hello world;      
    #X obj 0 0 loadbang;          
    #X connect 1 0 0 0;           
    #X connect 2 0 1 0;           
Compared to Hello World in Java, it's actually not that unreadable IMO.


You've got 20 magic integers with no explanation in the source. Java version does not contain that.


Yup. Magic integers are bad for readability. So are "magic phrases", like public static void.

I think the readability of Pd is horrible, but the question was whether it was human readable at all.


I don't think they're in the similar category at all. Keywords are part of the syntax - if you know what they are in one place, you know what they are in another. (even if they have multiple meanings) Magic numbers are use-specific and you need extra context to understand them. They're part of the code, not the language itself - although the language can help the situation by enforcing naming in some cases.


Well, I think many programming keywords have a form of meaning that you need extra context to understand. How would I intuitively could guess what 'public static void' was, withing having any idea about OO or Java? I mean, 'void' is perhaps OK, but don't tell me you could understand 'swing' with no context, just by reading the word?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: