<div dir="ltr"><div>Leam,</div><div><br></div><div>Very nice code structure. You are obviously a disciplined programmer.</div><div><br></div>Here are two quick comments about your code:<div><br></div><div>1) use {} on your if even if there is only one line of code. Two reasons:</div><div> a) it is too easy to add a line of code and break the if later (and sometimes it will not cause a compile error).</div><div> b) if you do add the line of code and also add the {} later, then when you look at the code change using git diff, you see the add for the {} in addition to your logic change. it is alway nice to only see the logic change in git diff, not code structure change.</div><div><br></div><div>2) your modules only return a pointer to "<span class="" style="color:rgb(167,29,93);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre">struct</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre"> driver" or accept it as a parameter. You can use a technique called opaque structures. </span>You can google opaque structure to find a technique that works for you, but it in a nutshell, it is used to hide the elements of the structure for the calling routines and only allow the module.c code to change the elements.</div><div><br></div><div>There are several techniques, here is the technique I use:</div><div>1) replace "struct driver {...}:" in module.h with "struct driver *;"</div><div>2) move "struct drive {...};" to module.c</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 8:56 PM, Christopher Hagler <span dir="ltr"><<a href="mailto:haglerchristopher@gmail.com" target="_blank">haglerchristopher@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I would definitely be interested in joining. I have not done any major programming in C and assembly langauge since college, but I am confident I will be able to pick it back up after a short review. I just joined the mailing list, so I missed all of the details and the previous conversations. However, if there is anything that I need to know, you can just send me a direct email. Also, I have been toying around with C in my spare time. I am currently implementing a compiler and a home automation framework that is all written in C. If you would like to work on these projects, you are more than welcome too.<div><br><div>1) <a href="https://github.com/haglerchristopher/automation/tree/development" target="_blank">https://github.com/haglerchristopher/automation/tree/development</a></div><div>2) <a href="https://github.com/haglerchristopher/compiler/tree/development" target="_blank">https://github.com/haglerchristopher/compiler/tree/development</a></div><div><br></div><div>This sounds like it is going to be a lot of fun, and I look forward to working with you.</div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 7:03 PM, Leam Hall <span dir="ltr"><<a href="mailto:leamhall@gmail.com" target="_blank">leamhall@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've been doing the "Learn C the Hard Way" thing for a little over two weeks now. For those of you wondering why we should do it as a group; consider the ease of distraction. Work is stressful, should I learn something that can go straight to my resume faster? Is there something more fun I could learn? Am I spending enough time with the family? Will I ever get anywhere anyway? Am I going too slow? Too fast?<br>
<br>
Learning with others encouraging you can really help. I'm also trying to learn Spanish, our weekly visits to the local Mexican restaurant really help bring the language to life.<br>
<br>
With C it's a little harder to "go talk to someone". I did do a few lines just to test a thought the other day. Normally that would take me a lot more time. Okay, half a dozen lines of "if {...}..." won't change the world. I'm hoping it will change me.<br>
<br>
For those of you who have volunteered to mentor, my deepest thanks! I expect we'll get in over our heads shortly. For those thinking about joining, or secretly checking for the book on Amazon, jump on in! We officially start 1 Jan. By 1 Apr you'll be 3 months older. Will you know more C 1 Apr than you did 1 Jan?<br>
<br>
Leam<br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Michael Potter<br> Tapp Solutions, LLC</div><div> <a href="http://www.tappsolutions.com" target="_blank">www.tappsolutions.com</a><br>+1 770 815 6142 ** Atlanta ** <a href="mailto:michael@potter.name" target="_blank">michael@potter.name</a> ** <a href="http://www.linkedin.com/in/michaelpotter" target="_blank">www.linkedin.com/in/michaelpotter</a></div></div></div></div></div>
</div>