Slashdot Mirror


User: phantomfive

phantomfive's activity in the archive.

Stories
0
Comments
31,362
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 31,362

  1. Re:MIne were all blocked by Sarbaynes Oxley on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    I went into management. Programming ceased to be engaging. it was easier to argue for code cleanup a couple times a year as a team lead than as a programmer because we had two people saying it would be beneficial.

    Yeah, I learned the hard way that sometimes it's better to become a manager, even if you don't want to, because otherwise bad managers will make decisions for you.

  2. Re:Step 1 - Don't on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    Well, I don't disagree with your main point, that some code is not worth the effort of writing comprehensive unit tests.
    However, it's worth pointing out that in this case, Uncle Bob suggests writing a stub function right before the command goes to the machine.

    I have no understanding of your code base though, so I'm not telling you what to do; I have confidence in your coding ability.

  3. Re:How to deal on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    Yeah, to be honest, in my experience, technical debt largely increases as developer competence decreases.

    Yeah, I think that's true.

  4. Re:How to deal on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    Lisp is really great I won't deny, and macros are without a doubt better than C++ style generic programming, but writing hygienic macros in Lisp is still a pain. We'll say almost readable syntax.

    And Smalltalk is without a doubt worth looking into. The best way IMO is to check out Squeak and play with it (there's a tutorial).

  5. Re:When your question gets closed by SO on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    Some of the good techniques in some domains are really awful ideas in other domains.

    As a Python programmer, I used to disagree with you, but lately I've found my C++ code is much more flexible since I added some braces.

  6. Re:In complement, assume you do NOT understand it on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    That's a good point, too. You kind of have to draw a line in your mind, "This is affected by the change......That is not affected by the change."

  7. Re:How to deal on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    And lets not forget Logic Programming. Did I miss any?

    Stack based programming, table oriented programming, probably more lol
    Personally, I think Smalltalk does a nice job of finding the balance between the various methodologies.

  8. Re:Answer is not in the code on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    Unit tests or no, you're still going to get lousy code from lousy programmers, and good code from good programmers (I think that is the point you were trying to make).

  9. Re:How to deal on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    I contend that one can always learn to think more clearly, and if one is constantly doing so then one's code will constantly be less clear than one is capable of writing.

    You are right, but there's a point where you are 'good enough'. Let me give an analogy:

    Traffic going onto the freeway can be bad, and if it gets too bad, then suddenly there is a slowdown, or even traffic jam. If the traffic is clear, then you can go the speed limit. The traffic can become more clear, but there is a point where it's "good enough."

    Of course, you should ask, "When is it 'clear enough' in software development?" I think Jim Shore has the answer. When your code is clean enough that you can operate in the sort of 'no bug' environment he describes, then there is still room for improvement, but you write good code at that point.

  10. Re:When your question gets closed by SO on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    The Peter principal says that all 'professional' programmers will be asked to do things more and more complicated.

    Donald Knuth discussed this, and said that you keep doing harder and hard things, things you've never done before, and that is why you can't write perfect code.
    The upside is, your skills keep getting better, and that's what keeps programming fun.

    In practice, you'll probably just end up writing yet more web services.

  11. Re:Two things on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    One of the checks I do is to have a non-programmer just READ my code. If they can make any sense of it (Think variable and function names) then I continue.

    That's a really good idea.

  12. Re:Dice sucks dick. on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    but during non-peak times (like the week between Christmas and New Years) when stuff is slow

    Best week of the year because no one is there, and you can work on whatever you want.

  13. Re:How to deal on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    If you inherit someone else's mess, and your team is really good (because if your team is not good, your first priority needs to be training them, otherwise they'll just write even more bad code), then the answer is to encapsulate the ugliness and move on.

    If you are working in a section of code, spend a little time clean it up, since you'll have to test it anyway. Make sure you understand the implications of every line you change (yeah, that's slow). Over time, the sections you work with a lot will become very clean, and you'll be able to work with the code easily and quickly.

    A constant need to refactor is a sign that something is wrong.

  14. Re:How to deal on The Best Ways To Simplify Your Code? (dice.com) · · Score: 1

    This line of thinking implies that one never improves

    No. Please read the part where I wrote, "Learn to think clearly."

  15. Re:Step 1 - Don't on The Best Ways To Simplify Your Code? (dice.com) · · Score: 3, Insightful

    Let me offer a counter point: abstracting, wrapping, deferring, and hiding those black boxes can often lead you to building abstractions and interfaces which promise more than the underlying code can deliver, or which are outright not compatible with it. If you run screaming from your real code so you can add a layer of code which allows you to pretend like you know what code you have, sooner or later you do something monumentally STUPID.

    You are right, and the GP is also right. The reality is, people who write bad code will write bad code, no matter what 'strategy' they use (and those people will typically use the wrong strategy, too).

    When programmers aren't asking themselves, "how can I write readable code?" then you can be sure their code won't be readable, even when they follow all the guidelines.

    Also, if the programmers on your team are writing bad code, you either need to teach them to do better or leave the company because it doesn't matter how brilliant you are, you can't clean faster than the other programmers make a mess.

  16. Re:How to deal on The Best Ways To Simplify Your Code? (dice.com) · · Score: 4, Insightful

    I think the code is a representation of the person. People who think clearly write clear code. Learn to think clearly.

  17. When your question gets closed by SO on The Best Ways To Simplify Your Code? (dice.com) · · Score: 4, Insightful

    When your question gets closed on Stack Overflow, then try to ask it on Slashdot?

    Frankly, if your code is constantly getting out of control and becoming unreadable, you are not doing professional work, you are doing amateur work (and yes, I know that there are plenty of paid professionals who do amateur work. We've seen stories from Trend Micro programmers here recently on Slashdot).

    It's not a set of rules to follow. If there were a mindless algorithm to follow, then a computer could do it. Instead, when you are about to write code, always ask yourself, "How can I write this in a way that future programmers can understand it?"

  18. Re:The Cloud: 1, Users: 0 on Nest Thermostat Bug Leaves Owners Without Heating (thestack.com) · · Score: 1

    We've seen a lot of failure-mode problems lately, to me this points to a lack of quality assurance testing.

    If you want high-quality software, you need to start with teaching even junior developers how to do it. Otherwise QA will just be overwhelmed, and management will release without getting rid of all the bugs.

    We have all these development methodologies like agile, XP, scrum, waterfall, that are focused on what managers should do, and what kind of meeting you should have, etc, but we need to focus on making the individual programmers better. Then you won't need managers.

  19. Re:You know what, Microsoft? on Microsoft Open Sources Edge JavaScript Code, Plans Linux Port (windows.com) · · Score: 1

    Microsoft already allows this capability, you need to search better. Here are the instructions, although I prefer these.

  20. Re:Corporate greed and stupidity is the only probl on Why Sharing Ransomware Code For Educational Purposes Is Asking For Trouble (betanews.com) · · Score: 1

    Step 4: Now my boxes are actually getting exploited, and they mostly weren't before.

    You hope.

  21. Re: are you kidding me?! on Why Sharing Ransomware Code For Educational Purposes Is Asking For Trouble (betanews.com) · · Score: 1
  22. Re:I use responsible disclosure for open source on Why Sharing Ransomware Code For Educational Purposes Is Asking For Trouble (betanews.com) · · Score: 1

    "We use Debian. Do you know anything about Debian?", he asked.
    I replied "did you see that Debian security alert about an hour ago?"
    "Yeah, this one right here?" he said as he opened the email.
    Looking at the first line of the email, he saw it said "Ray Morris discovered a vulnerability ..."
    Suddenly he seemed less concerned about my knowledge of Debian. :)

    That is awesome. You are awesome.

  23. Re:This is the second story in as many days... on Why Sharing Ransomware Code For Educational Purposes Is Asking For Trouble (betanews.com) · · Score: 1

    It's also worth pointing out that "responsible disclosure" time is only a problem with closed source software.
    With open source software, you can release a patch with the disclosure. Yet another reason to favor open source over closed.

  24. Re:Corporate greed and stupidity is the only probl on Why Sharing Ransomware Code For Educational Purposes Is Asking For Trouble (betanews.com) · · Score: 4, Interesting

    If a company is (arguably) already treating security reasonably seriously, then spreading details on how to hurt their customers does not achieve anything.

    That kind of assumes there aren't malicious people already exploiting the bug.
    Sometimes it's better to let people know so they can defend themselves: either by closing a port, changing a configuration, turning off a service, fixing the bugs themselves and recompiling, or switching to another software system.

    Of course, corporations don't like the last two options, but being able to recompile is a very real benefit of open source software.

  25. Re:Possible reasons on Are Phone Numbers Doomed To Die? (fortune.com) · · Score: 1

    scale out to pan-galactic levels, include a cryptographic signature and be directly transliterable across every language, including Klingon, ancient Egyptian hieroglyphics and the language of a tribe in the Amazon basin that only uses clicks and whistles and writes only by stacking the skulls of its enemies.

    Huh.....that actually does sound kind of good.