Ask Slashdot: How Often Do You Switch Programming Languages?
An anonymous Slashdot reader writes:
I always see a lot of different opinions about programming languages, but how much choice do you really get to have over which language to use? If you want to develop for Android, then you're probably using Java...and if you're developing for iOS, then you've probably been using Swift or Objective-C. Even when looking for a job, all your most recent job experience is usually tied up in whatever language your current employer insisted on using. (Unless people are routinely getting hired to work on projects in an entirely different language than the one that they're using now...)
Maybe the question I really want to ask is how often do you really get to choose your programming languages... Does it happen when you're swayed by the available development environment or intrigued by the community's stellar reputation, or that buzz of excitement that keeps building up around one particular language? Or are programming languages just something that you eventually just fall into by default?
Leave your answers in the comments. How often do you switch programming languages?
Maybe the question I really want to ask is how often do you really get to choose your programming languages... Does it happen when you're swayed by the available development environment or intrigued by the community's stellar reputation, or that buzz of excitement that keeps building up around one particular language? Or are programming languages just something that you eventually just fall into by default?
Leave your answers in the comments. How often do you switch programming languages?
But then, I only fry firmware-burgers, so 'C' and assembler are it...unless you wanna count all the assembler flavors, then it would be 2 or 3 times a day...
(T)he (O)ld (M)an
Small embedded ARM processors: C
Mid-sized embedded Linux: C++
Bloaty multi-core GUI with printer drivers, etc. running on Windows: C#
Cloudy web servery type stuff: Javascript
And, all of these can be found in a single shipping product. Go Team Silo Go! Hope it sticks when you toss it over the wall!
Comment removed based on user account deletion
One thing I do not miss (besides being woken up by the pager) is having my knowledge obsoleted and being forced to learn new things. Oh, but you're supposed to never stop learning, stay young, blah blah blah. Bullshit, that's a bunch of pro-corporate propaganda. Now, I learn something...it sticks. 5 years later, I still know the thing. In fact, after 5 years I'm probably quite good at it. I will stay quite good at it until it changes (slowly or not at all) or I die. Sure, new laws and regulations come along every so often and they must be mastered, but it is nothing like IT. I like this way much better than becoming an expert and then having to start all over at square 1.
Shutting down free speech with violence isn't fighting fascism. It IS fascism!
I have switched computer languages many times. Some times for good, some times just for a project, but often I find a "better" language, only to find that it has many dead ends or other problems. My present primary language is actually two: Python and C++. With these two there isn't much I can't do. Where one is weak the other is strong.
.net is solidly in the trash, perl is solidly in my past, and very happily Objective-C is in the dumpster and I set it on fire.
That said, there are some situations where another language is called for. Javascript is pretty much the defacto browser language. Thus I would never try Python or C++ in the browser as that would just be horrible. But I don't really see Javascript as a great a language outside the browser as some people claim. Then there are scripting languages. I use Lua where I give users the ability to extend my programs through scripts because Lua is wonderfully tied into C++ through some awesome language extensions, they are tight and small. So would I say that I switch programming language when I jump to Lua or Javascript?
That all said, some languages are pretty much dead to me. Java is solidly in the trash,
I think that an interesting question would be more, "What language(s) do you presently use, what languages are your last 5 years of code largely in, and what languages are presently on your list of languages you are interested in exploring?"
Grandpa, Mom says you need to get off the computer.
You should almost never have the mentality of "I don't use such-and-such-a-language", whether it's because you don't like semicolons, hate whitespace requirements, or some other bullshit reason (come at me, I know you're out there :P). That doesn't mean you can't prefer one or the other, or even gripe about it to your co-workers; just don't let it get in your way.
If you've done enough programming and know at least 1-2 languages fluently, you should be able to pick up another very quickly (less than a week). Often, at a particular company or on a particular project, you don't get a choice. If you do, the requirements of the project will force you to choose between 2 or 3. If you happen to be in a situation where you have absolute control and get the final say on what language to use, then you should choose the one that is best for the job.
But when I say "best for the job", I don't necessarily mean in some theoretical, push-your-glasses-up-your-nose sense. I mean what will allow you to do the best you can to achieve the requirements of the task at hand. If the task at hand is to teach yourself something, choose a language you're less familiar with. If it's to meet the requirements of a client in a reasonable amount of time, choose a language you are more familiar with. If the application is computation heavy and speed is a requirement, choose a more efficient language. If you are not the sole developer, choose a language that your co-workers would be more comfortable with using.
Often (read: always), more than one of these factors will be relevant. It's up to you, individually or as part of a team, to weigh them and determine the best choice. That is what it means to be an expert.
Simply put, you should switch languages whenever you deem it necessary to do so. To know when it's necessary, you have to expose yourself to a lot of different languages.
Only crack the nuts that crack. You don't put the ones that don't crack in the sack.
Unless you have been programming for about 300 years, there is zero chance you have achieved fluency in more than 2 or 3 of these programming languages. Being able to print "Hello world," does not count as fluency, any more than being able to say, "Hello, my name is Robert," counts as fluency in a human language.
Once you get past the first 6 or so, assuming you chose them carefully, the similarities are apparent. But if it helps, merely being able to write a nontrivial program in a given language doesn't mean that you can call yourself a "X programmer".
Consider what it means to be a Java programmer. I know Java, the language, extremely well. Well enough to write a conforming Java 1.7 to bytecode compiler, I would think. Now here's what I don't know: JSF, Spring, Swing, Maven, Ant, Struts, Android SDK, Eclipse RCP, etc. It's knowing a decent amount of that stuff that which lets you call yourself a "Java programmer" in good conscience. I can write programs in Java, but I'm not a Java programmer.
sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
I dont switch. I start to use programming languages when is see it fit and stop to use them when I see it fit. It is not a 'Everything in one language' thing. Depending on the project, languages switch positions.
1987-1990: Basic
1988-today: Assembler
1989-1993: Pascal
1990-today: C/C++
1995-2010: perl
1996-today: octave/matlab
1999-2005: Autolisp
2000-today: Java
2002-today: Python
1995-today: bash
2007-2011: tcl/tk
For small programs, compiling C++ at -O0 takes under a second and the result runs faster than any interpreted language.
I am TheRaven on Soylent News
The first is the implementation of the language. You start with Smalltalk, take out the bits of Smalltalk that are difficult to compile, and then end up with an implementation of a language that is slower than something like Squeak / Pharo, which are simple bytecode interpreters. That doesn't fill anyone with confidence in the language. I can understand Ruby not being faster than a JIT-compiled Smalltalk, but there's no excuse for it not having been faster than a reasonable Smalltalk bytecode interpreter from day one.
Then there's the community. The Ruby community spent a good decade taking 30-year-old ideas and claiming that Ruby had made them possible, that Ruby developers had invented them, and this is why Ruby is so awesome. Rails is a good example of this. ORMs have existed since the '80s. WebObjects was arguably[1] the first ever web app development framework and it included EOF, which did the same thing as Rails in Objective-C (later in Java) and has had an open source reimplementation since the late '90s (GNUstepWeb, later SOPE, the latter of which is used by [Scalable] OpenGroupware.org). Oh, and WebObjects had much better developer tools than Rails, supported multithreading long before Ruby was able to run multithreaded, and was an order of magnitude or so faster.
[1] There's some disagreement, related to announcement / beta / shipping dates, but it's either the first or second.
I am TheRaven on Soylent News
C/C++ is good for canned software meant for wide deployment where you have fine tweaking of the performance so it can run fast on a big set of software. However scripting languages are good for those internal jobs that need to be fast enough but programmed quickly without all the rigor, so you have a useful app running quickly.
Most of my programs I make are server side and I rely on scripting languages to do much of the grunt work because they can do it without the fuss of C.
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
I get where you're coming from. Being a programmer in "X" is more about knowing the tools and available libraries than it is about knowing the language itself. Somebody who works with C# could probably be very productive un VB.Net within a day or two, even though the languages appear quite different. On the other hand, C# and Java look quite similar in their syntax, but generally don't have much in common in terms of actually working with them. It might take a month or more to get reasonably productive it you switched from C# to Java.
Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
So you are the one that writes all those scripts in the task scheduler with no error handling or logging that fail all the time and make my life a living hell.