Other Programming Vs. Max

Jun 30, 2006 at 1:54pm

Other Programming Vs. Max

I’ve never programmed anything except for Max.(if you even call it programming) I enjoy it so much that im thinking about learning a language such as C++ or java…

I understand it’s going to be much harder, but would you say the general process will be the same? Based upon me liking max i’m trying to figure out if i would feel the same about the others.

#26647
Jun 30, 2006 at 2:21pm

I went through the same thing. I loved max so much that I decided to embark on c++ for a year. I installed gcc on a sharp zaurus [funny enough] and would spend about 15-20 hours a week on this little device using vim to learn c++ [along with a few pdfs and a good window manager for small devices]…

after about a year I can say that at most I can appreciate the scope of programming languages. I tried to relate everything back to max somehow, for better or worse. I was able to understand quite a lot of c++ concepts by trying to think of how i’d “patch” that up in max. It worked for the most part and I finshed about 800/1200 pages of deitels c++ book.

Anyways, it helped me appreciate max even more, and I think twice [and sometimes three times] before whining about things that I don’t like in max. The amount of effort and time that’s gone into max to bring all this stuff together truly must be astronomical! Also things that I didn’t really notice, such as video game physics or silly things like winamp took on a new meaning for me.. its almost scary how as a programming illiterate how far we are from understanding the complexity of our computers!!

I’d recommend it, unless you spend ages and ages of time you probably won’t get to a point of doing anything useful with it, but none the less its quite an eye opener. In all fairness I really don’t have the time to learn c++ at my age along with the piano and all the other things i’ve got stacked up——-

binez0r

#79965
Jul 1, 2006 at 5:16am

papermesh wrote:
> I’ve never programmed anything except for Max.(if you even call it
> programming) I enjoy it so much that im thinking about learning a
> language such as C++ or java…
>
> I understand it’s going to be much harder, but would you say the
> general process will be the same? Based upon me liking max i’m
> trying to figure out if i would feel the same about the others.

Just start with Java or Javascript within Max, its an opportunity to
combine these different ways of thinking…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#79966
Jul 2, 2006 at 6:54am

Max was also the first ‘language’ I mastered. JK Clayton’s
suggestion of the Orielly javascript book really was very helpful.
Especially for someone like me who is a HORRID reader. I’m now
beginning Java.
My only suggestion is to try and abandon your current definitions
and terms. “object” “properties” etc… While in some ways they may
parallel, Max/MSP terms can mean very different things in the context
of coded languages. Despite having heard that max is “object
oriented”, try to abandon your ideas about what an object is.

at least that was my experience. learning JS actually made me wish
max was more object oriented. is that strange?
-matt

#79967
Jul 2, 2006 at 7:57am

On 02-juil.-06, at 08:54, matthew aidekman wrote:

> Despite having heard that max is “object oriented”, try to abandon
> your ideas about what an object is.

Max is probably more a “message passing” language than a real object
oriented language. There is an old article about this and other things
that must be somewhere on cycling’s website (I don’t remeber well, but
it’s quite old!).

About languages, learning a Lisp brought me much more than any
procedural language. Now I’m afraid I forgot its syntax but the ideas
remains.

p

#79968
Jul 2, 2006 at 8:24am

Quote: Patrick Delges wrote on Sun, 02 July 2006 01:57
> Max is probably more a “message passing” language than a real object
> oriented language. There is an old article about this and other things
> that must be somewhere on cycling’s website (I don’t remeber well, but
> it’s quite old!).
—————————————————-
this discussion maybe? http://mitpress2.mit.edu/e-journals/Computer-Music-Journal/cmjlib/editors-notes/17-2.html

i myself am doubting between starting java or python, with the only real advantage of java the max integration i guess.

#79969
Jul 2, 2006 at 8:51am

On 02-juil.-06, at 10:25, junior wrote:

>
> Quote: Patrick Delges wrote on Sun, 02 July 2006 01:57
>> Max is probably more a “message passing” language than a real object
>> oriented language. There is an old article about this and other things
>> that must be somewhere on cycling’s website (I don’t remeber well, but
>> it’s quite old!).
> —————————————————-
> this discussion maybe?
> http://mitpress2.mit.edu/e-journals/Computer-Music-Journal/cmjlib/
> editors-notes/17-2.html

That’s it!

> i myself am doubting between starting java or python, with the only
> real advantage of java the max integration i guess.

I would go for Java (it’s now the language used everywhere). But if
what you are after is learning how to program, then the language is not
that important. Pascal is a nice language too :-)

#79970
Jul 2, 2006 at 3:11pm

On 2-Jul-2006, at 8:54, matthew aidekman wrote:

> Despite having heard that max is “object oriented”, try to abandon
> your ideas about what an object is.

Max *is* OO, as far as it goes.


An object-oriented language is an langauge that uses objects. Objects
are entities that have state and behavior.

Max objects fulfill all of those requirements.

However, many people have come to expect OOLs to provide extended
features: classes, class inheritance, multiple inheritance, function
overloading, private/public implementation, frameworks, und so weiter
und so fort… But just because C++ (for instance) provides some of
this stuff, it isn’t absolutely necessary for a language to be OO.

No two langauges are quite the same. Never expect another programming
language to behave exactly like the first one you learned (which is
what you’ll probably judge all other PLs by).

OTOH, you can transfer some organizational principles from any one
language to any other. The basic task of approaching a real world
problem and breaking it down in steps until each step can be mapped
to a sequence of statements performed by an (abstract) machine; this
task is what programming is about. Max isn’t a bad way to cut your
teeth on this.

If what you’re wanting to learn is how to program Max external
objects, the obvious options are JScript, Java, and C (not so much C+
+). They all have different rough edges.

Good luck.

– Peter

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +—> Litter Power & Litter Bundle for Jitter
Heavy-Duty Mathematics for Everyday Use
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de

#79971
Jul 2, 2006 at 6:14pm

> However, many people have come to expect OOLs to provide extended
> features: classes, class inheritance, multiple inheritance,
> function overloading, private/public implementation, frameworks,

this is kind of a thread jack… (sorry original poster).. but.. as
an aside.. has anyone thought of implementing this stuff in max?
after coming back to max from javascript, I found myself wondering if
max could do things like

make objects properties of other objects,
encourage more variable and multidimensional arrays etc.

I had this lying around… I know its super geeky but hey

http://img434.imageshack.us/
img434/9310/3c07514f0a9db1904bc8e9532281e7.gif

#79972

Jul 2, 2006 at 6:22pm

doh… I forgot to add that the only way that would be worth while
would be with a ZUI.

#79973
Jul 3, 2006 at 8:53am

I would argue that max is absolutely an OO language. You can create
classes, etc using it, but the key is actually *planning* out your
patch beforehand. I think that the visual nature of max lends itself
to “just doing things” and not planning out how they should be
properly organized into classes and functions. (Although I’m sure
that the best Max’ers already know this)

So here’s an example of what I’d call inheritance. If you take
[jit.submatrix] to be an “object,” then extending it’s behavior could
be done by using [route]:

#N comlet messages;
#P outlet 286 329 15 0;
#N comlet jit_matrix;
#P outlet 124 330 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 124 204 185 196617 route setSubmatrixVals;
#P inlet 124 177 15 0;
#N vpatcher 143 91 397 487;
#N comlet list: offsetX offsetY dimX dimY;
#P inlet 78 53 15 0;
#N comlet to jit.submatrix;
#P outlet 78 358 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P newex 153 188 45 196617 prepend dim;
#P window linecount 0;
#P newex 78 188 50 196617 prepend offset;
#P newex 78 151 85 196617 zl slice 2;
#P comment 98 56 118 196617 to set submatrix bounds;
#P connect 5 0 1 0;
#P connect 1 0 2 0;
#P fasten 2 0 4 0 83 312 83 312;
#P fasten 3 0 4 0 158 234 83 234;
#P connect 1 1 3 0;
#P pop;
#P newobj 124 238 55 196617 p subArea;
#P newex 124 280 172 196617 jit.submatrix @dim 1 1 @offset 0 0;
#B color 5;
#P connect 0 1 5 0;
#P connect 0 0 4 0;
#P connect 2 0 3 0;
#P connect 3 0 1 0;
#P fasten 3 1 0 0 304 271 129 271;
#P connect 1 0 0 0;
#P window clipboard copycount 6;

I use [route] and [patcherargs] to create new, explicit “functions”
for my “classes” (e.g. subpatchers and patchers). I’m fairly sure
that this is what they were created for, which I’ve learned from
examples like jit.lcd-layer.

What’s tricky is what to call this… I’d call it inheritance, but
maybe you could argue that the [jit.submatrix] is actually just a
“pubic variable” of this class? (It would be private if there was no
way of explicitly talking to it, but there is a way in this patch via
the right outlet of route). I would say no, because this patch is
built around the jit.submatrix and retains all of its originally
functionality.

I’d be interested to hear what others think.

Also, FWIW, I feel like my OOP skills have increased after using max
for a few years (I’ve been using java ever since it first came out,
in around ’96-97)

best
evan

On Jul 2, 2006, at 7:14 PM, matthew aidekman wrote:

>> However, many people have come to expect OOLs to provide extended
>> features: classes, class inheritance, multiple inheritance,
>> function overloading, private/public implementation, frameworks,
>
> this is kind of a thread jack… (sorry original poster).. but..
> as an aside.. has anyone thought of implementing this stuff in max?
> after coming back to max from javascript, I found myself wondering
> if max could do things like
>
> make objects properties of other objects,
> encourage more variable and multidimensional arrays etc.
>
> I had this lying around… I know its super geeky but hey
>
> http://img434.imageshack.us/
> img434/9310/3c07514f0a9db1904bc8e9532281e7.gif
>
> #79974

Jul 3, 2006 at 8:45pm

Hi Evan,
Nice solution.
This approach is called ‘delegation’ as the new object delegates
‘inherited’ methods to the included instance.
it is a perfectly valid alternative to inheritance.
where inheritance establishes a relation between classes,
delegation is based on a relation between instances.
but that’s all theory, in practice you can use them interchangeably,
provided that you have the proper language mechanisms (as max does).
there was a lot of discussion about this in the OO community in the
1980′s.
-jennek

On 3-jul-2006, at 8:53, evan.raskob [lists] wrote:

> I would argue that max is absolutely an OO language. You can
> create classes, etc using it, but the key is actually *planning*
> out your patch beforehand. I think that the visual nature of max
> lends itself to “just doing things” and not planning out how they
> should be properly organized into classes and functions. (Although
> I’m sure that the best Max’ers already know this)
>
> So here’s an example of what I’d call inheritance. If you take
> [jit.submatrix] to be an “object,” then extending it’s behavior
> could be done by using [route]:
>
> #N comlet messages;
> #P outlet 286 329 15 0;
> #N comlet jit_matrix;
> #P outlet 124 330 15 0;
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P newex 124 204 185 196617 route setSubmatrixVals;
> #P inlet 124 177 15 0;
> #N vpatcher 143 91 397 487;
> #N comlet list: offsetX offsetY dimX dimY;
> #P inlet 78 53 15 0;
> #N comlet to jit.submatrix;
> #P outlet 78 358 15 0;
> #P window setfont “Sans Serif” 9.;
> #P window linecount 2;
> #P newex 153 188 45 196617 prepend dim;
> #P window linecount 0;
> #P newex 78 188 50 196617 prepend offset;
> #P newex 78 151 85 196617 zl slice 2;
> #P comment 98 56 118 196617 to set submatrix bounds;
> #P connect 5 0 1 0;
> #P connect 1 0 2 0;
> #P fasten 2 0 4 0 83 312 83 312;
> #P fasten 3 0 4 0 158 234 83 234;
> #P connect 1 1 3 0;
> #P pop;
> #P newobj 124 238 55 196617 p subArea;
> #P newex 124 280 172 196617 jit.submatrix @dim 1 1 @offset 0 0;
> #B color 5;
> #P connect 0 1 5 0;
> #P connect 0 0 4 0;
> #P connect 2 0 3 0;
> #P connect 3 0 1 0;
> #P fasten 3 1 0 0 304 271 129 271;
> #P connect 1 0 0 0;
> #P window clipboard copycount 6;
>
>
> I use [route] and [patcherargs] to create new, explicit “functions”
> for my “classes” (e.g. subpatchers and patchers). I’m fairly sure
> that this is what they were created for, which I’ve learned from
> examples like jit.lcd-layer.
>
> What’s tricky is what to call this… I’d call it inheritance, but
> maybe you could argue that the [jit.submatrix] is actually just a
> “pubic variable” of this class? (It would be private if there was
> no way of explicitly talking to it, but there is a way in this
> patch via the right outlet of route). I would say no, because this
> patch is built around the jit.submatrix and retains all of its
> originally functionality.
>
> I’d be interested to hear what others think.
>
> Also, FWIW, I feel like my OOP skills have increased after using
> max for a few years (I’ve been using java ever since it first came
> out, in around ’96-97)
>
> best
> evan
>
>
> On Jul 2, 2006, at 7:14 PM, matthew aidekman wrote:
>
>>> However, many people have come to expect OOLs to provide extended
>>> features: classes, class inheritance, multiple inheritance,
>>> function overloading, private/public implementation, frameworks,
>>
>> this is kind of a thread jack… (sorry original poster).. but..
>> as an aside.. has anyone thought of implementing this stuff in
>> max?after coming back to max from javascript, I found myself
>> wondering if max could do things like
>>
>> make objects properties of other objects,
>> encourage more variable and multidimensional arrays etc.
>>
>> I had this lying around… I know its super geeky but hey
>>
>> http://img434.imageshack.us/
>> img434/9310/3c07514f0a9db1904bc8e9532281e7.gif
>>
>> #79975

You must be logged in to reply to this topic.