Which Scripting Language should I learn? C#, VB.Net, or Python? - Grasshopper2024-03-28T23:39:53Zhttps://www.grasshopper3d.com/forum/topics/which-scripting-language-should-i-learn-c-vb-net-or-python?feed=yes&xn_auth=noI think that you need to unde…tag:www.grasshopper3d.com,2020-03-25:2985220:Comment:20525712020-03-25T14:41:33.795ZRaymond Moselyhttps://www.grasshopper3d.com/profile/RaymondMosely
<p><span>I think that you need to understand what you are doing - marketing, SEO, programming, design or what you are doing there, you should have cases, examples, insights, and stories that will be interesting to your listeners. I also advise you to read the </span><span><a href="https://gradesfixer.com/free-essay-examples/world/" rel="noopener" target="_blank">https://gradesfixer.com/free-essay-examples/world/</a> articles of these guys that they publish absolutely for free. Perhaps they will…</span></p>
<p><span>I think that you need to understand what you are doing - marketing, SEO, programming, design or what you are doing there, you should have cases, examples, insights, and stories that will be interesting to your listeners. I also advise you to read the </span><span><a href="https://gradesfixer.com/free-essay-examples/world/" target="_blank" rel="noopener">https://gradesfixer.com/free-essay-examples/world/</a> articles of these guys that they publish absolutely for free. Perhaps they will be useful. Good luck with that!</span></p> I guess it`s Python tag:www.grasshopper3d.com,2020-03-25:2985220:Comment:20524512020-03-25T14:38:22.319ZHannah Stevenshttps://www.grasshopper3d.com/profile/HannahStevens
<p>I guess it`s Python </p>
<p>I guess it`s Python </p> Thank youtag:www.grasshopper3d.com,2017-09-09:2985220:Comment:18107902017-09-09T02:16:05.487ZNader Belalhttps://www.grasshopper3d.com/profile/NaderBelal
<p>Thank you</p>
<p>Thank you</p> Thank you, Paul!
The differen…tag:www.grasshopper3d.com,2017-05-18:2985220:Comment:17534682017-05-18T13:08:27.736ZMartin Jhttps://www.grasshopper3d.com/profile/Martin559
<p>Thank you, Paul!</p>
<p>The difference is smaller than I imagined then. I think your last paragraph sums it up well, and it makes me less catious spending time in the scripting editor.</p>
<p>Cheers, Martin</p>
<p>Thank you, Paul!</p>
<p>The difference is smaller than I imagined then. I think your last paragraph sums it up well, and it makes me less catious spending time in the scripting editor.</p>
<p>Cheers, Martin</p> I would say that compiling in…tag:www.grasshopper3d.com,2017-05-15:2985220:Comment:17513982017-05-15T13:10:40.528ZPaul N Jeffrieshttps://www.grasshopper3d.com/profile/PaulNJeffries
<p>I would say that compiling in VS offers the following advantages:</p>
<p>- Proper debugging with step-through, performance profiling etc.</p>
<p>- Slight increase in performance.</p>
<p>- Can completely customise the component by setting the icon, adding menu options and use an entirely custom GUI for it if you wish.</p>
<p>- Can implement your own custom data types/'goo'.</p>
<p>- Can create different types of component (parameters, value lists etc. etc.)</p>
<p>- Can reuse code between…</p>
<p>I would say that compiling in VS offers the following advantages:</p>
<p>- Proper debugging with step-through, performance profiling etc.</p>
<p>- Slight increase in performance.</p>
<p>- Can completely customise the component by setting the icon, adding menu options and use an entirely custom GUI for it if you wish.</p>
<p>- Can implement your own custom data types/'goo'.</p>
<p>- Can create different types of component (parameters, value lists etc. etc.)</p>
<p>- Can reuse code between multiple components.</p>
<p>- Easier to reuse in different definitions or share with others as a plugin (you can wrap up scripts in user objects, but I find that to be a bit less neat).</p>
<p>- You can use external libraries etc. with scripting components, but Visual Studio does make this a bit easier to manage.</p>
<p>- You can add more in the way of documentation to the component (i.e. tooltips, Help documentation etc.)</p>
<p>- Much less buggy than the script editor (i.e. it won't delete your type arguments *every single f*%#ing time* you try to instantiate a new generic object...)</p>
<p>- You have ultimate power and can do pretty much whatever you want. (Cue ominous thunder...)</p>
<p></p>
<p>There are however a few disadvantages:</p>
<p>- You need to write your code, compile it, install it and then run it in Grasshopper - it's not as immediate as the write-try loop you have with scripting components. (You can make certain minor changes to the code while debugging, but more major ones will mean having to shut down, re-compile and re-run).</p>
<p>- You need to write a couple of extra functions to populate your inputs/outputs, declare a GUID etc. You also need to extract your inputs in a slightly more complicated way. The script component takes care of all this stuff for you.</p>
<p>- Other people who open your definitions will need to have the plugin installed as well or those components won't work - it's not embedded in the definition itself like a script is.</p>
<p></p>
<p>I tend to grit my teeth and put up with the awful script editor if I'm just writing short scripts that are specific to that particular definition or if I'm in the early stages of writing a new tool and just want to experiment. I'll switch to VS if it's becoming something larger and more complicated or that I might want to reuse or share. Excluding the input/output parts, the bulk of the code is going to be the same no matter what you're using, so it's not too much of a commitment to go from one to the other.</p> Thanks for great insight! I h…tag:www.grasshopper3d.com,2017-05-12:2985220:Comment:17505292017-05-12T17:23:31.557ZMartin Jhttps://www.grasshopper3d.com/profile/Martin559
Thanks for great insight! I have a question: What are the main differences using the built-in GH script editor compared to compiling in Visual Studio (except for the improved IDE in VS already mentioned)? I'm thinking of performance, import of external libraries, access to frameworks and I/O, etc.<br/>
Many thanks,<br/>
Martin
Thanks for great insight! I have a question: What are the main differences using the built-in GH script editor compared to compiling in Visual Studio (except for the improved IDE in VS already mentioned)? I'm thinking of performance, import of external libraries, access to frameworks and I/O, etc.<br/>
Many thanks,<br/>
Martin Excellent notes from Andrew!…tag:www.grasshopper3d.com,2016-11-23:2985220:Comment:16446152016-11-23T05:55:43.086ZDevang Chauhanhttps://www.grasshopper3d.com/profile/devang
<p>Excellent notes from Andrew! Great tips from Anthony, Paul, and Konrad. Thank you all for sharing your experience. I would like to add something to this thread.</p>
<p>Dear Reader,</p>
<p>While it is good to start with a language that you find easier to learn by following a tutorial series or reading a book, if you are in for the long haul, things typically won’t end there. You will soon realize that finishing an introductory course on a language will not completely enable you to contribute…</p>
<p>Excellent notes from Andrew! Great tips from Anthony, Paul, and Konrad. Thank you all for sharing your experience. I would like to add something to this thread.</p>
<p>Dear Reader,</p>
<p>While it is good to start with a language that you find easier to learn by following a tutorial series or reading a book, if you are in for the long haul, things typically won’t end there. You will soon realize that finishing an introductory course on a language will not completely enable you to contribute in terms of development of tools if that’s what your aim is. For example, you’ll really need to understand object oriented programming if you want to work with an already established group. You need to learn and understand the API of tools that you want to contribute to. You might also encounter the need to use external libraries for the language you are using. All of this will require you to read and understand a lot of documentation. If there’s no good documentation, you’ll need the skills to read and learn from someone else’s code if they have done something similar. All these processes can be very mind bending and therefore, the keys will always be patience and perseverance.</p>
<p>Start out with a language, but be open-minded to learn and accept other languages and technologies too. All the people who have contributed to this thread before me have experience in more than one language. I hope you realize by now why did they not end after learning one language.</p>
<p>Paul’s made a brilliant point. While it will not cut down on the work you’ll have to put in to learn things, it will invariably add some luck in difficult situations. If you are the first one in your circle and don’t have friends and colleagues with such skills, I recommend you find online communities and groups. That would help a lot.</p>
<p>Best,</p>
<p>Devang</p>
<p> </p> I really like Paul's approach…tag:www.grasshopper3d.com,2016-03-30:2985220:Comment:14969142016-03-30T15:14:57.663Zkonrad k sobonhttps://www.grasshopper3d.com/profile/konradksobon
<p>I really like Paul's approach of learning the one language that "your colleagues" are using, and working under the assumption that this way you will be able to get more help and be able to collaborate better. +1<br></br><br></br>Just like everyone else has said, Python is a great "entry" language to learn, and once you get that, you will be able to transition to any other language with relative ease. I personally use both (python and C#) because I can use Python components to test an idea out…</p>
<p>I really like Paul's approach of learning the one language that "your colleagues" are using, and working under the assumption that this way you will be able to get more help and be able to collaborate better. +1<br/><br/>Just like everyone else has said, Python is a great "entry" language to learn, and once you get that, you will be able to transition to any other language with relative ease. I personally use both (python and C#) because I can use Python components to test an idea out really quickly without need to compile anything and then when I am comfortable with it, I usually transition my components to a library that was written in C# (I do most of my work in Dynamo/Revit environment but don't think that matters here in context of the conversation). <br/><br/>Great write up Andrew! </p> This seems like a good summar…tag:www.grasshopper3d.com,2016-03-29:2985220:Comment:14961212016-03-29T21:32:14.766ZPaul N Jeffrieshttps://www.grasshopper3d.com/profile/PaulNJeffries
<p>This seems like a good summary to me.</p>
<p></p>
<p>I teach people coding in Python, because that's the easiest language to get people who haven't coded before up and running and producing usable scripts quickly, but I personally tend to use either VB or C# and would recommend those instead to anybody who's in it for the long haul and is willing to put in a bit more effort up-front, because those languages are ultimately a bit more powerful in terms of what you can do with them. Even if…</p>
<p>This seems like a good summary to me.</p>
<p></p>
<p>I teach people coding in Python, because that's the easiest language to get people who haven't coded before up and running and producing usable scripts quickly, but I personally tend to use either VB or C# and would recommend those instead to anybody who's in it for the long haul and is willing to put in a bit more effort up-front, because those languages are ultimately a bit more powerful in terms of what you can do with them. Even if Python plugins become available that's probably not a task I would choose to use that language for - the features that make VB and C# feel a bit more complicated and restrictive than Python really start to make sense when you start developing bigger, more complicated, multi-file projects.</p>
<p></p>
<p>On the VB.NET vs C# front: underneath they are essentially the same language, the differences are largely cosmetic so it's down to whichever form of syntax you like the best. VB will be slightly easier to pick up if you've done any scripting before in Rhinoscript or VBA in Excel etc. As noted, C# will be more familiar to people with C/C++/Java/Javascript backgrounds. I use both and both are great languages - I slightly prefer C# to <em>write</em> because it's marginally more compact, but VB.NET to <em>read</em> because it's more english-like so there's less translation effort needed.</p>
<p></p>
<p>Of course, learning any one of these languages will put you 75% of the way towards being able to use one of the others, so it doesn't really matter all that much which one you choose first. The key criteria in real life is usually whatever language your friends and colleagues are using, not only because it makes it easier to get help but also because it boosts productivity if you can share and reuse code, and when some hiccup in a script comes to light the day before a deadline it's an excellent idea to have somebody else on hand who stands a chance of understanding and fixing the code in case the original author isn't around.</p> I should add the reason I bro…tag:www.grasshopper3d.com,2016-03-28:2985220:Comment:14934682016-03-28T09:07:47.685ZAnthony Buckley-Thorphttps://www.grasshopper3d.com/profile/AnthonyBuckley
<p>I should add the reason I brought up JavaScript is its predominance in web applications and that being a useful side benefit of following the C# path.</p>
<p>I should add the reason I brought up JavaScript is its predominance in web applications and that being a useful side benefit of following the C# path.</p>