|
Aleksei Vasiliev posted:.bold {font-style:italic;} ahaha .bold {font-weight:normal}
|
# ? May 13, 2011 10:03 |
|
|
# ? Jun 10, 2024 12:03 |
|
Wheany posted:Best way to separate content and presentation using CSS? Are you new to web development? Don't worry, you get used to it eventually. Here's a whole stylesheet full of this kind of crap http://www.airfrance.co.uk/FR/common/common/css/global.css
|
# ? May 13, 2011 11:18 |
|
Melted_Igloo posted:ahaha code:
|
# ? May 13, 2011 13:03 |
|
I know it's a common one, but after staring at a 3000 line class with 100+ lines of imports, then seeing this poo poo:code:
|
# ? May 13, 2011 18:17 |
|
NotShadowStar posted:
This is the reason I called it a non-horror. It's still styleable, even if it's stupid and misleading. Because while you can have a dumb class like <span class="underlined-red-text-with-yellow-background">, it's still better than <span style="text-decoration:underline; color:red; background:yellow">. That latter is basically a font tag. Heey, can you do span[style="text-decoration:underline; color:red; background:yellow"] in a style sheet? Because that would rule.
|
# ? May 13, 2011 19:05 |
|
Wheany posted:Heey, can you do span[style="text-decoration:underline; color:red; background:yellow"] in a style sheet? Because that would rule. Holy poo poo, yes you can: code:
|
# ? May 13, 2011 19:11 |
|
Wheany posted:Holy poo poo, yes you can: I am so going to do this to my UX guy the next time he annoys me.
|
# ? May 13, 2011 20:07 |
|
TRex EaterofCars posted:I know it's a common one, but after staring at a 3000 line class with 100+ lines of imports, then seeing this poo poo: Eh, governments are usually pretty understanding about accumulated rounding errors.
|
# ? May 13, 2011 20:17 |
|
wellwhoopdedooo posted:Eh, governments are usually pretty understanding about accumulated rounding errors. I think he was referring to the fact that it is a private getter method?
|
# ? May 13, 2011 20:18 |
|
TasteMyHouse posted:I think he was referring to the fact that it is a private getter method? That could easily be some sort of internal calculation thing.
|
# ? May 13, 2011 20:55 |
|
NotShadowStar posted:
I know one of those SEO spammer retards loves doing stuff like code:
|
# ? May 13, 2011 20:56 |
|
TasteMyHouse posted:I think he was referring to the fact that it is a private getter method? I'll take private getters over money in floats any day of the week.
|
# ? May 13, 2011 21:10 |
|
Wheany posted:This is the reason I called it a non-horror. It's still styleable, even if it's stupid and misleading. Yeah I'd much rather have the option to set intellectually conflicting properties, like a light font weight on a strong tag than have some convoluted bullshit in the CSS specification saying 'you can set this on this tag, but not these tags!' since that always leads to cases where you want to do something that's valid but can't. The horror is people just abusing the poo poo out of these things to where it doesn't make any sense at all.
|
# ? May 13, 2011 21:28 |
Wheany posted:Holy poo poo, yes you can: Hey, you could also use that to make nonsensical style= attributes in your HTML and still have them do something. CSS classes go home!
|
|
# ? May 13, 2011 21:44 |
|
yaoi prophet posted:If I ever write a language this will be a compile-time error. I have discovered exactly one useful case for an empty exception handler: on Windows when you attempt to launch a process with elevated privileges (such as, relaunching yourself from standard user -> admin with some state parameters) and the user hits cancel, the C# process class throws an exception. But it's very possible you don't want to do anything if they hit cancel. So just swallow. ~~~TMYK~~~
|
# ? May 13, 2011 23:04 |
|
Why can't you just catch the exception that's thrown when they hit cancel, instead of capturing everything?
|
# ? May 13, 2011 23:14 |
|
Factor Mystic posted:I have discovered exactly one useful case for an empty exception handler: on Windows when you attempt to launch a process with elevated privileges (such as, relaunching yourself from standard user -> admin with some state parameters) and the user hits cancel, the C# process class throws an exception. But it's very possible you don't want to do anything if they hit cancel. So just swallow. code:
|
# ? May 13, 2011 23:14 |
|
wellwhoopdedooo posted:I'll take private getters over money in floats any day of the week. The "private getter" is a function of how loving large this class is. Seriously, lines 3-106 are imports. While being pissed about that I ran into the money as float thing I posted and it took the rest of the wind out of my sails
|
# ? May 13, 2011 23:24 |
|
TRex EaterofCars posted:The "private getter" is a function of how loving large this class is. Seriously, lines 3-106 are imports. Yeah, I get same thing here, and when I run into something that's just hosed on a conceptual level, to where I know it's wrong everywhere and there's tons of code that depend on it being wrong so "fixing" it would involve either practically rewriting everything or putting in enough simulations of wrongness that it's effectively just as broken as it ever was, and even if I was feeling masochistic enough to do either one I'd have to do it on overtime because I'd never get approval for the extra time because there's no "business case" for it other than "it won't make everything that touches it worse", I get bummed right out and it gets hard to even think of working anymore.
|
# ? May 13, 2011 23:51 |
|
Last Tuesday a retarded multi-layer caching system that I've argued needs fixing for well over a year now took down our site and cost us a shitload. To be fair I never foresaw the particular failure mode but being an arcane nightmare something was bound to happen. The solution has been to catch the problem as a special case, thus adding to the complexity. *le sigh* I'm now writing a super fast log parser for no particular reason, but it means I'm writing savagely optimised C for kicks.
|
# ? May 14, 2011 00:08 |
|
code:
|
# ? May 14, 2011 04:34 |
|
I'm trying to think of a SCM without a blame command and drawing a blank, so the real horror here is that your code isn't in any kind of version control system.
|
# ? May 14, 2011 05:11 |
|
Dooey posted:
Don't you use source control? Doesn't it have a "blame" feature?
|
# ? May 14, 2011 05:32 |
|
A "global variables file" sounds sort of horrifying on its own.
|
# ? May 14, 2011 05:33 |
|
pseudorandom name posted:I'm trying to think of a SCM without a blame command and drawing a blank, so the real horror here is that your code isn't in any kind of version control system. I know of one. Or at least, I haven't been able to find it yet. And ugh.
|
# ? May 14, 2011 05:46 |
|
I've been trying to convince my boss to let us use source control since I started this job 2 weeks ago. I've got about half the people on board, and two of us are starting to use a git repo in the hope that it will catch on with everyone else. (This shop primarily does electrical engineering so they aren't really familiar with common software development methodologies.) The global variables is bad, but its a mistake I might have made before I knew better, so I can forgive it. extern unsigned int i; is just terrible though.
|
# ? May 14, 2011 06:43 |
|
Dooey posted:I've been trying to convince my boss to let us use source control So is your boss like insane, or something
|
# ? May 14, 2011 06:49 |
|
Aleksei Vasiliev posted:
Dooey posted:(This shop primarily does electrical engineering so they aren't really familiar with common software development methodologies.) This is pretty much the case, EE's tend to commit some pretty major coding horrors. Hell, sometimes horrors are even required by the device/IDE/platform. And I've never seen a good IDE for embedded devices. Ever.
|
# ? May 14, 2011 07:02 |
|
Dooey posted:methodologies
|
# ? May 14, 2011 12:18 |
|
My programming methodology is often programming by permutation. I can code fast as hell sometimes though
|
# ? May 14, 2011 12:34 |
|
Aleksei Vasiliev posted:My programming methodology is often programming by permutation. I can code fast as hell sometimes though Doesn't everyone do some programming by permutation when working with poorly designed or 'enterprisey' third party libraries? Stuff like Office OpenXML SDK (or hell most stuff to do with System.XML) springs to mind.
|
# ? May 14, 2011 12:39 |
|
Milotic posted:Doesn't everyone do some programming by permutation when working with poorly designed or 'enterprisey' third party libraries? Anything I've done with web scraping ever has been done by permutation though. I tried to write a parser for an HTML-based forum and my god
|
# ? May 14, 2011 13:06 |
|
Everyone does Programming by Permutation when they find themselves trying to write/debug code and the only information available is "it's broke" or "it worked". The Worst Kind of Debugging. I think in these circumstances extensive test suites are the only way to stay remotely sane. If it's something I can't easily test or instrument, gently caress me.
|
# ? May 14, 2011 14:33 |
|
Someone set up a redirect from "Shotgun Debugging" to that article tia
|
# ? May 14, 2011 16:11 |
|
Sometimes I do that when I find i have an off-by-one error and I'm confident the code is otherwise correct. I know I shouldn't really do it, though.
|
# ? May 14, 2011 16:21 |
|
zokie posted:This, this is also a horror. "Here at Company we have a very advanced methodology". Ugh! There's definitely a diminishing return on process, but I've never worked any place that was anywhere near that end of the spectrum. My last job was working on certain systems for billion-dollar submarine platforms and there was no process whatsoever. So of course our software was fragile, barely functioning garbage. But lots of people at the lab had no basis for comparing it to robust, documented, or maintainable software, so they all thought our stuff was hot poo poo, as opposed to steaming poo poo.
|
# ? May 14, 2011 16:21 |
|
BigRedDot posted:So of course our software was fragile, barely functioning garbage. But lots of people at the lab had no basis for comparing it to robust, documented, or maintainable software, so they all thought our stuff was hot poo poo, as opposed to steaming poo poo. It seems like that's often the case when a company doesn't view software as their product but as something they have to do to make their awesome widget work.
|
# ? May 14, 2011 16:39 |
|
Thermopyle posted:It seems like that's often the case when a company doesn't view software as their product but as something they have to do to make their awesome widget work. That makes sense: the widget may compete in an open market with widgets from other companies, but the software has a monopoly on the widget-platform.
|
# ? May 14, 2011 17:16 |
|
Thermopyle posted:It seems like that's often the case when a company doesn't view software as their product but as something they have to do to make their awesome widget work.
|
# ? May 14, 2011 17:54 |
|
|
# ? Jun 10, 2024 12:03 |
BigRedDot posted:Oh, this was 100% the case there. "But we're a research lab, you see!" Or "We make sonars, not software!" Nevermind everything past the actual physical sensor is all built with software nowadays... Cut the amount of solder in half, we make sonars, not electric circuits.
|
|
# ? May 14, 2011 18:38 |