Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Due to rather strange circumstances, I only have until Monday to learn (at least) the basics of PHP and .NET programming. I'm already fairly competent (though there is a lot of room for improvement) in C++ so I feel I have some of the concepts nailed already, but I need to get into the two languages in a bit more depth in a very short time frame.

Unfortunately I won't have time to get any books so will need to exclusively use online resources, I'm more of a 'do-er' so any way to test my skills in a practical way would be a huge bonus :-)

share|improve this question

closed as off-topic by durron597, MichaelT, Snowman, gnat, Kilian Foth May 4 '15 at 8:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking career or education advice are off topic on Programmers. They are only meaningful to the asker and do not generate lasting value for the broader programming community. Furthermore, in most cases, any answer is going to be a subjective opinion that may not take into account all the nuances of a (your) particular circumstance." – durron597, Community, Snowman, gnat, Kilian Foth
If this question can be reworded to fit the rules in the help center, please edit the question.

I smell a job interview. – Robert Harvey Nov 30 '12 at 18:53
Is there a quick and practical way to learn 2 other programming language in 3 days? No. Is there a quick and practical way to learn 1 other programming language in 3 days? No. You're hosed. And by learn, I'm sure we can all agree that the intention is to be "in any way proficient". – Steve Evers Nov 30 '12 at 19:04
Define "the basics" – Luiz Angelo Nov 30 '12 at 19:08
About all you can do is learn the syntax of the language. You will be unlikely to get any of the nuances or idioms that are common to the language. – Loki Astari Nov 30 '12 at 19:27
Ehm, how long did it take you to become "fairly competent" in C++? – Andy Nov 30 '12 at 20:02
up vote 11 down vote accepted

Well, the good news is that you already know how to program. The vast majority of that knowledge transferrs between languages.

Read the wiki articles on both. It would tell you the basic things you might be missing. Like how .NET isn't a language.

I won't have time to get any books

Yes you do. You have a full weekend. Stop everything else. Swing by a store. Buy two. Read like you mean it.

And this is the most important part: CODE SOME PHP (with .NET). Hit the tutorials, make some small projects, hit some walls, log some bugs, solve those bugs, and overcome your ignorance. Port some of your C++ programs into PHP. You've ALREADY solved how to do the problem, this is just translating. If you want to learn how to program in PHP, the best advice I can give you is to go program in PHP.

Will you "know" PHP by Monday? No, of course not. Who are you kidding? And don't lie to anyone by claiming otherwise. But you WILL have more knowledge then you had Friday. And you WILL have learned a lot.

share|improve this answer
Huge thanks for the response, as others have guessed I'm in a situation where depending on how Monday turns out, I may not even need the PHP/.NET books which is why I'm a little cautious about investing lots of money on books just yet, especially since I'm the sort of person who'd probably want to spend more than just a weekend working out which books I'd like to get - I'll use whatever free online resources I can find to try and get a taste for the languages, and hope that Monday gives me a reason to go crazy and really sink my teeth into them :D Thanks again! – Tamsin Nov 30 '12 at 19:44
I might really be misunderstanding this or just be out of date in my knowledge but "Code some php (with .NET)" How does one code PHP with .NET? – Jimmy Hoffa Nov 30 '12 at 21:05
Hell if I know, I'm a C-monkey. Perhaps they're using something like this? – Philip Nov 30 '12 at 22:39
@Tamsin good thing's that by having the books you can always have time to learn the languages, and they will help with other jobs. Good luck. – arin Dec 1 '12 at 16:47

Your only hope is downloading the SAMS Teach Yourself C# in 24 Hours and SAMS Teach Yourself PHP in 24 Hours e-books and reading about 1,200 pages in the next 60 or so hours. You'll have about 3 minutes to skim and understand each page, assuming you don't eat or sleep.

Seriously, this is an impossible task. You can learn language syntax that fast and even try out some simple examples, but PHP is complicated by the fact that nobody just writes bare PHP anymore, and .NET (typically in C#) is useless without understanding the gigantic library of standard classes. When I was a development manager, I usually figured a good-to-great Java programmer could pick up C# enough to be useful in about 4 weeks.

share|improve this answer
This could be great, thank you :) – Tamsin Dec 1 '12 at 17:02
Eating and sleeping is overrated. – Kenzo Dec 5 '12 at 21:06

It's hard to answer without knowing what the basics are.

In more of a C# guy, so this is oriented to C#, ok?

Not to rain on your parade, but there's a lot of stuff to know.

Are you talking about only the language? Or are talking about how to code agaisnt a DB? How about threading? Or the differente UI approaches - WPF vs WinForm?

Assuming you also asked about PHP, I assume C# as a part of a web app. In this case, is WebForms or MVC? If MVC, which one?


C# Fundamentals - Part 1

C# Fundamentals - Part 2

There's more on PluralSight and they have a free trial.

There's also Tekpub with some free content (ASP.Net and MVC if I'm not mistaken). And also LearnVisualStudio.Net - but LVS.Net will probably too basic for you.

For C#, I suggest you at least knowing the syntax and what the VS snippets do.

If I were you, I'try focus on how much you've learned on the given timeframe instead on the actual knowledge.

share|improve this answer

To good news is that many languages share the same conceptual background. This is particularily true if you look at procedural or object oriented languages - luckily, PHP and many of the .NET languages (C#, VBA) are examples of these groups. However, you will want to distinguish language (e.g. C#) and platform (e.g. .NET) - those are not the same. The platform is a collection of libraries (functions) that can typically be used from many languages. Knowing a platform at heart generally takes more time than to do the same for a language.

Having said this, and considering your original question, let me propose the following quick and practical approach to learning a new programming language is this:

  • Learn/read about the static structures of the language (e.g. data types, functions, procedures, classes, interfaces etc.).

  • Look at the control constructs (if/then, case/switch, while/until etc.)

  • Familiarize yourself with the typical style of how the language is expressed (by browsing through tutorials or actual code).

  • Try to map each of the constructs to the language(s) you know already. This will give you a pretty good grasp on where you should focus, e.g. concepts that are particular to the new language you are trying to learn.

Most important, however, is the next step:

  • Try to solve a problem in the new language. This can be any problem of your choice that you know the solution to from a conceptual point of view - e.g. implement an algorithm, build a web application, write a web service etc. The imporant part here is to learn to actually use the language and its associated tools and run-time environments.

Keep in mind that all of this merely will get you started, and does not replace actual experience. It is through experience that you will learn how to best make use of a programming language's feature, which of course takes more time...

share|improve this answer
Thank you, this is great advice :) – Tamsin Dec 1 '12 at 17:02
"Try to solve a problem in the new language." Yup. Try to build something in the new language, even if it's simple. – Kenzo Dec 5 '12 at 21:08

I think reading computer books page by page is mostly a waste of time. Most specific technology books I have seen, if not all, are stuffed with fluff and unnecessary fat to make it sell at a higher price as there is a corellation between the price and number of pages (IMO, the relationship should be reverse to encourage brevity).

My advice to you is to find a nice online hands-on tutorial, which I am sure are plentiful for PHP, kick back and learn the basics while building a pilot app, not read theory. What I do find to currently be lacking online (or perhaps an opportunity from a different perspective) is an online tutorial boutique, where you can choose from many options and technologies. And where users could create and publish their own tutorials. I think that would be pretty cool but I don't know of any existing ones.

But if you are good with other languages, I am sure the learning curve will be gentle for you. Best of luck.

share|improve this answer
I am going to have to go ahead and disagree. If a computer book is stuffed with fluff, you should not bother reading it at all. If it is a good book, it is worth reading cover to cover. Examples are Scot Meyers' books on C++, and Robert C. Martin's "Clean Code". – Dima Nov 30 '12 at 20:59
always there are exceptions – amphibient Nov 30 '12 at 21:14
There are simply many more bad books than there are good ones. – Dima Nov 30 '12 at 23:31
I've seen plenty of good books on advanced/in-depth topics, and there's plenty on how to learn language X from scratch. What seems hard to find are good books/resources for someone proficient in language X to learn language Y quickly. I've found it best to just dive in and start doing building and fixing things. – Mason Dec 1 '12 at 21:38

I suggest the project learning method. Find a small project that you know you can do (Do create a simple blog system, don't create an in-depth framework, etc):

  • Create the basics.
  • Add something new to the project scope that you don't know how to do.
  • Learn and implement it.
  • Repeat.
share|improve this answer
This could be a good idea, today I've been reading up as much as possible so tomorrow could be the day to do something a little more productive – Tamsin Dec 1 '12 at 17:03
Reading's great, but I've found that it's not everything. You can't learn to program by reading about programming any more than you can learn how to drive a car by reading the owner's manual. – SomeKittens Dec 1 '12 at 19:19

Frankly, if you know C++ then you know C, and so you practically know PHP. You need to learn the very basics of the language that are different - like scoping and types, and you need to know the environment PHP runs in - like POST variables, and you need to know libraries - like regex and soap.

You should also need to know how to get it going, so install xampp and write some code to do hello world at the very least.

You don't need books for all this - has most of it ready for you as reference material. The rest can be learned from any site that google returns from "PHP tutorial"

Edit: The OP's question isn't "how do I become proficient in PHP", its "how do I learn just enough to blag my way to a job"... PHP syntax is a lot like C, no-one can deny that. He doesn't need to know OO techniques or MVC frameworks or anything like that - just the absolute basics, and those are procedural, just like C (not that I meant that, I meant the syntax is like C)

share|improve this answer
Here's some things to look out for as far as PHP: learn the differences between PHP's OOP model and that of C++; learn about associative arrays and their quirks; PHP isn't typed as such, but types can be inferred. – Ian Atkin Nov 30 '12 at 22:12
Really, this answer is so wrong. PHP is not just procedural code like C. Besides, modern C++ is very different from C. – Florian Margaine Dec 1 '12 at 0:33

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