Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads

Programming Languages


imasonaz
 Share

Recommended Posts

Guest The_Monkey

Not to add to necro but is Python pretty much useless to learn? No one mentioned it as useful except monkey who put it 2nd behind PHP. Is it good to at least learn as a building block? Or is PHP just as easy to learn?

 

Python is excellent to learn. I know of a few jobs in my area asking for Python + Django coders. It is a different style of coding than C based languages, as there are no curly braces.

 

That being said, PHP is super easy to learn. But as with anything easy to learn, it can teach you some horrible habits.

Link to comment
Share on other sites

But as with anything easy to learn, it can teach you some horrible habits.

 

Yeah I learned Java first and when I started with Python (I'm learning through an online course that uses its own compiler that's made even easier), I'm surprised at how much simpler it is to declare and define variables. As well as how much indentation matters. I'm also signed up for R classes that I'll be working on once I'm done with they Python class. I plan to go into physics and I figure that if any language is good to learn for computational science, it's R. Is that a fair assumption?

Link to comment
Share on other sites

Guest The_Monkey

Yeah I learned Java first and when I started with Python (I'm learning through an online course that uses its own compiler that's made even easier), I'm surprised at how much simpler it is to declare and define variables. As well as how much indentation matters. I'm also signed up for R classes that I'll be working on once I'm done with they Python class. I plan to go into physics and I figure that if any language is good to learn for computational science, it's R. Is that a fair assumption?

 

It is. You are going the right route. Python will definitely help you one your way, as it is quite powerful with your transition. Python by itself can do some of the things you may need with R. Also check out wolfram's new language.

Link to comment
Share on other sites

I've been learning a lot of Object-Oriented Programming shtuff.

 

but over the past year and a half i've learnt Pascal, C, C++, C#, Objective C, Java, HTML/CSS/PHP/SQL

 

And a bunch of modeling languages like UML but that doesn't really count, about to learn Python for my Intro to AI class.

Link to comment
Share on other sites

wolfram's new language

Mathematica? I see a lot of that on Project Euler. That site is actually what made me want to learn J because those who programmed in J could do in one line what it took others 20-30 lines to do in another language.So I tried learning that but that was way too insane. So I dulled it down and I'm trying to learn what's actually useful.

Link to comment
Share on other sites

I don't know where you are getting your facts from, but there are far more PHP oriented development positions currently available on the job market than there are either Java or ASP.NET (some might argue more than even both of them combined). As it is pretty much the backbone of pretty much every major website on the internet today, due to the versatility of the language. Not to say Java and ASP.NET don't have their uses, just they have a far limited scope and range then PHP, and those who say otherwise are not in tune with current employment needs.

 

You can view an article about it here. It seems fairly clear, if you want a job on the web developing, you need to know PHP.

 

Huh? Not even close. PHP positions are dwindling because Javascript/JQuery are skyrocketing in popularity. You cannot live without Javascript for a client-end web interface. Also PHP is dying due to other languages being more robust and not as broken. Take a look at this: http://en.wikipedia.org/wiki/Programming_languages_used_in_most_popular_websites

You can see that virtually any language can be used on the server-end, not just PHP.

Also don't confuse Java with Javascript, that's annoying.

 

Personally I can't stand PHP. Just to name a few things that I dislike about it:

  • Documentation isn't versioned, there is only one set of docs
  • Rules for identifiers aren't universal (i.e. variable names are case sensitive, but function calls are not)
  • Passing too many arguments to a user-function doesn't flag any errors, the extra ones are just ignored (like seriously? what the even fuck)
  • Floats and doubles are literally the exact same datatype
  • Can't store 64-bit integers on 32-bit machines
  • No integer division, only floating point

The list goes on. PHP was just a poorly designed system from the start. The only reason it's still reasonably quick is because it was created from C which is fast as balls. But there's just too many things wrong with it that it would require an entire rewrite for any decent developer to give it credit.

Link to comment
Share on other sites

Huh? Not even close. PHP positions are dwindling because Javascript/JQuery are skyrocketing in popularity. You cannot live without Javascript for a client-end web interface. Also PHP is dying due to other languages being more robust and not as broken. Take a look at this: http://en.wikipedia....opular_websites

You can see that virtually any language can be used on the server-end, not just PHP.

Also don't confuse Java with Javascript, that's annoying.

 

Personally I can't stand PHP. Just to name a few things that I dislike about it:

  • Documentation isn't versioned, there is only one set of docs
  • Rules for identifiers aren't universal (i.e. variable names are case sensitive, but function calls are not)
  • Passing too many arguments to a user-function doesn't flag any errors, the extra ones are just ignored (like seriously? what the even fuck)
  • Floats and doubles are literally the exact same datatype
  • Can't store 64-bit integers on 32-bit machines
  • No integer division, only floating point

The list goes on. PHP was just a poorly designed system from the start. The only reason it's still reasonably quick is because it was created from C which is fast as balls. But there's just too many things wrong with it that it would require an entire rewrite for any decent developer to give it credit.

 

You are quite literally comparing apples and oranges, one of them is client-side (javascript/jquery) and the other is server-side (PHP). Effectively it is like you are saying Publix (the super market) isn't cornering the HD TV market like BestBuy is. So unless you are going to sit here and tell me everyone is creating their back-ends using javascript/jquery, I have no idea what on earth your talking about. Which is why when I was initially speaking of Java I was referring to the server-side language and not the client-side Javascript.

 

As for what you hate about PHP...

  • Documentation isn't versioned, there is only one set of docs (The version is clearly printed at the top of the page)
  • Rules for identifiers aren't universal (i.e. variable names are case sensitive, but function calls are not) (Every language has different standards, PHP is no different)
  • Passing too many arguments to a user-function doesn't flag any errors, the extra ones are just ignored (like seriously? what the even fuck) (Most scripting languages do this...and you can check in the function itself)
  • Floats and doubles are literally the exact same datatype (Please go on, explain why you need less precision, and how PHP can't do it)
  • Can't store 64-bit integers on 32-bit machine (I don't even...why don't the triangles go in the square holes? Also there are workarounds)
  • No integer division, only floating point (I think the word you are looking for is rounding)

Not to mention most of the real issues PHP has have been fixed in various frameworks which most commerical development houses employ so it is a non-issue.

 

Now don't misunderstand me, Javascript is an invaluable language to know and it works well with PHP, but the King of server-side for the foreseeable web future will be PHP hands down.

Edited by Papa John
Link to comment
Share on other sites

Guest The_Monkey

You are quite literally comparing apples and oranges, one of them is client-side (javascript/jquery) and the other is server-side (PHP). Effectively it is like you are saying Publix (the super market) isn't cornering the HD TV market like BestBuy is. So unless you are going to sit here and tell me everyone is creating their back-ends using javascript/jquery, I have no idea what on earth your talking about. Which is why when I was initially speaking of Java I was referring to the server-side language and not the client-side Javascript.

 

As for what you hate about PHP...

  • Documentation isn't versioned, there is only one set of docs (The version is clearly printed at the top of the page)
  • Rules for identifiers aren't universal (i.e. variable names are case sensitive, but function calls are not) (Every language has different standards, PHP is no different)
  • Passing too many arguments to a user-function doesn't flag any errors, the extra ones are just ignored (like seriously? what the even fuck) (Most scripting languages do this...and you can check in the function itself)
  • Floats and doubles are literally the exact same datatype (Please go on, explain why you need less precision, and how PHP can't do it)
  • Can't store 64-bit integers on 32-bit machine (I don't even...why don't the triangles go in the square holes? Also there are workarounds)
  • No integer division, only floating point (I think the word you are looking for is rounding)

Not to mention most of the real issues PHP has have been fixed in various frameworks which most commerical development houses employ so it is a non-issue.

 

Now don't misunderstand me, Javascript is an invaluable language to know and it works well with PHP, but the King of server-side for the foreseeable web future will be PHP hands down.

 

I don't even have to say anything. PapaJohn said it all. Stop trying to be a hipster programmer...

Link to comment
Share on other sites

You are quite literally comparing apples and oranges, one of them is client-side (javascript/jquery) and the other is server-side (PHP). Effectively it is like you are saying Publix (the super market) isn't cornering the HD TV market like BestBuy is. So unless you are going to sit here and tell me everyone is creating their back-ends using javascript/jquery, I have no idea what on earth your talking about. Which is why when I was initially speaking of Java I was referring to the server-side language and not the client-side Javascript.

 

Good reading there. I said PHP 'positions' are dwindling because Javascript is excelling in popularity. As in, companies are hiring more JS developers because they need them to fill the larger and larger front-end projects. Not to mention large companies like Google don't use PHP because of its flaws. Everyone knows that the only company left that really truly relies on it if Facebook. But, if you had considered the link I posted you'd know that.

  • (The version is clearly printed at the top of the page) And that changes what I said how..? There is still only one doc version. You're left with one doc version for every version of PHP which is retarded.
  • (Every language has different standards, PHP is no different) That doesn't make the standards intuitive. Any decent language has universal identifier rules. Look at literally any other language, identifier rules apply across the board through variable names, functions, constants etc.
  • (Most scripting languages do this...and you can check in the function itself) That doesn't make it right. It's not an issue I have with PHP alone, but it certainly is inexcusable. There's no need for it.
  • (Please go on, explain why you need less precision, and how PHP can't do it) Now I feel like you're just trolling. Yeah guys, why would we ever need less precision? Let's just store everything in 64-bit ints. We'll quadruple our memory usage but that's okay.
  • (I don't even...why don't the triangles go in the square holes? Also there are workarounds) Okay you obviously don't know as much about your language as you think if you didn't understand what I was getting at. You can still store 64-bit integers on 32-bit machines, they just need to be unsigned. I would expect most people to know this, seeing as plenty of languages do it. It's a huge portability problem that the entire developer community recognizes. Unpacking a 64-bit integer onto a 32-bit machine in PHP will cause it to overflow instead of.. say.. casting it to a float or an unsigned integer like every other language.
  • (I think the word you are looking for is rounding) No, I'm looking for division. You cannot divide two integers. You must convert them to floats first and then truncate the result if you want to do integer division.

PHP is just a failure of a language, there are so many problems with it it's staggering. Here's another fun one: How come && and || have different orders of precedence than the 'and' and 'or' operators?

Edited by Big Al
Link to comment
Share on other sites

Good reading there. I said PHP 'positions' are dwindling because Javascript is excelling in popularity. As in, companies are hiring more JS developers because they need them to fill the larger and larger front-end projects. Not to mention large companies like Google don't use PHP because of its flaws. Everyone knows that the only company left that really truly relies on it if Facebook. But, if you had considered the link I posted you'd know that.

 

Considering the article I cited in the study indicated showed almost three times the amount of PHP related positions available as Javascript (and since you have thus far provided nothing to counter that article) I don't see how they are "dwindling".

 

And that changes what I said how..? There is still only one doc version. You're left with one doc version for every version of PHP which is retarded.

 

Which if you are using an IDE, like pretty much everyone, it is automatically handled for you. If not, again, included on the page with the version is supporting functions (and their versions) which you can easily get links to view.

 

That doesn't make the standards intuitive. Any decent language has universal identifier rules. Look at literally any other language, identifier rules apply across the board through variable names, functions, constants etc.

 

It makes the standards not something you are necessarily use to, and thus, "not intuitive". Standards are created based on the design of the language, and you shouldn't be expecting a universal standard for all programming languages.

 

Now I feel like you're just trolling. Yeah guys, why would we ever need less precision? Let's just store everything in 64-bit ints. We'll quadruple our memory usage but that's okay.

 

I forgot this was the 90's and web server's all ran on 512 MB's of RAM, also you are vastly overestimating memory usage.

 

Okay you obviously don't know as much about your language as you think if you didn't understand what I was getting at. You can still store 64-bit integers on 32-bit machines, they just need to be unsigned. I would expect most people to know this, seeing as plenty of languages do it. It's a huge portability problem that the entire developer community recognizes. Unpacking a 64-bit integer onto a 32-bit machine will cause it to overflow instead of.. say.. casting it to a float or an unsigned integer like every other language.

 

I must have missed the part where I was a mind reader and/or you stated it was unsigned integers. But fortunately I was, which is why I stated there are workarounds to fudging the math for it on 32-bit machines.

 

No, I'm looking for division. You cannot divide two integers. You must convert them to floats first and then truncate the result if you want to do integer division.

 

Do me a favor and take out a calculator and do two calculations: 1) 10 / 5 and 2) 10.000000000000000 / 5.000000000000000 and tell me where the answers differ. Since they don't, you obviously can do integer division just apparently you don't want to perform the child sacrifices required to use the floor / ceil functions. Which is funny considering Javascript does literally the exact same thing, as with all loosely types languages.

 

PHP is just a failure of a language, there are so many problems with it it's staggering. Here's another fun one: How come && and || have different orders of precedence than the 'and' and 'or' operators?

 

Let me spell out your argument for you: I like Javascript, PHP isn't Javascript, therefor PHP is Satan. The problem is you don't seem to understand how highly similar the languages are.

Edited by Papa John
Link to comment
Share on other sites

Honestly this is just embarrassing.. all you're saying is "Well there is no logical reason for why these things are the way they are, but you can perform hacky workarounds so you shouldn't care."

 

Yes, having to use twice the precision on floating point values does matter. It's incredibly ignorant to just say "well we have lots of memory so proper memory management doesn't matter".

If you're storing thousands of values, which often webservers are, you're wasting loads of memory.

 

And yes, having to cast integers to floats and then back again in order to divide them matters, because again, you're spending way more CPU power than you should if you're operating on thousands of numbers.

PHP is just full of awkward solutions to things that never should have been problems in the first place.

It's terribly non-portable, it's as slow as all hell compared to C or C#, and it's a huge memory hog. It's basically the Java of web languages, minus the portability and ease of use. Go lookup blogs about people ranting on PHP and you'll see what I mean. People hate it, and for good reasons.

Link to comment
Share on other sites

Honestly this is just embarrassing.. all you're saying is "Well there is no logical reason for why these things are the way they are, but you can perform hacky workarounds so you shouldn't care."

 

Yes, having to use twice the precision on floating point values does matter. It's incredibly ignorant to just say "well we have lots of memory so proper memory management doesn't matter".

If you're storing thousands of values, which often webservers are, you're wasting loads of memory.

 

And yes, having to cast integers to floats and then back again in order to divide them matters, because again, you're spending way more CPU power than you should if you're operating on thousands of numbers.

PHP is just full of awkward solutions to things that never should have been problems in the first place.

It's terribly non-portable, it's as slow as all hell compared to C or C#, and it's a huge memory hog. It's basically the Java of web languages, minus the portability and ease of use. Go lookup blogs about people ranting on PHP and you'll see what I mean. People hate it, and for good reasons.

 

C# is not, arguably, as efficient or fast as C/C++ because of the numerous libraries it is built upon. It does not do memory management, unless done manually, as well or precise as can be done in C/C++. However, people use it because the days of requiring the most efficient use of processing and memory are no longer as relevant as they use to be. People now switch to C# because they can more easily and simply perform tasks in a few lines that would have taken them hundreds in C/C++. In a world becoming more and more focused on rapid deployment of both web and client applications, the difference in writing those extra lines of code (and the customer's paying for it) have lead to the adoption of higher level languages. Those extra CPU cycles or that extra memory usage is offset by the ability for companies to easily create and modify their websites in a timely fashion.

 

You are absolutely right the PHP has issues, but the fact of the matter is you can say that about every single programming language out there. They all have their unique frustrations that people will write volumes about but, and this is the key, still use them. They use them because they know that despite these disadvantages and frustrations there are also similar advantages that make the language so powerful. For PHP it is allowing stuff to just work, and the many ways that it can allow those things to work together without being told things like you used an integer instead of a double or a float. Or if I want that number to be a string, or to then convert back to a number to go into a class. In short, abstraction, while being a disadvantage in some respects can be very useful when you are trying to rapidly develop a web application.

 

To be entirely honest, most loosely typed programming languages are an oddity. Their structure and methodology are designed to work in very specific scenarios, and for PHP that is the web.

Edited by Papa John
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share