Home AMX User Forum AMX General Discussion
Options

Are there any sample program avaible?

I am a newbie on AMX programming in Hong Kong which there is no resources about AMX programming. So I would like to have some nice sample program to show me how AMX programming is done. Thanks.

P.S. Will there be anything like yahoo! groups about AMX?

Thanks for all help!!

Comments

  • Options
    DHawthorneDHawthorne Posts: 4,584
    This is the best resource I am aware of. You'll mostly find module code here, not full programs though. I'm sure folks can contribute some sample for you.
  • Options
    GSLogicGSLogic Posts: 562
    winstonma wrote:
    I am a newbie on AMX programming in Hong Kong which there is no resources about AMX programming. So I would like to have some nice sample program to show me how AMX programming is done. Thanks.
    I had the same issue years ago!

    Why AMX doesn't give new programmers examples of well written code, I don't know. When I first started I learned more from other people's code (reverse engineering) than any other form of learning. This is why modules shouldn't be locked.
  • Options
    Hi!

    I agree Gary in 100%.
    I?m a beginner too and I?m always searching for pieces of code to find out how other programmers do it.
    It?s nearly impossible to write a program by consulting the programmers manual only.

    Winstonma, if you tell the nice guys of this forum what you want to control, they maybe can send you some code.
  • Options
    DHawthorneDHawthorne Posts: 4,584
    GSLogic wrote:
    I had the same issue years ago!

    Why AMX doesn't give new programmers examples of well written code, I don't know. When I first started I learned more from other people's code (reverse engineering) than any other form of learning. This is why modules shouldn't be locked.

    That's easy - they want you to take the official training, and they don't want to have to support programmers who don't. It's very sensible from their point of view.
  • Options
    GSLogicGSLogic Posts: 562
    DHawthorne wrote:
    That's easy - they want you to take the official training, and they don't want to have to support programmers who don't. It's very sensible from their point of view.

    Dave
    I went through all the training and never received any sample code. I had to learn from reverse engineering... Toyota style. It's a great way to learn but it takes a lot longer.
  • Options
    DHawthorneDHawthorne Posts: 4,584
    GSLogic wrote:
    Dave
    I went through all the training and never received any sample code. I had to learn from reverse engineering... Toyota style. It's a great way to learn but it takes a lot longer.
    What I meant is that is why they don't just throw up a bunch of sample code on the website. They don't want untrained programmers trying to figure it out on their own.

    They may not have given out sample code at training, but they did walk you through writing your own for every basic situation ... you wound up with your own samples. My first few months in the field I referred to what I wrote in training quite frequently.

    This is, after all, a commercial venture, not a hobby. AMX has a vested interest in doing what they can to be as certain as they can that people programming their product are doing it in such a way that will reflect well on the product. They don't want an end-user calling them up saying, "your system works like crap," only to find some hack had programmed it based on samples cobbled together from the web site. It's bound to happen in any case, but AMX is not likely to want to contribute to it.

    Mind you, this is just surmise; I don't know for a fact this is official policy. But I have been dealing with AMX for many years, and that surmise is consistent with what I know from working with them.
  • Options
    GSLogicGSLogic Posts: 562
    DHawthorne wrote:
    What I meant is that is why they don't just throw up a bunch of sample code on the website. They don't want untrained programmers trying to figure it out on their own.
    Dave
    I completely understand and agree with what you are saying but, don't you think you would have learned much faster seeing code that was written correctly. Even today if I see a style or an idea that I like, I will incorporate it in my programming. I can't see the logic in not offering sample code to programmers that are CERTIFIED, to help than learn faster and more important learn go habits.
  • Options
    DHawthorneDHawthorne Posts: 4,584
    That's true; offering sample programs to certified programmers could be helpful. I was thinking entirely in the context of a hobbyist or amateur browsing the site.
  • Options
    yuriyuri Posts: 861
    if you are certified you should be able to write your own code.
    What good does a piece of code do if you are only going to copy paste from it? Write it yourself and you actually learn something, charge the customer for the time ;)
  • Options
    viningvining Posts: 4,368
    yuri wrote:
    if you are certified you should be able to write your own code.
    What good does a piece of code do if you are only going to copy paste from it? Write it yourself and you actually learn something, charge the customer for the time
    Yes, if your certified you should be able to write code but not necassarily write it right. There's alot of us who are isolated and working for the most part all alone who need to see other points of view and techniques expressed in code. I like many wasn't a programmer before taking on AMX and I still have a hard time considering myself one now. Seeing code done right, done different and even done wrong is extremely beneficial in many ways. Just to be able to see the different ways people approach a similiar problem if not useful can at least be amusing.
  • Options
    adysadys Posts: 395
    So why not make it ourself?

    lets open a post to hold all the examples we can think of.
  • Options
    JeffJeff Posts: 374
    Certified Programmers get access to a locked forum on here with code samples to share with eachother. I imagine this is locked for the same reason someone speculated earlier.

    I started programming AMX, found this site, asked a bunch of stupid newbie questions, got things up and running, and quickly learned how much I didn't know. I then signed up for the class and got the certification. Had I been able to make it all work without the class, I probably wouldn't have taken it. Now that I've taken it, I learned a lot of things I wouldn't have learned otherwise. My code is better now than it would have been had I taught myself, and that's AMX's goal.

    J
  • Options
    Code Samples - What SPECIFICALLY do you need?

    I have some "canned" samples that I have written and send out to people when they request them. It is more difficult to send out an entire program without some idea of what you are looking for because it could be a complete waste of time if you are only looking for specific device types... IP, 232 or IR - or queueing, parseing or some other general code issue. If you can give me some specifics, and a little time, I can find or write some code samples to help or at least point you in the right direction to find some help. Feel free to email me at chris.lumley@amx.com ... but keep in mind, it may take a bit of time depending on the request and what I have going on. I like to help people who want to learn because it helps my programming too, so give me some specifics and I'll be glad to post something.
  • Options
    GSLogicGSLogic Posts: 562
    I like the idea of a sample code section but who is going to police it? What if someone uploads code that is total garbage... who is to say what is garbage, there is a fine line between genius and pain.

    As I've always thought; AMX should give certified programmers the ability to download the comm files from their modules. The mods hold many ways of code design, layout and styles of code writing to enlighten everyone. And of course no tech support on mods that are not locked. :)

    When I first started and I got my hands on a unlocked module comm file (did I say that), it was like looking through an encyclopedia for the first time. It really changed my thinking of code writing over night.
  • Options
    adysadys Posts: 395
    GSLogic wrote:
    I like the idea of a sample code section but who is going to police it? What if someone uploads code that is total garbage... who is to say what is garbage, there is a fine line between genius and pain.

    As I've always thought; AMX should give certified programmers the ability to download the comm files from their modules. The mods hold many ways of code design, layout and styles of code writing to enlighten everyone. And of course no tech support on mods that are not locked. :)

    When I first started and I got my hands on a unlocked module comm file (did I say that), it was like looking through an encyclopedia for the first time. It really changed my thinking of code writing over night.

    Where is that module? :)

    Just a reminder, not all of the people are certifed programmers, and not all countries have AMX schools.... I have no option to learn AMX so that is not fair...
  • Options
    JeffJeff Posts: 374
    If people seriously want to do some open source code availability, the place to do it is Google Code. They've got a good setup for sharing open source stuff. Somebody a while back created a Netlinx section, but there isn't anything actually in it. I'm hesitant to add something of my own, because I'm still learning, but thats the best venue for sharing code.

    J
  • Options
    GSLogicGSLogic Posts: 562
    adys wrote:
    Where is that module? :)
    mmm - I lost it! :)
Sign In or Register to comment.