A null terminated String is a misnomer. It is actually an array of chars which uses a special character to signify its upper boundary. So that a second variable is not needed to hold the upper boundary. Zero was chosen by K&R.
OK... But, if you don't mind me asking, so what?
All modern C implementations use null terminated strings, for which the term "null-terminated" is in fact, very accurate, and they are, as teknopurge stated, a big problem (I wouldn't say "the bane of modern computing" though - C# and Java certainly don't have those).
You're right, it didn't have to be NULL, and it is technically an array (actually, it's technically a pointer - C doesn't have real arrays), but really, was there some point, aside from misguided pedantry, that I missed?
So, basically, as the OP said, "screw the n00bs", right?
Given enough time, you can learn how to use just about anything. A program that's usable only by people who took several days (weeks?) to read the manuals, is not usable, by any meaningful definition of the word.
I disagree with the OP though - vi and EMACS weren't about "fucking the users", in fact, when they were created, they were relatively user-friendly. Hell, they are still more user-friendly than some later DOS programs. But now, they are showing their age. Their main problem is that they don't follow any common UI paradigms, simply because they predate those paradigms.
If you're a competent programmer, appreciate good design, know PHP to some extent, etc. then use *Drupal*
I'd say, even if you aren't any of those things, you should still go with Drupal.
Everything, from module installation, to template creation (which you have to do, even on the most basic site) is simpler and less technical in Drupal. The only thing that's better in Joomla! is a slightly more attractive admin area layout.
The idea that Joomla! is somehow more newbie-friendly, is a myth.
That God explicitly blessed the occasional wiping out of various peoples, basically designating them as subhuman. This also violates the commandment "thou shalt not kill" which is stupidly contradictory
Thou shalt not kill is a mistranslation. "Lo Tirtsakh" means "Thou shalt not murder" ("Thou shalt not kill", in the modern sense, would be "Lo Taharog").
The OT doesn't try to hide the fact that God is very much pro-killing.
Re:Why does it need a "direction" anyway?
on
Ruby 1.9.1 Released
·
· Score: 1
So, what you're saying is that Ruby, like C, shouldn't really change?
It's certainly one approach. And it's certainly not without merit - just ask the VB people who were forced to move to VB.NET, or even the Python people who'll have to do without the % operator.
But personally, I like it when languages evolve. As much as people hate VB, it's still better than GW-BASIC (it has functions! woohoo!), and Delphi, well, it's dead now (not because it sucked, but because MS hired their main guy and copied everything that made it special), but it was much better than the original Pascal.
Btw, I still don't get why frameworks are so different from languages (direction/evolution-wise). You said frameworks are "competitive", but don't you think Ruby has to fight for mindshare, just like Rails?
Re:Why does it need a "direction" anyway?
on
Ruby 1.9.1 Released
·
· Score: 1
What kind of "direction" does a general-purpose, Turing-complete language need? What kind of "direction" did BASIC have? Or Pascal? Or C?
C is a pretty good example (as it hasn't really changed in years), but BASIC and Pascal? VB.NET and Delphi's Object Pascal show obvious signs of direction - be it "turn BASIC into C# with weird syntax" or "turn an imperative teaching language into an object-oriented language for writing GUIs". Both languages are dramatically different from their predecessors, and they didn't just randomly mutate.
Btw, I didn't get why a framework needs direction, but a "general-purpose Turing-complete" language doesn't. Are you implying that all of those languages are basically the same?
OK lets talk about it. It never happened. There's no evidence of it ever happening. There's no logical reason for the IDF to target children, (you can't even use them for the Passover - it has to be Christian children's blood, see?). Claiming that the IDF is targeting children is pure propaganda, and until proven otherwise, an outrageous lie. Satisfied?
Lets talk about Israels use of WMDs
Ah.. when did Israel ever used WMDs? It probably happened in the same alternate universe where it targets children.
Hamas trying to pick up the pieces and repair the grotesque acts of devastation
That could have been easily avoided if the HAMAS relinquished its goal of destroying Israel, and started peace negotiations. But hey, shooting rockets at Israeli civilians is just as good, right?
OK, then how about a helicopter-like (instead of a jet-plane like) flying car?
Flying cars will NOT happen. The general public is far too stupid to own one, and you would have to put in safety systems that make the car refuse to move when periodic service is needed.
Then how about making the "flying car" fully automated? I think that's the solution for normal cars as well (better safety, less traffic, etc).
I don't think it'll be easy, or that it'll be tomorrow, but the demand is certainly there.
For instance, you could reason that all Japanese are murderous bastards for what they did to the Chinese in the 1930s. But that is not the will of the Japanese people, nor is the rise of Mexican drug gangs the will of the Mexican people, nor was the rise of the Nazi party the will of the German people.
You're right about Mexican drug gangs, and the Nazi party (AFAIK, they didn't even properly win the 1932 elections), but the WW2-era Japanese? Are you sure?
From what I've read, they were fiercely nationalistic, and unlike Germany, didn't have a history of a diverse political culture. Basically, the Emperor, who's a direct descendant of the Gods decided to go to war, and that's it.
States don't have rights, only persons have rights.
Nations have rights too. One of those is the right of self-determination.
Claiming that Israel doesn't have the right to exist, is tantamount to claiming that the Jews (unlike any other people) deserve only to exist at the mercy of other nations.
Thanks, and Israel is denying the Palestinians their right to self determination.
Since Israel supports the two-state solution, and the foundation of a Palestinian state in the West Bank and Gaza, it doesn't deny the Palestinian's right of self-determination, period.
The only thing that stands in the way, it the HAMAS's refusal to accept a "Palestine" that doesn't include Israel as well.
It's that simple.
American land was stolen in less enlightened times. Stolen prior to the establishment of the League of Nations / UN, prior to the Hague and Geneva Conventions, prior to WWII, and prior to the introduction of nuclear weapons. The defenders of Israel, China, and other states attempting to acquire territory by force in modern times would like us to return to a time of lawlessness. A time when acquiring territory by force was acceptable, as was slavery.
Funny you mention the UN, considering that Israel was formed according to a UN resolution - one that the Arab states decided to ignore, and try to conquer Israel by force.
Basically, the exact opposite of what you're implying.
Everybody was so busy with their (incredibly insightful and important) Israel/Palestine Sucks debate, they didn't consider that it's a scam.
I'm an Israeli, and I've never heard of this thing before. AFAIK, it wasn't reported in any Israeli news source - and they love to hype misguided "patriotic" ventures such as this one.
but from what I can tell most of the suicide bombers at the very least are non-affiliated people who wrongfully kill civilians because they have lost their homes, land and families
Wrong.
First of all, I don't know where you got that "non-affiliated" part from. They're always armed, trained, and sent by organizations such as the HAMAS.
Second, while "losing their families and homes and land" is a nice, romantic theory, it has no basis in reality. There's no evidence that the people who chose to become suicide bombers do so because they were personally wronged by Israelis. Those who failed in their mission, and were captured by the Israelis certainly claim that it isn't true. Mostly, they want to be heroes, and they hate Israel for political reasons (which goes against another myth - that they're Islamic fanatics. Usually, they're not even particularly religious).
A modern military force aggressively and methodically assaulting a primarily civilian region outside its national borders containing a few militias armed with crude explosives and rocks looks pretty lopsided to most rational people.
The HAMAS's policy is one based on violent struggle against Israel. It's something that they're proud to announce. The fact that they chose to fight against an enemy that is much stronger that they are (and to do so while using civilians as a human shield) might not be "fair", but it's the HAMAS's choice, and ultimately, the choice of the people who voted them into office.
Israel is clearly violating the firm international law against collective punishment
First of all, saying that any international law is "firm" is ludicrous. Basically, nobody cares about it. Even open, democratic nations like the US or the UK ignore international law when it doesn't please them, and I'm not even talking about Russia or China. "International law", where it comes to armed conflicts, is a joke.
Second, if you think the purpose is just collective punishment, then how do you explain that the buildings targeted were either HAMAS military installations, houses of HAMAS officers or weapon storages? Even if you say that it's Israeli propaganda, it's clear that it's not just a carpet bombing. Why? Because of the incredibly high percentage of armed militants among the dead.
Until Israel removes all illegal settlements and withdraws to its original borders, it will not have the moral high ground in this debate. If it does that and is subsequently attacked, then it will have my full sympathy and will be justified in limited and properly targeted retaliation.
This experiment was already performed on a small scale, guess where? The Gaza strip.
After removing all of the settlements from the Gaza strip (at a great cost, btw), did HAMAS announce that it had no quarrel with Israel on the Gaza strip? No - they starting shooting even more rockets from the strip. Why? While according to you, Israel has "original borders" it can retreat to, according to the HAMAS, "Historical Palestine"'s borders include all of Israel. Nobody, I repeat, nobody in the HAMAS claims that if Israel retreats from all of the West Bank (as it already retreated from all of the Gaza Strip), it will recognize Israel's right to exist. The war simply has nothing to do with it.
But, apparently, Israel should do it to... gain your sympathy. Great...
Mod parent up. I'd also add - even without considering civilian casualties, it's apparently very hard to even hit such a missile in the first place.
Living in Israel, I hear IDF officials talking about anti-missile technology all of the time (prolly to justify their incredibly expensive research projects), and:
It looks like a trivial problem, but it really isn't.
The technology simply isn't there yet (look at how well the Patriot missiles worked during the first Gulf War).
When it will be there, it's still an extremely expensive missile to shoot down a very cheap and easy-to-produce missile.
Basically, the reason Israelis don't use anti-missile systems is not due to "reluctance", but for very practical reasons.
This is precisely why design documentation tends to go out of date very quickly -- it's written in the wrong language. We can't easily specify the level of detail we require in natural languages and so defer it to programming.
Another example: legalese. If you've ever tried reading a legal document, you'd notice that while nominally written in a "natural language", it's:
More or less incomprehensible to a layman
Actually much closer to a programming language (with a weird syntax and keywords in Latin)
and.. since it's still related to natural languages, it's not precise enough for its purpose. People still argue about what certain words meant 100 years ago (when the law was written), and wage costly legal battles over vague wording.
PHP ? Real OO? Thanks for the great joke.
How can I add methods to Number? Ehm you know, the class used for numbers... In order to write 3.times() for instance... ah, it doesn't exist?
OK, and how do you do this (add methods to existing classes) in C++ or Java? What, there's no simple way to do it? And... you do know that both of those (incredibly popular, OOP) languages have non-object basic types?
Or maybe you're just one of those Smalltalk snobs. Wait... it's probably not it, because you apparently don't see the point of OOP at all, except for modifying basic types (which is usually a BAD idea, even if your language supports it).
And, FYI, there are many PHP-based projects that do use OOP. For example, CakePHP and its ilk, and I understand that Joomla has gone OOP as well (drupal is still implements its own crazy system though). What's more, since many web frameworks use OOP, the average PHP programmer has a very good chance of using "real" OOP as well.
PHP and Perl are hasbeens, and simply not suitable for the large scale web applications of today.
Facebook, Wikipedia, and yes, even the website you're currently posting are pretty "large scale".
Now, I hate PHP (and Perl), and it's completely possible that it would've been easier to write those sites in Java, but claiming that PHP "isn't suitable for large scale web applications" when there's lots of empirical evidence to the contrary, reeks of fanboyism.
Sure it is. Just like it's genocide, child abuse and patent infringement.
To be honest, I don't see why you're complaining. Your friend paid good money in order to go to the other side of the world and taunt soldiers in a war zone. I think he's got his money's worth.
A null terminated String is a misnomer. It is actually an array of chars which uses a special character to signify its upper boundary. So that a second variable is not needed to hold the upper boundary. Zero was chosen by K&R.
OK... But, if you don't mind me asking, so what?
All modern C implementations use null terminated strings, for which the term "null-terminated" is in fact, very accurate, and they are, as teknopurge stated, a big problem (I wouldn't say "the bane of modern computing" though - C# and Java certainly don't have those).
You're right, it didn't have to be NULL, and it is technically an array (actually, it's technically a pointer - C doesn't have real arrays), but really, was there some point, aside from misguided pedantry, that I missed?
Maybe I'm feeding a troll, but what else would you terminate it with without using something the string may contain?
How about Pascal-like strings, where you keep the length of the string in the first couple of bytes. It also has the advantage of making strlen O(1).
So, basically, as the OP said, "screw the n00bs", right?
Given enough time, you can learn how to use just about anything. A program that's usable only by people who took several days (weeks?) to read the manuals, is not usable, by any meaningful definition of the word.
I disagree with the OP though - vi and EMACS weren't about "fucking the users", in fact, when they were created, they were relatively user-friendly. Hell, they are still more user-friendly than some later DOS programs. But now, they are showing their age. Their main problem is that they don't follow any common UI paradigms, simply because they predate those paradigms.
I'd say, even if you aren't any of those things, you should still go with Drupal.
Everything, from module installation, to template creation (which you have to do, even on the most basic site) is simpler and less technical in Drupal. The only thing that's better in Joomla! is a slightly more attractive admin area layout.
The idea that Joomla! is somehow more newbie-friendly, is a myth.
That God explicitly blessed the occasional wiping out of various peoples, basically designating them as subhuman. This also violates the commandment "thou shalt not kill" which is stupidly contradictory
Thou shalt not kill is a mistranslation. "Lo Tirtsakh" means "Thou shalt not murder" ("Thou shalt not kill", in the modern sense, would be "Lo Taharog").
The OT doesn't try to hide the fact that God is very much pro-killing.
It's certainly one approach. And it's certainly not without merit - just ask the VB people who were forced to move to VB.NET, or even the Python people who'll have to do without the % operator.
But personally, I like it when languages evolve. As much as people hate VB, it's still better than GW-BASIC (it has functions! woohoo!), and Delphi, well, it's dead now (not because it sucked, but because MS hired their main guy and copied everything that made it special), but it was much better than the original Pascal.
Btw, I still don't get why frameworks are so different from languages (direction/evolution-wise). You said frameworks are "competitive", but don't you think Ruby has to fight for mindshare, just like Rails?
What kind of "direction" does a general-purpose, Turing-complete language need? What kind of "direction" did BASIC have? Or Pascal? Or C?
C is a pretty good example (as it hasn't really changed in years), but BASIC and Pascal? VB.NET and Delphi's Object Pascal show obvious signs of direction - be it "turn BASIC into C# with weird syntax" or "turn an imperative teaching language into an object-oriented language for writing GUIs". Both languages are dramatically different from their predecessors, and they didn't just randomly mutate.
Btw, I didn't get why a framework needs direction, but a "general-purpose Turing-complete" language doesn't. Are you implying that all of those languages are basically the same?
Yeah lets talk about the IDF targetting children
OK lets talk about it. It never happened. There's no evidence of it ever happening. There's no logical reason for the IDF to target children, (you can't even use them for the Passover - it has to be Christian children's blood, see?). Claiming that the IDF is targeting children is pure propaganda, and until proven otherwise, an outrageous lie. Satisfied?
Lets talk about Israels use of WMDs
Ah.. when did Israel ever used WMDs? It probably happened in the same alternate universe where it targets children.
Hamas trying to pick up the pieces and repair the grotesque acts of devastation
That could have been easily avoided if the HAMAS relinquished its goal of destroying Israel, and started peace negotiations. But hey, shooting rockets at Israeli civilians is just as good, right?
OK, then how about a helicopter-like (instead of a jet-plane like) flying car?
Then how about making the "flying car" fully automated? I think that's the solution for normal cars as well (better safety, less traffic, etc).
I don't think it'll be easy, or that it'll be tomorrow, but the demand is certainly there.
You're right about Mexican drug gangs, and the Nazi party (AFAIK, they didn't even properly win the 1932 elections), but the WW2-era Japanese? Are you sure?
From what I've read, they were fiercely nationalistic, and unlike Germany, didn't have a history of a diverse political culture. Basically, the Emperor, who's a direct descendant of the Gods decided to go to war, and that's it.
Nations have rights too. One of those is the right of self-determination.
Claiming that Israel doesn't have the right to exist, is tantamount to claiming that the Jews (unlike any other people) deserve only to exist at the mercy of other nations.
Since Israel supports the two-state solution, and the foundation of a Palestinian state in the West Bank and Gaza, it doesn't deny the Palestinian's right of self-determination, period.
The only thing that stands in the way, it the HAMAS's refusal to accept a "Palestine" that doesn't include Israel as well.
It's that simple.
Funny you mention the UN, considering that Israel was formed according to a UN resolution - one that the Arab states decided to ignore, and try to conquer Israel by force.
Basically, the exact opposite of what you're implying.
Mod Parent up!
Everybody was so busy with their (incredibly insightful and important) Israel/Palestine Sucks debate, they didn't consider that it's a scam.
I'm an Israeli, and I've never heard of this thing before. AFAIK, it wasn't reported in any Israeli news source - and they love to hype misguided "patriotic" ventures such as this one.
Wrong.
First of all, I don't know where you got that "non-affiliated" part from. They're always armed, trained, and sent by organizations such as the HAMAS.
Second, while "losing their families and homes and land" is a nice, romantic theory, it has no basis in reality. There's no evidence that the people who chose to become suicide bombers do so because they were personally wronged by Israelis. Those who failed in their mission, and were captured by the Israelis certainly claim that it isn't true. Mostly, they want to be heroes, and they hate Israel for political reasons (which goes against another myth - that they're Islamic fanatics. Usually, they're not even particularly religious).
The solutions presented by both sides so far are ridiculous:
a) Throw them in the sea (Palestinian solution)
b) Exterminate them (Israeli solution)
Actually, it's more like:
The HAMAS's policy is one based on violent struggle against Israel. It's something that they're proud to announce. The fact that they chose to fight against an enemy that is much stronger that they are (and to do so while using civilians as a human shield) might not be "fair", but it's the HAMAS's choice, and ultimately, the choice of the people who voted them into office.
First of all, saying that any international law is "firm" is ludicrous. Basically, nobody cares about it. Even open, democratic nations like the US or the UK ignore international law when it doesn't please them, and I'm not even talking about Russia or China. "International law", where it comes to armed conflicts, is a joke.
Second, if you think the purpose is just collective punishment, then how do you explain that the buildings targeted were either HAMAS military installations, houses of HAMAS officers or weapon storages? Even if you say that it's Israeli propaganda, it's clear that it's not just a carpet bombing. Why? Because of the incredibly high percentage of armed militants among the dead.
This experiment was already performed on a small scale, guess where? The Gaza strip.
After removing all of the settlements from the Gaza strip (at a great cost, btw), did HAMAS announce that it had no quarrel with Israel on the Gaza strip? No - they starting shooting even more rockets from the strip. Why? While according to you, Israel has "original borders" it can retreat to, according to the HAMAS, "Historical Palestine"'s borders include all of Israel. Nobody, I repeat, nobody in the HAMAS claims that if Israel retreats from all of the West Bank (as it already retreated from all of the Gaza Strip), it will recognize Israel's right to exist. The war simply has nothing to do with it.
But, apparently, Israel should do it to... gain your sympathy. Great...
Mod parent up. I'd also add - even without considering civilian casualties, it's apparently very hard to even hit such a missile in the first place.
Living in Israel, I hear IDF officials talking about anti-missile technology all of the time (prolly to justify their incredibly expensive research projects), and:
Basically, the reason Israelis don't use anti-missile systems is not due to "reluctance", but for very practical reasons.
I like my tea warm - hot tea burns my tongue. And as, another poster noted - some like it iced.
But the main point is that hot tea is dangerous. I think "lukewarm" or "very warm but doesn't cause 3rd degree burns" is a sensible default.
Another example: legalese. If you've ever tried reading a legal document, you'd notice that while nominally written in a "natural language", it's:
PHP ? Real OO? Thanks for the great joke. How can I add methods to Number? Ehm you know, the class used for numbers... In order to write 3.times() for instance... ah, it doesn't exist?
OK, and how do you do this (add methods to existing classes) in C++ or Java? What, there's no simple way to do it? And... you do know that both of those (incredibly popular, OOP) languages have non-object basic types?
Or maybe you're just one of those Smalltalk snobs. Wait... it's probably not it, because you apparently don't see the point of OOP at all, except for modifying basic types (which is usually a BAD idea, even if your language supports it).
And, FYI, there are many PHP-based projects that do use OOP. For example, CakePHP and its ilk, and I understand that Joomla has gone OOP as well (drupal is still implements its own crazy system though). What's more, since many web frameworks use OOP, the average PHP programmer has a very good chance of using "real" OOP as well.
Even if they could make their own computer from some sand and metal ore, they'd still be worried about the chips in their head that made them do it.
PHP and Perl are hasbeens, and simply not suitable for the large scale web applications of today.
Facebook, Wikipedia, and yes, even the website you're currently posting are pretty "large scale".
Now, I hate PHP (and Perl), and it's completely possible that it would've been easier to write those sites in Java, but claiming that PHP "isn't suitable for large scale web applications" when there's lots of empirical evidence to the contrary, reeks of fanboyism.
Could you elaborate? You don't think it's a problem?
And Tetris.
No, wait, wrong fetish.
Thats fascism.
Sure it is. Just like it's genocide, child abuse and patent infringement.
To be honest, I don't see why you're complaining. Your friend paid good money in order to go to the other side of the world and taunt soldiers in a war zone. I think he's got his money's worth.