views:

449

answers:

8

I am a (self-proclaimed) PHP guru, but Stackoverflow pointed out some serious flaws in PHP.

I also know the syntax of C++, C#, Obj-C, java, bash and ruby. But going from building a "Hello world" to building a real-world application isn't trivial.

Any suggestions to spend more time on languageX (professionally/paid) while phasing out the amount of time I spend in PHP?

PS: I really like a working for a single employer (not myself) from a fixed location.

+1  A: 

Everything seems to be turning more towards object oriented programming and more and more towards managed languages. Go with C# and Java but moreover Java since it is system independent.

Suroot
I'm not fond of Java. But do prefer a linux desktop. Windows will do fine, it just needs stronger hardware. Tnx for the "system independent" aspect
Bob Fanger
Mono is quite a viable .NET option for some apps on some non-Windows platforms.
MichaelGG
And there is a C# version available for *nix. Java seems to be one of the top managed languages. Was merely sticking with known languages in this instance. Good call on Mono though.
Suroot
+14  A: 

I don't know that I'd say there are serious flaws with PHP. Someone should tell this to facebook.. Like any tool -- there's a right tool for the job, and PHP can often fit that mold. But I digress.

I was a PHP & Java programmer who moved over to C# (almost exclusively, now) and very much enjoy it.

I wouldn't recommend taking only paid projects to learn a language. Lots of bad things can happen there.

Start by porting some of your small PHP projects over and see how that works for you.

Good luck!

Ian

Ian P
I don't know that I'd say there are any serious flaws with writing on parchment. Someone should tell this to the major religions..
MichaelGG
+1 for porting as well
SnOrfus
"There's a right tool for the job"... absolutely. I use JavaScript for frontend development in web apps, C# or VB for quick desktop app development, C++ for 3D game development, etc... I don't stick to one language. I've learned to learn the language that's right for the application. I am not a guru of any of the languages I know, but.. I know (or will learn if needed) enough of the language to get the job done.
+2  A: 

Working on a opensource project will help you on a given language. I would sugges looking for a intersting opensource project for you, one with some activity, and start helping on features/bugs

webclimber
Just what every open source project needs: more "Hello world" coders. :)
cletus
+3  A: 

I thought that the programming language concepts class I took in college really expanded my thought process when it comes to programming. We studied a number of different languages and programmed in all of them. It's amazing the perspective you gain when you study vastly different languages.

For instance, we studied Perl, C w/ Flex/Bison, Scheme, Forth and Prolog. Those are pretty diverse languages. While we weren't able to get into too much detail with any of them, we solved similar problems in each. I feel that this was one of the best classes I have taken in my CS program.

The book we used: http://www.cs.rochester.edu/~scott/pragmatics/

I guess what I am saying is that once you study how programming languages work, you understand things a bit better that you can concentrate your thought process on solving the problem.

TURBOxSPOOL
+9  A: 

It depends why you want to learn a new language.

  • If you are curious about languages and want to understand their underlying principles, you ought to pick a language that's radically different from PHP, like Standard ML or Prolog. That will give you a wider range and a deeper understanding of why language X does certain tasks better than language Y, and when to use which.

  • If you want to learn a new language simply in order to make more money, you'll want to learn the languages and frameworks used in enterprise applications. But I must warn you: the path of greed leads to ASP.NET. ASP.NET leads to Windows. And Windows leads to suffering.

  • If you are mainly concerned with the shortcomings of PHP mentioned in this question, you should know that:

    1. Not everyone agrees that PHP is so terrible, in fact lots of high-performing web applications use PHP with great success
    2. If you haven't noticed those issues yourself yet, then you will not benefit much from using a language that addresses them
    3. Most people who whine about language X being imperfect, are merely fanboys trying to evangelize their own favourite language Y. Others are academics who actually raise valid points, but don't realize that most of those points sadly mean very little in most real-world production environments. If you can tell the fanboys from the brainiacs and understand which of their arguments matter to you, then you can make a decision. If not, disregard and go with whatever language you're most comfortable with.
Jens Roland
echo $Object; became a catchable exception/error.
Bob Fanger
$x = NULL; isset($x) became false. Several "segmentation fault" instead of an E_ERROR. ("false" == 0) is true, but ("false" == false) is false.
Bob Fanger
But I'm still enjoy PHP, I'm not converting, I'm want to add a language to my arsenal.
Bob Fanger
Excellent answer. Speaking of radically different languages, javascript is a useful one. It can be used on the server and its cousin actionscript can be used for flash or desktop applications using AIR.
rick
@rick: Yes, Javascript can work on the server using Aptana's Jaxer or similar, but personally, I'm a little scared of that -- it seems too much like black magic to me
Jens Roland
Totally agree to your 3rd point in your 3rd point :D... never go by what others say (unless you're sure that they know what they are talking about).. Mediocre programmers make stupid claims about a language - either because they favor another language or they've had a hard time with it.
+1  A: 

Write something fun.

For example I'm in the opposite situation ( well, I'm no C# guru ) and getting back into php. For a first project I'm building an application to store the different types of fireballs stored in street fighter games. :D

Keeps you motivated and you can kind of explore the programming space a little more than you would if you implemented a boring blog system or shopping cart.

jfar
I think coding blog systems are fun :-) although now I'm thinking my blog system needs more types of fireballs.
Jens Roland
A: 

Find out what pays in your areas of the country, or the area of the country you wish to go to. There is no use wasting your time on COBOL, for example, if there aren't any jobs (this would be most of the country).

In some areas of the country, PHP is very prominent and I would not go away from it. In other areas, like Nashville (where I am), Microsoft technologies rule. It would be unwise to invest in PHP here, unless you have an ulterior motive (Bill Gates Sucks?). in fact, for here, I would invest in WPF and SharePoint for highest rates. Your mileages may, and probably will, vary.

Gregory A Beamer
+1  A: 

One way I've found that really helps to learn another programming language is the same approach I've taken to learning spoken languages - use them. That may sound like some 'no duh!' advice so let me explain.

Simply reading tutorials and writing little 'hello world' types of apps, or writing a little blog that runs on your local machine is all well and fine. But in all seriousness, if that's all you do and you take a one week break, how much of it will you remember? If you're like me and many programmers I know, very little. While those may be great getting started tools the only way to really make it stick is to write applications you'll actually use. Even if you're just rewriting something you already have or use (my first real C# application was a video player that used Windows Media Player) and use your application in place of the existing one.

If you're talking about a web language then start up a new site for something small and do the same thing. You don't have to be trying to recreate Facebook in .net or Flickr in Java, just something simple that can grow.

Just remember to go slow and plan ahead so you don't just dive in head first. Know what the first features are and go from there. Tutorials and guides are great for getting started but depending 100% on them won't help you truly learn the new language. At least not most of the time, but some people are good with memorization so it may work for you.

Steven Surowiec