16 ms·
If PHP Were British
- PedroCandeias 15y agoJoke about php devs not being savvy enough to actually go and make these changes in 3... 2... 1...
- deleted 15y ago[deleted]
- corin_ 15y agoI find myself getting genuinely annoyed when having to write things like "color" in CSS. I wonder, though, as fun as it is to think about these jokes, what serious implications it had. Let's say, for example, it actually had been started with variables using a £ rather than $, would it have made any difference at all?
- citricsquid 15y agoreally? I'm British and I'm quite amazed at how I can (without ever thinking about it) switch between colour and color. I wonder if maybe some people approach programming as a different language (eg: color isn't colour, it's color, it is a unique thing) and then some approach it as an extension of their own language.
- corin_ 15y agoMaybe I just don't code enough to have got used to it.
- radiowave 15y agoIn BBC basic it was indeed COLOUR, which took me some unlearning.
- polymatter 15y agoAlso a Brit here. I used to get annoyed, but eventually I think it seeped into my system as a different language as you put it. About 2 years ago I had a colleague get very angry with me for writing code analogous to: Color colour = new Color(); To me, it makes perfect sense, and tbh didn't realise I was even doing it. I definitely endorse everyone standardising on American spelling though, now its been pointed out to me.
- copper 15y agoStrangely, I do that too. I tend to blame my education :) Amusingly enough, (though not strange, if you consider its origins) Haskell uses the British spelling. Off the top of my head, the colour types are defined in the Data.Colour module.
- ender7 15y agoAfter seeing him give a talk, I've come to the conclusion that Simon Peyton-Jones is possibly the most British man alive.
- amirhhz 15y agoIf anyone is interested: http://ontwik.com/haskell/simon-peyton-jones-a-taste-of-haskell/ http://ontwik.com/haskell/simon-peyton-jones-a-taste-of-hask... I don't know if this is the one you meant, but I watched it a while ago and I think it's well worth the time: SPJ is great to listen to and you actually pick up a good amount Haskell and functional concepts.
- jacques_chester 15y agoHe'll have to apologetically briskly out-stroll Stephen Fry first.
- benjiweber 15y agoclass Colour extends Color {} // problem solved.
- elliottkember 15y agoI've often wondered this. I had a friend who couldn't spell to save his life when he was writing prose - but when he wrote code he was fine. Never understood how that worked.
- troels 15y agoAre you saying that you don't? I most definitely think of code as being an extension of language. Code occupies this rather unique field where it is part machinery and part language. Approaching it only as machinery, limits your possibilities.
- citricsquid 15y agoMaybe that's why I'm a terrible programmer then.
- SoftwareMaven 15y agoI doubt it. While it may limit your parent's capability (if he thought of it as a second language), I think it would a little presumptuous for him to imply it limits yours. I know lots of people who approach coding differently than I do, yet they still do just fine (even if I can't watch them code because it drives me crazy :).
- troels 15y agoIt would be presumptuous if I was to say that not thinking that way would make you a bad programmer; I'm sure there are many ways to enlightenment. And many types of enlightenment, for that matter. But I would venture to say that being able to think of programming as language, is a strength. Whether you use this paradigm as the primary frame for writing software, is a different matter. I find it very powerful. See also: Literate programming, or - more recently - Domain Driven Design (In particular: Ubiquitous language).
- MattJ100 15y agoI'm glad you said this - I'm exactly the same. I automatically type "color: gray" when coding, I wouldn't dream of using them them outside my text editor. It may not be limited to natural vs programming language though. I also have no issue daily switching between 0-indexed and 1-indexed languages, but I hear an endless stream of complaints about the latter language from people who insist they can't do that.
- Lewisham 15y agoI never had much of a problem with 'color', but grey/gray got me every single time. Always went with the British spelling. However, at this point, I actually can't remember which spelling is which. I have to look it up. 'a' is the American one, right? (gosh, I hope I'm right)
- randlet 15y agoI write a fair bit of wxPython code and one of the things that always struck me as surprising is that you can use widget.Color or widget.Center interchangeably with widget.Colour and widget.Centre!
- Sodaware 15y agoThe biggest problem would be that the £ symbol is not on US keyboards. The # symbol takes its place, but is called the pound sign rather than hash.
- rbanffy 15y ago> Let's say, for example, it actually had been started with variables using a £ rather than $, would it have made any difference at all? I think that had more to do with the $ usage in Perl rather than with currencies.
- abhaga 15y ago> Let's say, for example, it actually had been started with variables using a £ rather than $, would it have made any difference at all? I cannot see £ sign on my keyboard, so that would be slightly inconvenient. :)
- gmac 15y agoIndeed, nor is it in ASCII. So it might at least have encouraged attention to be paid to character encoding issues a decade or so earlier!
- Someone 15y agoWho cares about ASCII (American standard code for…) in a British product? This, of course, would use BS-4730 (BS = British Standards Institute.) it has £ where ASCII has #.
- willyt 15y agoThere's no # on mac British keyboards! You have to hit option-4 (did I get that right, don't have a keyboard in front if me) to e.g. comment ruby code...
- tristanperry 15y agoWhen I was younger it'd annoy me. I'd always forget and slip back into writing colour. Then I'd wonder why the text or background colour of something wasn't changing. A few minutes later (of checking I was editing the right file, that I was changing the property of the right id/class, etc etc!), I'd finally realise I was simply 'misspelling' it. DOH! Now, though, things have clicked and I find I can very easily switch between color and colour when needed. Even to the point that if I'm typing on a US based site, I tend to use color (and Americanized spellings), and on non-US sites I tend to British spelling. Can take a while to get used to though. Anywhoo, I loved this blog post :) Especially the: Words fail me at this point. How is any self-respecting gentleman expected to make head or tail of these "words". It beggars belief that anyone could allow such distortions of words to be entered into a programming language. They, along with the myriad of similar errors, should be reverted to their proper forms immediately: Bit!
- j_col 15y agoBrilliant! Given my sadness today around HP destroying the mobile platform I love (webOS), this has really cheered me up ;-) I especially like the cheerio() function.
- AlexC04 15y agoI too thought it was brill. Next, lets play "if PHP were cockney"
- justincormack 15y agowe could replace the semicolon with "innit!" $oranges = "lemons" innit!
- FuzzyDunlop 15y agoI prefer the Manc version of PHP (which syntactically has bugger all in common with PHP coz thats how we roll in Manc): alright ar kid? im not being funny but x = y z is like 10 * 10 int it you got a spare minute? can you just do this for us // codage while im sorting this out // conditionage ta son if /*function*/ is acting the goat bloody_nora (error) summat wrong? nah : damn fucking right flower
- lubutu 15y agoThe only language I know which actually uses "colour" in its standard library, is Occam, designed in Bristol. Are there any others? (Nitpick: "socialize" is the original spelling; "socialise" was a change in spelling on our side of the pond.)
- corin_ 15y agoThere's actually many cases where we (Brits) hate on the American version without realising that actually theirs is the version we were using back when we sent people over to America, and it is us we have changed over the years not they. Still annoys me though :)
- mahmud 15y agoAmerica is a preservation jar for per-Enlightenment Britain.
- deleted 15y ago[deleted]
- SoftwareMaven 15y agoWhen I learned that, I found it extremely humorous. What was even funnier was that the extra U's showed up as Britain attempted to be more French-like. Isn't that a slap in the face today!
- rbanffy 15y agoI still insist to write "behaviour" despite the protests of my spell-checkers. And I am a Brazilian/Hungarian educated mostly in Portuguese to whom English is a third language. I blame my high-school English teacher. But then, when in the browser, I also catch myself submitting forms with control-x control-s.
- andrewem 15y agoQuite. See this supposed American barbarism from Daniel Defoe's 1722 novel "Journal of the Plague Year": "besides, it being in the time of the vacation too, they were generally gone into the country". (http://www.gutenberg.org/files/376/376-h/376-h.htm http://www.gutenberg.org/files/376/376-h/376-h.htm)
- wbhart 15y agoIf it were truly British then upon an exception it would apologise excessively and offer to dust you off. Queues would also be ubiquitous. Data could not be accessed in order, but would have to be retrieved from an unordered queue, which would necessarily involve a long wait. There would also be a congestion charge for drivers at certain hours of the day and interfacing with Rails would cause unexpected delays.
- mambodog 15y agoGoogle cache link: http://webcache.googleusercontent.com/search?q=cache:http://www.addedbytes.com/blog/if-php-were-british/&hl=en&strip=1 http://webcache.googleusercontent.com/search?q=cache:http://...
- premchai21 15y agopreg_match might actually be better expanded as practical_extraction_and_reporting_language_regular_expression_match. (I'd comment on the original but it's currently too overloaded for it, I gather.)
- justincormack 15y agoNot overloaded, just form an orderly queue and wait please.
- code_duck 15y agoyeah, where does 'perform' come from?
- Luyt 15y agoCOBOL. But I think the author didn't know that the preg_*() functions use regular expressions the same way Perl does.
- DaveChild 15y agoI did know that, but wasn't sure the "p" stood for "perl". The manual page for preg_match leads with "preg_match — Perform a regular expression match", so I went with that.
- code_duck 15y agoTrue, and you never know with PHP. The preg functions are wrappers around the Perl Compatible Regular Expressions library, though (PCRE) vs the older POSIX greg PHP functions, so I do think they mean Perl.
- ojbyrne 15y agoActually, my understanding is that the p in preg actually stands for perl. php.net refers to PCRE (Perl Compatible Regular Expressions).
- BerislavLopac 15y agoI'm amazed that no comment has yet mentioned my favo(u)rite take on the subject, the immortal Lingua::Romana::Perligata http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.... ;)
- halostatue 15y agoFunny, but completely ignorant of the fact that Canadian English is distinct from Amrican English. We generally spell it 'colour' here, but draw the line at 'connexion', and have two spellings for 'seriali[sz]e', depending on the audience and style guide you follow. Joe Clark has a wonderful book about this, Organizing Our Marvellous Neighbours (http://en-ca.org/ http://en-ca.org/).
- rll 15y agoYeah, the opening paragraph to this one lost me. I have a Canadian passport and I was living in Canada at the time and we spell it "colour" there. But yes, I chose to go with American English over Canadian/Danish/Inuktituk simply because I was already used to that from other languages. Like others have mentioned, non-American programmers don't tend to think of the terms in programming languages as an extension of the language, but simply as tokens that do things. Having those tokens consistent across languages makes sense.
- joshaidan 15y agoYeah, it makes me wonder if we'll ever see a programming language that uses "colour." Are there any out there? We must do something to reverse this trend!!!
- Kliment 15y agoWx uses "colour" everywhere: http://www.wxpython.org/docs/api/wx.Colour-class.html http://www.wxpython.org/docs/api/wx.Colour-class.html
- ralph 15y agoProgramming languages created in England use "colour", e.g. BBC BASIC. http://www.bbcbasic.co.uk/bbcbasic/manual/bbckey1.html#colour http://www.bbcbasic.co.uk/bbcbasic/manual/bbckey1.html#colou... Yes, BBC as in British Broadcasting Corporation.
- cperciva 15y agoInterestingly, Canadian English is almost en-GB-oed -- which is the closest thing the world has to "international standard English", seeing as it's the dialect preferred by both the United Nations and the International Organization for Standardization,
- thelovelyfish 15y agoIf it were British there would be alcohol involved somehow.
- voyou 15y agoWe're talking about PHP, so I think we can take it as read that there was substance abuse involved somewhere.
- thelovelyfish 15y agololz
- jordinl 15y agoA colleague once complained because I wrote 'initialize' with a z...
- cafard 15y agoIf we change the sigils, can we refer to objects as "quiddities"?
- tarkin2 15y ago$ is superior though, simply for its ease of access using the left index finger. £ would require the use of the middle finger. To British sensibilities, it would mean swearing at PHP on every variable declaration! Actually, that said...
- benjoffe 15y ago£ isn't even available on my keyboard, I would need specific software or IDE features just for this.
- uxp 15y agoI agree that ease of accessibility of the key is very important in choosing a variable symbol. The first time I ever stepped into ERB, typing <% was a chore, since it was just a bit further than I had been used to typing tag characters. For en_US Americans on OS X, the £ character is a simple Option+3 though. Can anyone tell me what the key combination for the character is on en_US Windows platforms?
- benjiweber 15y agoI'm always amazed how hard it is to type a | pipe on an american keyboard. On British keyboards it's next to left shift so you can type it with just one keystroke.
- w1ntermute 15y agoOh god, I had to use a British keyboard while working on a project this summer, and that damn backslash/pipe key next to the left shift was the bane of my existence. I don't know how many times I accidentally hit that when trying to hit the left shift. Why would you ever put it there? And the tall Enter key - uggh, why? Even if you need an extra key because of the pound symbol, you could just put it where the backslash/pipe key normally goes, instead of having a misshapen Enter key. And swapping " and @ - completely nonsensical. ' and " should be on the same key.
- deleted 15y ago[deleted]
- zandorg 15y agoIn Common Lisp, 'Fourth' is the fourth item in a list, rather than 'Forth'.
- reinhardt 15y agoHow long until some bored hacker writes a british<->us PHP compiler and posts it here? I give it a week.
- uriel 15y agoAnd if PHP was Japanese it would commit Seppuku.
- georgieporgie 15y agoI always thought the dollar sign originated as a variable marker because it was used in BASIC to mark a string. Is there an earlier origin?
- 4J7z0Fgt63dTZbs 15y agoNow if PHP were Japanese?
- fdb 15y agoHe does have a point with the abbreviations. The use of abbreviations and underscores in PHP is maddeningly inconsistent. Example: pdf_stringwidth strlen str_replace