|
|
# ? Dec 7, 2011 15:31 |
|
|
# ? May 16, 2024 02:17 |
|
The real horror here is that whole web thingy.
|
# ? Dec 7, 2011 16:48 |
|
Clavius posted:I bet they were doing this with tables before, until they heard somewhere that tables were bad, so they moved to DIVs
|
# ? Dec 7, 2011 17:08 |
|
In order to get rounded corners just right I've had to resort to autogenerating html like that. It sucks but them's the breaks on an internet that allows IE.
|
# ? Dec 7, 2011 17:20 |
|
Suspicious Dish posted:(The bet was related to Prototype's use of regex to validate JSON and then parse it using eval(), which is a horror in and of itself. I bet money that there was no excuse -- the JSON spec was easy enough to hand-write a recursive-descent parser for in an hour. I won.) Oh sam
|
# ? Dec 7, 2011 18:55 |
|
Isn't being able to eval it pretty much what json was designed for?
|
# ? Dec 7, 2011 19:05 |
|
Vanadium posted:Isn't being able to eval it pretty much what json was designed for?
|
# ? Dec 7, 2011 19:14 |
|
It's trivial to write a parser though, and would likely be faster than eval() *unsubstantiated claim
|
# ? Dec 7, 2011 19:38 |
|
NotShadowStar posted:Oh sam Tom, actually: https://github.com/sstephenson/prototype/commit/9ff57b042d30b527ff1c96feec863042b28926a8#diff-1
|
# ? Dec 7, 2011 22:17 |
|
NotShadowStar posted:It's trivial to write a parser though, and would likely be faster than eval() Faster than an eval implemented in Javascript, yes. Faster than a native-code eval implementation? Of course all modern browsers have native JSON decoding too, so there's really no excuse for using eval at all.
|
# ? Dec 7, 2011 22:56 |
|
qntm posted:I bet they were doing this with tables before, until they heard somewhere that tables were bad, so they moved to DIVs I don't really know much about web design. Are tables actually bad or not?
|
# ? Dec 7, 2011 23:04 |
|
PalmTreeFun posted:I don't really know much about web design. Are tables actually bad or not? Tables are pretty good at displaying tabular data and for organization of very basic pages. When used excessively for layout they get really ugly really fast.
|
# ? Dec 7, 2011 23:06 |
|
PalmTreeFun posted:I don't really know much about web design. Are tables actually bad or not? Tables were used as layout before CSS was good enough to take over the job and tables were an approximation on what print designers are used to. Then came this long dark era where everything was ugly as poo poo because CSS doesn't give you the tools that someone doing design would expect, like columns and baselines and letter spacing all that fun stuff. In the last few years you saw the web starting to look a whole lot nicer because the old print designers learned CSS and started applying the decades old techniques on how to make things look pretty to CSS. Baselines almost impossibly hard to keep straight though, and letter spacing is pretty much non-functional still.
|
# ? Dec 7, 2011 23:50 |
|
Thanks to this thread I correctly guessed the cause of an intermittent connection failure in a system - it was an intermittent problem where it would lose connection to the database and boot users out and as soon as it was mentioned I said "Heh, I bet it'll turn out that it's not got anything handling connection failures". It took the developer on it a couple of days to get down to the problem but sure enough, buried in the code was a wonderful CATCH returns NULL. Nice one whoever put that it. You can't acquire a connection so what should you do? gently caress it just carry on regardless.
|
# ? Dec 7, 2011 23:56 |
|
TRex EaterofCars posted:In order to get rounded corners just right I've had to resort to autogenerating html like that. It sucks but them's the breaks on an internet that allows IE. Yeah don't do this. It's much better to just let IE have the square corners and use border-radius. It's extremely easy to bring round an ACM or client to this way of thinking when you tell them it will take X amount of extra hours to implement and quantify that extra cost to them. There's also the billion other arguments such as clean code, scalability, future planning, accessibility, load time, maintenance time blah blah blah blah, but the easiest one to sell the average person you actually have to sell this to is just to quantify the money they lose by implementing a meaningless piece of flair that adds nothing to the functionality of a product in a ten year old peripheral. e: and if that fails and you absolutely must have the corners in ie, use a js framework or something to patch up the lack of functionality, don't make the real browsers suffer with terrible coding practice. CSS3PIE was pretty rad the last time I went out of my way to make the design identical down to ie6. Clavius fucked around with this message at 00:30 on Dec 8, 2011 |
# ? Dec 8, 2011 00:27 |
|
qntm posted:I bet they were doing this with tables before, until they heard somewhere that tables were bad, so they moved to DIVs code:
|
# ? Dec 8, 2011 00:30 |
|
Proving once again that one of the hardest problems in computer science is naming things:code:
|
# ? Dec 8, 2011 01:59 |
|
Clavius posted:Yeah don't do this. It's much better to just let IE have the square corners and use border-radius. Don't you know that if everything doesn't have drop shadows and rounded corners in all browsers, your site won't work at all / visitors will immediately leave / nobody will understand the 'vision' / be unable to read the content that's nowhere near the rounded corners / become outraged?
|
# ? Dec 8, 2011 02:45 |
|
I really liked the period of time where the harder/uglier it was to do something in CSS the more likely common it was because 98% of the CSS tutorials on the web were three-column layouts and rounded corners.
|
# ? Dec 8, 2011 02:52 |
|
w00tz0r posted:Proving once again that one of the hardest problems in computer science is naming things: I came across this yesterday: code:
|
# ? Dec 8, 2011 03:01 |
|
Obviously they're short for "Implementation" and "Contract".
|
# ? Dec 8, 2011 03:05 |
|
evensevenone posted:I really liked the period of time where the harder/uglier it was to do something in CSS the more likely common it was because 98% of the CSS tutorials on the web were three-column layouts and rounded corners. I still think CSS is terrible for layout. There's 1000 different ways to "center something", and they all have their own drawbacks. It's amazing to me that there's a whole society of people who have been brainwashed into believing that position: absolute; top: 50%; left: 50%; margin-top: -300px; margin-left: -400px; is better than <center>. I'm all for separation of content and markup, but what I feel CSS needs is horizontal-position: center; vertical-position: center;, which the browser would do all the correct math to center the element relative to the parent. I've heard there's a float: center; in CSS3, and there's that new fancy flex box stuff, so I guess there's things to look forward to.
|
# ? Dec 8, 2011 03:16 |
|
Suspicious Dish posted:I still think CSS is terrible for layout. There's 1000 different ways to "center something", and they all have their own drawbacks. It's amazing to me that there's a whole society of people who have been brainwashed into believing that position: absolute; top: 50%; left: 50%; margin-top: -300px; margin-left: -400px; is better than <center>. code:
|
# ? Dec 8, 2011 03:57 |
|
I'm diving into one of our old programs to port it over to from VC6 to VS2008, so I'm looking forward to regularly screaming at my monitor again. At least I convinced them to let me install redmine as opposed to working off a to-do list .txt file on my lead's desktop.
|
# ? Dec 8, 2011 04:02 |
|
Clavius posted:Yeah don't do this. It's much better to just let IE have the square corners and use border-radius. It's extremely easy to bring round an ACM or client to this way of thinking when you tell them it will take X amount of extra hours to implement and quantify that extra cost to them. There's also the billion other arguments such as clean code, scalability, future planning, accessibility, load time, maintenance time blah blah blah blah, but the easiest one to sell the average person you actually have to sell this to is just to quantify the money they lose by implementing a meaningless piece of flair that adds nothing to the functionality of a product in a ten year old peripheral. Lecture me all you want, specs are specs and customer is rich, I'm not going to rile him up over more money for me. I'll give him the "this will take X hours" and if he says "ok" then I do it.
|
# ? Dec 8, 2011 04:06 |
|
Well I can't possible imagine why ticking and unticking the box to control <feature> isn't working, afterall the backend code looks mighty fine to me:code:
|
# ? Dec 8, 2011 13:06 |
|
NotShadowStar posted:
Only works with a specified width, and now you need a wrapper <div> to add a margin.
|
# ? Dec 8, 2011 15:01 |
|
Suspicious Dish posted:Only works with a specified width, and now you need a wrapper <div> to add a margin. Uh, yes, there's reasons for that. Quiz time: How do you automatically center something that isn't text in something like InDesign? A: You can't, because of the same problems I talked about. You center something by hand in InDesign, Interface Builder, whatever the name of the Microsoft thing builder is. The thing you're trying to center has to have a fixed size, what you're centering it to has to have a fixed size, and the margins are calculated automatically.
|
# ? Dec 8, 2011 16:33 |
|
Can you center vertically with that? "margin-top: auto; margin-bottom: auto;" doesn't seem to do anything.
|
# ? Dec 8, 2011 16:45 |
|
mjau posted:Can you center vertically with that? "margin-top: auto; margin-bottom: auto;" doesn't seem to do anything. The margin:0px auto trick only works for horizontal centering, and in my experience vertical centering can be a bitch. The best way I've found to do it, where the containing element's height is not known, is: display:table-cell; vertical-align:middle;. I feel dirty every time I use that though.
|
# ? Dec 8, 2011 17:22 |
|
TRex EaterofCars posted:Lecture me all you want, specs are specs and customer is rich, I'm not going to rile him up over more money for me. I'll give him the "this will take X hours" and if he says "ok" then I do it. Like I said, there are much better ways to pander to terrible browsers than nesting divs horribly. Rounded corners is especially easy using what I posted there. Vertical centering in CSS is loving awful. Mostly I just design to not have to center vertically because more often than not a fixed height is terrible practice for when blind people want bigger font sizes and stuff like that. It's much better to let the heights of elements be dictated by a base from the font size using em's. Sometimes it's not possible but ideally... Generally though CSS2 isn't set up for layout and we use a series of nasty hacks because it's a bit less horrible than tables. CSS3 has some real real nice layout controls going, but it's one of those things we can't just apply the progressive enhancement argument to like rounded corners and shadows and stuff. The old browsers will totally gently caress it up rather than degrade it gracefully.
|
# ? Dec 8, 2011 17:54 |
|
Clavius posted:Like I said, there are much better ways to pander to terrible browsers than nesting divs horribly. Rounded corners is especially easy using what I posted there. I will use that in the future, thanks.
|
# ? Dec 8, 2011 18:25 |
|
Clavius posted:Vertical centering in CSS is loving awful. This is mostly because for some reason even CSS3 doesn't have any abilities for baseline grids, so you have to do it yourself. If you were vertically centering some element in InDesign you'd put an equal number of baselines top and bottom. With CSS you have to do the same calculations by hand. It comes out the same in the end if you do it right, it's just more work and more chances to get it wrong.
|
# ? Dec 8, 2011 18:42 |
|
For a script designed to make web design easier, CSS sure doesn't seem to do a lot to make web design easier.
|
# ? Dec 8, 2011 20:30 |
|
PalmTreeFun posted:For a script designed to make web design easier, CSS sure doesn't seem to do a lot to make web design easier. CSS makes the trivial easy, and the complex achievable. EDIT: That was sarcastic. Sinestro fucked around with this message at 21:34 on Dec 8, 2011 |
# ? Dec 8, 2011 20:58 |
|
Is CSS perfect, no? But like any other design medium you need to start working with it rather than against it. Unfortunately most designers don't like using calculators to figure out how to manipulate box models. And it took a decade for tools and browsers to catch up.
|
# ? Dec 8, 2011 21:26 |
|
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Spatial_searching_ref/Class_Kd_tree.html Look at the const-ness of the operations. I find some of them...questionable.
|
# ? Dec 8, 2011 23:05 |
|
This thread always give me a few laughs, so I feel like giving back. This is one of the horrors I ended up with today after completing my project that I have to give my professor tomorow. Granted, it wouldn't be this terrible if my two project partners hadn't dropped out of the class 1/4 of the way through, and left me to do this completely alone.code:
|
# ? Dec 9, 2011 02:38 |
|
Medieval Medic posted:
Just don't do that when you're getting paid to write code
|
# ? Dec 9, 2011 02:52 |
|
|
# ? May 16, 2024 02:17 |
Kim Jong III posted:Just don't do that when you're getting paid to write code or this code:
|
|
# ? Dec 9, 2011 02:54 |