Thread: Request for code review

  1. #1
    Registered User
    Join Date
    Feb 2017
    Posts
    2

    Request for code review

    Ladies and Gents,

    I need help, and I mean help in a big way.

    I've been working on my personal open source project for the past three years, and I've literally been going at it, alone.

    In summary, it's a library that provides a framework for C++ programs, that facilitates much of what my employers needed over the span of my career.

    Things like thread safe, persisted queues, logging, Nagios and Cacti considerations, standardised configurations, inter process communication, etc, etc.

    The library makes heavy use of boost, IPC is done with boost::asio for instance.

    It is in use by my current employer, their entire C++ code base is developed from it. For all intent and purpose, the library is functionally complete, tested and stable.

    But as I've said, I've been doing this solo, and having been the only C++ developer in our offices, for at least the past 2 years, I'm more than convinced there are quite a few improvements that can be made.

    I know you are all busy with life the universe and everything, but I really need the assistance of a few, to take a look at where I'm going with this, glance at the code, and tell me where they might have followed a different approach or have a better solution for the problem at hand.

    You can find the code, and a bit of documentation on github:

    GitHub - TheLastCylon/kisscpp: a C++ library for rapid application development

    Fell free to contact me should you be willing and interested. Any assistance in this, would be greatly appreciated.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,421
    My first suggestion is get a free scan from Coverity Scan - Static Analysis
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Not gonna lie, it sounds like you're so far past the point of code review that anything we say won't matter.

    I'm incredibly scared to ask but do you have a test suite for your code? If you don't, I wouldn't even consider refactoring without having a solid test suite to back up your code because you'll never be able to manage a refactor breaking anything successfully.

  4. #4
    Registered User
    Join Date
    Feb 2017
    Posts
    2
    Noted, test suite required. I'll be making that a priority then.

    However, the code is nowhere near needing refactoring. What I do need, is a pair of eyes that are not mine, telling me where I'm smoking my own socks, and should have done something different/better.

  5. #5
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    There's no point in us giving you feedback if you can't ensure that a refactor won't break your codebase.

    We could take a look and give you a lot of constructive criticism and stuff like that but if you made any changes, you're opening up the potential for untold catastrophe in a random corner case in a random part of your codebase.

    Catch is a good header-only lib if you don't need mocking. GTest is pretty great and has GMock for mocking out things as well. I'm sure there's other frameworks but those are the two I'm aware of.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. code review please :)
    By happyclown in forum C Programming
    Replies: 5
    Last Post: 02-23-2009, 11:59 PM
  2. C Code Review
    By trillianjedi in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 06-18-2008, 12:29 PM
  3. code review request: stack implementation
    By cs32 in forum C Programming
    Replies: 6
    Last Post: 02-24-2008, 02:26 PM
  4. Request for peer review
    By ruthgrin in forum C++ Programming
    Replies: 13
    Last Post: 01-26-2006, 10:03 PM
  5. Code review please
    By Brighteyes in forum C Programming
    Replies: 9
    Last Post: 03-29-2003, 06:28 PM

Tags for this Thread