Web Dev Questions That Don't Need Their Own Thread v4
5,001 replies, posted
[QUOTE=CBastard;43238095]Here we go again...[/QUOTE]
Well, what do you expect? PHP is shit, trying to convince PHP developers of this though is impossible because they'll always revert to "Well it's fine for me my opinion lalalalalala".
[QUOTE=Eudoxia;43238627]Well, what do you expect? PHP is shit, trying to convince PHP developers of this though is impossible because they'll always revert to "Well it's fine for me my opinion lalalalalala".[/QUOTE]
dude its all opinion
[QUOTE=RusselG;43238684]dude its all opinion[/QUOTE]
Well some things are just objectively pretty shitty. Like the vast inconsistencies mentioned in the post. If that's not objectively shitty, what is?
[QUOTE=Eudoxia;43239014]Well some things are just objectively pretty shitty. Like the vast inconsistencies mentioned in the post. If that's not objectively shitty, what is?[/QUOTE]
-snip i got mad :C-
It's your personal opinion, and should stay that way. I don't care what you use, just don't bitch about other languages being shitty. That's your own [I]subjective[/I] opinion.
[QUOTE=xianlee;43236568]Im using this on my site
[code]
@media only screen and (max-width: 800px), only screen and (max-device-width: 800px) {
**code**
}[/code]
Not sure what it looks like on any other phone except Nexus 5.. when it drops below 800px it just changes stuff around, the only thing that will look off (hopefully) is the title will be cut off on a phone with a width reso of 320px.[/QUOTE]
Informative, but it turns out my helper that was supposed to check on his phone didn't update his chrome and haven't had it updated for quite a while. After the update everything was fine. :v:
[QUOTE=TrinityX;43239192]If you think PHP is so bad... Why don't you go and make the best web backend scripting language there is?
Oh right... You won't because PHP would be better.[/QUOTE]
Not another [URL="http://en.wikipedia.org/wiki/Server-side_scripting#Languages"]standard[/URL]
[QUOTE=TrinityX;43239192]If you think PHP is so bad... Why don't you go and make the best web backend scripting language there is?
Oh right... You won't because PHP would be better.[/QUOTE]
Why not Ruby or Python, or JavaScript through node.js? They aren't my favorite languages for various reasons, but are overall a much better, better designed choice, than PHP.
[QUOTE=Eudoxia;43237870][url]http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/[/url][/QUOTE]
How funny, some Ruby guy send me this today and I almost shat my pants laughing.
[QUOTE=Moofy;43239347]How funny, some Ruby guy send me this today and I almost shat my pants laughing.[/QUOTE]
Laughing because its true or because you think its ridiculous?
[QUOTE=Eudoxia;43239366]Laughing because its true or because you think its ridiculous?[/QUOTE]
Neither, I just personally think PHP is a far more superior language.
Can someone start a thread dedicated to this topic? This comes up all the time here and in the WAYWO and it's getting pretty tiring.
[QUOTE=TrinityX;43239192]-snip i got mad :C-
It's your personal opinion, and should stay that way. I don't care what you use, just don't bitch about other languages being shitty. That's your own [I]subjective[/I] opinion.[/QUOTE]
I'm sorry, but huge inconsistencies in things like naming conventions in a standard library are not subjectively shitty. They are just shitty. Plain and simple. I would love for you to try to argue how they are not shitty.
[editline]19th December 2013[/editline]
[QUOTE=Moofy;43239445]Neither, I just personally think PHP is a far more superior language.[/QUOTE]
Have you actually [I]used[/I] any of the alternatives on a large scale project?
[QUOTE=Eudoxia;43237870][url]http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/[/url][/QUOTE]
[url=http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html]I thought we'd already established that blog post was horse shit.[/url]
Guys pls
[QUOTE=Miljaker;39736672]
To keep things running smoothly (until our inevitable demise), please try to abide by these very simple rules:
▬ Don't be a jerk.
▬ Keep your hands inside the thread at all times.
▬ Don't be a jerk.
[/QUOTE]
[QUOTE=jetboy;43241308][url=http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html]I thought we'd already established that blog post was horse shit.[/url][/QUOTE]
The guy has some good points for sure, but the inconsistency and shitty debuggability alone are good enough reason to search out alternatives IMO. If I have to spend 2x as long looking up function names because no one understood the importance of naming conventions and 2x as long debugging because I don't get any useful stack traces or some dork @silenced a bunch of lines of code, then the language is absolutely making me less productive and worth switching.
"This screwdriver works so I'm not going to use a drill instead even though I would be more productive with it"
[QUOTE=jetboy;43241308][url=http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html]I thought we'd already established that blog post was horse shit.[/url][/QUOTE]
Christ, I should be studying for important exams. Fine...
[QUOTE]I don't know how Python handles it, but generally as a programmer I'd like to know if a file operation failed. His point here seems to be that low-level functions return false instead of throwing an exception, which is honestly a holdover from when PHP was young and didn't have exceptions. However, which is more boilerplate: if ( !( $file = fopen('file.txt', 'w') ) ) or a try-catch block? [/QUOTE]
His complaint is not that operations return errors instead of throwing exceptions, but that operations can return values that are [I]both[/I] errors and perfectly valid outputs, like the JSON decoder that returns null on failure.
[QUOTE]The == operator is the core of loosely typed languages, and is immensely powerful. He thinks it's flaky because he can't wrap his brain around loose comparisons.[/QUOTE]
Common Lisp, being dynamically typed, has four equality operators to make up for type dynamism. Also, he doesn't address points like [B]comparison not being transitive[/B].
[QUOTE]it is his responsibility to come to an understanding of how programming languages work, and he has failed to do so.[/QUOTE]
Sigh. If you don't understand Malbolge you're just weak-minded :downs:
[QUOTE] Finally, his argument of "the largest and most popular websites in the world, designed and written by the smartest programmers in the world, don't prove anything" is laughable. The conscious choices of almost every single web engineering team worth a damn do, in fact, count as proof that the tool they've chosen is worthwhile.[/QUOTE]
The "smartest programmers in the world" have been steadily moving to Python and Ruby for web development. Others use Scala, Go and Haskell. Nobody goes back to PHP.
[QUOTE]It's purely a web language, and nothing else. Websites don't need threads, because if they take longer than a second to run they've failed. Again, fundamental lack of understanding.[/QUOTE]
:downs:
[QUOTE]Though to be fair, if I ever get a json object which resolves to null, I'm going to handle it as an error regardless.[/QUOTE]
:downs:
[QUOTE]C and Python crash fatally, potentially destroying the memory space of other programs. Got it.[/QUOTE]
Yes, Python will corrupt memory.
[QUOTE][QUOTE]There is no way to declare a variable.[/QUOTE]
I really should make a hotkey for "he doesn't understand loosely typed languages."[/QUOTE]
Again, this is pure nonsense. He's not even wrong.
[QUOTE]Again, I'm going to have to ask how Python does that. Does Python automatically sanitize plaintext output? How would you print a <script> tag in python if that's the case? Or is this, like most of his complaints, just how languages work?[/QUOTE]
The difference being, of course, that PHP was designed to be a web language, and Python a general-purpose one. Python frameworks do this. PHP itself should do common input cleanup automatically.
[QUOTE]PHP was originally written to be super easy to use.[/QUOTE]
I don't see why he keeps using this as an excuse for bad design. Could someone enlighten me?
Stop
How can I change a div width based on the window width.
Example: the div width is auto and I want to make it so it changes to 960px when the browser window is <= 960
I don't know how to get the window width.
[editline]20th December 2013[/editline]
PS: If any of you have a solution please reply.
if you want it to be a fraction of the window width, use % (width:61.8%;)
if you want it to always be at least 960px, use min-width (min-width:960px;)
Thanks didn't even knew there was something like that.
How do notifications work in databases?
[QUOTE=jung3o;43245357]How do notifications work in databases?[/QUOTE]
I think you would need a table for notifications, and fill it up with notifications, then get all notifications with a certain identifier and echo them.
[QUOTE=TrinityX;43248888]I think you would need a table for notifications, and fill it up with notifications, then get all notifications with a certain identifier and echo them.[/QUOTE]
That's what I was thinking. Hope I'm doing it right.
So I have been reading your posts now for a while. I am looking to expand my knowledge (or rether get some). Im fairliy good with HTML and CSS. Other then that, I did some javascript, but im pretty in darkness.
So what language would you suggest I learn next, as I would like to do some freelance web development in future. Thanks for answer :v:
[QUOTE=Leafberry;43265045]So I have been reading your posts now for a while. I am looking to expand my knowledge (or rether get some). Im fairliy good with HTML and CSS. Other then that, I did some javascript, but im pretty in darkness.
So what language would you suggest I learn next, as I would like to do some freelance web development in future. Thanks for answer :v:[/QUOTE]
A serverside language like PHP or Ruby would be an idea.
Or expand your Javascript knowledge.
[QUOTE=gokiyono;43265085]A serverside language like PHP or Ruby would be an idea.
Or expand your Javascript knowledge.[/QUOTE]
Hmm yeah I was thinking about going for ruby or php. But which of the two would you recommend for someone who has no knowldege in none.
[QUOTE=Leafberry;43265228]Hmm yeah I was thinking about going for ruby or php. But which of the two would you recommend for someone who has no knowldege in none.[/QUOTE]
I would say PHP pretty easy to learn.
I have very limited knowledge of Ruby, so I can't say weather or not it's easy to learn either.
[QUOTE=gokiyono;43265367]I would say PHP pretty easy to learn.
I have very limited knowledge of Ruby, so I can't say weather or not it's easy to learn either.[/QUOTE]
if you like javascript, look more into node.js
You can start doing serverside code without learning a new language! :dance:
[QUOTE=lkymky;43268487]if you like javascript, look more into node.js
You can start doing serverside code without learning a new language! :dance:[/QUOTE]
Dont get me wrong .. I am really bad at javascript. I realy know only the basics. So i will have to learn a new language anyway :v:
Hey, are there any grey-hatters here that I can get to try and find exploits/bugs in a web form?
If you're interested please drop me a PM, it needs to be done as this is going to be delivered to a business in about a week.
Sorry, you need to Log In to post a reply to this thread.