none
Writing an answer with the NNTP Bridge with embedded code doesn't set the code flag RRS feed

  • Question

  • It is possible to write answers well formated with code via the community NNTP bridge.

    But the flag "contains code" is not set for this articles.
    This is a fault and drawback with the new "Recognition system"! Points and medals get lost, even if nearly every second article contaons code!

    Why does the web interface no parsing for the code tags?


    Martin Richter -- MVP for VC++ [Germany] -- http://blog.m-ri.de
    Tuesday, July 19, 2011 7:16 AM

Answers

  • I played with this for some time in one of the sandbox forums, and the only way I could get the reply flagged as having code was if it had <pre> </pre> tags in the HTML, no matter how much code there was or how standard/obvious the code was. Is it possible you pasted code in your reply that already had these tags? The only way to tell is to edit the reply and click "Edit HTML Source" to see. Also, the thread will be marked as having code (when you filter on "Has Code") if any of the replies has code. And it can take awhile to tell from your Activity if a specific reply is flagged. When Activity is not being updated I sometimes cannot tell.

     


    Richard Mueller - MVP Directory Services
    Friday, July 22, 2011 3:02 PM
    Moderator

All replies

  • There is a special "tag" in the medadata of ther post (HasCode).
    But the web-service does not provide an interface to set this metadata if your create a post.

    The Method "CreateReply" only loks like:
    CreateReply(System.Guid forumId, System.Guid threadId, System.Guid postId, string body);

    There is no way to set the code-flag in a reply...


    Jochen Kalmbach (MVP VC++)
    Wednesday, July 20, 2011 6:25 AM
  • Yes, this is a known limitation in the bridge so posting with code achievements are not so easy to get if one is ONLY using the bridge. I'll take a look at this to see if this is something that could be changed given the other work in our backlog.
    Community Forums Program Manager
    Wednesday, July 20, 2011 7:17 AM
    Answerer
  • > But the web-service does not provide an interface to set this metadata if your create a post.

    OK!

    Than I would say, that an automatic parser will solve the problem.
    * And there should be a fix soon !*

    Otherwise code postings of users of the NNTP Brige are recognized by the new system.


    Martin Richter -- MVP for VC++ [Germany] -- http://blog.m-ri.de
    Wednesday, July 20, 2011 9:07 AM
  • You are correct, they are not. This is but one of the many limitations the bridge path has (along with mark as answer, vote helpful, move/split/merge, propose answer, escalate thread, etc). I would say that our primary focus is more on improving the web based user experience and it is not always easy or practical to ensure every thing we do toward this aligns with the bridge. But as I said, we will spend some time looking into this, maybe there is some solution that isn't obvious. 
    Community Forums Program Manager
    Thursday, July 21, 2011 12:24 AM
    Answerer
  • maybe there is some solution that isn't obvious.

    Just parse the text for code and set the flag ;)


    Martin Richter -- MVP for VC++ [Germany] -- http://blog.m-ri.de
    Thursday, July 21, 2011 9:08 AM
  • Thanks Martin, I realize this is an option, but what I'm looking for is something less costly. This sounds simple but the amount of work to do this and run it through test and deployment is more costly than it sounds. And doing this takes away from other things we are working on. 
    Community Forums Program Manager
    Thursday, July 21, 2011 5:06 PM
    Answerer
  • But the normal interface seams to have this "auto-parsing" too...
    I just need to edit a posting from the bridge and the flag gets set.

    Sorry! I don't understand this. I am developing software for over 30 years. I know what testing and development means. But I can not believe that this is so complicated.... Just a simple serach for one tag will do it...


    Martin Richter -- MVP for VC++ [Germany] -- http://blog.m-ri.de
    Thursday, July 21, 2011 5:39 PM
  • When you post it from the web, how do select the content as “code” ?

    Thursday, July 21, 2011 5:50 PM
  • Insert code dialog sets a bit on the message. Re: Martin's response, it may not sound very complicated. But when we have other bugs and work items and limited resources we have to prioritize things.
    Community Forums Program Manager
    Thursday, July 21, 2011 6:19 PM
    Answerer
  • >> Insert code dialog sets

    Is it same as “Insert Code Block”? 

    >>> Just parse the text for code and set the flag ;)

    What flag? And where is that flag?

    If I copy and paste the script from notepad, is it considered as “code”? or do I have to manually set the flag?

    Thursday, July 21, 2011 6:23 PM
  • If you paste code in a reply, there is no way for a program to determine that it is code. If you use "Insert Code Block", HTML tags are added that a program can search for. If you don't have the "Insert Code Block" or "Edit HTML Source" buttons, there is no way for you to insert code that will be recognized as such.

     


    Richard Mueller - MVP Directory Services
    Thursday, July 21, 2011 6:33 PM
    Moderator
  • Isn't it PRE tag? E.g. if someone edits the post and adds PRE tag will it work?
    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog

    Thursday, July 21, 2011 7:16 PM
    Moderator
  • .

     

    Thank Richard.  I can see “insert Code block”  what it doesn’t do anything.  {#codeblock_dlg.languageLabel}  is empty.  What should I select there?

     

     

    Thursday, July 21, 2011 7:26 PM
  • Wow!.  That was the problem with IE9.  I can use Code bock using Chrome!

    Thursday, July 21, 2011 7:29 PM
  • Yes, but I don't want to encourage abuse. I stopped using the Insert Code Block feature months ago because it doesn't maintain white space and does not use a fixed width font. I use Edit HTML Source instead. I noticed recently none of my replies were flagged as including code. I now add the <pre> tag and my replies with code are flagged as such. They may fix the "Insert Code Block" feature so I don't need to do this.

     


    Richard Mueller - MVP Directory Services
    Thursday, July 21, 2011 8:06 PM
    Moderator
  • Thanks.  How do you add the <pre> tag?

    Do you need to edit the HTML?  Or just add <pre> tag before the code?

    Thursday, July 21, 2011 8:16 PM
  • Yes, you need to edit HTML of the post.
    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog
    Thursday, July 21, 2011 8:33 PM
    Moderator
  • When you post it from the web, how do select the content as “code” ?

    No!
    I just edit my posting made with the NNTP Bridge.
    I do nothing else than, edit and save and the flag gets set.


    Martin Richter -- MVP for VC++ [Germany] -- http://blog.m-ri.de
    Friday, July 22, 2011 9:23 AM
  • > Insert code dialog sets a bit on the message. Re: Martin's response, it may not sound very complicated. But when we have other bugs and work items and limited resources we have to prioritize things.
     I truely understand this, but you have already the code.
    I just edit an existing item with some code in it posted with the NNTP bridge. After I change nothing, and just press save, the flag "with code" appears.


    Martin Richter -- MVP for VC++ [Germany] -- http://blog.m-ri.de
    Friday, July 22, 2011 9:24 AM
  • I played with this for some time in one of the sandbox forums, and the only way I could get the reply flagged as having code was if it had <pre> </pre> tags in the HTML, no matter how much code there was or how standard/obvious the code was. Is it possible you pasted code in your reply that already had these tags? The only way to tell is to edit the reply and click "Edit HTML Source" to see. Also, the thread will be marked as having code (when you filter on "Has Code") if any of the replies has code. And it can take awhile to tell from your Activity if a specific reply is flagged. When Activity is not being updated I sometimes cannot tell.

     


    Richard Mueller - MVP Directory Services
    Friday, July 22, 2011 3:02 PM
    Moderator
  • > Insert code dialog sets a bit on the message. Re: Martin's response, it may not sound very complicated. But when we have other bugs and work items and limited resources we have to prioritize things.
     I truely understand this, but you have already the code.
    I just edit an existing item with some code in it posted with the NNTP bridge. After I change nothing, and just press save, the flag "with code" appears.


    I know this goes beyond your original request/question, but something we definitely believe is important is having a good "power user" interface to the MSDN Forums.  Using an NNTP reader over the NNTP bridge gives some very compelling power user capabilities compared to the normal web interface, although it also seems like it should be possible to create a much better power user interface.  The more the MSDN forum feature set evolves, the less well suited an NNTP reader interface becomes for it.  By "power user" interface I mean something generally optimized around speed and efficiency.

    Does that make any sense?  Do you see any other key characteristics of a "power user" interface besides speed and efficiency?  Obviously there's a lot of details to that, but do you think there's an opportunity there?

    Sunday, July 24, 2011 11:06 AM