|
Painless posted:The way you describe it, your way of "fixing" things sounds like a coding horror in itself. Class A has a bug, so fix it by quietly removing 'final' and extending with a class that has the bug fixed? It wasn't a bug in the sense that there was a flaw in ClassA. I just call everything in our issue tracker a bug.
|
# ? Jul 1, 2010 16:19 |
|
|
# ? Apr 27, 2024 13:52 |
|
wwb posted:Except that the homo who wrote MySql decided to try and get the EU to stop the deal because his database is a special snowflake that deserves to live. Go ahead. Monty Widenius is Finnish, though. And his Special Snowflake is re-opensourced (well, sort of) under the name MariaDB.
|
# ? Jul 1, 2010 17:08 |
|
Lysandus posted:It wasn't a bug in the sense that there was a flaw in ClassA. I just call everything in our issue tracker a bug. That still isn't a horror. He was probably too shy to ask you if he could remove the final keyword from the class. Janitor Prime fucked around with this message at 18:25 on Jul 1, 2010 |
# ? Jul 1, 2010 17:19 |
|
MEAT TREAT posted:That still isn't a horror. He was probably to shy to ask you if he could remove the final keyword from the class. In fact, the "help" probably made him think that he was expressly not allowed to modify it, only to subclass it.
|
# ? Jul 1, 2010 17:40 |
|
Touché.
|
# ? Jul 1, 2010 18:26 |
|
Also, if all he did was copy ClassA into a new ClassB, removed the final keyword from ClassB and then subclassed it to ClassC, all you have to do is remove final from ClassA and change ClassC's parent class to ClassA, and you have solved the "horror". That is a far cry from some of the poo poo that people pull that takes days/weeks/months+ to untangle.
|
# ? Jul 1, 2010 18:41 |
|
1337JiveTurkey posted:Section 1.4.4.6: Wherein we learn why referential integrity is actually bad Further to that, the MySQL Gotchas list. Granted, some (maybe a lot) of these problems might be fixed in more recent versions of MySQL but it's still horrifying. MySQL is a coding horror in and of itself and actively propagates coding horrors as it is used. No SEQUENCEs, no CURSORs outside of stored procs and triggers, schizophrenic features that sometimes work on certain table engines but not on others... MySQL drives me nuts like no other software can. Well, maybe PHP. My favourite MySQL shite mis-features that upped my ire recently are its horrible and brain dead spatial extensions: - All spatial operations act on minimum bounding rectangles only so good luck with anything that isn't a box or a point. - Ridiculously incomplete: no built-in distance() or centroid() functions or anything of any real use for that matter. - Contrast to its main competition in PostGIS... I've been using PostGIS for years and had to cope with MySQL's spatial nonsense recently for a small contract and it was a horrible experience.
|
# ? Jul 1, 2010 23:38 |
|
dark_panda posted:MySQL drives me nuts like no other software can. Well, maybe PHP.
|
# ? Jul 2, 2010 00:35 |
|
Kidane posted:While I am paid to write Perl, I am by no means an expert. However, I'm of the opinion that there is nothing inherent to Perl which requires overly-concise code. My boss looked at some code I wrote and said "it's very straightforward" which I take as a compliment although I suspect many Perl programmers wouldn't. My code tends to look like this: Try running your code through Perl critic
|
# ? Jul 2, 2010 07:43 |
|
dark_panda posted:Further to that, the MySQL Gotchas list. I looked through that list and I would say the things on it fall into three categories.
dark_panda posted:schizophrenic features that sometimes work on certain table engines but not on others... While I can see how that might be frustrating, I don't see how they could have implemented a flexible system for allowing swappable storage engines without having features that work on some engines but not others; and the swappable storage engines are nice to have. At any rate, most applications are fine sticking with InnoDB for just about anything, maybe MyISAM for text searching. Can't comment on spatial data types, never used them. I have no reason to doubt what you say about them.
|
# ? Jul 2, 2010 14:05 |
|
Why are swappable storage engines useful? On any other database I can make a table that does everything I want without worrying about that bullshit.
|
# ? Jul 2, 2010 16:03 |
|
Hammerite posted:I looked through that list and I would say the things on it fall into three categories. The list itself is pretty old and flat-out says that it is referring to MySQL version 4.1 and below, so yeah, plenty of things are going to be fixed. My main problem is the attitude the problems represent in the first place, I think. The FOREIGN KEY stuff is just another example: the MySQL developers making up reasons for why you don't need a feature or why a feature is flat out wrong to begin with, despite said feature being rather fundamental to RDBMS design. To be fair, the FOREIGN KEY stuff has of course been long-fixed in MySQL up to a certain degree (don't even think about mixing table types if you actually want it to work), but that whole episode did leave a bad taste in my mouth. As for some problems that can be solved by traditional mode, well, even those cases seem flat out weird. For instance, even with traditional mode enabled, "SELECT 1 / 0;" still returns NULL, 'cause apparently the ERROR_FOR_DIVISION_BY_ZERO option only errors out on INSERTs and UPDATEs; meanwhile, for SELECTs, a warning is silently produced. If MySQL were operating like a traditional RDBMS I'd expect errors for division by zero wherever they occur. Further to that, why do they handle division by zero but not the square root of negative numbers or any other situation where the result of an expression is mathematically undefined? This works fine: code:
Speaking of collation support, I find it bizarre that the default encoding and collation settings are latin1 and latin1_swedish_ci respectively. Collation is a bit harder to default, I guess, and I know MySQL AB is based in Sweden, but I would at least think that these days UTF-8 would be the more popular choice for the encoding. Hammerite posted:While I can see how that might be frustrating, I don't see how they could have implemented a flexible system for allowing swappable storage engines without having features that work on some engines but not others; and the swappable storage engines are nice to have. At any rate, most applications are fine sticking with InnoDB for just about anything, maybe MyISAM for text searching. The swappable storage engines can be alluring, but in the end it seems to cause so many headaches that you start to wonder if it's worth it. For instance, let's say you do want ACID compliance so you go with InnoDB. Meanwhile, you have a need for full-text search, as you say. Well, there goes your ACID compliance, 'cause MyISAM doesn't support ACID or FOREIGN KEYs. Or let's say you want the spatial stuff I'm so interested in. Well, now you have a choice, 'cause both MyISAM and InnoDB support spatial columns, great. However, your choice involves either having ACID compliance or spatial indexes, 'cause only MyISAM supports indexes on spatial columns but only InnoDB supports ACID. I realize that a lot of this is pretty subjective stuff and that MySQL does fill certain niches. It's just that for my uses, I have never thought to myself "I'd prefer to use MySQL over the available alternatives for this project." It's just littered with too many quirks and odd behaviours. Certainly, every database out there has its own set of quirks and oddities, but the sheer number of MySQL quirks and the attitude displayed in the past by its developers have biased me against it. Yeah, I'll admit that I'm flat out biased against MySQL, but it's not a bias without justification...
|
# ? Jul 2, 2010 19:37 |
|
dark_panda posted:Yeah, I'll admit that I'm flat out biased against MySQL, but it's not a bias without justification... Thinking that a lovely piece of software or technology sucks because it is lovely is not a "bias".
|
# ? Jul 2, 2010 19:52 |
|
wwb posted:Except that the homo who wrote MySql decided to try and get the EU to stop the deal because his database is a special snowflake that deserves to live. The real horror here is that none of you called this guy on his homophobic bigotry. Shame on all of you.
|
# ? Jul 3, 2010 20:41 |
|
Markov Chain Chomp posted:The real horror here is that none of you called this guy on his homophobic bigotry. Shame on all of you.
|
# ? Jul 3, 2010 21:06 |
|
Shumagorath posted:____________/ Cool, an old gimmick and you didn't even get the nbsp right. Congratulations.
|
# ? Jul 3, 2010 21:20 |
|
Markov Chain Chomp posted:Cool, an old gimmick and you didn't even get the nbsp right. Congratulations. \____________
|
# ? Jul 3, 2010 21:30 |
|
shrughes posted:\____________
|
# ? Jul 3, 2010 21:31 |
|
Markov Chain Chomp posted:The real horror here is that none of you called this guy on his homophobic bigotry. Shame on all of you. you're not a real computer person if you're not a horrible right wing bigot
|
# ? Jul 3, 2010 23:06 |
|
Markov Chain Chomp posted:The real horror here is that none of you called this guy on his homophobic bigotry. Shame on all of you. If morons on the internet were ignored instead of engaged there would be fewer morons on the internet.
|
# ? Jul 3, 2010 23:23 |
|
MasterSlowPoke posted:you're not a real computer person if you're not a horrible right wing bigot You're not a real person if you're a computer person.
|
# ? Jul 3, 2010 23:27 |
|
Frankly I thought his homophobia was more or less cancelled out by his racism.
|
# ? Jul 3, 2010 23:57 |
|
MasterSlowPoke posted:you're not a real computer person if you're not a horrible right wing bigot There's a guy where I work (bay area, software company) who has a bunch of bumper stickers, like "some village in Kenya is missing its idiot" and "keep america pure, fight immigrants" and a bunch of other conservative drek I don't what his job position is but I hope it's not management or customer support.
|
# ? Jul 4, 2010 00:35 |
|
He's probably a sysadmin and one day he'll probably bring a gun to work and start shooting people.
|
# ? Jul 4, 2010 00:36 |
|
dreck
|
# ? Jul 4, 2010 00:36 |
|
rt4 posted:He's probably a sysadmin and one day he'll probably bring a gun to work and start shooting people. Otto Skorzeny posted:dreck e: I guess the spelling depends on whether you're german or jewish
|
# ? Jul 4, 2010 00:38 |
|
Nigglypuff posted:Frankly I thought his homophobia was more or less cancelled out by his racism. I'm not a fan of racism/xenophobia, but if MySQL and PHP had spawned from the same country you have to admit that there's a discussion about... "containment" that could at least take place.
|
# ? Jul 4, 2010 01:43 |
|
Come on guys, Lerdorf is Danish! Know your Scandinavian countries.
|
# ? Jul 4, 2010 06:43 |
|
I don't give a drat about any country that eats pickled fish
|
# ? Jul 4, 2010 06:48 |
|
dark_panda posted:As for some problems that can be solved by traditional mode, well, even those cases seem flat out weird. For instance, even with traditional mode enabled, "SELECT 1 / 0;" still returns NULL, 'cause apparently the ERROR_FOR_DIVISION_BY_ZERO option only errors out on INSERTs and UPDATEs; meanwhile, for SELECTs, a warning is silently produced. I didn't know about that. That is not very well implemented. quote:Further to that, why do they handle division by zero but not the square root of negative numbers or any other situation where the result of an expression is mathematically undefined? This works fine: Yeah, I would agree that throwing an error would be appropriate here. Although as a mathematician I feel the need to be picky and say that the result isn't "undefined mathematically", it just isn't a value that MySQL is designed to be able to manipulate. But it is a definite value and NULL isn't appropriate. quote:Speaking of collation support, I find it bizarre that the default encoding and collation settings are latin1 and latin1_swedish_ci respectively. Collation is a bit harder to default, I guess, and I know MySQL AB is based in Sweden, but I would at least think that these days UTF-8 would be the more popular choice for the encoding. Arguably, but you have to bear in mind that MySQL will reserve 3 bytes per character if you make a CHAR column UTF-8, so it is not without side-effects. quote:The swappable storage engines can be alluring, but in the end it seems to cause so many headaches that you start to wonder if it's worth it. You could take either of two positions on the subject. On the one hand you could say that it's good to have swappable storage engines in principle, because it means that developers have the freedom to create engines optimised for all sorts of different tasks. This is largely a theoretical advantage, although you can see it to a certain extent in the existence of the ARCHIVE and MEMORY engines. On the other hand you could argue that it leads to huge duplication of effort and results in none of the engines being as polished as a single engine could be if it was focused on by the design team.
|
# ? Jul 4, 2010 14:32 |
|
So we have an automated process where students upload their C++ code and we use an Ant script (Ant for building C++, ugh, I know I know) to compile and run it. We use the cpptasks library for this. The version of cpptasks we're using on our server is slightly outdated, so this bug may be fixed now, but it's one of the most idiotic things I've ever seen. When you want to link to libraries in the build, you do something like this: code:
code:
code:
|
# ? Jul 4, 2010 15:34 |
|
Flobbster posted:if I try to put "lib" on the front thinking it will just strip it off, nope! It spits out an error saying "Don't prefix your libraries with 'lib'."
|
# ? Jul 4, 2010 16:36 |
|
Mustach posted:Ah, the classic "I know what you did and could easily work around it but don't want to" design pattern. This is my favorite design pattern when dealing with websites. It takes less text to write "16 characters, no dashes or spaces" than to just do "input =~ s/[\w\-]//g".
|
# ? Jul 4, 2010 23:42 |
|
Hammerite posted:On the one hand you could say that it's good to have swappable storage engines in principle, because it means that developers have the freedom to create engines optimised for all sorts of different tasks. This is largely a theoretical advantage,
|
# ? Jul 5, 2010 10:59 |
|
Safe Memory Usage in C# Usually, the C# garbage collector does a pretty good job. The problem is, however, that you constantly run the risk of running out of memory in the middle of a program. Part 1: http://cspangled.blogspot.com/2010/04/safe-memory-usage-in-c-part-12.html Keeping track of which memory is allocated is done via the LinearMemory.bounds member, which is a boolean array of the same length as the LinearMemory.mem byte array. When reserving a chunk of memory from 40 to 49, we simply set up "fenceposts" by setting bounds[40] and bounds[49] to true to mark the area as reserved. This way the malloc() function can just scan for the first big enough chunk of memory that is outside two "fenceposts", and the free() function can just scan along the memory from the given pointer to the next "fencepost" to know exactly which memory chunk to free. Since the bounds array takes up only 1/8 (remember, a boolean need only 1 bit!) of the mem array, it's not much overhead. If we say that the mem array is of size O(n), then the bounds array is of size O(n/8)=O(n). This gives us a total of O(2n), which is linear. Since you can't go better than linear when dealing with memory, this model is pretty tight. Part 1: Followup: http://cspangled.blogspot.com/2010/04/safe-memory-usage-in-c-part-12-followup.html You'll hit OOM when you deserialize them, and much sooner. My very simplified Hello World introductory example is probably to blame for this one. The objects should not be "serialized" and "deserialized", they should be created, manipulated, and used entirely within the LinearMemory. You will be happy to know that the more advanced examples I have lined up for part two does exactly that! As soon as he implied that leaving a server running would cause out of memory errors in a completely different process, he demonstrated that he really doesn't understand virtual memory at all. I always feel ill at ease responding to people who comment with the "smackdown" approach. Not because the comment itself hurts my feelings or some such, but because if I point out errors in their post I make them look rather stupid in front of everyone. That would make me feel bad, so that's why I politely decide to reply here instead of directly in the Reddit comments: You forget that virtual memory is still finite. That means one process can still use too much of available (virtual and physical) memory, leaving not enough for your process. Part 2: http://cspangled.blogspot.com/2010/04/safe-memory-usage-in-c-part-22.html Serialization is a no-go; we need to write functions to read and manipulate live data inside the LinearMemory. For the new structures I intend to introduce, we only need to extend the LinearMemoryTools a little so it can interpret integers in addition to strings. Each number is simply encoded in 5 big-endian bytes code:
|
# ? Jul 6, 2010 22:23 |
|
shrughes posted:
What the hell? I read a little bit in and reached the statement about it being a well known problem in the game industry and you allocate up front and manually manage it all. It isn't about running out of memory all the sudden. Did he even read the article he linked? Wait, does he know how a garbage collector works? This is C# which I can't imagine doing anything different from the other garbage collectors. I do manual memory management on one platform not because I have to but because the memory management system regularly screws up with deletes. This leads to a host problems such as running out of memory, or overwriting other values. Good luck getting anyone from that company to fix it though. HFX fucked around with this message at 22:36 on Jul 6, 2010 |
# ? Jul 6, 2010 22:32 |
|
code:
code:
quote:As programming guru Joel says, real programmers need to understand pointers.
|
# ? Jul 6, 2010 22:52 |
|
code:
quote:While I don't know exactly the algorithm for Turing's machine, I think the LinearMemory is well suited to encryption in general, sice you have free access directly to the bytes. You could even encrypt and decrypt an object in-place!
|
# ? Jul 6, 2010 22:59 |
|
Did he really align his equals signs by putting underscores after the variable names?
|
# ? Jul 6, 2010 23:06 |
|
|
# ? Apr 27, 2024 13:52 |
|
Janin posted:Did he really align his equals signs by putting underscores after the variable names? He didn't want to take sides in the spaces vs. tabs debate.
|
# ? Jul 6, 2010 23:34 |