Thread: Ruby Question and Unity Test Framework feedback wanted.

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    4,183

    Ruby Question and Unity Test Framework feedback wanted.

    I have decide that I need to learn a Unit Testing Framework.

    I have decided to try Unity; it is mentioned in Unit Testing in C: Tools and Conventions | Dr Dobb's

    Unity site is Throw The Switch! - White Papers - Unity Intro

    I party decided on Unity because it uses just "C" with no "C++" in the Unit Testing Framework; also, because it uses Ruby to do higher level work.

    I have decided learning OOP using C++ has not really worked well for me. So, I wonder if Ruby is considered a good language to learn OOP?

    I would also like any positive or negative feedback on using Unity Test Framework.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    I have decided learning OOP using C++ has not really worked well for me. So, I wonder if Ruby is considered a good language to learn OOP?
    I hope I don't sound like a jerk, but what would make a good language to learn OOP, for you? Ruby has some syntax differences, but it is still OOP, so OOP itself might be what's really confusing.

  3. #3
    11DE784A SirPrattlepod's Avatar
    Join Date
    Aug 2013
    Posts
    485
    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning.

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by whiteflags View Post
    I hope I don't sound like a jerk, but what would make a good language to learn OOP, for you? Ruby has some syntax differences, but it is still OOP, so OOP itself might be what's really confusing.
    Thinking in OOP terms is the problem; I am hoping the cause is C++ is so much like C that it is causing me to still think like I do in C.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  5. #5
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by stahta01 View Post
    C++ is so much like C that it is causing me to still think like I do in C.
    this is likely the root of your problem. it took me a long time to go from a purely procedural mindset to include object oriented programming, so I can relate to what you're going through.

    the ideal goal for a programmer should not be to think in terms of only procedural, or only object oriented, or only functional programming, for a particular program, but rather to critically think about the problem you're trying to solve, and decide how aspects of each paradigm apply to your particular problem, and use some of each to address the various components of the program you're trying to write. with few exceptions, no problem is best solved by a single paradigm. this is what makes C++ so powerful. it embraces all programming paradigms, and allows you to mix them in a single program.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  6. #6
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by stahta01 View Post
    causing me to still think like I do in C.
    And why you are not thinking OOP when in C?
    Language should not determine how you thinking.

    Language determines how you implement what you have decided to do during your "thinking phase"
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  7. #7
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Thinking in OOP terms is the problem; I am hoping the cause is C++ is so much like C that it is causing me to still think like I do in C.
    O_o

    Well, thinking in "OOP" may be a part of your problem, but that, in my opinion, is not the root of your problem.

    It seems to me that your problem with C++ is that you delved too deeply into C++ before you really built a foundation of solving problems the C++ way.

    In so doing, I believe you found yourself overwhelmed with the C++ way and simply defaulted to the C way simply because you understood that approach.

    If you repeat this fault, trying to move too quickly, you will have the same problem with Ruby or any other language: you will not have given yourself enough time to learn how express your thoughts well with such other languages so find yourself sticking with the C way.

    I don't intend to offend at all. I hope you know this, but I've seen this before, and have also used you as an example for others.

    I'd really recommend Python instead, but feel free to give Ruby a try.

    In any event, if your willing to give C++ another go, step back all the way from what you know as a programmer. Start learning C++ as if you knew nothing about programming in general. Do all those crappy, simplistic, boring examples you could do using C with your eyes closed. Build a new foundation with C++ way with that approach and you'll be swimming.

    Language determines how you implement what you have decided to do during your "thinking phase"
    On the other hand, languages determines how you implement what you have decided to do during your "thinking phase".

    Nope. I'm not making a silly joke. My point is, your thoughts about implementing solutions are necessarily bent by your experiences.

    You may feel free to deny this all you like, but at the end of the day, it is a simple fact: our thought processes as programmers are shaped by the tools we use.

    [Edit]
    I'm not looking for an argument about "OOP" in C. I'm not interested. Yes, you can do "OOP" in C. You can do "OOP" in assembler, Javascript, and common LISP, but that doesn't make "OOP" constructs the right tool for the job in those languages.
    [/Edit]

    stahta01 has very likely avoid many aspects of "OOP" in C for the same reasons a C programmer generally avoids function constructs: the native support is atrocious so other techniques are often far more appropriate to the solution.

    If stahta01 is extremely familiar with C constructs, as I feel comfortable assuming, his experience surely shapes his approach to solving problems with C++ thanks to the, false, familiarity.

    Besides, a C approach to "OOP" constructs is generally flawed C++ out of the gate.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  8. #8
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Speaking of -- kinda off topic -- you have no idea how many times I read your name as shasta.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. UDK and Unity
    By DavidP in forum Game Programming
    Replies: 10
    Last Post: 11-06-2009, 09:23 AM
  2. Feedback wanted - DispHelper
    By anonytmouse in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-31-2003, 09:30 AM
  3. Ruby
    By MethodMan in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-11-2002, 04:51 PM
  4. unity (further);
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 02-26-2002, 03:16 PM
  5. New feedback/help chat test
    By Betazep in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 12-09-2001, 11:27 PM