Slashdot Mirror


User: daveime

daveime's activity in the archive.

Stories
0
Comments
2,242
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2,242

  1. Re:Oh if only... on Refactoring SQL Applications · · Score: 1

    Because you used '%string%', you forced the query to do a full table scan, i.e. he couldn't use any indexes, and then you sorted 27 million rows, forcing a filesort rather than in-memory sort.

    Remind me never to offer you a job as a DBA.

  2. Re:Should have included PostgreSQL and DB2 on Refactoring SQL Applications · · Score: 1

    MySQL has always worked fine for me ... anecdotal I know, but a lot of coders I've met tend to have the mentality "I can throw whatever query I want at the system, and if it doesn't work, it's a DBA problem".

    Thankfully I am both the programmer and DBA for our system, so I don't have to worry about a.n.other dumbass making a query that joins 27 tables with combinations of LEFT, RIGHT and INNER joins that end up running a WHERE clause of 1 million billion gazillion fufillion shabady-u-illion ... yen ... sorry rows, got carried away thinking about sharks and laser beams.

    Rules of thumb, which I repeat ad nauseum to any new junior I have to take under my wing :-

    Don't use LEFT or RIGHT joins unless absolutely necessary - and even then, one or the other, NOT both in a single query.

    Don't use ORDER BY unless absolutely necessary ... once you get above about 4MB, he's going to start using filesorting rather than in memory sorting.

    Don't request every column of every table just to get a count of the total records ... do a separate minimal query that hopefully can use index only, and never touch the actual table, and then the main query to fetch a subset of rows using LIMIT N,M.

    Use DESCRIBE on every query ... if you don't see the estimated row counts that look like N x 1 x 1 then the query is no good ... something that is N x M x P can quickly explode into hundreds of millions of possible combinations before you know it, even if N,M,P are small magnitude like 1000 rows per table.

    Multi column indexes are your friend, but even then, a little care in the order of the columns can make all the difference in the speed of the index search ... think cardinality, and order your multi column index so that the most rows can be elimiated at each step. Likewise, don't use a column that might infer a range search (timestamps etc) at the start of the multi-column, as you'll lose all the benefit of the later columns (he simply won't use them). Flags and status columsn first, timestamps and other ranges of values later.

    A little care and attention can turn a 45 minute query into a 15 second query ... believe me, I've done this kind of optimization myself.

  3. Re:Uninstalling doesn't help?? on Adobe Fixes Recent PDF Flaw, But Not Before Auto Exploit · · Score: 1

    So why are we still teaching CS students that code modularization and re-use are good things ?

    Surely the whole point of DLLs (and shared onjects on nix) was that different programs could re-use useful code ? Now every programmer has to re-invent the wheel (or at least anything above the HAL), to avoid using any third-party DLL, just in case it's vulnerable to some exploit ?

    Shouldn't we just be teaching the students, "fuckit, throw more hard disk space at everything, and duplicate code as much as possible" ?

    Not that there is any logic in that whatsoever, as it just means instead of having to patch ONE copy of the identical code, you have to patch MANY copies of the same code.

  4. Half Assed on New Electrode Lets Batteries Charge In 10 Seconds · · Score: 1, Insightful

    Can you PLEASE stop with these half-assed, incomplete analogies ?

    to deliver 25,000 watts, or enough power for about 20 vacuum cleaners

    OH, REALLY ? FOR HOW BLOODY LONG ??? A day, a month, the rest of your life ???

    Without a time quantifier, the analogy is totally meaningless.

    20 vacuum cleaners for 30 minutes each, assuming each vacuum cleaner consumes 2.5 Kwh. Now that MEANS something !

    And just out of interest, why vacuum cleaners ? This is Slashdot, not Womans Weekly Online ... how many basement nerds actually know what a vacuum cleaner looks like ? That's something their mum's do when they are still asleep isn't it ?

    Enough power for a Beowulf Cluster damnit ... something we can relate to !

  5. Re:Update only what you recognize on Living Free With Linux, Round 2 · · Score: 1

    It was the Winfast TV2000 XP Expert.

    While the initial install seemed to recognize it, I then had to decide which app to install to actually use the video stream.

    MythTV was an absolute nightmare with servers, clients, mysql and a whole load of other garbage to install just to watch the damn stream, and I quickly aborted that one.

    I eventually landed with xawtv, installed without a hitch, but no video or sound. Then I had some issue with the video4linux drivers, and ended up having to hack into some config to tell video4windows to use /dev/video1. Then I had a grainy picture, but no sound, and another config to edit to get the sound to work.

    Even when working, I discovered that actually recording the feed AND watching it at the same time was almost impossible to do, as the recorder component would "steal" /dev/video and not allow the viewer app to use it.

    Compared to Windows, where I double clicked install, and EVERYTHING worked in 2 minutes, it was a nightmare, and I am a tech savvy kinda guy who regularly has to do server maintenence and coding on LAMP boxes.

    I wish I could be more precise, but it's been two months, and to be honest it's a memory I want to put behind me. I really don't need another piece of advice on "what I SHOULD have done", because that's the whole problem as I see it, and other posters have pointed out. You shouldn't have to go trawling through newsgroups or seeking the advice of GURU's just to get something working.

    So perhaps I'll give it another go in a couple of years, and see if it's improved any more.

  6. Re:I did RTFA... on Living Free With Linux, Round 2 · · Score: 2, Insightful

    Wrong analogy.

    The car is a tool, the end goal being the ability to drive seomwhere.

    Sure you have to learn how to use it first.

    Windows allows you to drive the car once you know how to drive.

    Linux allows you to drive the car only once you know the workings of every component of the internal combustion engine.

  7. Re:Update only what you recognize on Living Free With Linux, Round 2 · · Score: 1

    Yes, because there's nothing more reassuring than installing what you think is a "brand new O/S", and then discovering that there are 120+ updates to install.

    Especially with oblique names, one-liner comments, and undefined purposes.

    I myself tried Ubuntu 8.04, and yes, the initial install was easy, except for the fact first time round he happily let me reformat my hard disk partitions while installing, but didn't even THINK to warn me that the first partition was not set up to be bootable.

    And I'd say that the end experience pretty much matches his review. I did work out the Synaptics Package Manager pretty quickly, but then trying to install a simple driver for my TV tuner card and finding an application that I could actually use to watch the output and maybe record it was a 12 hour nightmare I never want to relive. I shouldn't still be having to go into the command line and hacking configuration files just to get the output from /dev/video working with a viewer application.

    The command line apologists still don't seem to understand the needs of the user, or maybe they want to protect their arcane "boys club". It's no good saying "well if it doesn't work from the GUI, you can always shell in and type some line of gibberish". Even those of us that DO have an inkling of what it all means don't particularly enjoy it, and shouldn't have to deal with it in 2009. Either it "just works", or it doesn't.

    "Just works if you hack this and that and follow these steps if you have this distro, except with this compiler in which case you need to do something different", simply doesn' cut it.

    Year of the Linux Desktop ? It's close, but still no cigar sorry.

  8. Re:Who watches the Watchmen ? on Norton Users Worried By PIFTS.exe, Stonewalling By Symantec · · Score: 1

    Your video drivers fucked up again ? Or did the 100+ module dependency tree just to get a simple TV tuner app working cause you to balk ?

    You might want to install windows there mate !

  9. Today's kdawson Gem on Microsoft Shoots Own Foot In Iceland · · Score: 1

    Today's kdawson Gem is brought to you by the Department of Redundancy Department.

    Warning: link contains strong language and vivid imagery

    This is the internet, we'd be surprised if a blog post DIDN'T comtain strong language and vivid imagery (especially when it's a MS bash-fest) !

    But do we really need to be WARNED about it ? What's next, warning people that webpages may contain flahing banner ads that may cause seizures ?

  10. Re:Troll??!! Dunbal Got PWNED on Film Piracy, Organized Crime and Terrorism · · Score: 1

    A Homonym is a word that is spelt the same, sounds the same but has two different meanings IN ITSELF !!!!

    Otherwise EVERY word could be considered a homonym, as it can be put next to any other word and depending on context, acquire a different meaning.

    Example,

    Dumb Terminal
    Dumb Waiter
    Dumb Bell
    Dumb Ass

    The word "Dumb" is NOT a homonym for "Dumb", "Dumb" OR "Dumb" just because it has been placed next to other words.

    Jesus, you are so fucking ignorant or your own language, I'm amazed you manage to post at all.

    You win fine ... who's name should they write on the medal, Anonymous Moron ?

  11. Re:If it was easy-- on UAC Whitelist Hole In Windows 7 · · Score: 1

    Yes, what a GOOD idea ... let's start with the malware writers who found the exploit to get around UAC in the first place ?

    I'm SURE they'll be happy to follow good programming practice, if only we educate them.

    We're talking about exploits here, the people who write these are NOT going to respect UAC, or the proper locations for installing things. Their whole raison d'ete is getting AROUND these things.

  12. Re:What Microsoft should do on UAC Whitelist Hole In Windows 7 · · Score: 1

    Hmm, here's a little anecdote about my wife, who is computer literate, but not a whole lot of common sense when it comes to warnings etc.

    I have ZoneAlarm on my PC, and recently the missus wanted to use her USB memory stick to copy some files from work. I came home later to find my PC infected with some nasty virus. When I asked her what she'd done, (assuming that ZoneAlarm would have my back covered), here's the conversation ...

    Me : So, what did you do to the computer ?

    Mrs : Nothing, I put in my keydisk, and this popup told me it might be dangerous to open. You always told me to click "decline" when this happens.

    Me : Yes, so .... ?

    Mrs: Every time I clicked decline, nothing happened, and I couldn't open my keydisk. So after about 5 tries like that, I clicked allow instead, AND IT WORKED !!!

    You see, it doesn't matter what style of warning or popup or protection you put in place, users expect things to work, and when they don't, those same users will try to find a workaround.

    It's like being allowed to disable UAC, or for *nix bods, allowing things to run as root. Limited user accounts are great, until such point as it actually limits the user from doing something they REALLY want to do ... then they ask for workarounds, or passwords, and your system is just as insecure as every other system.

    So your timing solution, whilst might be suitable for us techies who probably don't NEED it in the first place, for an "average" user, it's just aother annoyance.

    Ask him/her, "Do you want to let this run for 60 seconds", and they'll try it. When their Flash Video Player keeps stopping after exactly 60 seconds, they'll soon work out what "letting it run for infinite time" does ... it solves the problem you gave them by restricting them in the first place. Never mind that the rest of the system runs like a dog because that Flash Video Player is hogging all the resources, they achieved what they wanted to.

    These kind of restrictions just train the users to find a way to work around them. It doesn't prevent them from doing stupid things in the first place, if they really WANT to do those stupid things.

    And for the record, if you asked my missus about the "halting problem", she'd probably say "what's wrong with the halting, can't you fix the problem ? I thought you were supposed to be the computer wizard here ?"

  13. Re:If it was easy-- on UAC Whitelist Hole In Windows 7 · · Score: 1

    Yes, finally, they are starting to "get it" ...

    I was able to move documents, images, videos etc from my C: drive to my monster E: drive, separating programs from data.

    But why couldn't they just have allowed us to move "a whole user", or even "all users" to a different directory, instead of having to do each directory individually ? It's about 13 individual moves per user right now, and although it takes time, it IS worth it.

  14. Re:No Script Bragging -- please stop on UAC Whitelist Hole In Windows 7 · · Score: 1

    I think the point he's trying to make is how do YOU determine if a script is safe UNTIL you enable it to run at least once ?

    Oh sorry, I didn't realise it was you, Brendan

  15. Re:Troll??!! Dunbal Got PWNED on Film Piracy, Organized Crime and Terrorism · · Score: 1

    Yes, yes, I should have expanded further ...

    Homonyms do not include words used in the wrong context to generate emotive responses or trigger associate behaviour in the unwashed masses.

    Copyright = unemotive factual item related to ownership laws.

    Pirate = person who attacks boats, and may wear any combination of eye patch, wooden leg, hook for a hand and shoulder parrot.

    Copyright Pirate = BAAAAAAAADDDDD ... you see how that works, an emotive response via association of uncontextually related words ?

    I'd advise before calling anyone out, you yourself get an education on how the language works outside of tabloid journalism / Fox News.

  16. Re:Troll??!! Dunbal Got PWNED on Film Piracy, Organized Crime and Terrorism · · Score: 1

    Just because a word gets used often enough in the wrong context, especially by the gutter press or corporations with a vested interest in making the association, does not magically turn it into the right context.

    I mean FFS, reference.com ??? Next he'll be quoting wikipedia.com as a reliable source ... oh, wait he DID, when he completely misunderstood the meaning of the word homonym.

    Homonyms : words that share the same spelling and the same pronunciation but have different meanings, examples "bear (noun), an animal", and "bear (verb), to carry or support load".

    The only reason he got modded "-1 Troll" was because there's no "-1 Fucking Dumbass" moderation.

  17. Re:Obvious difference that they missed on Film Piracy, Organized Crime and Terrorism · · Score: 1

    The terrorists probably also used toilet paper, but is it relevant ?

    I don't remember seeing any news reports about the number of deaths from low flying boats, whereas the number of deaths from bullet wounds was, I believe, considerably higher.

  18. Re:Obvious difference that they missed on Film Piracy, Organized Crime and Terrorism · · Score: 1

    I waa, waaa, waaant to fundle your bottom.

  19. Re:Their Dark Intentions Remain on UK Government To Back Off Plans To Share Private Data · · Score: 0, Flamebait

    Because Jews and Christians would hold a committee meeting, or possibly send a strongly worded letter to the local newspaper. They might even get up the gumption to hold a bring-and-buy sale or a bingo game to raise funds for a placard or sign to hold up outside the town hall.

    Muslims just kill you (long curvy sword for individual offenders), or several pounds of liquid explosive (useful for bulk intolerance sanitizing).

  20. Re:Not like The Pirate Bay on Big Swedish Filesharing Server Seized · · Score: 1

    I don't understand why anyone would want to sink digital media off the coast of Africa ?

    Maybe they are "assisting on making available" to all the little fishies and creatures under the sea ?

  21. Re:Not like The Pirate Bay on Big Swedish Filesharing Server Seized · · Score: 1

    No, no, no, absolute f*****g nonsense.

    In fact both the Daily Show and SNL host their content online for FREE, for anyone to watch / download.

    So rather than trotting out the usual "pirates are killing the industry" crap, they at least have embraced the fact that the industry NEEDs to change it's distribution method.

    Just like VHS didn't kill the movie industry, and the movie industry adapted to sell films on VHS, they simply have to do the same with digital media. Ditto VCD, DVD, and any other method of media transfer you like to choose.

  22. Re:The true cost of Microsoft's monopoly on 9 Browsers Compared For Speed and Features · · Score: 4, Insightful

    You aren't serious are you ?

    The only innovation Netscape did was to introduce frames and layers, the first of which was universally hated and eventually kicked from the standard when it was already too late. And the second, which was a pathetic attempt to keep up with the DHTML and on-the-fly re-rendering that MSIE 4 was already doing so well. Except NS4 DIDN'T re-render properly, didn't resize the layer based on content, so all you ended up with was crappy looking content overlaying other content and a damn mess of cross-browser hacks to even achieve that.

    Whereas, look at what MSIE did, taking innerHTML as a prime example. It was their innovation, it wasn't considered standard at the time, but it was so useful that Firefox and all the others implemented it anyway.

    You really need to stop believing everything you read about the browser wars, and actually admit that NS4 sucked so badly, no one WANTED to buy it. Plus the fact that MSIE was being bundled for free, why bother paying for an inferior competitor. Netscape didn't deserve to survive, sorry. Not because of MS abusing a monopoly, but because NS4 browser was a dog, and needed to die.

    To my mind that was the time when people were starting to realiss that a browser IS an integral part of any O/S and there was already becoming less market space for paid alternatives to survive. Let me ask you this ? As we're all so used to "free" browsers these days, do you think Firefox would have such dominance if it cost $5 ? or $10 ? Of course not, people want something that works most of the time as they expect, and if it's free, then so much better.

  23. Re:9 Browsers compared on 9 Browsers Compared For Speed and Features · · Score: 1

    Under what circumstances could 5 officers kicking the crap out of a suspect NOT be considered as "making the cops look bad" ?

    What they did was excessive, there can be no question in anyones mind. He'd already been tasered twice and presumably was in a weakened state. At that point, I'm sure they could have simply piled him and got the handcuffs on. Not attacked him with batons, and repeatedly stomping and kicking him for a couple of minutes.

    Still, some people have a pretty wierd view of the world.

  24. Re:Let the analogies commence on Microsoft Windows, On a Mainframe · · Score: 1

    So you are at least 110 years old then ?

    That Viagra MUST be good if you can even remember what a girlfriend looks like at that age !

  25. Re:Let the analogies commence on Microsoft Windows, On a Mainframe · · Score: 1

    I think you gave us the wrong URL ...

    THIS is your girlfriend in the upper left ...

    http://images.google.com/images?hl=en&rlz=1B3GGGL_en___US233&um=1&q=inflatable+women