Thread: I want to convert this C program to C#

  1. #16
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    It tends to produce code that is similar in quality to written text, translated to Chinese and then back to English.

    ...

    For the record, this post translated into Chinese then back to English twice becomes:
    Clever analogy. It reminds me of the computationally-outdated "invisible idiot" anecdote.

    The book recounts a story, probably fictional, about the lack of accuracy in text translation programs. A deputation that included an American Senator was proudly led to a demonstration of a translation program. The Senator suggested a phrase to be translated, "Out of sight, out of mind". The machine printed Chinese characters and these were then entered into the machine to be translated back to English. The visitors were all astonished when the machine printed the phrase "invisible idiot" on the paper. The computer had literally translated the separate expressions "out of sight" and "out of mind". The anecdote and the phrase "invisible idiot" have entered popular culture.

  2. #17
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    I am going to have to find the floppy disk hold the assignment in college where I line by line converted a Ada linked list into a C link list.
    I need to see how badly I did the job. All I can remember was over using macros to do something I thought was smart at the time.
    (Wow, that was 15 years ago.)

    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

  3. #18
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    Quote Originally Posted by stahta01 View Post
    I am going to have to find the floppy disk hold the assignment in college where I line by line converted a Ada linked list into a C link list.
    I need to see how badly I did the job. All I can remember was over using macros to do something I thought was smart at the time.
    (Wow, that was 15 years ago.)

    Tim S.
    The only project I've ever done that was a successful line-by-line (or nearly so) conversion was kind of embarrassing - I ported over some very math-heavy code with minimal edits to do a discrete wavelet transform, because I was too lazy to learn the math involved.

    I say embarrassing because in college I actually did research involving the discrete wavelet transform, and only a few years later I was reduced to converting someone else's code because I no longer understood the math and didn't really want to relearn it all.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  4. #19
    Registered User
    Join Date
    Jan 2010
    Posts
    208
    Yeah, I won't try and translate any more c programs I just finished my last one today I have this book that has programming exercises in it. I did 6 chapters in c now I'm on chapter 7 and can start fresh in the c# language

  5. #20
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    I did 6 chapters in c now I'm on chapter 7 and can start fresh in the c# language
    O_o

    That is an absurd progression; what book does this?

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

  6. #21
    Registered User
    Join Date
    Jan 2010
    Posts
    208
    Sorry for the confusion The book is called c for business programmers and I started out doing the programs in c the reason I switch to c# is because I am trying to prepare myself for programming 2 class the book solves general problems in c and I can do the same thing in c# I'm really not trying to learn c to much it just started that way Probably not a good idea to mix both languages the problems in the book are pretty general so I could in theory use any language

  7. #22
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    I see; that is a different thing.

    Well, changing gears because you know you'll need C# is a fine reason.

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

  8. #23
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by Cat View Post
    For the record, this post translated into Chinese then back to English twice becomes:
    That's automated translation. It would be sort of equivalent of getting a french C programmer to convert some C++ code with english comments to C#, and then get a polish C programmer to translate that C# code back to C++. Twice.

    Even with very talented programmers doing the jobs, there's a fair chance the final C++ code will only have superficial resemblance to the original, and that it will not produce the same results.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Convert gsoap PHP program to C
    By straygrey in forum C Programming
    Replies: 20
    Last Post: 10-31-2013, 08:33 AM
  2. Replies: 1
    Last Post: 03-16-2010, 10:17 AM
  3. Convert c++ program to c
    By tnt666 in forum C Programming
    Replies: 7
    Last Post: 12-01-2008, 09:23 AM
  4. Convert a C++ program?
    By unregistered in forum C Programming
    Replies: 4
    Last Post: 05-22-2002, 02:44 AM
  5. Can anybody convert this program.
    By andy bee in forum C Programming
    Replies: 3
    Last Post: 08-28-2001, 05:07 PM