Slashdot Mirror


User: locofungus

locofungus's activity in the archive.

Stories
0
Comments
988
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 988

  1. Re:Doesn't matter in the end on Comments On Code Comments? · · Score: 1

    Huh?

    The OP I replied to was saying why a sloppy programmer would ignore comments while a conscientious programmer would read them.

    My reply was why, IME, a sloppy programmer reads and relies on comments while a conscientious programmer will ignore what they say and rely on the code.

    IME code is either so new that it's clear and concise that comments aren't really required or was written by someone who employs coincidence programming (making changes until it appears to work without understanding why it works) in which case comments aren't going to help.

    Or, code is old, maintained by hundreds of people over tens of years with differing priorities and skills in which case the comments are incomplete, inaccurate, or just plain wrong.

    I have seen major business affecting bugs caused because someone believed a a function did what the comment said and not what the code said.

    I know someone who is a rather good musician. When she is analyzing a piece of music from the score she puts on a different piece of music in the background. This is because if she just reads the music then sometimes she hears what she thinks is there rather than looking at what is actually written especially if the music unexpectedly fails to follow some fairly standard progression.

    Comments can have the same effect in code. They can be useful but they can also mislead. They can even stop you seeing bugs in the code.

    Throughout my more than twenty year programming career I have, almost exclusively, been given other peoples old, buggy, inefficient code to "sort out". Whether that be to fix some obscure, intermittent bug, speed it up or make it work in some new use case.

    I am envious of these people who manage to only work on clean, well documented code. I suppose there are two possibilities: 1 - that I'm so good at making sense of utter crap that my skills are too valuable to waste on code that anybody can understand or 2 - that my style of coding is so appalling that nobody dares to let me loose on this beautiful code that everybody else deals with.

    Tim.

  2. Re:Doesn't matter in the end on Comments On Code Comments? · · Score: 3, Insightful

    Exactly my point.

    The people who write code like this don't know what it is doing when they write it. Therefore, by definition, at best their comments will tell you what they *meant* to write.

    Given that this code is now 10, 15, 20 years old, other programmers along the way will now be relying on what this code *actually* does.

    It's one of my pet peeves that people want to rewrite code when they *can't* understand it. But in order to rewrite code like this you *have* to understand it. I've seen so much rewritten code that is even worse than the code it replaced because it's full of hacks reproducing all the accidental behaviour in the original code and introducing its own accidental behaviour along the way.

    It is a wonderful thing to be given the chance to rewrite a piece of obnoxious code. But it's an expensive process with a lot of up front research and, is always harder than fixing that obscure bug in the obscure code *except* when you've already proved that the obscure bug *cannot* be fixed in the old code. But in that case you're already admitting that the rewrite will change some behaviours.

    Tim.

  3. Re:Doesn't matter in the end on Comments On Code Comments? · · Score: 1

    A rushed or sloppy coder is going to ignore them either way. And a conscientious coder is going to read them regardless.

    A rushed or sloppy coder is going to read them and rely on them regardless of what the code says.

    A conscientious coder is going to know they're wrong. Either the code is clean and self documenting in which case it doesn't need comments and even if they're factually correct they're wrong because they're not needed and might not be maintained with the code and if the code isn't clean and self documenting then it's inevitable that it doesn't things that the original programmer hadn't even thought of so the comment is, at best, a statement of what the original programmer intended to write.

    There are, of course, exceptions. But they're rare.

    Tim.

  4. Re:How does this qualify as "teleportation"? on Quantum Teleportation Sends Information 143 Kilometers · · Score: 1

    It's more like:

    You have two pieces of paper that you "entangle" whatever that means in this case and give one away.

    Then you go home and paint a picture on your piece.

    You take a digital scan of what you've painted and send it to the person with the other piece of paper.

    They "print" the scan onto their piece of paper but instead of just getting a digital print they get the identical picture, paint, brush strokes etc but your copy of the picture is destroyed in the process.

    Basically you've managed to transfer a physical copy as though you posted it but all you've actually exchanged is information (plus the earlier preparation of a pair of blank sheets of paper)

    Tim.

  5. Re:If I recall..... on Quantum Teleportation Sends Information 143 Kilometers · · Score: 4, Interesting

    I'll try.

    If two events are "time like" then one event occurs before the other *in*all*reference*frames*. i.e. the earlier event could cause the later event. Note that being time like doesn't require the two events to be causally linked but if A causes B then events A and B will be time like

    If two events are "space like" then they cannot be causally linked because it is impossible for a signal traveling at the speed of light to get from the first event to the second event in the available time. It also turns out that for space like events different inertial observers don't even agree on which event occurred first. But this causes no problems because events C and D are not causally linked.

    If an observer can travel faster than light then the above no longer holds. An observer traveling faster than light will no longer necessarily agree that A happens before B even if A causes B. An appropriate observer can wait for B to happen and then stop A from happening even though it was A that caused B. It is this paradox that leads physicists to assume that faster than light communication is impossible.

    The idea of a maximum speed isn't really that crazy anyway. There are only two possible universes, one where there is a maximum speed - which implied time dilation and everything else we see in special relativity - and one where there is no maximum speed - which you get if you take the limit as c approaches infinity in the special relativity equations and turns out to be the newtonian universe. If there is no maximum speed then there is universal time and therefore all events can be uniquely assigned a time and all observers will agree on the ordering.

    Tim.

  6. Re:How does this qualify as "teleportation"? on Quantum Teleportation Sends Information 143 Kilometers · · Score: 1

    The quantum state is copied (actually it's not copied, it's transferred - quantum copying would imply faster than light communication)

    Going back to the more common example of momentum plus position, this would be like transferring the momentum and position from one electron to another (i.e. moving one electron into exactly the same place + velocity as the one you are "copying"). There is no measurement of position or momentum happening so the uncertainty principle is not violated and the transfer process changes the position and momentum of the original so you do not end up with two identical electrons.

    Tim.

  7. Re:I don't understand on Quantum Teleportation Sends Information 143 Kilometers · · Score: 2

    I agree and I was hoping someone else would have commented by now.

    TFS talks about efficiency. I can only guess that they can improve the bandwidth of the communication by using quantum teleportation but I'm not sure how and would be intrigued to find out.

    Tim.

  8. Re:The format of the asnwer is interresting on Obama and Romney Respond To ScienceDebate.org Questionnaire · · Score: 1

    incumbents frequently win extra terms

    I'm not an American but even I know this needs qualifying:

    Republican incumbents frequently win extra terms.

    There have been few democrats who have won a second term. Clinton was the first since FDR in 1937.

    Tim.

  9. Re:Why is inaction not justifiable? on Obama and Romney Respond To ScienceDebate.org Questionnaire · · Score: 1

    With politicians you WANT the default action to be "none", because otherwise you just get ill-informed bullshit codified into law.

    Dumping CO2 into the atmosphere in gigatonne lots is not a default action of doing nothing.

    Scientists would love it if the default action was doing nothing. Getting there is going to be hard. The longer we leave it the more likely it is that the required action isn't going to be doing nothing and instead going to require costly active measures to mitigate the worst consequences.

    Tim.

  10. Re:Unmanageable on The Truth About Hiring "Rock Star" Developers · · Score: 1

    In my experience lack of social skills disappears towards the high end of most skill scales. Really smart people often also learn how to interact with other people, even if they are different.

    Amen to this. I am sometimes amused in the various posts here about hiring programmers complaining about HR filtering and general inability of people hiring to recognize how brilliant they are.

    I think it is true that a good programmer can be good in any language. But that includes social discourse. Many here come over as proud that they're social misfits. That HR bod that they are so disparaging about is disproportionately young, attractive and female. Personally I think that's enough incentive to want to be able to charm her even if there isn't a job riding on it.

    Tim.

  11. Re:Unmanageable on The Truth About Hiring "Rock Star" Developers · · Score: 4, Insightful

    A diva, OTH, is always right, in his mind that is, he is abrasive and nearly impossible to manage effectively.

    While this is probably true for some people, especially above average people who have only worked at small companies where they are the best developer with no real competition I think there's a second problem that can make good people appear like that:

    Sometimes we are asked to do something that is impossible. Not hard, not boring, not beyond our capabilities, but impossible.

    Mediocre developers will go off to start things when they are asked. Months later they'll hit the corner cases that make the project impossible to do and then will be completely flummoxed at which point one of the top developers will be called in to try to rescue the project.

    Where the top developers can be particularly weak is in trying to explain why a project "just won't work." It's surprisingly difficult to do in any moderately complex system. Often any single example that won't work has a simple solution. It's only when you consider many of the difficult cases together that you understand that the solutions are mutually inconsistent.

    One of the key things of the top people isn't just that they're good but that they don't (often) start along roads that won't work. Get two or three of them together, give them time to thrash out ideas (and them leaving work early on Friday to go for a pint might actually save your company hundreds of thousands in developer time when they realize there's a problem ahead) and you really can see a ten fold performance improvement in productivity. Not because more code is written but less is written and then thrown away.

    Maybe we're saying the same thing. But I have seen few true divas while you imply they're common. Many able programmers are not perhaps as socially functional as managers might prefer but that is, unfortunately, going to be a consequence of hiring people who are doing a job that needs excessive amounts of pedantry to get right.

    Tim.

  12. Re:Is this applicable anymore? on Ask Slashdot: Is the Rise of Skeuomorphic User Interfaces a Problem? · · Score: 1

    Really?

    Animated page turns.

    When I read a book my finger is under the page ready to turn as my eyes reach the bottom of the page.

    I flip the page and continue reading so fast that I don't see the page turn. It doesn't feel as though I take any longer to continue reading when turning the page than I do when I start the next line.

    I had one of the early sony e-books. Now page turns there were slow. I would push the page turn button as I started to read the last line to limit the pause in reading. The kindle is much better but there's still a noticeable break in reading while waiting for the page. The iPad could be instant but instead you have to pause waiting for the page to turn. Particularly frustrating when I'm playing from music where my eyes aren't on the music when I turn the page[1] but when I look up the animation is still playing and I want to see the notes.

    [1] Amusing anecdote - sometimes, when playing from memory, I will turn the page of whatever music is on the piano when I get to the page turns of the piece I'm playing.

    So much effort put in to making page turns look pretty but so little effort put into developing a UI that makes multiple page turns, flicking through a book that we do effortlessly with the real thing, possible.

    Tim.

  13. Doesn't surprise me at all. on Music Memories Stored In Different Part of Brain Than Other Memories · · Score: 3, Interesting

    I have always been able to memorize plays or poetry with almost effortless ease. In fact in my acting days at school I often knew pretty much all the words of all the parts (except for the acts/scenes that I was not involved in rehearsing) and I can still quote vast tracts of plays that I've not re-read for 20 years.

    I also play the piano. Playing that from memory is a herculean effort with hours and hours of repetitive work required to get anything to stick. It also doesn't take very long for me to forget again unless I regularly play through something and I can get sudden blank moments when playing through something that I've played through dozens of times before without a problem. It's also not stress related as it happens regardless of whether I'm playing with someone else listening.

    Tim.

  14. Easy. on Why Cell Phone Bans Don't Work · · Score: 1

    It's easy. Now we know that we just need to ban anybody from driving who uses a mobile phone while driving.

    We just had cause and effect backwards.

    Tim.

  15. Re:Beats paying child support! on Birth Control For Men Edges Closer · · Score: 1

    Hormones.

    Assuming you are male and heterosexual then you will know how powerful the drive to have sex is. So strong that if a woman is really determined to sleep with you the only way to avoid sex is to avoid her. Boy, they only have to indicate that they wouldn't say no if you asked and it's hard not to give in to temptation.

    You should understand that hormones have as dramatic an effect on women. Women's hormones change on a monthly basis and their desires, and mood changes as a result. Even more dramatic is the effect that pregnancy does to them. Their body is overwhelmed by hormones that many will never have experienced before. For many of them the difficulty in having an abortion, even if they said they would previously, is as hard as a man turning down sex from a beautiful woman who is really pushing the issue and doing everything in her power to seduce him.

    So remember, it could be easier for you to remain celibate for the rest of your life than your partner to have an abortion once she's pregnant.

    Tim.

  16. Re:Wishful thinking on Birth Control For Men Edges Closer · · Score: 1

    Try being a man in a job interview and having to rely solely on merit and get back to me. Try being a man and getting out of a traffic ticket and get back to me. Try being a man and actually having to take some risk and do some work just to have a relationship, let alone a good one.

    You need to get out more and make more female friends. Women get some things more easily than men - if a woman wants sex and she doesn't really care who then sure, it's easy for her, she can even charge if she wants - but you'll find that while sex is important to most women it has to be with the right man.

    Ten guys and ten gals in a bar. The guys will be happy to sleep with any of the girls, the girls will want to get to know the guys first.

    As a guy, if you're out cruising for sex then you've got to find the girls that either have sufficiently low self esteem that they'll quickly sleep with a guy to stop him going somewhere else or find the girls who are up for casual sex. Both groups exist but in total it's probably less than one in ten women. (The casual sex group are often mid thirties singles. The low self esteem groups are often young and surprisingly attractive)

    Now look at it from the other side. Those 90% plus of women who aren't up for a quick shag. Maybe they're not looking for a life partner but they are looking for a relationship. While a relationship includes sex it doesn't focus on sex. Even the blokes who are interested in a relationship are still going to be interested in sex for sex sake. Maybe it's my acquaintances but many women seem to very much enjoy the company of gay men. I think they get the pleasure of male company without that never ending barrage of "will she sleep with me?"

    As a heterosexual man who very much enjoys female company - my close female friends outnumber my close male friends by about six to one[1] - the way most men behave is extremely frustrating. It makes it really difficult for me to make new female friends because "I think you're an interesting person and I'd like to get to know you better" is just missing "in bed" and women have learned to add that themselves. (It also doesn't help that I grow on people with time so I have most success in environments where I can chat for half an hour, wander away and then continue the conversation another day. I'm not the sort of guy who pulls a girl easily and then she loses interest later. On the other hand, I don't think I've ever been turned down for a second date[2].)

    [1] I define a close friend as someone I go out for lunch with on a one on one basis for no other reason than we enjoy each others company.

    [2] Date shouldn't imply too much. I have very close female friends where it was obvious to me from before the first date (and I assume to her) that this was just a friendship thing and was never going to progress beyond a kiss on the cheek.

    Tim.

    p.s. Any man who gets involved with a low self esteem woman for the sex is an arsehole and if she tries to trap him by getting pregnant then good on her and he deserves everything he gets.

  17. Re:Oh, the delicious irony! on Ecuador Grants Asylum To Julian Assange · · Score: 2

    There are two separate things here.

    1. Sweden is not allowed to extradite Assange further without UK permission. That is just a part of extradition law.

    2. Neither UK nor Sweden can give guarantees that Assange will not be extradited further. Should the US request his extradition then the UK and Sweden will have to consider that request and then allow or reject it based on the merits of the request. Assange is neither a UK nor a Swedish citizen. I don't know if those guarantees could be given even if he was but they're certainly not going to be given as things stand. Britain or Sweden could end up in the same state as the Equadorian embassy, stuck with someone who can't leave their borders.

    Assange is safer extradited to Sweden than he is staying in the UK because both Sweden and the UK would have to agree to a further extradition.

    What if it turned out that Assange knew about the planning of September 11th but chose to keep quiet about it rather than let the authorities know? Would the commentators on this blog really be happy that the UK and Sweden had guaranteed his safety from prosecution in the US? As it is, neither the UK nor Sweden would extradite to the US without a guarantee that the death penalty will not be imposed and that alone would be likely to cause much anger in the US.

    Tim.

  18. Re:Wow, the slave boys getting desperate on Ecuador Grants Asylum To Julian Assange · · Score: 2

    It won't happen like that.

    What will happen is that Ecuador will be told that unless Assange is handed over in a week that the UK will no longer recognize the Ecuadorian embassy and their diplomats will be persona non grata.

    In a weeks time some police officers will turn up at the embassy and ask for Assange and he will be led away in handcuffs (I don't know if they will be armed or not - quite possibly not although there will probably be armed police around just in case things escalate)

    If, instead, the ambassador refuses to hand Assange over, Britain will start the diplomatic protocols to close the embassy. The diplomats will be ejected from the country and Assange will either be arrested when he tries to leave the embassy or will be arrested when the police go into the building after all the diplomats have left.

    Ecuador will, probably, in retaliation, eject the British diplomats from Ecuador.

    A few months or years later there will be a entente cordiale and Britain and Ecuador will resume diplomatic relations and the embassies will be repopulated with diplomats. In the mean time essential diplomatic communications will be maintained via some neutral third party - probably the Swedish embassy :-)

    Tim.

  19. Re:what is the issue??? on Google's Self-Driving Cars: 300,000 Miles Logged, Not a Single Accident · · Score: 1

    There's no shame in being involved in an accident if it's not your fault.

    I disagree.

    There are some accidents that it is impossible to avoid but the vast majority of accidents could be avoided even if it's the other drivers fault.

    In fact, I think one of the problems leading to the carnage on the roads is that "it wasn't my fault" is an acceptable excuse.

    I took an advanced motoring course nearly twenty years ago. It's telling that since I took that course I can only think of one occasion where I have needed to use emergency braking to avoid an accident. I can remember an occasion when my passenger was talking to me then I say "Hold on, where has that dog gone?" I'm slowing down, looking for it and then, lo and behold, it steps out in front of me, just about where I would have been if I hadn't started slowing down. Sure, I make mistakes all the time, everyone does but some of my mistakes are things like "shit, I didn't notice that turning or any signs for it" as I go barrelling past with my foot still on the throttle completely unprepared for the car that could have pulled out in front of me if there had been a car and if they'd also not been paying attention.

    I'm also very conscious of the fact that my speed tends to increase as I start getting tired. I start paying less attention to the road, seeing fewer hazards, and so the apparent safe speed increases.

    Tim.

  20. Re:That's not the good coder on Bad Software Runs the World · · Score: 1

    A good coder though can structure code in such a way that problems do not cascade, that incoming issues are limited in scope in terms of affecting the rest of the codebase. A good coder can make a huge system where you can replace a part of it without magic or too many tears.

    I'm not sure that's really the case. However well designed the system first was, requirements changes, tight deadlines etc over 20 or more years can mean that there is coupling between systems that nobody in their right mind would have designed in from the start.

    But a good coder writes code that they *expect* to work in a *predictable* way and when it doesn't do what they expect they take the time to understand why and their fixes themselves make sense.

    Poor coders write code and then make changes until it appears to work for the test cases that they have. Even the original coder doesn't understand *why* it "works".

    Probably the greatest cost of rearchitecting a huge legacy system is finding all those weird corner cases that *nobody* has *ever* understood or known they are there but the users of the software are now utterly dependent on. Unfortunately, they're often found during user acceptance testing and result in even the new system ending up with "unpleasant" fixes that increase coupling.

    On huge legacy systems even upgrading the compiler or changing the optimization settings becomes a major project because there's countless places in the code where there is undefined behaviour that happens to work in the current compiler with the current settings.

    Tim.

  21. Trend setter! on Debian Changes Default Desktop From GNOME To XFCE · · Score: 0

    I moved to XFCE (from KDE) with the last round of dist-upgrade.

    I run fanless low power machines at home (because I like peace and quiet although it has also cut down noticeably on my electricity bill) and KDE was far too slow and unresponsive.

    Tim.

  22. Re:Flowers for Algernon on Ask Slashdot: What's the Most Depressing Sci-fi You've Ever Read? · · Score: 1

    Flowers for Algernon is sad and makes you cry but not depressing.

    The Gods Themselves is depressing even though it finishes on an upbeat note. I think it is more depressing for having the happy ending than it would have been with the obvious catastrophic ending. We will run lemming like to destruction and only a better shiny toy will change our direction. The inability to see the cliff edge is something that evolution has had no solution for in the past and even intelligence seems to have not solved the problem, substituting blind unwillingness to see for inability to see.

    Tim.

  23. Re:Childhood's End By Arthur C. Clarke on Ask Slashdot: What's the Most Depressing Sci-fi You've Ever Read? · · Score: 1

    I didn't find childhoods end depressing.

    It's a step change in evolution, that we don't normally see other than via extinction events of the current successful species.

    Assuming we actually do get into space and end up with permanent installations away from Earth then I would expect homo sapiens to evolve into something pretty much unrecognizable to us today.

    I don't find that depressing, I find that exhilarating. I just hope that the distances involved will mean that as evolution diverges and we become separate species, we will maintain cooperation rather than end up in conflict. The resources we require are likely to remain strikingly similar long after the time where we've speciated. It would be so tempting to take over an existing terraformed world or space station that is almost what is needed.

    Tim.

  24. The Gods Themselves on Ask Slashdot: What's the Most Depressing Sci-fi You've Ever Read? · · Score: 1

    I know it has a happy ending but the mad desperate dash to suicide and the unwillingness to accept that cheap, plentiful energy might power the economy now but can destroy the world later mirrors so closely our addiction to oil and our willingness to spend trillions defending our sources of oil but only spend peanuts researching alternatives.

    Tim.

  25. Re:Other Olympic blackouts on 'Wi-Fi Police' Stalk Olympic Games · · Score: 1

    "doesn't stand a breadcrumb's chance in Piccadilly Circus"

    Love it!

    Tim.