I’m still annoyed with how verbose Objective-C is. Just check out what one has to do to create and concatenate a string. Madness:
<span style="color:#323232;"> NSString * test = [[NSString alloc] initWithString:@"This is a test string."];
</span><span style="color:#323232;"> NSString * test2 = [test stringByAppendingString:@" This value is appended."];
</span>
And god forbid you want to concatenate two things to a string:
<span style="color:#323232;"> NSString * test3 = [test1 stringByAppendingString:[test2 stringByAppendingString:@" Adding a third value."]];
</span>
Is it wrong that I’m stuck trying to figure out what language this is?
Trying to figure out what string.length and print(var) exist in a single language… Not Java, not C# (I’m pretty sure its .Length, not length), certainly not C, C++ or Python, Pascal, Schme or Haskell or Javascript or PHP.
It’s weird that people are so focused on it. It’s pseudocode, and it’s purely meant for day one comp sci students to grasp how data is stored and processed, before they are forced into writing Java, most likely
I’m very much guessing that this is just supposed to be a type of pseudocode given the context and vagueness of it.
It’s a big reason why I really dont like pseudocode as instruction to people learning the basics of what programming is. It made more sense 20 years ago when programming languages were on a whole a lot more esoteric and less plain text, but now with simple languages like Python there’s simply little reason to not just write Python code or whatever.
I took an intro to programming class in College and the single thing I got dinged on the most is “incorrect pseudocode”, which was either too formal and close to real code or too casual and close to plain English.
It’s not a great system. We really need to get rid of it as a practice
And VisualBasic’s syntax is easier than COBOL, but this isn’t a competition to make the least offensive heap of putrid garbage, so why does it matter?
Python works just fine for basic scripts, frankly it’s amazing for it, but oop and functional programming is so incredibly obviously badly shoehorned in that huge swathes needs scrapping and version 4 releasing
I think you’re missing the forest for the trees here pretty heavily.
Yes, Python has some goofy aspects about managing it while performing high level, in depth tasks.
This is a post and a comment chain about pseudocode being taught to people who likely just learned what a “programming language” was several weeks ago. Essentially no one taking the GCSE knows what “bash-like scripts” even means.
Reminds me of 7th grade math class, chapter on estimating. Assignment was “Estimate the following values” with problems like 42+28=? or 14*3=?
One of them was 6*7=? Which having memorized my times tables in 4th grade like they told me to, I knew off the top of my head that it’s 42. I wrote that. And it was marked wrong because I was too precise.
This is quite a cheap answer but maybe it’s just pseudo code. We had exercises in university about pseudo code with examples that intentionally broke all syntax systems and conventions to show that not everything has to be executable that you write down in a theoretical computer science homework
It’s a shitty question. It’s implied by the fact that “24” is wrong that the answer is “6”, the length of the string “Monday”.
In some languages dot access on objects could give you the properties of the object type (things pertaining to a “day” object) but this would still be ambiguous since a day’s length can be measured in many different ways.
In others, it would require you to call length as a function (.length()) or not be available at all, or require you to pass the object into another function [ length_in_seconds(day_x)]
I think the question is fine, but we have to assume they covered this type of method prior to the exam, where .length would result in the character count of a String.
Scala and Kotlin are close ones, although those requires variables to be declared with var day = “Monday” (unless the variables are declared elsewhere)
Is PHP becoming irrelevant? It still comprises the vast majority of web pages out there. Maybe that has been going down but with he amount of competing languages and systems out there, that is to be expected.
Either way, it’s an awesome language, happily been using it for decades now
Yeah they do, with no real reason, really. Oohh, “some functions use underscore and others don’t!” And? It’s not a problem, really. Every language has baggage from the past and PHP kept it for stability, I’m happy with that.
That’s weird, but more of an aesthetics issue than anything. JavaScript will actually decide to behave oddly for no reason; if that’s it it’s still king of the shitbirds.
I’m not the one you asked, but what I like isn’t really about PHP itself, but the fact that I can get dirt cheap hosting with PHP and MySQL. Every time I want to create a small “app” that makes some manual task easier it’s very useful to create something I can access from the internet.
Python is really useful for stuff like that too, but (in my experience) not as easy and cheap to use as an web app.
For example I go to dinner with some friends every month and we always forget who’s turn it is to choose and book a restaurant. So I just made this PHP page that shows the current and next 2 months with a name. So we always use that to see who’s turn it is.
Though I like that you use PHP, I don’t think there is such a thing as PHP hosting, or python hosting? Maybe I’m not understanding what you’re saying here?
When you pay a company and they provide you with a domain (you choose) and give you a webserver, some disk space, a database etc.
I pay about 30 euros a year for 5 websites. They are all very basic (either some php stuff I made, or WordPress). These websites have very few visitors so the hosting specs don’t really matter. All these websites have a specific domain name, some disk space, and a database.
For this price they offer PHP and MySQL. So it’s not a dedicated server where I’m root and can Install other stuff.
Quite early on the eyes, powerful, fast to build and rolk out projects, about. A billion libraries with all the functions you’ll ever need. People both about it because it has some language quirks from way back in the beginning, I see it as stability. I don’t know how node is now but I remember a few years back where every bug fix came accompanied not only by 10 new bugs but also a bunch of interface changes that immediately broke everything. Every. Single. Damn. Time.
Having said that, it under very active development and has been majorly improved over the years. Dumb design choices are no long available and right now it’s quite easy to work securely with it.
Beyond the “but these two functions should have similar naming but they don’t!” argument, that with a good editor doesn’t matter anyway, there isn’t really a good argument out there not to use it.
To be fair, we do develop stuff. Nothing implies quality, so it’s not like we’re misrepresenting anything. Personally, anyone who calls themselves a software engineer and works with any web-related technology (PHP, JavaScript, etc) are the ones to be shunned.
I’m a full-stack web developer and am involved all the way through including cloud infrastructure, API development, database creation/maintenance, test automation, architecture etc.
I guess what makes a “developer” in your context different? Embedded? Kernel?
Only those who code in the same language as I am can be called developers. Everyone else is just an impostor and their technology doesn’t matter! Real programmers use my language of choice
Heyyy its your super duper new project manager! I hope you are feeling a-mazing because you are my a-ce on the team. Anyways i need you to do things twice as fast, because we are running low on budget after sales promised another feature without extra billing and the CEO already signed off on it. Please make this happen somehow. If this project isn’t succesfull i’ll get fired and have to sell the house. But no pressure!
Never used it in over 23 years of using PHP. Also, I don’t thing that has existed anymore for the past 10 years or so?
Seriously, if we’re going to do this, can we also bitch about painful java apps from 10 years ago, or the hilariously shitty modules in node from 10 years ago? I can go on for a while, but you hopefully get the point.
My confusion is that you hate it tosay because someone over a decade ago wrote 10 times the same complaint that was mostly fixed already since about a decade ago
That article is over a decade old. A lot of these issues aren’t relevant any more or have been fixed. Some weren’t even PHP issues, for example mysql_real_escape_string is a MySQL API (dev.mysql.com/…/mysql-real-escape-string.html).
PHP isn’t the best language, but it’s not as bad as some people claim it to be, especially if you use a good framework like Laravel.
lol, no… it sucks
trust me, if you’ve already gotten used to php, you’re smart enough to learn a better language.
really just use node if you’re going that sorta route…
ECMA 6 has had drastic improvements over the past js… however node is still infinitely better than php, and since javascript is inexorably a part of web development, it’s a lot more logical to use it on the backend too…
i don’t mean that node is great, i mean that it’s an easy transition from php, a billion times better, and much more modern and useful… so a very natural transition…
ECMA 6 has had drastic improvements over the past js…
Sure, but it still lacks basic built-in features. For example, why do maps and sets not have sort or filter methods? In Node, why is there no built-in way to connect to a database of any sort? Why can Node.js apps only use a single time zone? Requiring libraries for everything is not ideal as the libraries vary wildly in quality and they can end up either abandoned or containing malware (which has happened several times in the Node ecosystem).
still infinitely better than php
They each have their pros and cons, depending on use case. Node.js does some things better than PHP, but the opposite is true too.
You can build a whole PHP website without using any third-party libraries, and it’ll work on any web host that supports PHP (literally any good web host that exists today). There’s value in having that level of flexibility.
You can build a PHP site today and it’ll mostly still be working (maybe with some minor changes) in 5 years, whereas for some of my Node.js sites I have to switch to an older version of Node just to build them. For example obviousspoilers.com has been practically untouched since 2009.
The fact that PHP can run multiple apps in the same FPM process means that you can run thousands of sites on a single server without issues. There’s some non-Node solutions to this (like Cloudflare workers) but they’re mostly proprietary at the moment.
There are more PHP than Node.js jobs, and far more sites use PHP. Wordpress uses PHP and powers over 40% of the web, so that means that at least 40% of all websites use PHP.
wordpress does not power 40% of the web…
im not going to argue any more than that because this is a humorous type community, and ya’ll are getting too serious.
i hope you enjoy all of your “programming” with your garbage little “language” and POS word🤢press🤮
p.s. notice how everyone who argues in favor of php and wordpress ONLY know that language and framework?
what a curious thing…
also downvotes aren’t supposed to be used just because you disagree with someone’s opinion. Your comments seem like a typical redditor so please just go back to Reddit if you’re going to use downvotes that way.
That is literally a decade old article with basically 1 complaint that sometimes functions are strpos() and sometimes str_len(). Anything else it’s saying is “I don’t even know how to say it”. Really now? Any of your complaints have been fixed since about a decade ago, so why don’t you give it a try?
yeah and they only get you around the neighborhood, any actual distance and a motorcycle is infinitely better…
but, it figures you’d miss that, since you’re a dumby dumbo mcpoopoo head webdev
Now you’re throwing ad hominem around. You don’t need to be toxic to communicate your point, web development did at one point have a lot of growing to do and I can admit that there is still plenty of progress to be made. In 2024 however, ignoring the web ecosystem as any type of developer is purely traditionalist elitism.
Please refrain of using offensive words, specially if you are trying to actually communicate an idea that is by all means demeaning to other people. The community is about humour, keep that in mind ;)
Yeah this is one of the main reasons why Stackoverflow’s question closing policies are bullshit. We’re going to close the question so nobody can answer it… but they can still upvote it and it will still be ranked highly on Google!
Bunch of idiots.
You know the SO Devs actually tried to improve this a while ago - I think you would be able to reopen your question once or something. Of course the power-hungry mods hated that idea and the abandoned it.
At this point it’s unfixable. They depend on their unpaid mods and they’ve already attracted the sort of people you absolutely don’t want to moderate a site.
The only hack I’ve found is that if your question gets downvoted/closed you are allowed to delete it, wait half an hour and ask it again. Much better odds of success than editing the question.
You can’t. The kinds of people who are nominated are the wrong kinds of people. I’ve participated in many SO elections and none of the candidates ever mention any of these issues.
The question is about “superpermutations”. The permutations of 1 and 2 are “12” and “21”. A “superpermutation” would be “1221”. It contains the numbers 1 and 2 as well as all permutations of 1 and 2. However “121” is also a superpermutation of 1 and 2. It also contains “12” and “21” and it’s shorter than “1221”.
The problem is finding the shortest superpermutation. Stand-up Maths has a video where he interviews a mathematician that published Anonymous’ solution. So yes, there is a math paper where the main author is “Anonymous 4chan Poster”.
I seriously could not believe what I was watching when I got to that part. I would start the next one thinking “there is no way… Yep, again”. How did the director even convince people to do it?
As annoying as it was to slog through the episodes (I think I went through 5 of them before realizing I wasn’t missing much skipping the other three), there is something to be said about how much it captures that feeling of uselessness that Kyo and Yuki have. Kyo begins to realize each time and Yuki is forced to be aware through each repetition. Haruhi is so powerful that she creates an endless time loop, that was both amazing and terrifying.
She can’t interfere, her job is to monitor and observe and only stop Haruhi if she’s going to endanger the universe. So even with the ability to stop her, she can’t do anything by the code of her position.
Thats the thing, she does interfere, but just enough that it keeps happening. 100% no interference would be not even telling them that there is a loop going on when they try to find out
I’ve used a duress password with crypto containers since the old TrueCrypt introduced me to it a while back. Sure you can have the password and unlock the vault but it’s just text file notes in there that aren’t at all important. In reality though, no one would ever give a shit about my data enough to even ask me my password.
Honestly, yeah sometimes. It’s my emotional reflex to frustration that was programmed into me by my parents and I haven’t done enough cognitive behavioral therapy to undo it.
As someone who discovered my Type 1 ASD at 40, the gods know that I have a lot more work to do on my self-awareness and abrasiveness.
Not saying you should adopt this, but sometimes I read aloud what I type and imagine myself replying to a student in real life in the way of and with the tone that people sometimes have on StackOverflow.
My gut reaction at that point, usually, is to rewrite a response or post completely with a more generous dose of humility and compassion.
I don’t always get it right, but when I remember to do that and read replies, I like myself a little bit more.
I’ve been thinking about this a bit more, and I realized that I talk to other people the way I talk to myself. This probably wouldn’t be a problem if I weren’t so critical of myself.
I think I need to not only put in the effort to reread the things I write when communicating with others, but also to just be kinder to myself in my internal monologue.
I spend too much time being frustrated inside my own head, and that makes it easy to use that same tone when I’m interacting with other people.
Thanks for sharing your advice. I think verbalizing my thoughts the way you suggested will be really helpful.
It’s not about feeling better. It’s about getting the other person to understand that Google exists and that they can use it, too. Too many people refuse to put in any effort of their own and go ask someone instead.
IMHO in that situation answering isn’t even the right thing to do, since it encourages that behaviour and prevents the asker from learning to find out stuff for themselves. Something about fishing for hungry people or so…
When someone is genuinely stuck, doing research themselves allows the answerer not to go down the same dead ends, which saves time for both.
If it’s on Stack Exchange, you can help us keep the community decent by assuming good faith and being patient with newcomers. Yes, it’s frustrating. And yeah, sometimes, it’s basically impossible to avoid sarcasm and scorn, just like how HN sometimes needs to be sneered at, but we can still strive for a maximum of civility.
If all else fails, just remember: you’re not on Philosophy SE or any of the religious communities, it’s just a computer question, and it can be answered without devolving into an opinion war. Pat yourself on the back for being a “schmott guy!” and write a polite answer that hopefully the newbies will grok. Be respectful of plural perspectives; it’s a feature that a question may have multiple well-liked answers.
Yeah, this list of sites is making me think of asking for a book by loudly asking a library, a series of coffeeshops, a chud microbrewery, and an 11-year-old bully. Try quietly reading in the library first, I guess.
ChatGPT is give you general answer not the right ones from my experience
Sometimes you get the right answer if you fine tune your question…but sometimes don’t
Peple misunderstand “Closed as duplicate” as an insult, when it’s just the hint to look at the provided link. If you didn’t find the answer previously, this just means there are multiple ways to express the problem, which use different words and thus don’t all find the same google result.
They also changed the wording from “closed” to “on hold” years ago, and I don’t think I’ve ever seen the people complaining about the site take any notice.
Some times the question has no semblance at all. Other times the answer has no semblance at all. Some times there’s no answer at all. And obviously, modern SO is full of people that will just post a ridiculously incorrect answer. There is a wide variety of possibilities!
I remember being very surprised as a I followed one of those links and got the answer I needed. But I don’t remember exactly when.
That’s fair, but if you edit the question to explain how it’s different (without which, how could anyone even answer your question?), it can be (and often is) reopened.
programmer_humor
Active
This magazine is from a federated server and may be incomplete. Browse more on the original instance.