Having seen some examples, you must be eager to start using ÃMQ in some apps. Before you start that, take a deep breath, chillax, and reflect on some basic advice that will save you much stress and confusion:
Learn ÃMQ step-by-step. Itâs just one simple API, but it hides a world of possibilities. Take the possibilities slowly and master each one.
Write nice code. Ugly code hides problems and makes it hard for others to help you. You might get used to meaningless variable names, but people reading your code wonât. Use names that are real words, that say something other than âIâm too careless to tell you what this variable is really for.â Use consistent indentation and clean layout. Write nice code, and your world will be more comfortable.
Test what you make as you make it. When your program doesnât work, you should know which five lines are to blame. This is especially true when you do ÃMQ magic, which just wonât work the first few times you try it.
When you find that things donât work as expected, break your code into pieces, test each one, and see which one is not working. ÃMQ lets you make essentially modular code; use that to your advantage.
Make abstractions (classes, methods, whatever) as you need them. If you copy/paste a lot of code, youâre going to copy/paste errors, too.
Get ZeroMQ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.