|
Hammerite posted:I don't see what you mean. Yes, do { ... } while (false) is another good example, although as far as I am aware it only provides the same functionality as goto. Sorry, I thought we were playing "seemingly odd but legitimate uses of loops", not "heh everything is a goto". PS How is what you quoted a goto?
|
# ¿ Sep 27, 2010 21:00 |
|
|
# ¿ May 14, 2024 10:07 |
|
Hammerite posted:php I had no idea we were talking about PHP. My apologies.
|
# ¿ Sep 27, 2010 23:46 |
|
Yeah I hate when the browns mess up my code.
|
# ¿ Sep 29, 2010 21:03 |
|
Argue posted:randomized http responses I think this ties for best in thread with Duff's Enigma.
|
# ¿ Nov 9, 2010 06:26 |
|
GrumpyDoctor posted:With operator overloading, all bets are off. Unary ! could reformat your hard drive. So two of them should bring your hard drive right back.
|
# ¿ Nov 11, 2010 20:53 |
|
And after a couple of years, to me I'm other people.
|
# ¿ Nov 26, 2010 22:43 |
|
Munkeymon posted:Naming your release after the last movie you saw isn't totally unreasonable. I could see it giving a movie buff some context to help pull up associated memories. So long as that context includes the missing year of a date and missing version numbers, and said movie buff still works there, I'm with you. Maybe the Click release worked around something really annoying.
|
# ¿ Dec 2, 2010 01:06 |
|
Zombywuf posted:Short answer: IE. Ahahahahahahahahahahahaha IE is the greatest thing ever made ever.
|
# ¿ Dec 7, 2010 10:29 |
|
PHP's as good a conversation subject as it is a programming language.
|
# ¿ Dec 11, 2010 03:08 |
|
Munkeymon posted:This counts as a horror, right: Wikipedia article on SYmbolic LinK (SYLK) posted:Not to be confused with symbolic link. Not so sure that's such a horror, though they could probably have chosen something a bit less likely to appear at the start of a csv file than "ID".
|
# ¿ Dec 14, 2010 22:25 |
|
Xenogenesis posted:Some Rails controller action from a photo site: What an obnoxious way to write.
|
# ¿ Dec 20, 2010 00:56 |
|
Minecraft is the new PHP.
|
# ¿ Jan 8, 2011 15:19 |
|
C++'s fault for overloading bit shifts in iostream, giving this poor guy two different assignment operators to choose from seemingly arbitrarily (because one of them is completely arbitrary). The other two errors are very forgivable. I guess what I'm saying is why shouldn't he expect the bit shift by area to be an assignment? Now I just feel bad for him. He's not the problem here. His language has failed him.
|
# ¿ Jan 15, 2011 17:33 |
|
YeOldeButchere posted:You never know what future versions will do. Better safe than sorry. I realize you're joking but surely an assertion would make more sense if that was the goal. I've definitely seen assertions for e.g. C++ STL containers, like this: code:
|
# ¿ Jan 28, 2011 23:15 |
|
Hammerite posted:The main argument against using it from a functionality perspective, as far as I can see, is that it doesn't let you do anything you can't already do with an associative array. That's a silly reason. Take that argument far enough and we'll all use assembler whose only instruction is subtract and branch if less than or equal to zero. I haven't touched PHP in a solid decade so I don't know how this particular feature works but does it help make something clearer or easier to use?
|
# ¿ Feb 11, 2011 16:49 |
|
Ryouga Inverse posted:A tab can be defined by the viewer to be an arbitrary number of spaces Don't tabs mean "go to the next tab stop", and it's the tab stops that are defined as an arbitrary number of spaces apart? [/pedantry]
|
# ¿ Mar 10, 2011 23:18 |
|
Tux Racer posted:converting a tab to spaces as to not gently caress up the formatting really isn't a huge deal So do it. Problem solved.
|
# ¿ Mar 11, 2011 09:16 |
|
Thermopyle posted:No. I wasn't being disparaging anyone. Dren's belief that naming is important was independently echoed, and Dren is encouraged by this.
|
# ¿ Mar 15, 2011 09:31 |
|
Wait why does that compile?
|
# ¿ Mar 23, 2011 06:21 |
|
yaoi prophet posted:some_id implicitly gets converted into bool. Oh, now I get it. Thanks!
|
# ¿ Mar 23, 2011 07:27 |
|
Shame about the typo.
|
# ¿ Mar 25, 2011 19:50 |
|
yaoi prophet posted:Fortunately nobody is going to be searching for stuff including backslashes in our data. Remember where you were when you said this.
|
# ¿ Mar 27, 2011 11:59 |
|
Janin posted:It's standards-compliant code that has different output depending on whether the compiler is in C89 or C99 mode. That's not a horror, it's a specification check at runtime.
|
# ¿ Mar 30, 2011 00:06 |
|
Lexical Unit posted:They only have one request, that we change all Imperial units to SI. This is a nightmare... Calmly explain to your boss or the customer that this is how spacecraft explode.
|
# ¿ Mar 31, 2011 16:46 |
|
Munkeymon posted:It works because (.*) can match nothing (as in, a zero-length string) without error. At least, that's the best way I can think to put it. I'm sure someone will correct me if I'm not stating it perfectly. Dot is "any one character", star is "zero or more times". So the empty string is indeed matched by .*.
|
# ¿ Apr 12, 2011 22:55 |
|
It's pretty boring.
|
# ¿ Apr 15, 2011 04:30 |
|
shrughes posted:Babby didn't like milliseconds so he created a library that parses strings instead. Alright, I'll be that guy. What makes this a horror? OK, it's not implemented how I would have implemented it, adding 1.7KB of someone else's code to your page doesn't seem worth it for what little is gained, and the parsing of strings isn't even done very well: code:
I guess I'm saying I have zero desire to use this guy's code but what's horror-worthy about it? Also setTimeout's arguments are backwards, so at least this guy got that right.
|
# ¿ May 15, 2011 09:00 |
|
I never liked January much, so I applaud that date printer for it's bold step.
|
# ¿ May 18, 2011 18:08 |
|
Pardot posted:
bwahahahahahahaha
|
# ¿ May 23, 2011 21:16 |
|
pseudorandom name posted:I don't see what's so bad about marking up data so that search engines can identify, extract and index it. 1. It's ugly. 2. That's the whole job of a bloody search engine!
|
# ¿ Jun 4, 2011 08:17 |
|
Brecht posted:Not really. It's extra, meaningful data provided in a canonical, straightforward way. I see HTML as markup that's meant to be almost as human-readable as computer-readable. To my mind, that's why manually editing XML is usually hopeless, and why browsers interpret HTML so leniently. "Extra, meaningful data provided in a canonical, straightforward way" can be, and in this case is, done in an ugly way. quote:If search engines can know the context of data, they get a lot better. I don't see why this is controversial. Nowhere did I say otherwise, your controversy is imagined.
|
# ¿ Jun 4, 2011 09:04 |
|
1337JiveTurkey posted:Instead it's separating the data's logical structure from the document's structure so you don't have spans, divs, tables and the like cluttering up the biographical information of a film director. This admirable goal has nothing to do with the posted example, which in fact adds one div and one span that were not present in the original. quote:Removing semantically meaningful data is something that should only be done with a reason. ... Removing metadata which is in a standardized format makes it harder for search engines and other tools to use the remaining data effectively. We're talking about a new specification that adds data. As of a month ago, precisely zero websites were using it. What data is being taken away here? Just as data should be removed only with reason, so should data be added only with reason. There is such a thing as too much.
|
# ¿ Jun 4, 2011 10:28 |
|
Aleksei Vasiliev posted:writing code without looking at it is some seriously zen poo poo I write like this: code:
|
# ¿ Jun 4, 2011 10:40 |
|
Brecht posted:So you're saying if I'm writing a movie website, and I know this H3 contains the director's name, signaling that context with a type="director" tag is too much information? Not necessarily, I'm saying adding ten attributes, a div, and a span to signal that context is too much.
|
# ¿ Jun 4, 2011 19:41 |
|
1337JiveTurkey posted:HTML doesn't do structured data very well and it shows. XML with client-side XSLT does much better in that regard since then you can just have an XML document. HTML does documents very well, and I'm not sure it was ever seriously offered as a language to describe structured data, so why should it do that very well? As you point out, there are better tools for that job. Yet another attempt to bolt some attributes on to HTML and call it a data description language seems wrongheaded. And ugly. <structured data store> + <store to html transformation> will generally be better than HTML for any values of the two variables, if your problem is storing and presenting structured data.
|
# ¿ Jun 4, 2011 19:47 |
|
Vanadium posted:Go has it too, but when I tried to google for a description I only found a yahoo answers page about why ghosts do not fall through floors if they can go through walls. The golang spec is pretty readable, including its section on switch statements. But yeah, break is implicit in cases, fallthrough overrides it.
|
# ¿ Jun 18, 2011 08:01 |
|
wwb posted:just about every other language I can think of defines boolean "true" using the keyword TRUE and boolean "false" using the keyword FALSE. I actually quite like how YAML defines true, yes, and on all as boolean true. code:
|
# ¿ Jun 26, 2011 08:21 |
|
benitocereno posted:I'm convinced there's a whole subset of programmers that do this kind of thing just to gently caress with you. Maybe it's a canary. When you see one you're supposed to figure out who wrote it, ask them what the hell they were doing, and they say "ahh, you've actually read the code! Excellent!"
|
# ¿ Jul 6, 2011 23:17 |
|
baquerd posted:The issue is the number of programmers who think it's just another language to use instead of a substantially different cross-disciplinary skill. The other issue is CSS isn't a proper language, with no support for variables or functions, so it's a huge pain in the rear end to use if you are a programmer. If CSS had started out like less or sass maybe it wouldn't be so horribly abused. quote:I still use tables for layout Can't fault you for that one. Why CSS doesn't have a columns: 2 is beyond me.
|
# ¿ Jul 25, 2011 18:14 |
|
|
# ¿ May 14, 2024 10:07 |
|
_aaron posted:Not to derail too much, but I'd like to get into some web development, and I'd like to avoid these bad tutorials. Any suggestions for where to start learning? I've been learning Python lately, and I like it, so maybe something where I can put that to use? Your intuition regarding derails is spot on! Hit up the web dev thread for more. But basically, figure out the box model (box = size + padding + border, margins don't count towards size, margins collapse each other) and positioning (absolute, relative, and fixed all start their own coordinates for child elements) and you can figure most of it out. Also you can make shapes!
|
# ¿ Jul 26, 2011 06:44 |