|
That depends on the format of the file. If we're dealing with a human-readable, unordered, key-value config file, well how could you associate a string literal with a symbol at runtime?
|
# ¿ Nov 16, 2010 18:01 |
|
|
# ¿ Apr 26, 2024 19:25 |
|
litghost posted:? Janin posted:Use a schema file to auto-generate both the storage class/struct and its serialisation procedure.
|
# ¿ Nov 16, 2010 18:47 |
|
That is truly tragic.code:
|
# ¿ Nov 18, 2010 18:35 |
|
I would love a weekly "explain what the following obfuscated code does" contest. Kind of like ioccc but in reverse.
|
# ¿ Nov 20, 2010 20:56 |
|
And I thought XSLT was horrible. I want to know what the <cats>5</cats> at the end of that first example does.
|
# ¿ Dec 7, 2010 02:09 |
|
This must be the coding horrors equivalent of Slow News Day.
|
# ¿ Jan 15, 2011 19:04 |
|
Why you would choose string parsing over something like code:
|
# ¿ May 15, 2011 11:58 |
|
I would guess that somebody just told them "tables are evil!" and forgot to add "except for tabular data!"
|
# ¿ Jul 22, 2011 16:13 |
|
Fixed width fonts own because you can do stupid poo poo like thispre:struct transition_table : mpl::vector< // Start Event Target Action Guard // +---------+------------+-----------+---------------------------+----------------------------+ a_row< Stopped , play , Playing , &player_::start_playback >, a_row< Stopped , open_close , Open , &player_::open_drawer >, _row< Stopped , stop , Stopped >, // +---------+------------+-----------+---------------------------+----------------------------+ a_row< Open , open_close , Empty , &player_::close_drawer >, // +---------+------------+-----------+---------------------------+----------------------------+ a_row< Empty , open_close , Open , &player_::open_drawer >, row< Empty , cd_detected, Stopped , &player_::store_cd_info , &player_::good_disk_format >, row< Empty , cd_detected, Playing , &player_::store_cd_info , &player_::auto_start >, // +---------+------------+-----------+---------------------------+----------------------------+ a_row< Playing , stop , Stopped , &player_::stop_playback >, a_row< Playing , pause , Paused , &player_::pause_playback >, a_row< Playing , open_close , Open , &player_::stop_and_open >, // +---------+------------+-----------+---------------------------+----------------------------+ a_row< Paused , end_pause , Playing , &player_::resume_playback >, a_row< Paused , stop , Stopped , &player_::stop_playback >, a_row< Paused , open_close , Open , &player_::stop_and_open > // +---------+------------+-----------+---------------------------+----------------------------+ > {};
|
# ¿ Jul 30, 2011 17:58 |
|
Fun fact that code is part of the boost MSM library documentation.
|
# ¿ Jul 31, 2011 01:13 |
|
code:
|
# ¿ Jul 31, 2011 02:35 |
|
MrMoo posted:lol, it's when you have to add restrict it gets even more entertaining. code:
|
# ¿ Jul 31, 2011 14:54 |
|
edit: never mind i'm not getting involved in this
|
# ¿ Aug 12, 2011 22:10 |
|
Because:code:
|
# ¿ Sep 25, 2011 22:00 |
|
Non c++ programmers talking about c++
|
# ¿ Sep 26, 2011 03:31 |
|
Zombywuf posted:References being invisible and impossible to manipulate separately to values is the real horror.
|
# ¿ Sep 26, 2011 16:55 |
|
This seems like a good time to recommend this book http://www.elementsofprogramming.com/book.html
|
# ¿ Sep 26, 2011 22:17 |
|
w00tz0r posted:That was my lead. I had a shouting match with him that lasted at least half an hour.
|
# ¿ Oct 19, 2011 21:05 |
|
code:
|
# ¿ Dec 22, 2011 14:14 |
|
The code by itself is pretty horrible but the indentation is what made me laugh when I saw it. This entire codebase is pretty wacko code:
|
# ¿ Dec 22, 2011 17:00 |
|
Post the login details on 4chan and let nature take its course.
|
# ¿ Dec 23, 2011 13:23 |
|
quote:Yeah, sadly that really hosed things up for a few hours in super meat world but it was all fixed before i even woke up today.
|
# ¿ Dec 24, 2011 19:25 |
|
Edmund McMillen School Of Security: Feel free to leave your databases wide open to the public. If anybody exploits it, then they're a jerk!!! It totally sucks!! WHy can't the world be a better place????
|
# ¿ Dec 24, 2011 20:22 |
|
Nippashish posted:"When she went out dressed like that pretty much the only thing that could have happened did. It's not a leap to figure out what a man would do after seeing her, and that's where the real problem is."
|
# ¿ Dec 24, 2011 23:09 |
|
Markov Chain Chomp posted:How do they differ at all? Dressing provocatively leads to a rape. HOW DO THESE TWO THINGS DIFFER AT ALL
|
# ¿ Dec 24, 2011 23:12 |
|
Markov Chain Chomp posted:So any known security vulnerability deserves a great force of people hammering on it to exploit it? Even if the manpower behind the product is quite small and unable to deal with such an attack?
|
# ¿ Dec 24, 2011 23:18 |
|
I'll start us off...code:
|
# ¿ Dec 31, 2011 17:00 |
|
code:
|
# ¿ Feb 1, 2012 18:12 |
|
mintskoal posted:
|
# ¿ Feb 3, 2012 00:06 |
|
I'm a fan of brainfuck. It is actually worth learning if you are the kind of person who enjoys pen and paper puzzles. Writing a simple program in brainfuck is like solving a sudoku or something.
|
# ¿ Feb 3, 2012 23:59 |
|
Does this count as a coding horror? http://www.youtube.com/watch?v=xF0-LGoXtaw
|
# ¿ Mar 18, 2012 13:02 |
|
No, feeling strongly one way or another about it is retarded.
|
# ¿ Mar 24, 2012 14:55 |
|
I've never understood this argument because: - If you understand the syntax of the language then you will never make that mistake. - If you don't understand the syntax of the language then making that mistake and learning from it is beneficial
|
# ¿ Mar 24, 2012 22:12 |
|
Has anybody ever made that mistake more than once? Maybe if they code with their eyes closed. If a conditional has no braces, it executes at most one line. It's an easy rule to learn. If you happen to add another line to a single-line if-statement then the error is right under your nose, because the problem area is at most three adjacent lines long. The above code sticks out like a sore thumb to me.
|
# ¿ Mar 25, 2012 00:16 |
|
Ithaqua posted:I always use curly braces, even if it could reasonably be fit onto a single line, for the sake of consistency. Obviously, I am horribly wrong.
|
# ¿ Mar 27, 2012 19:21 |
|
What were you expecting from a library designed specifically for working with the C preprocessor? It's going to be horrible no matter what. I would say the library itself is the horror but presumably it has its uses
|
# ¿ Mar 29, 2012 19:11 |
|
This example is pretty nifty http://codepad.org/tU1ZUCJ5 If you can't tell, the FOR_EACH at the end is saying "run this CATCH macro for each of the tokens in BUILTIN_TYPES", and generates a catch() statement for each of them.
|
# ¿ Mar 30, 2012 13:26 |
|
Keevon posted:Perhaps you could excuse me for assuming people were angry by the fact that Notch is brought up a disproportionate amount in this thread.
|
# ¿ Apr 8, 2012 20:54 |
|
It's ok that you said something incorrect and somebody called you out there's no need to be a dick about it "bro".
|
# ¿ Apr 8, 2012 21:18 |
|
|
# ¿ Apr 26, 2024 19:25 |
|
This must be what posting in the Minecraft thread is like.
|
# ¿ Apr 8, 2012 21:30 |