4 ms·
If HN believes creative thinking is a waste of time I’ll get downvoted for this but I fancy just letting my imagination go wild so here goes... Video gamers ca
by olliesaunders 14y ago
If HN believes creative thinking is a waste of time I’ll get downvoted for this but I fancy just letting my imagination go wild so here goes...
Video gamers can supposedly differentiate between tones more similar to one another than non-gamers. Perhaps, if you made a theme of very similar colors, you could achieve the same benefit from programming. Although I suspect it might not work because the difference in the colors has to have significance for your brain to really start paying attention to it. So you could have a color-sensitive language. Or maybe color could be the only significant thing, then you could just bind each character to a color in your text editor and use a normal language.
While walking in the wood today and looking at the detail on the ground and searching for ripe fruit in the trees I was thinking about how our brains are really good at picking out specific visual things from noise and how more complex visual things are sometimes easier to recognize than simpler things. Also its possible to get really good at picking out subtle clues from very complex input: think about a native American Indian’s ability to track moving animals over long distances.
So I think what would be really cool is to have a way of representing each function of a program as a visual form, ideally a 3-dimensional one. You could then look at these form and over time you would start to be able to see certain things about the function just by looking at the forms. I wonder if that might be a much faster way of searching for specific things within a large body of code such as you might do in a security audit than actually reading through all the code because it taps into the innate concurrency of the right-hemisphere.
There would be some difficulty would be in generating appropriate visual forms. The form has to be meaningful. The ideal would be if it were meaningful to the point where somebody well used to them could write the code a form represented just by looking at the form or, at least, infer the gist of it. Of course you don’t have to limit yourself to one form per function, you could have 10 different forms per function, each representing different properties, or forms generated from by dividing the code in lots of different ways (not just functions). Or maybe you could simplify everything I’m saying here and just have a lot more statistical static analysis of code then displayed with charts and infographics.
- keeran 14y agoI tried explaining a similar concept to a designer recently - When I use Sublime Text 2 I use the minimap to visually identify sections of code based on their rough shape, and get to learn bits of code or sections of a file purely on its indentation / minimap pattern.
- chii 14y agoThats exactly what I do with sublime as well, except i do it for log files. similar exceptions/errors in log files tends to have similar shapes thoughout, and you can scan a log file to find probable problems due to the patterns of errors without having to read each individually
- wgrover 14y agoYou might find graphical programming languages like LabVIEW interesting; here's a little tutorial that shows what LabVIEW programs look like: http://www.ee.buffalo.edu/faculty/paololiu/edtech/roaldi/tutorials/labview.htm http://www.ee.buffalo.edu/faculty/paololiu/edtech/roaldi/tut... "Wires" that carry values are color-coded according to their contents (integers are blue, floating point values are orange, booleans are green, etc.). Loops like FOR and WHILE are actual "loops" that encircle the repeated code. The flow of information along the wires determines the order of execution for the code, and you can debug your code by turning on a special mode that actually shows the information moving down the wires.
- thirdhaf 14y agoLabView IS fun, I've written a couple of drivers and a (physical device) testing GUI with it. As I've been thinking about it more I see two hurdles to overcome with LabView though: - Layout: Spaghetti code becomes a very tangible issue if you don't follow guides on routing religiously. Intro courses only touch on this and LabView code in the wild are rarely clean. These visual routing guides are ORTHOGONAL to good code design practices which you also have to follow to make maintainable and understandable code. - Navigation: There is no VIM or Emacs for LabView code as far as I know. Navigating a codebase and following function references deeper and deeper down the rabbit hole becomes tedious pretty quickly. Visual breakpoints help here but there's no substitute for quick navigation, I never found a Ctags equivalent for this language. (Caveat, EE turned software engineer ranting)
- spartango 14y agoI'm not a LabView fan for various reasons, but something neat they've added as of V8.0 (I think) is an auto-format tool which will take a mess of wires and organize it. Vastly improves readability, and works really well.
- thirdhaf 14y agoHmm, we were still running 6.1 in 2008 which probably explains a lot. (No upgrade path allowed at that time)
- akkartik 14y agoI'm not sure how to do all of that, but the bit about reducing the dynamic range resonates. I think syntax highlighting should exist to highlight three categories of syntax: a) comments. What is never run? b) literals. What is just plain data? c) punctuation -- mostly so it can be deemphasized. Sample of my minimalist 'scheme': http://imgur.com/NrrS9.png http://imgur.com/NrrS9.png
- daralthus 14y agoI think different colors/shades for different types and highlighting profiling data for functions could be useful also.
- akkartik 14y agoFunny you should mention profiling; I was just reading http://blog.golang.org/2011/06/profiling-go-programs.html http://blog.golang.org/2011/06/profiling-go-programs.html today. The Go profiler seems extremely impressive.
- mhd 14y agoWhich brings us almost full-circle to early monochromatic highlighting, where you didn't have many options besides adding bold and italic to the mix.
- danbee 14y agoYour scheme reminds me of CGA colour palettes. https://en.wikipedia.org/wiki/Color_Graphics_Adapter https://en.wikipedia.org/wiki/Color_Graphics_Adapter
- yuan 14y agoYou might try naming your functions in Chinese. There's evidence showing that people take advantage of the face recognition machinery of their brains to read Chinese[1]. Coincidentally, native speakers of tonal languages (Chinese being one of them) also seem to have a higher chance of being pitch-perfect [2]. [1] Man-Ying Wang, Bo-Cheng Kuo, Shih-Kuen Cheng (2011). "Chinese characters elicit face-like N170 inversion effects". Brain and Cognition 77 (2011) 419–431. [2] Deutsch, D., Henthorn, T., Marvin, E., & Xu H-S (2006). "Absolute pitch among American and Chinese conservatory students: Prevalence differences, and evidence for a speech-related critical period". Journal of the Acoustical Society of America 119 (2): 719–722.