Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. What's your quickest/lightest way to try a code?

What's your quickest/lightest way to try a code?

Scheduled Pinned Locked Moved The Lounge
csharpvisual-studiojavascriptpythonalgorithms
39 Posts 31 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K kalberts

    emacs is a good OS, but it could really use a decent editor...

    U Offline
    U Offline
    User 13269747
    wrote on last edited by
    #29

    Quote:

    emacs is a good OS, but it could really use a decent editor...

    This is a good joke, but it could really use a punchline :-) (The first time I heard this joke was in '92, so I've had quiet a long time to think of a reply)

    1 Reply Last reply
    0
    • N Nand32

      Yes, we got plenty of Online playgrounds. But I mean the offline ones. I've always envied Javascript devs. All they need is just a notepad and a browser and they are good to try out a logic or an algorithm. Poor guys like me used to install Visual Studio Elephant (Here Elephant points to the size don't worry) Just to try a simple code, just because I was glued to .net. Now in recent times, I use VS Code & verify the code snippets that the team does with Python. This feels quick & snappy. :-O :thumbsup:

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #30

      Just use the [REPL](https://en.wikipedia.org/wiki/Read–eval–print\_loop) if the language has one, VSCode + compiler in the Code's integrated terminal if the language doesn't have one. That covers the main languages I might want to play with (Haskell, Python, OCaml, C++ or Rust in my case).

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      1 Reply Last reply
      0
      • D Dar Brett 0

        I've always liked LINQPad - The .NET Programmer's Playground[^], ever since I heard of it anyway. It's meant for giving you a C# oriented way to query different databases, but I find it great for just trying snippets of C# code. *Not at all associated with the developer other than that we live in the same city and he gave an interesting talk a conference one time.

        V Offline
        V Offline
        vKaras
        wrote on last edited by
        #31

        yeha <3 LINQPad, we got the Premium License. isnt that expensive compared to other tools or 3rd party components. And realy usefull.. I use it kinda every day, trying some simple stuff I'm not 100% sure how it works, testing some new things without creating that usual console application and .Dump() to view anything on the fly :D:D

        S 1 Reply Last reply
        0
        • N Nand32

          Yes, we got plenty of Online playgrounds. But I mean the offline ones. I've always envied Javascript devs. All they need is just a notepad and a browser and they are good to try out a logic or an algorithm. Poor guys like me used to install Visual Studio Elephant (Here Elephant points to the size don't worry) Just to try a simple code, just because I was glued to .net. Now in recent times, I use VS Code & verify the code snippets that the team does with Python. This feels quick & snappy. :-O :thumbsup:

          R Offline
          R Offline
          rnbergren
          wrote on last edited by
          #32

          I am glad I am not the only one. I have a semi console app. I call it something like sortingmultidemi because the first time I used it was like 30 years ago and I was sorting a mutli dimensional array and I wanted to see the outcome. It now has more commented code than working code. but I take it everywhere. Copy Paste alot out of it. Lots of examples of things. and for some reason quicker than google when searching for something I have done before.

          To err is human to really mess up you need a computer

          1 Reply Last reply
          0
          • R realJSOP

            I usually include a console app in my solutions called "TestHarness". That way, I can test right there in the same solution, and use all the assemblies referenced therein. For casual stuff not directly associated with a project and that doesn't need a GUI, I use a console app.

            ".45 ACP - because shooting twice is just silly" - JSOP, 2010
            -----
            You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
            -----
            When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

            I Offline
            I Offline
            ISanti
            wrote on last edited by
            #33

            Me too.

            Sorry for my bad English

            1 Reply Last reply
            0
            • R realJSOP

              I usually include a console app in my solutions called "TestHarness". That way, I can test right there in the same solution, and use all the assemblies referenced therein. For casual stuff not directly associated with a project and that doesn't need a GUI, I use a console app.

              ".45 ACP - because shooting twice is just silly" - JSOP, 2010
              -----
              You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
              -----
              When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

              A Offline
              A Offline
              agolddog
              wrote on last edited by
              #34

              Ha, this reminds me of the HPCs I work with. When I got here, they were developing a web service API for various things. Their strategy was to deploy to test, and hit the web service, then retrieve logs from the test server and plow through them looking for errors, and/or review the results in the app that worked those kinds of data (for saving methods). Invariably, the logging wouldn't be sufficient for some problem, so they'd add more, re-deploy, etc, etc. Of course, since "branching is too hard," this also means that potentially broken code is checked in, so it could be deployed to test. These web services were part of a webapp solution. So, I put a 'Test' area in there, and built some views to let them pick the API method they wanted to run, displaying some inputs appropriate to that method, and throwing the results up on the screen. Allowed me to debug the code in VS instead of having to read logs, and test locally. These guys looked at me as if I was from the moon. Sigh.

              1 Reply Last reply
              0
              • V vKaras

                yeha <3 LINQPad, we got the Premium License. isnt that expensive compared to other tools or 3rd party components. And realy usefull.. I use it kinda every day, trying some simple stuff I'm not 100% sure how it works, testing some new things without creating that usual console application and .Dump() to view anything on the fly :D:D

                S Offline
                S Offline
                siliconvideo
                wrote on last edited by
                #35

                I vote for LinqPad also. A quick way to check out code snippets, classes and even small programs. Works with C#, F#, SQL and even VB. Similar debug methods as Visual Studio.

                1 Reply Last reply
                0
                • N Nand32

                  Yes, we got plenty of Online playgrounds. But I mean the offline ones. I've always envied Javascript devs. All they need is just a notepad and a browser and they are good to try out a logic or an algorithm. Poor guys like me used to install Visual Studio Elephant (Here Elephant points to the size don't worry) Just to try a simple code, just because I was glued to .net. Now in recent times, I use VS Code & verify the code snippets that the team does with Python. This feels quick & snappy. :-O :thumbsup:

                  B Offline
                  B Offline
                  Bruce Greene
                  wrote on last edited by
                  #36

                  I'm always working on some WPF/C# desktop app in Visual Studio - so I just create a temporary method in there, call it from a click handler etc, then delete it after I've finished validating the code.

                  1 Reply Last reply
                  0
                  • N Nand32

                    Yes, we got plenty of Online playgrounds. But I mean the offline ones. I've always envied Javascript devs. All they need is just a notepad and a browser and they are good to try out a logic or an algorithm. Poor guys like me used to install Visual Studio Elephant (Here Elephant points to the size don't worry) Just to try a simple code, just because I was glued to .net. Now in recent times, I use VS Code & verify the code snippets that the team does with Python. This feels quick & snappy. :-O :thumbsup:

                    E Offline
                    E Offline
                    Ed K
                    wrote on last edited by
                    #37

                    Set up a simple NUnit test project and just drop all of them there. But if you are testing something your team is doing I'm questioning their unit testing practices.

                    ed ~"Watch your thoughts; they become your words. Watch your words they become your actions. Watch your actions; they become your habits. Watch your habits; they become your character. Watch your character; it becomes your destiny." -Frank Outlaw.

                    1 Reply Last reply
                    0
                    • N Nand32

                      Yes, we got plenty of Online playgrounds. But I mean the offline ones. I've always envied Javascript devs. All they need is just a notepad and a browser and they are good to try out a logic or an algorithm. Poor guys like me used to install Visual Studio Elephant (Here Elephant points to the size don't worry) Just to try a simple code, just because I was glued to .net. Now in recent times, I use VS Code & verify the code snippets that the team does with Python. This feels quick & snappy. :-O :thumbsup:

                      D Offline
                      D Offline
                      decaffeinatedMonkey
                      wrote on last edited by
                      #38

                      I use my imagination. Guaranteed to be compile safe.

                      1 Reply Last reply
                      0
                      • N Nand32

                        Yes, we got plenty of Online playgrounds. But I mean the offline ones. I've always envied Javascript devs. All they need is just a notepad and a browser and they are good to try out a logic or an algorithm. Poor guys like me used to install Visual Studio Elephant (Here Elephant points to the size don't worry) Just to try a simple code, just because I was glued to .net. Now in recent times, I use VS Code & verify the code snippets that the team does with Python. This feels quick & snappy. :-O :thumbsup:

                        D Offline
                        D Offline
                        Davyd McColl
                        wrote on last edited by
                        #39

                        Depends Small bits of .net: linqpad Larger bits of .net: Rider + .net core, perhaps a unit test assembly for checking out an API or idea. For most things, I'll use the REPL: JavaScript (node or f12 in a browser), Python (ipython is friendlier than the plain interpreter, but both work), Ruby (when I used it). Rider has a c# REPL, I think.

                        If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups