What does your desk look like?
-
@creayt said:
@tonyshowoff said:
PHP's also a lot faster (primarily with opcaching)
Wait, what? Where did you hear that? I would bet money that I can take almost any PHP code you have, rewrite it in ColdFusion, and run it on identical hardware and have it just mercilessly dominate PHP's peformance. ColdFusion has a giant, beautiful array of caching options and uses Ehcache under the covers. I'd be interested to read what you read that made it sound like PHP can even hold a candle to Java performacewise. Didn't Facebook even write something to take their PHP, expressly because it's slow, and convert it to C++ or something?
Unfortunately I don't have the tools to run any sort of tests, but I based on it on the fact that CF is interpreted on top of Java, and it's part of the same reason that Ruby is slower than PHP. Also I wasn't aware of any op or byte code caching. I tried to find some done online, but they were all either way too old or seemed biased either toward PHP or CF.
Facebook wrote HipHop which converted PHP to C++ to gain performance, but even now PHP's new opcaching still isn't as good as what's created with the HHVM, but it's far, far better than it was.
-
@scottalanmiller said:
I don't know but didn't FogCreek make something to convert their VBScript into PHP?
Bwahahahaha
Sorry, had to be mentioned.
Yes, it's called Wasabi, it converts to other languages so they can be more OS independent, it's all a terrible, terrible idea. It's based on VBScript though, with some additions to it.
-
@tonyshowoff said:
Unfortunately I don't have the tools to run any sort of tests, but I based on it on the fact that CF is interpreted on top of Java, and it's part of the same reason that Ruby is slower than PHP. Also I wasn't aware of any op or byte code caching. I tried to find some done online, but they were all either way too old or seemed biased either toward PHP or CF..
ColdFusion COMPILES into Java, and is extreeeeeeeeemely fast. You learn something every day
-
@creayt said:
I'm mostly referring to the absolutely schizophrenicish naming of things, from what I remember from my PHP days. Underscores here, weird choices there, etc. One of the things that I adored about the move from PHP to CF is that I had to consult the docs so, so much less, because of the language design, it's extremely guessable a lot of the time, so as I was learning it I was literally able to just guess function names and they'd be right, instead of having to Google every 8 seconds.
Yes, PHP has a lot of poorly named internal functions and in many cases parameter order that doesn't match logically with similar functions. This issue isn't ignored, and there are plans to fix it and primarily replace things with internal classes, but it's not an easy road. I certainly find it really irritating, but IDEs help, and I know what you mean about having to check the docs a lot or google things, but I rarely do anymore thanks to PhpStorm.
-
@tonyshowoff said:
Yes, PHP has a lot of poorly named internal functions and in many cases parameter order that doesn't match logically with similar functions. This issue isn't ignored, and there are plans to fix it and primarily replace things with internal classes, but it's not an easy road. I certainly find it really irritating, but IDEs help, and I know what you mean about having to check the docs a lot or google things, but I rarely do anymore thanks to PhpStorm.
Sounds awesome and like PHP is about to get a lot better. I bet you're excited.
-
@creayt said:
Better for what? Some things, not others, do you get what I mean?
Better flying machines. When it comes to flying there's speed, height, manoeuvrability, fuel economy, and what you can carry, and planes are better at all those things except manoeuvrability.
You can do separation of concerns either way.
My point was it seems like it encourages you not to though.
The tag-based version fully supports OO programming.
It's hard to visualise what that'd look like.
I fundamentally disagree with you that airplanes are better than helicopters. I think helicopters are better and full of more individual utility overall, but airplanes are better at some things, and extremely easy to pilot. I've never driven a helicopter, so I can't speak to that, but I imagine it's much more difficult.
Well, I disagree with you here, and helicopters are much harder to pilot, indeed. I don't even think we should keep talking about this, seems completely off point.
-
@creayt said:
@tonyshowoff said:
Unfortunately I don't have the tools to run any sort of tests, but I based on it on the fact that CF is interpreted on top of Java, and it's part of the same reason that Ruby is slower than PHP. Also I wasn't aware of any op or byte code caching. I tried to find some done online, but they were all either way too old or seemed biased either toward PHP or CF..
ColdFusion COMPILES into Java, and is extreeeeeeeeemely fast. You learn something ever day
Does it? Yes, I do
-
@creayt said:
@tonyshowoff said:
Yes, PHP has a lot of poorly named internal functions and in many cases parameter order that doesn't match logically with similar functions. This issue isn't ignored, and there are plans to fix it and primarily replace things with internal classes, but it's not an easy road. I certainly find it really irritating, but IDEs help, and I know what you mean about having to check the docs a lot or google things, but I rarely do anymore thanks to PhpStorm.
Sounds awesome and like PHP is about to get a lot better. I bet you're excited.
Assuming that's not sarcasm, yes it is awesome, and PHP is getting better. It was really, really terrible for a long time, and I did a lot of PHP work, but not as a primary language, since about 1998/9. Only since really 5.5 has it taken off, and their release schedule is much tighter than it used to be, and the thing I'm most excited about with the coming PHP 7 is actual scalar typing. Some people consider PHP to be moving toward Java, but I don't consider that a bad thing, because I hated a lot about Java.
PHP's got some goofy syntax problems like how namespaces are dealt with, but Apple's new language Swift has even weirder stuff, like using \ in strings not to escape things, but to import variables... wtf?
-
@tonyshowoff said:
Better flying machines. When it comes to flying there's speed, height, manoeuvrability, fuel economy, and what you can carry, and planes are better at all those things except manoeuvrability.
See, I just don't think you can defend that. They have higher top speed at high altitudes, but for the "speed" of getting you from point A to point B where the distance between them is less than say half of the average width of any state in America, helicopters are way better. With an airplane you have to board, take off, find somewhere to land, travel probably by car to wherever you're going, often taking a lot longer to get you to the same spot. They're better at long-distance travel, for sure, but who cares? That's something you want to do some of the time. We can stop talking about it, but it's my entire point w/ the script versus tag based syntax. For generating dynamic HTML and integrating w/ HTML, which is, you know, only the most important and ubiquitous markup language in the world and responsible for the greatest innovation of our time, the tag-based language is much, much, much, much, much better.
My point was it seems like it encourages you not to though.
Probably just because you haven't worked with it. It doesn't encourage one thing or another. You can easily, fluidly write full classes, inheritance and all, w/ the tag option. And it works extremely well, and can be written about as quickly as script version thanks to the beauty of code insight and completion.
It's hard to visualise what that'd look like.
Dead simple ( pseudo
<class extends="parentClass"> <properties /> <method name="doSomething"> <argument name="a" type="b" default="c" /> <return x /> </method> </class>
-
How did we get from desk talk to Helicopters!
-
@creayt said:
We can stop talking about it, but it's my entire point w/ the script versus tag based syntax. For generating dynamic HTML and integrating w/ HTML, which is, you know, only the most important and ubiquitous markup language in the world and responsible for the greatest innovation of our time, the tag-based language is much, much, much, much, much better.
I agree with you here mostly, and for years I constantly pushed for moving things to the web. I got my wish, but in the 90s people though I was crazy. I disagree with that a similarly syntaxed language is good, because mark up and actual programming are two different things.
Probably just because you haven't worked with it. It doesn't encourage one thing or another. You can easily, fluidly write full classes, inheritance and all, w/ the tag option. And it works extremely well, and can be written about as quickly as script version thanks to the beauty of code insight and completion.
I can see how this could be the case.
Dead simple ( pseudo
<class extends="parentClass"> <properties /> <method name="doSomething"> <argument name="a" type="b" default="c" /> <return x /> </method> </class>
You can format code by doing five ~ before and after the text. Anyway, this isn't the worst thing I've ever seen, but again feels too XML-like for my taste, and in fact aside from return x, this whole thing is XML parse-able; though I imagine less strict XML engines would allow an argument without value.
-
-
@tonyshowoff said:
@BMarie said:
How did we get from desk talk to Helicopters!
Helicopters are designed on desks Done.
Touche
-
@tonyshowoff said:
You can format code by doing five ~ before and after the text. Anyway, this isn't the worst thing I've ever seen, but again feels too XML-like for my taste, and in fact aside from return x, this whole thing is XML parse-able; though I imagine less strict XML engines would allow an argument without value.
That'll come in handy, thanks!
-
@tonyshowoff said:
This isn't the worst thing I've ever seen, but again feels too XML-like for my taste, and in fact aside from return x, this whole thing is XML parse-able; though I imagine less strict XML engines would allow an argument without value.
Right, I think most people would probably opt for the script-based syntax for a class, but the point was it doesn't encourage one thing or another, you can do everything you want to in either of the two ways, the art becomes prudently judging when to use which:
class { function doSomething( a ){ return x; } }
-
@creayt said:
@tonyshowoff said:
This isn't the worst thing I've ever seen, but again feels too XML-like for my taste, and in fact aside from return x, this whole thing is XML parse-able; though I imagine less strict XML engines would allow an argument without value.
Right, I think most people would probably opt for the script-based syntax for a class, but the point was it doesn't encourage one thing or another, you can do everything you want to in either of the two ways, the art becomes prudently judging when to use which:
class { function doSomething( a ){ return x; } }
That's much better
-
@tonyshowoff said:
@creayt said:
Ummmm, what? Better organization of code? What does that sentence mean to you?
Easier, rather, it puts you in a position to more easily organise things, because things are easier to follow and find. Proper organisation of larger projects is highly important, especially when you consider things like separation of concerns and so forth. Text editors like Sublime or Notepad++ don't really help with that at all.
How your code is organized depends on how you organize it, into files and folders. What am I missing here?
-
@tonyshowoff said:
@creayt Oh, no I wasn't, cfScript is vastly better. Admittedly my experience with CF is about 8 or so years out of date, but due to licensing, availability, and other issues I never consider it really. Full disclosure, I've always hated XML as well, and we use JSON or BSON for all of our transport/storage stuff in house where possible over XML. You may love ColdFusion, but I certainly do not, and I think that's fine.
I don't think anyone uses XML for almost anything in 2015. JSON won for most intents and purposes.
-
@creayt said:
How your code is organized depends on how you organize it, into files and folders. What am I missing here?
I think you're missing having worked on extremely large projects, for example a large enterprise project can be thousands of files. Being able to ctrl + click a class, function, method and it take me to exactly where it is, or easily search for part of a file name, class name, or something else, is a powerful thing that allows me to better and more easily organise my code is functionality products like PhpStorm offer that text editors don't, aside from obvious things like proper hinting, type recognition, etc.
The organisation of the code itself depends on what, if any, standard you're following, and so on, and it's obviously still easy to also badly organise your projects with something like PhpStorm, but being able to find things in a second (or less) in an indexed system and also properly name and organise them (things like PhpStorm will warn you if the naming and/or directory structure is off scheme) are vastly superior to having to search all files for my class, method, etc or go manually find the file with the class I'm looking for, and also cull results which are similar matches, and do it all manually.
So yes, it's organised depending on how you organise it, but that doesn't mean you did a good job. In the same way just because one writes code doesn't make it good, just because one wrote it.
I don't think anyone uses XML for almost anything in 2015. JSON won for most intents and purposes.
For transport over the web, yes JSON has won, but XML is still widely in use, especially amongst people who write in .NET or Java, and not just for protocols, but storage, metadata, etc. Many insanely verbose "standards" exist for XML eDocs out there, lest we forget all the insane things that use XML like many types of configuration files, Microsoft Office documents/spreadsheets/etc, just tons of things.
-
@tonyshowoff said:
I think you're missing having worked on extremely large projects, for example a large enterprise project can be thousands of files. Being able to ctrl + click a class, function, method and it take me to exactly where it is, or easily search for part of a file name, class name, or something else, is a powerful thing that allows me to better and more easily organise my code is functionality products like PhpStorm offer that text editors don't, aside from obvious things like proper hinting, type recognition, etc.
Well isn't that presumptuous. The project I'm working on right now is massive, and doing a quick check it shows that it has 15,737 code files, not including front-end resources like images or video. From what you were saying I was right, and you were talking about something totally different, code navigation.
But in reality I probably navigate my code as quickly or more quickly than you do. Sublime text lets you search through file, class, and function names with a simple keystroke and open other files right up to where you want them. It sounds like you're making these giant assumptions about Sublime Text based on your perception of its class of application, throwing it into a lump with "text editors" in your mind, when in reality it can be extended to do endless things in the same way that any "formal IDE" ( like Eclipse ) can. It has version control integration, code insight and analysis, and a host of other empowering features.
I personally see having to rely on your IDE to help you figure out where other code lives as the digital equivalent of a training wheel. It's better to deeply understand your code, strategize its organization in a way that that problem is automatically solved and that you know the exact location of every piece of code by convention, and could see it being useful when you take over a large project from someone else and have to learn it quickly by exploration using that method, although in all honesty that'd be just as easy to do using Sublime's keystroke navigation features.
The organisation of the code itself depends on what, if any, standard you're following, and so on, and it's obviously still easy to also badly organise your projects with something like PhpStorm, but being able to find things in a second (or less) in an indexed system and also properly name and organise them (things like PhpStorm will warn you if the naming and/or directory structure is off scheme) are vastly superior to having to search all files for my class, method, etc or go manually find the file with the class I'm looking for, and also cull results which are similar matches, and do it all manually.
So yes, it's organised depending on how you organise it, but that doesn't mean you did a good job. In the same way just because one writes code doesn't make it good, just because one wrote it.
Right, which is why your IDE has nothing to do with your code organization, which was my point.