DEV Community

Discussion on: Should programming languages be made for IDEs rather than humans?

 
thorstenhirsch profile image
Thorsten Hirsch • Edited

Thank you for your detailed reply. The "tool from hell" is SwissRisk's X-Gen, a transformation tool being used at some banks. One might think that it's highly specialised on orders and trades, but it's rather generic and can handle any data as long as you're using XML. But here's the point: the design philosophy of the IDE seems to be based on the assumption, that typing (like on a keyboard) is bad. Unfortunately that's the only "innovative" idea, thus the graphical building blocks that you can drag'n'drop in the IDE are in fact just representations of elements of structured programming. What does that mean? Well in order to program something like this...

if (input.trade[0].type == "foo") { output.info = "hello world"; }

...which you can type in a matter of seconds, you will have to complete the following steps in X-Gen:

  1. create a new transformation.
  2. select the size of your workspace for the transformation. your options are "DIN A3" and "DIN A4". (yep, that's true.)
  3. drag'n'drop the [IF] square on the sheet
  4. open details of the [IF] square and enter 'input.trade[0].type == "foo"' (yes, here you're allowed to type something)
  5. drag'n'drop the [THEN] square onto the [IF] square
  6. open details of the [THEN] square and enter 'output.info = "hello world"'
  7. I also think that one needs to draw some arrows between the squares so that X-Gen knows the order of your squares (i.e. control flow) - well, we only have one square in this example that needs arrows, so 2 arrows are enough: start -> [IF[THEN]] -> end.

You see, this tool really represents text as graphics. It does not even try to step up onto the next abstraction layer, it just makes it really hard to write code by disabling typing for all the keywords.

Why did I write "code is text in your thoughts"? After a long day of coding it happens that I dream of code and then I really see text. Syntax highlighted code. But that's probably just because I stared on it for countless hours. It's not what I think when I am working on code. So yes, I was wrong. Developers think in abstractions, I totally agree with you on that.

I guess this all leads to the question: What's a good abstraction layer for graphical representation? I'm pretty sure the answer is "it depends". When documenting/presenting I like to use Visio diagrams (and ASCII diagrams) for giving an overview of the system, I'm working on. However these diagrams have very different grades of detail, depending on the importance of the components for the audience. So a shape can represent a bunch of hosts (not important) as well as a single function or REST call (important). An IDE on the other side should present a consistent level of abstractions with similar grade of detail for all (technically) equivalent components.