News for hackers. Stuff that matters.
Re:Future of Programming Languages by bane on Friday November 28, 2014 @12:39AM (#8669813)
I think whatever the language of the future will be, it's likely that we're going to have to give up editing a bunch of text files. Much of modern programming these days is really about workflow of large teams. It'd be nice to have richer editing areas that allow for things like embedded diagrams and videos as comments, annotations, hypertext links out to documentation and from documentation into code, review comments (similar to MS-Word), font size; colors; background colors etc. time-tracking for payroll, etc.

IDEs try to provide some of this layer on top of the piles of text files we use today, often supplemented with out-of-band config files and folder structure littering stuff all over the place. But there continues to be a proliferation of hacked on comment systems to handle things like method descriptions, code changes, reviews. People make changes in some code, then leave a comment in the code with the change they made, their name and email address so 2 years later somebody can try and track them down to remember the 2-line change they made 2 years prior. It's kind of absurd.

Imagine if I could just draw a box around a section of code, make the box dashed and fill the background with red and have a call-out annotation around it that says something like "highly performance sensitive, do not touch, see bane for problems" and "bane" was a link to my bug tracker page where you could immediately file an issue with that code?

And you knew the code had a problem because right above it, instead of some vague interpretive ASCII art describing the algorithm as a comment, there was a familiar vector graphic diagram and a set of equations all of us domain expert programmers know by heart. Only you noticed an error in the way I translated it from the textbook to code. You also tagged the couple lines I screwed up and wrote up a review comment in the sidebar (like in MS-Word) letting me know what you thought was wrong, that way when I go to my bug tracker, click the link that takes me directly to the code you wanted me to see, I see your review comment right next to the code in question, only it's not mixed up in the rest of the code comments explaining how the code works since it's semantically a separate thing.

I check out the problem and see that you're correct, I leave a response comment (which automatically notifies you via e-mail with a link to the bug tracker and to the code in question. When I go back out to the bug tracker the amount of time I was reviewing the issue is automatically logged, a diff is stored for review so everybody knows what I changed and the review comment and reply are automatically filled out in the tracker. My boss wants to check out the entire exchange, clicks my reply, is taken directly to the block of code in question and sees that I spent a reasonable amount of time doing the change (which he can see since the changes were tracked in the diff). I close the case and the review comments disappear from the code, leaving behind only good clean code and explanatory comments.

Now a year later, somebody turns on "see old bugs" and they see there was a problem there, the discussion, what the bug tracker #s were (with links they can follow), they can even play back time and see the 3 other edits that happened since then by simply moving a slider left to right.

Re:Future of Programming Languages by ajuc on Friday November 28, 2014 @05:14AM (#8670392)
Version control system commit comments are already very useful for many common development tasks, if done right (jira ticket number in each commit, commits divided properly, good commit messages with reasons for change). I wish there was more metadata there (like which tests failed during automatic build after each commit).

But I disagree using text as underlying data format is a problem. It's godsend. Text can be grepped, copy-pasted, diffed and versioned easily.

I cringe when I have to work with versioned word or excel documents. Working with versioned code is much easier.

you may think big red arrow would be nice to put in code, but how do I later search for all red arrows related to X, added by John between 3 and 4 months ago?

I have specification divided into 100s of versioned office documents. When I want to grep I have to know where to look (or zipgrep the underlying xml, which sometimes work sometimes doesn't).

If it was in a text format I could grep and see real differences, not edit history.

If it had embedded video I would need to watch the whole thing. And no - adding keywords isn't much help. I want to be able to search by content.

Re:Future of Programming Languages by fsloth on Friday November 28, 2014 @06:12AM (#8670528)
I don't think tools are the problem, but rather the process is.

I think it's a false idea the dev envinronment should cater to all stakeholders and parties of the process. Maintainting the theory of the system is one of the most important things but I'm really sceptical an IDE and a tool based process can do it for us.

Yes, there should be preferably only one place and way to do a particular thing but that does not mean they have to be all bound to the same tool.

I.e. the algorithm development you described in your example used completely unnecessary gaps in the communication. If the expert and you had reserved time with a whiteboard or a google hang out and ironed out the bugs right there without this nonsense going through the formal code review process it would have been much easier for all parties.

If your boss wants to participate in the process and does not trust you enough that so he needs to doublecheck on every trivial detail I would call that micromanagement. Or, he can join in the discussion when it is going on if he can have valid input into it. Otherwise he should trust you to do the right thing, and if he wants to check up on things the revision history in the spec document (or just v1 and v2 of the spec) should be sufficient combined with the code changes.

If the boss wants to doublecheck on everything or the process requires that all communication related to code changes (including that quick discussion you had with the chief architect at the urinals) is stored then the problem is in the process that is too heavy with non-value-adding baggage and no tool can fix it.

Storage of the spec should be formalized, code review should be formalized, but not all communications and work related to data that is input into these system should and can be formalized.

I think the idea that tools will fix the process is a faulty idea - the process needs constant vigilance from human participants and tools can only facilitate it. Expert work can be incredibly value adding but it needs to be first and foremost built on trust between individuals and clear ownership of responsibilities. Final products can and need to be bound to formal constraints - the process needs rigor on an individual level but not anal-retentive overseeing over every minutiae.

Re:Future of Programming Languages by taeric on Friday November 28, 2014 @01:01AM (#8669848)
My main problem with this is the odd implication that text files are anything more than just a form of art. With rules. And, typically, well agreed meaning. You even refer to them as "interpretive ASCII art."

That is to say. Sure, I can not literally draw a box around some code. I can, however, put "boxes" around many parts of code. Be it by shuffling them away to another repository/file/namespace/whatever. Or simply appending "thinkThrice" to the function names.

More, it is easily argued that all art is "interpretive" at some level. The odd believe that a set of well agreed upon sets of interpretations (you know, the alphabet) are somehow less appropriate than mere free form lines on a wall is interesting.

Re:Future of Programming Languages by overgard on Friday November 28, 2014 @01:23AM (#8669882)
I like this vision, but I just don't see it catching on. (Unless it has an obvious fallback to text). There are just so many tools that operate on text that you'd have to replace. I can't imagine people dropping, say, Git so that they can have videos as comments. At best you're probably dealing with some sort of markdown-esque meta-language that you embed in the comments.

The only significant language I can think of that shirked the code-as-files paradigm was smalltalk. Arguably that did not do the language a lot of favors, in that one of the main problems with smalltalk was that it always felt like a walled garden. It was definitely a very /nice/ garden, but interacting with the rest of the system was a very alien experience.

Re:Future of Programming Languages by bblach on Friday November 28, 2014 @03:27AM (#8670116)
"Imagine if I could just draw a box around a section of code, make the box dashed and fill the background with red and have a call-out annotation around it that says something like "highly performance sensitive, do not touch, see bane for problems" and "bane" was a link to my bug tracker page where you could immediately file an issue with that code?"

I really like this imagination.

Re:Future of Programming Languages by Marazan on Friday November 28, 2014 @09:37AM (#8671026)
People have being working on things like this since the early nineties when there was sufficient point and click graphical power to make it sensible.

The issues is that now the code document is incredibly fragile. It can only be viewed, edited and manipulated with the one particular tool suite.

Raw text files suck but have amazing interoparability.

Re:Future of Programming Languages by trias on Friday November 28, 2014 @07:52AM (#8670759)
Someday, people will say "I program in HTML" and be correct.
Re:Future of Programming Languages by brudgers on Friday November 28, 2014 @04:56AM (#8670349)
That's a lot of baked in dependencies for a language.