Reddit mentions: The best software reuse books

We found 15 Reddit comments discussing the best software reuse books. We ran sentiment analysis on each of these comments to determine how redditors feel about different products. We found 1 product and ranked them based on the amount of positive reactions they received. Here are the top 20.

1. C Interfaces and Implementations: Techniques for Creating Reusable Software

C Interfaces and Implementations: Techniques for Creating Reusable Software
Specs:
Height1.11 Inches
Length9.26 Inches
Number of items1
Weight2.0282528104 Pounds
Width7.41 Inches
▼ Read Reddit mentions

🎓 Reddit experts on software reuse books

The comments and opinions expressed on this page are written exclusively by redditors. To provide you with the most relevant data, we sourced opinions from the most knowledgeable Reddit users based the total number of upvotes and downvotes received across comments on subreddits where software reuse books are discussed. For your reference and for the sake of transparency, here are the specialists whose opinions mattered the most in our ranking.
Total score: 7
Number of comments: 3
Relevant subreddits: 2
Total score: 5
Number of comments: 2
Relevant subreddits: 1
Total score: 5
Number of comments: 1
Relevant subreddits: 1
Total score: 4
Number of comments: 1
Relevant subreddits: 1
Total score: 3
Number of comments: 1
Relevant subreddits: 1
Total score: 3
Number of comments: 1
Relevant subreddits: 1
Total score: 1
Number of comments: 1
Relevant subreddits: 1
Total score: 1
Number of comments: 1
Relevant subreddits: 1
Total score: 1
Number of comments: 1
Relevant subreddits: 1
Total score: 1
Number of comments: 1
Relevant subreddits: 1

idea-bulb Interested in what Redditors like? Check out our Shuffle feature

Shuffle: random products popular on Reddit

Top Reddit comments about Software Reuse:

u/Newt_Hoenikker · 3 pointsr/C_Programming

I have a several friends who find Test-driven Development to be really helpful for shaping their ideas into code. In general you'll need to break down the problem into smaller pieces, and TDD can help not only in realizing what those pieces need to be, but it also provides a method of ensuring that your code has accomplished what you want.

One of my favorite lessons from this sub is that complexity should stem from the coupling of simple parts. This isn't always straightforward. Many times it's easy to create a monolithic myProject.c, a single struct, or only a handful of functions to get the result you want. This isn't, strictly speaking, wrong but it is generally seen as bad practice. This is because when you have to maintain long term projects you want to have changes to one portion affect the others as little as possible; you should never have to rewrite the whole program in order to accommodate a change to a single part.

There aren't exactly hard and fast rules to determine the best process for modular design, but practicing on smaller projects is a good start. If you're looking for more specific "best practices" I've found C Interfaces and Implementations by David Hanson to be a really nice guide for some particularly common problems.

As for your specific project I think it would help you to consider the mechanics of TicTacToe as a game, and how you can change them while still keeping it familiar. For instance, my first thoughts are:

  • grid size: 3x3 is standard, but a larger grid could change how the game plays out without changing win conditions.

  • player number: 1v1 is standard, but having 3+ player free-for-all matches or teams could make it completely different.

    Now what I'm getting at here is that for the purposes of learning best practice it could help to design the program to allow for different rules, changing individual parts without it requiring a complete overhaul. If you can build it to change these things without recompilation so much the better. In general I look at this method as an analogous measure of scalability; can the program handle an increased load, how much of one, and how readily will it handle it. In allowing for modular rule changes you'll build a modular project.

    As a final note, bear in mind that there is a limit to modularity. Eventually trying to make a program handle every eventuality can be paralyzing. Learning where the limit is and what you feel you can handle is almost purely a matter of experience, but I think the most important thing is to never let the scale of your project deter you from completing it. You control how the program is designed so ultimately it's your decision, and if that means just sitting down and writing out something that works so be it. The perfect is the enemy of the good.

    I hope that helps.
u/phao · 3 pointsr/learnprogramming

((EDIT)) I was assuming, for some reason (don't ask me why), that you couldn't do what /u/kulseran told you to do (i.e. having a function in the other file, and calling that function passing stuf as a parameter), but if you can stick to what he said, do it. It's the simpler/better/... solution. It often won't be able possible however. ((/EDIT))

Sorry the long post.

It is right: if you had another module that needed the contents of stuff, then you'd need something more sophisticated. Some options in C would be through the use of ADTs and mutable modules. In C++ you have way more options. I'm going to assume C though.

You can look at your code and find out which problem is the use of stuff solving. Factor that solution into a coherent (possibly mutable) module and hide stuff in there by making it a file scope static variable. Access to stuff is now done through its module's public interface. If access to it includes mutable operations, then you can control that mutation because it only happens through the module's public interface (only functions defined in that same file/module can access stuff). Ideally, this removes its globalness.

Of course that if this module provide functions like setStuff, getStuff, getPointerToStuff and/or related operations, the module separation is as good as nothing. The idea is to create an useful boundary that allows you good enough control over how stuff is used while providing a useful and encapsulating set of operations that users of your module can use. If those includes getState, then fine, but if it starts including all that other stuff, then you're effectively back to globals.

And just to be clear, the term "mutable module" is something I just came up with. It just means a module whose state can change.

The ADT approach is pretty common. Maybe there is a type struggling to come out of your use of stuff. Analyze your program and find out. Check which set of operations people are interested in doing to stuff. Voilá, there is your ADT. Now implement it. Hide it's internal state and have it be controlled through the ADT's operations.

There is a book on this. For all I know, it's good but it has been a while since I've looked at it => http://www.amazon.com/Interfaces-Implementations-Techniques-Creating-Reusable/dp/0201498413.

I think it's good to notice that the solutions C easily supports don't seem very good to me. You surely can solve the problem, but it won't be that convenient. There will be workarounds. C isn't particularly known for its ability to create great abstractions.

The overall notion is that state itself is not your enemy. However, it's often that we use mutable state. That is SOMETHING is in a state and the state of SOMETHING can change and become another one. Besides, often we'd like to share SOMETHING. That is, several modules in your program want to use SOMETHING. These two needs are in conflict with each other. That's where lies the evil because it's too error prone to share mutable state. If it's mutable, avoid sharing. If it's shared, avoid mutable.

That's the advantage of placing something inside a module, hiding it behind an ADT's implementation and so forth. Because it minimizes the sharing of that state. Now only a handful of functions share that state, which means that errors due to sharing [the module's particular internal] mutable state are limited to that particular piece of code.

As for the java code...

Notice how you use public static final variables. These have state and are shared, but aren't mutable. So they just don't have all the usual pain of globals (although they're not the ultimate perfect feature). The private state of an object is mutable, but sharing is contained to the object, and thus they also don't have all the pain of globals. You can control this private state through the object's public interface, much like you can do through the stateful object and the ADT implementation.

I'm sorry but I just scanned through the beginning of your java code. I didn't look much into it.

u/rtz90 · 1 pointr/embedded

So I found the book C Interfaces and Implementations, which looks pretty good. Do you have any other recommendations for design pattern books?

I have been following the Linux kernel style guide for a while and I am pretty happy with it. I have skimmed some random kernel code a few times but always felt actually diving in and seriously reading it would require a big time commitment, maybe better to start with something smaller first like Contiki...

u/ThomasPtacek · 4 pointsr/programming

If you're a Python programmer and you want to learn C, the best way to get started is by writing C extensions for Python. Find a C library that looks interesting and wire it up to CPython.

A baby step towards doing this is to use an FFI, like Python ctypes or Ruby/DL. You'll be working with raw memory and C function calls, but you'll be writing Python. Try to port your FFI-driven extension to native C.

I don't recommend just grabbing K&R and plowing through it. It's a great book but you're not going to retain anything by reading and then trying to write out the example programs. C didn't click for me until I had real projects to work on.

My recommended book is C Interfaces and Implementations (CII). What you're going to miss in C, right away, is the lack of a "list" or "array" type like you get in Python. CII will give you the list and the dict back, and, more importantly, show you how to structure your C code professionally and idiomatically.

u/benjade · 1 pointr/C_Programming

Besides what has been mentioned, these two are also good:

u/Truth_Be_Told · 1 pointr/C_Programming

First note that Career/Job/Market is quite different from Knowledge/Intellectual satisfaction. So you have to keep "earning money" separate from "gaining knowledge" but do both parallely. If you are one of the lucky few who has both aligned in a particular job, you have got it made. Mostly that is never the case and hence you have to work on your Motivation/Enthusiasm and keep hammering away at the difficult subjects. There are no shortcuts :-)

I prefer Books to the Internet for study since they are more coherent and less distracting, allowing you to focus better on a subject. Unless newer editions are reqd. buy used/older editions to save money and build a large library. So here is a selection from my library (in no particular order);

u/tulip_bro · 13 pointsr/C_Programming

Chris Wellons blog series is good for minimalist C library design, and he has excellent examples on his Github too: https://nullprogram.com/blog/2018/06/10/

For a more opaque approach, check out: https://www.amazon.com/Interfaces-Implementations-Techniques-Creating-Reusable/dp/0201498413

u/reginod · 1 pointr/netsec

You don't need a school for this.

Low Level Programming Languages

u/fish1232 · 3 pointsr/learnprogramming

Kilo, A Text Editor

Build your own Lisp introduction to C

Architecture of Open Source Applications Not sure which are in C

Lion's Commentary on Unix pre-K&R C

Compiler Design in C some low-level stuff

C Interfaces and Implementations (amazon link)

I haven't read any of these, but they're highly recommended.

u/wrelam · 12 pointsr/C_Programming

C Interfaces and Implementations has some decent advice for designing C programs. This is also a skill which you 'll develop with time (e.g. over your entire career) so don't worry too much about figuring it out immediately; it requires experience. As you work on various projects you'll get a sense for what works and what doesn't so that over time you'll have developed strategies for solving particular types of problems.

OOP concepts are still valid even though C may not have ways to necessarily implement them within the language proper. Object-Oriented Software Construction is a fantastic book for learning OOP concepts. As your C experience grows, you'll begin to see ways of implementing some of those design strategies with C, even though it's not an OO language.

Knowing when to use what type of data structure can also aid in simplifying your code base. The standard book for this is CLRS, but for C specific implementations and advice, see Algorithms in C.

u/madsci · 5 pointsr/C_Programming

You absolutely should make it modular, it just takes some different techniques to do it. C Interfaces and Implementations covers that topic in some depth.