@remus said:
Are you a fan of python by any chance?
Maybe just a wee bit
@unknownuser said:
Although this doesn't require a language I know having the ability to record and save a set of proceedures as a macro (while building a model) would be useful and could be a replacement for a lot of simple rubies.
I very much agree for those needing a simple repetitive action or what-not. But here again you will be limited. You could do so much more with a little bit of code. Not only that, learning a few things about programming can be transfered to automating tasks on your machine, and/or other scripting languages/programs.
Programming is not rocket science, and scripting of an API is nothing more than saying to SU "Hey, do this if this condition: else do that". The base code is already there, all you have to do is call the methods(). Just as your car is already designed, engineered, and built for you, so is the SU API. All you have to do is put a little gas in, turn the key and go! It is really not as hard as you think. But i think the barrier here is Ruby. (see next section)
@pixero said:
How about a thread with ruby programming tutorials for everyone?
Very good idea, and I am already two steps ahead of you. I have started a tutorial for non-programmers. The main purpose is to get them over the initial "hump" quickly and show how easy it really is to write useful scripts. I have postponed it for now because i found as i was writing the tut, how teaching/learning would be so much more simple if Python were available.
SketchUp is changing the world of 3D modeling much the way Python changed the world of programming. I see a great future for this software. It is evolving rather quickly, and has brought many people to the wonders and joys of the modeling world(novice and professional alike). I only want to guarantee this future upwards evolution by giving people the common sense tools they need to wield the full power of this great application. SU is truly the only software i have seen that can carry the title of "21st century software"
The combination of Sketchup's intuitive and ground-breaking UI, coupled with the common sense approach and simplistic elegance of Python will be an unstoppable force. Not only will this expand SketchUp's influence, but will give a SketchUp user the complete power they need over the application -- in the quickest, and most painless way.
SU users need a language that...
1.) is easy to learn
2.) is widely supported
3.) is open source
4.) Has ample, AND clear documentation (most important)
*and if you can teach good programming principals in the process, what a plus!!
Python fits all these and then some. Modelers need to concentrate on modeling, but they also need the power scripting brings, and a lot of you do not realize this power yet, but i want to change that. If Python were here i would not need to write a tutorial, i would just point you to one of the great tuts that already exist out there.
For those that don't know anything about either language i will explain. Ruby and Python are by far the only two "very high level" languages that exist today(IMO) -- High level simply means easy to use.
Ruby is a language with lots of shortcuts and has many ways to do the same thing. But these shortcuts make learning the language painful for non-programmers, and even experienced guy's like myself. This is because there are more rules to learn, more syntax, and two scripts can look wildly different. Ruby is a direct descendant of Perl(a very powerful, but VERY cryptic language). If you are a Perl programmer, you would love Ruby.
But if you are a non-programmer or a C programmer, you will find Python very easy to learn. I believe Python is the perfect scripting language for any software. Python revolutionized programming the way SU revolutionized modeling. SU is made for modelers, not professional programmers, so I believe Ruby was the wrong choice in this regard. Not everybody wants to, or needs to script SU. But for those that do, i want to give you a fighting chance. The pros can learn any language, this is about making SU more useful to EVERY SINGLE USER.(and lots of pro's love Python too)
Let me tell you the perils that a SU user faces on his quest to learn SU scripting. The first thing this user must overcome is his sense of self worthlessness. The "I can't possibly write code" syndrome. Once this person finally builds enough self courage to overcome this monster, a new and more powerful one awaits around the corner. Poor documentation. I am not just talking about the SU API(which is better than most API's). This extends well into the world of Ruby itself. I have yet, in my months of looking to find a decent tutorial for the Ruby language that i can suggest for struggling SU users. There exist no Ruby tutorial that will ease a new programmer into the language. The SU API docs have some shortfalls too. They are missing some real good examples, and the links to example scripts are broken! This is a travesty to all new SU scripters.
PYTHON HISTORY
Python came into being around 1991 by a computer science genius named "Guido van Rossum". This man is truly a man before his time(currently works at Google). Python revolutionized the world of programming and showed other languages how easy programming should be. Python promotes good coding styles by indentation, syntax is clear, and choice of keywords is perfect. I like to think of Python as simplistic programming elegance. No other high level language can compete with Python.
There are literally hundreds, and i would say even into the thousands, of good free tutorials across the web for Python for all levels(beginner to pro). Not only is the language easy to learn, you will never be without clearly written tutorials for this language. The community is huge, and many people follow this language. Python is by far the easiest of all languages to learn for non-programmers and just as powerful as any other high level, i can speak from experience.
Hopefully people will come to their senses and demand a change or the inclusion of the Python programming language next to the Ruby API. For it will be for your benefit SU users.
PS: Did i mention that Python is Google's official language of choice. That Google uses Python in their search engine and applications. Python is also used by Nasa, Industrial Light and Magic, and many more respected people. It pretty much runs YouTube.
check here for more details
http://www.python.org/