Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm currently in the process of modifying a C++ code that was written for UNIX system so that it works by compiling from Visual Studio. I had to change some built-in functions' names and I had to change the way dynamic arrays are defined.

My question is, can I say that I'm 'porting' this code from UNIX to Windows/Visual Studio or is 'porting' used only when changing from one programming language to another (porting from C++ to Java)?

share|improve this question
1  
Many years ago, I had to convert 16 bit OS/2 software to run on 32 bit OS/2. During the project, everyone referred to this activity as "porting to 32 bit". So it doesn't even have to mean moving to a different OS or even different hardware, just a different environment. –  Steven Burnap Jan 25 '13 at 18:54

3 Answers 3

up vote 12 down vote accepted

According to Wikipedia, and my own personal experience, the term "porting" refers to making software work for a platform for which it was not originally intended. This process sometimes requires a change in language, but not always.

The term is not generally applied to the process of adapting software to run with less memory on the same CPU and operating system, nor is it applied to the rewriting of source code in a different language (i.e. language conversion or translation).

When people say that Java programs are more "portable," they mean that it takes less additional work to make them compatible with a variety of different machines and operating systems.

share|improve this answer
7  
From what I've seen, when people say Java programs are more portable, it means they lack experience in porting Java programs, and simply rely on Sun/Oracle's sales pitches. In my experience, porting Java is actually a bit harder than average (largely because people have been encouraged to believe that portability is automatic/guaranteed and therefore unworthy of attention or work). –  Jerry Coffin Feb 1 '12 at 9:58
2  
@JerryCoffin: I haven't had much experience on that front. The Java programs I've worked with were all web applications that worked equally well on Linux, Windows, and Mac boxes. But I have heard stories from firms whose management pushed a Java conversion on them despite the developers' protests that they wouldn't achieve portability that way. –  StriplingWarrior Feb 1 '12 at 16:34
3  
@Jerry - not sure where your experience lies but pretty much every Java program I've ported has been trivial to port (this includes both GUIs and server-side apps over Mac/Win/Linux/Solaris). Sun and Oracle are correct to the extent that Java apps are easier to port than anything else - most don't even need a recompile (which would be necessary even for well written portable C/C++ which is probably 2nd best on portability). The most common issues I see are when developers have hardcoded platform-specific things like "/" as the directory separator, but these are pretty easy to fix.... –  mikera Feb 15 '12 at 1:59
    
@Jerry I programmed J2ME games for 5 years. When I was ending, we were doing 80 versions of a game - every platform has different performance, bugs etc etc. Solution? They didn't create standards for platforms, they created standartized testing for J2ME applications. Never again. –  Sulthan Jan 25 '13 at 13:43

One can port software between operating systems. One can port software between processor architectures. One may need to perform some of the activities I'd normally associate with "porting" when dealing with major platform changes (Apple's PPC -> x86 switch, or Windows XP -> Windows Vista/7/8). I wouldn't consider switching programming languages to be "porting." More like completely rewriting.

I've ported software from Linux to Windows and vice-versa. I've ported software from SPARC to x86 (I just love dealing with endian issues) And from 32-bit to 64-bit. These days I'm programming in Java... I'm not sure if the word "porting" has much meaning in Javaland, perhaps between major JVM versions....

share|improve this answer

Porting is becoming more and more popular in game development, as the publishers want to cover as many platforms as possible (PC, Xbox, Playstation, etc.). As mentioned, porting means converting the original program so that it works in a completely different system. Generally the game makers convert console games to PC.

share|improve this answer
    
More and more developers are relying on cross-platform development tools like Unity so that they don't have to port. Developing one codebase that runs on many platforms at the outset is not the same thing as "porting", which implies something was designed and run on one platform, and then modified to run on another. –  Steven Burnap Jan 25 '13 at 18:57
    
That sounds interesting! How does it affect performance and scalability? One concern would most likely be the fact that consoles are still quite a lot slower than most higher end PCs - how does Unity approach this without compromising maximum quality on faster systems? –  Juha Untinen Jan 26 '13 at 13:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.