• 0

Which language would you chose between C# and PHP


Question

I'm interested in changing career paths from computer repair and troubleshooting to programming. The two languages I'm looking at are C# and PHP. I understand the two are apples and oranges in comparison because they are for two entirely different things. However, I would like to learn a language that is in high demand and could give me a good level of job security. So based on your knowledge and experience, which of these two would you think could provide that? I appreciate any feed back you can provide.

Thanks! :D

Recommended Posts

  • 0

Been coding websites in PHP for about a year and a half. For a new company I set up I decided to use ASP (C#), because the website will have to manage larges about of data crunching (game stats and the like). And I have to say, the entire development experience has been better. The debugging, the designing, the structuring.. I built a site in 2 days that would of taken be a week in PHP.

  • 0

PHP is an odd duck, but it's still (usually) the P part of LAMP, so there are plenty of jobs out there for it. If you're going to start with a project that is already written in a language, I'd learn Python + Django instead of PHP if web development strikes your fancy. Python is extremely easy to learn, and outside of it's sometimes annoying whitespacing, is usually the most logical for a learner.

  • 0

Aeikus, you shouldn't pigeonhole yourself into just one language. It's OK to concentrate on one language while learning to see examples of programming concepts and to do some hands on learning, but you want to learn the fundamentals that will be language agnostic. I've covered this on my blog.

  • 0

...

that guy who wrote the article knows nothing and he then gave loads of arguments which he tried to justify why PHP is not needed or is used and It was just a load of hog

The article raises a ton of good points and provides a bunch of examples, I don't see how you can just reject them out of hand.

	function foo(string $s) {}

	foo("hello world");

Why should that cause a fatal error for example? And such a nonsensical error at that.

Catchable fatal error: Argument 1 passed to foo() must be an instance of string, string given, called in ? on line 3 and defined in ? on line 2
  • 0

Neither, all of them or any of them.

You said you are coming from a computer repair background and want to learn a programming language.

Without further info I assume you are just beggining so just pick one and learn the fundamentals first.

So you better start hacking. Programming is more like an art and there are millions ways to solve a problem some solutions better/elegant/etc than others and the only way to get there is to program and keep progamming, make lots mistakes and learn from them.

I would start with procedural programing to get the basic stuff first and then move to object oriented programming. The core concepts are the same for all common programming languages.

Many programming languages do better in specific fields than others such as web, desktop, mobile, scripiting, etc. There is no jack for all trades in my opinion.

Don't get confused when comparing programming languages and frameworks, django, ruby on rails, .net, etc are all frameworks so these frameworks should be compared to Zend, Codeigniter and other PHP frameworks.

I wouldn't recommend to start learning a language using a framework since frameworks usually have a certain pattern to follow and need to follow a certain way to do things which imho should be avoided when first learning a programming language.

To give you an example at school on my first year we started learning the basic stuff on Pascal which you can consider now a dead language but the basic principles have remain over the years and will probably not change anytime soon.

Now my personal preferences:

For web development I choose PHP for many other things which are not related to the language itself, such as documentation, code examples, big community, it's free, works on every platform, lots of tested code out there (lots of bad code as well :-)

On Linux enviroments for quick scripting I prefer python over perl.

For other type of work C# and Java are really popular, Java more than C# specially on big projects that I've been involved to. Java also has the android as a platform which is a big plus for the language.

Don't forget Objective-C for Apple devices lots of opportunities there especially since the mobile/tablet market is growing expentionally every year.

Anyway I envy you nothing is so exciting like learning a new thing from the first time especially programming and remember start coding from day zero. Don't waste time reading entire books before starting, you will only get better and better by coding.

One last thing If you know friends that are also into programming try to do things togheter. It is the most fun thing to do and you will learn a lot that from each other. Plus usually when you do programming for a living it involves working with other people which takes progamming to a different level since it is not just you reading and working on your code.

Cheers.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Are you going to do performance benchmarks comparing all states? I'd be interested in seeing that in the next "part".
    • My father still uses a programme written in dbase3. Still manages to work with a little help from dosbox. 
    • Microsoft hides these secret Windows 11 performance boost settings available on every PC by Sayan Sen Windows enthusiasts often look for ways to extract as much performance out of their systems as possible, and it's often the case that they try and do so while trying to minimize the heat and power consumption. This is especially relevant in the case of mobile Windows PCs since laptops and notebooks tend to get hot and management of that heat and power is harder in such a form factor. As such users often turn to techniques like under-volting which can be used to squeeze out the maximum capabilities of a chip while also maintaining lowered power levels. There are official apps from AMD and Intel with the likes of Ryzen Master and XTU (Extreme Tuning Utility). While these are quite handy, most enthusiasts probably prefer to dig into the BIOS and play around with settings there like Curve Optimizer on Ryzen, which lets users set various frequency-voltage scaling values. These are essentially called P-States. If you are not familiar with them, Processor Power Management is done through Advanced Configuration and Power Interface (ACPI) P-states and C-states. While P-states or performance pwoer states handle CPU voltage-frequency scaling, C-states deal with CPU sleep states so that some of the CPU functions, which are not necessary at that moment, can be disabled. The P-states and C-states work together to make the processor run more efficiently. It helps the OS and apps determine which cores can be parked and which should be boosted. Of course not every user is an enthusiast or knows the technicalities and integrities of how things like overclocking or undervolting work. Thankfully for them Windows itself offers something pretty cool, though it is hidden by default on all systems. By default, Windows only has two P-States, "Minimum Processor State" and "Maximum Processor State." However, this can be changed with a Registry trick to expand the options under a secret "Processor performance boost mode" dropdown. This essentially enables the HWP or hardware P-States available on a device, and these are not controlled just by the OS itself as the underlying hardware gets involved too. In total there are five Processor Performance Boost Mode profiles that control how Windows requests and allows CPU turbo/boost behavior under the different power policies. They are: Disabled: In this mode, processor boosting is effectively turned off. The CPU will avoid entering turbo or boost frequencies and instead operate closer to its base frequency ceiling. This can significantly reduce power consumption and heat output, but at the cost of reduced burst performance and responsiveness in short workloads. Enabled: This is the standard behavior where boost functionality is allowed under normal conditions. The processor can opportunistically increase frequency when workload demands it, balancing performance gains with power and thermal constraints as managed by the system. Aggressive: Aggressive mode favors performance more heavily, allowing the CPU to enter higher boost states more readily and sustain them longer. This should in theory improve responsiveness under bursty or heavy workloads but increases power draw and thermal output compared to the default enabled behavior. Efficient Enabled: This mode still allows boosting, but with a stronger bias toward energy efficiency. The system attempts to use boost more selectively, avoiding unnecessary frequency spikes when the performance gain is marginal. Efficient Aggressive: This is a hybrid approach where boost is still performance-responsive, but the system continuously weighs efficiency more heavily than in Aggressive mode. It aims to deliver noticeable performance improvements while reducing wasted power in less demanding scenarios. Here's how to enable the Processor performance boost mode: Open Registry Editor: Press Win+R, type regedit, and click OK. Go to: HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\be337238-0d82-4146-a960-4f3749d470c7 (where HKLM stands for HKEY_LOCAL_MACHINE_) Modify the value of Attributes from 1 to 2 (you can find modify option by right-clicking) After that, exit Registry, you should now be able to see the new "Processor performance boost mode" dropdown menu: As you can see there are now five new P-States or CPPC states or power profile available that help define the boost mode processor setting on your PC. Wrapping it up here's a quick run-down of the settings as defined by Microsoft itself. Setting Description Disabled The corresponding P-state-based behaviour is disabled. Collaborative Processor Performance Control (CPPC) behaviour is disabled. Enabled The corresponding P-state-based behaviour is enabled. CPPC behaviour is Efficient Enabled. Aggressive The corresponding P-state-based behaviour is enabled. CPPC behaviour is Aggressive. Efficient Enabled The corresponding P-state-based behaviour is Efficient. CPPC behaviour is Efficient Enabled. Efficient Aggressive The corresponding P-state-based behaviour is Efficient. CPPC behaviour is Aggressive. Aggressive At Guaranteed Windows calculates the desired extra performance above the guaranteed performance level, and asks the processor to deliver that specific performance level. Efficient Aggressive At Guaranteed Windows always asks the processor to deliver the highest possible performance above the guaranteed performance level. In the next part we shall be comparing these settings to explore how much of a benefit or regression they can provide in terms of performance and power efficiency. If you decide to change the values on your system and are experiencing problems like crashes or an overheating PC, make sure to revert the steps back to the original state.
  • Recent Achievements

    • Week One Done
      rolfus earned a badge
      Week One Done
    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
    • Conversation Starter
      flexorcist earned a badge
      Conversation Starter
    • One Month Later
      AndreaB earned a badge
      One Month Later
    • One Month Later
      agatameier earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      518
    2. 2
      +Edouard
      198
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      ATLien_0
      93
    5. 5
      Steven P.
      78
  • Tell a friend

    Love Neowin? Tell a friend!