Entries:
Comments:
Discussions:

Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

figuerres figuerres ???
  • VS2015: Writing comments into code while debugger is running?

    , androidi wrote

    @figuerres:

    - this type of project likely involves quite bit of research into what boilerplate to write and writing a lot of boilerplate before you can run/debug anything. I wouldn't be talking about this type of feature if I was the kind of person who is ok with coding without being able to run/debug almost every change.

    For me to even consider trying to write such "add-in" I'd need to start with a VM snapshot that has VS1 debugging another VS2 that's debugging a test project, such that when / is pressed in VS2, it breaks to VS1 and I can add the code in VS1 to handle what VS2 should be doing once / is pressed.  (now perhaps I'm complicating this up, like maybe you could do large part of this with a "mock" that imitates the VS2 running/debugging the test project, but now you'd have to figure out how to write such mock in the first place, could be easy or very complex)

    Let me guess that setting up that is either impossible or takes weeks-months if you don't know what you are doing. That's probably why it's not been done before.

     

    have you looked at Roslyn yet ?  if not you need to. it is access to what the compiler does to help do stuff like this.  to make things like plugins easier to make and to give you more access to the internals of the compiler , parser and such. 

  • VS2015: Writing comments into code while debugger is running?

    , androidi wrote

    @magicalclick: "I don't like the idea that" Well it can be something you can a) turn on b) if on, the ide could have option to pop up a dialog before you can start writing a comment (recall, you can't make any changes outside comments in what I suggested). c) any edits made at run-time that are not comment would be reverted or turned into comments..  (eg. inserting single / between 1234 would turn that to 12/34 which is not a comment - either this type of edit could be disallowed entirely by default or the IDE could ask if you want to insert the //#/ /#// around that code and background compile it after which you could do instant "pause,apply edit and continue" w/o pausing the app for more than milliseconds. If you stopped the app the original code would be preserved while the modified line code could be copied to be inside regular comment or discarded depending on preference)

     

    @magicalclick: "You can always make a quick garbage loop above your breakpoint during the pause. "

    As explained in other other thread, if you were modifying say audio code, you'd only have the audio buffer amount of time to apply the edit without glitching the audio. The system suggested here would enable that scenario 'simply' by making intellisense/background compiler & editor  available while app is running. Then use edit & continue to instantly apply to changes or if the changes can't be applied with e&c then opt to restart the app & either keep the changes commented or merge them and restart.

     

    @cheong:

    "impossible for the IDE to know whether you're editing comment or code unless they're stored in different places" .. "removed the "//" marking"

    The rules to answer that could be, while running:

    1. every new line with text must start with comment character. /

    2. Edits are also allowed inside existing comments

    3. If attempting to remove comment /'s from something starting with //#/ (indicating code inside  comment) while running, either IDE can stop you or it can ask analyze the code for whether it can be inserted through pausing the app/thread and using edit & continue to insert the uncommented code.

     

    "it's about the compiler only recognise changes in source file by filesize and modified time changes"

    Depending on the technical requirements here's couple approaches:

    1) If it's that you don't want the run-time-edit to modify the timestamp until app is paused and saved: The source file can be made such that other apps cannot write to it (share read only), then you can store the runtime changes elsewhere and merge them during pause/restart/stop debug.

     

    2) If it is that you want the timestamp to change: don't allow saving the run-time-edit untl //#/ is met with /#// (end commented code tag).

    The background compiler can be called to detect if the code is valid prior to attempting to save it.

     

    3) You could treat the changes made at runtime as if you were doing stuff in the

    a) repl loop/immediate window or

    b) doing inmemory copy of the source and doing compile using inmemory virtual filesystem. 

    c) Or store the changes in some OS database after removing share-write flag from the source file, then when the background compiler is going through the source, it add the runtime modified pieces from the db.

    have you looked into the Roslyn tools ? compiler as a service ? try and write the addin ....

    see if you can do it.  then tell us about it.

     

     

  • Lumia Phone Firesale?

    this line really hits the nail of what I have long seen as the real problem for Microsoft as a whole:

    "When I look back on our journey in mobility, we've done hard work and had great ideas, but have not always had the alignment needed across the company to make an impact,"

    to many different agendas , to many different groups each with different marching orders, to much internal politics getting in the way, no real leadership taking charge and getting the clear directions and goals set forth.

    it's a classic sickness that drags on all large corporations.

  • mat velloso; ​sharepoint/​lists/odata calls

    OData is a form of rest web service

    I am not sure what version is used on the site you are looking at but with OData 4 on IIS

    (what I am working with)  the setup is that you will require authorization to access most things.

    this is often done with a Json Web Token but may be done in other ways.

    ok took a look and this is the older xml and data services stuff, but the same idea applies that you need to do some kind of login and the site may need to grant your login a role that allows you to access the endpoint.

    if he was showing it in a demo he may not be inviting everyone to go there.

    he probably did a login with an account that is authorized.

  • Microsoft ​File​Synchroniza​tion framework -- http protocol

    are you referring to the Sync Framework or to some other api  / SDK ?

    make sure it's still actively supported. SYnc was created in 2009 and I have not seen or heard any recent work on it.

    just check and make sure it will be ok to use and are they still updating it.

    over the internet you may need a "hub" that clients connect to. you might also look into Azure as it has options to store files in the cloud and then multiple clients can pull from that common file store.

    depends of course on what you are doing.

     

  • a thread with no name ??

    I am surprised a bit that no one on the staff @ MS has taken a minute to edit the thread  to make it work or readable with out the <  >  chars ?

    who watches the site at MS these days ?

     

  • a thread with no name ??

    funny we have an un-readable topic now it seems ??

  • SpaceX stop it, you're making me teary eyed again

    what I really want to see us do is take the ideas of the "Space plane" and make it work.

    for example:

     

    the edge of space is 100KM    or 328,000 feet

    the SR-71 can flay to about 85,000 feet under it's own jet power.

    we need to see if we can make some kind of advanced engine that gets us to something close to 100 KM via an airport take off and landing and as it gets near the 100KM mark turns on the rockets to make the switch to being in space.

    that would make it possible to take off and land at a large number of locations. and it would make it possible to use less rocket fuel to get into orbit.

    yes it still needs fuel but if it can lift less fuel then it will be less expensive to make the trip.

    and while it's great that we can land a rocket now I think conventional aircraft style landings are a lot simpler to manage and the world has a huge infrastructure to handle that and advance that.

     

  • Xamarin - hopes and fears

    , Ian2 wrote

    Well my learning project is a new version of one of my old apps (Vantage Point) and I just got it running on an iPhone, iPad and Android phone, not to mention any number of emulators and it is looking OK everywhere.  Will probably upload to Android/Apple stores next week and then the waiting begins ...

    BTW It uses maps so the Windows Universal version is still pending (last I heard there is still a little work for Xamarin/Microsoft  to do before maps work well on this platform.)

     

    what about the google maps on the android / iPhone ??

  • ASP.NET MVC InLine Editing of a Grid

    Well let me see if I can help a bit...  and by the way the last few months I have been working on a project using Web API and OData 4.

    if you have a page that has data from a row of a table in your database for example.

    you can have an OData 4 Controller that will accept a an update to that row using the HTTP verb Patch or Merge.

    the Action on the server of the OData controller is to get a class that it can map to the database for example using Entity Framework.

    the class that it gets will have the data to be updated and the key for the record.

    so the code will apply the changes and do the update.

    the client side code will have the data in the form of a JSON object that has name value pairs that the OData code will be able to map to the entity to be updated.

     

    that is how OData can do this.

    with WEB API you can make the code more custom and I use WEB api form some cases.

    but the same pattern of passing a JSON object to an HTTP / AJAX call to the server and on the server a controller picks up the data and processes it.

    the nice thing about OData when you get into it is that you do not need to write a lot of different web service methods to work with the data.

    it starts by mapping the HTTP verbs to the database operations and then adds in some options to describe what you want the sql to be like, but  it's all done via the HTTP URL

    So  you have

    HTTP      =====  >    SQL

    GET                         Select

    POST                        Insert

    PATCH                     Update

    DELETE                   DELETE

     

    an ODATA controller will generally have two "GET" methods one that is just a bare GET and the other that will have a parameter that you map to the key of the table to get one record.

    I map the DELETE verb to code that updates a record to mark it as deleted in the system so that a users delete is not an undoable action.

    you can use a Generic base class to map a lot of tables with minimal code if you use a common set of column names in your database, or use entity framework attributes to do the mapping in EF.

    it works really well for us so far, we are about 5 months into a large project.