Slashdot Mirror


Coders' Primal Urge To Kill Inefficiency -- Everywhere (wired.com)

For software engineers, lack of friction is an aesthetic joy, an emotional high, the ideal existential state. It's what drives them, and what shapes our world. An excerpt from an upcoming book on coding, via Wired: The thrust of Silicon Valley is always to take human activity and shift it into metabolic overdrive. And maybe you've wondered, why the heck is that? Why do techies insist that things should be sped up, torqued, optimized? There's one obvious reason, of course: They do it because of the dictates of the market. Capitalism handsomely rewards anyone who can improve a process and squeeze some margin out. But with software, there's something else going on too. For coders, efficiency is more than just a tool for business. It's an existential state, an emotional driver.

Coders might have different backgrounds and political opinions, but nearly every one I've ever met found deep, almost soulful pleasure in taking something inefficient -- even just a little bit slow -- and tightening it up a notch. Removing the friction from a system is an aesthetic joy; coders' eyes blaze when they talk about making something run faster or how they eliminated some bothersome human effort from a process. This passion for efficiency isn't unique to software developers. Engineers and inventors have long been motivated by it. During the early years of industrialization, engineers elevated the automation of everyday tasks to a moral good. The engineer was humanity's "redeemer from despairing drudgery and burdensome labor," as Charles Hermany, an engineer himself, wrote in 1904.

[...] Many of today's programmers have their efficiency "aha" moment in their teenage years, when they discover that life is full of blindingly dull repetitive tasks and that computers are really good at doing them. (Math homework, with its dull litany of exercises, was one thing that inspired a number of coders I've talked to.) Larry Wall, who created the Perl programming language, and several coauthors wrote that one of the key virtues of a programmer is "laziness" -- of the variety where your unwillingness to perform rote actions inspires you to do the work to automate them.

181 comments

  1. looking forward to the dupe of this article by Anonymous Coward · · Score: 0

    Very efficient duping, the best.

    1. Re:looking forward to the dupe of this article by Anonymous Coward · · Score: 0

      Well, the article already has efficient dope.

  2. accurate by Anonymous Coward · · Score: 0

    100% accurate

  3. Ha... exactly backwards by goombah99 · · Score: 4, Interesting

    Numerical Recipes in $LANGUAGE states it is written for scientist not coders because the difference is that scientists work on the next generation of problems on the last generation of computers (and hence need efficiency), while coders solve the last generation of problems on the next generation of computers (and thus make the code more elegant but less efficient).

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re: Ha... exactly backwards by Type44Q · · Score: 2

      and thus make the code more elegant but less efficient

      Huh??

    2. Re: Ha... exactly backwards by Anonymous Coward · · Score: 1

      It means that when you have lots of resources you are not focused on efficiency in using them. For example a mind set of removing hacks and doing things the right way in a design pattern even if it means lots of overhead per call or memory inefficiency or having to throw more threads at the same task. If you are resource rich you strive for clean, re-usable code not optimizing resource constrained performance on the next larger problem. Look at all the metrics coders use to judge code and you can see it's about clean, re-usuable, APIs

    3. Re:Ha... exactly backwards by Anonymous Coward · · Score: 0

      Numerical Recipes in $LANGUAGE states it is written for scientist not coders because the difference is that scientists work on the next generation of problems on the last generation of computers (and hence need efficiency)

      Having actually worked with scientists on supercomputing-level next-generation problems I can tell you that statement is just bullshit.

      Most scientific code really needs efficiency but most scientists already use efficient primitives to assemble their computations (BLAS, LAPACK, etc.) Where they really fall down is understanding parallel computation, data dependencies, and the network effects and spatial/temporal locality problems their code has.

      Larger research groups may have funds allocated for actual developers to solve these but a lot of small research groups developing their own code would be much better served by learning effective techniques for using (say) MPI or data partitioning instead of trying to eke out gains of 3-4 cycles on their FFT algorithm.

    4. Re: Ha... exactly backwards by Anonymous Coward · · Score: 0

      No decent coder does this. If they do they're terrible at their job.

    5. Re: Ha... exactly backwards by Anonymous Coward · · Score: 0

      No decent coder does this. If they do they're terrible at their job.

      Riiiight and python doesn't default to 64 bit floats and ints? the language literally makes it hard to do anything else.
      Why do coders despise fortran? Most code written in fortran is fast. Whereas code written in other languages can be fast but generally starts out slow.

    6. Re:Ha... exactly backwards by coats · · Score: 4, Interesting
      Not my experience with environmental modelers. In particular, they have weaknesses with respect to (1) algorithms; and (2) how the implementation interacts with the hardware. Generally, it is coded in a "sloppy vector" style tailored for the limitations of 1980's vector supercomputers.
      • Case in point # 1: in the mid-90s, recognizing that emissions modeling is a linear operator problem instead of a data processing problem not only made the code much more elegant, it also reduced the run-time from 11 supercomputer-hours to 163 Sparc-2 seconds.
      • Case in point # 2: a little recoding to respect how memory access patterns interact with microprocessor based systems reduces the run-time of (my custom of) the WRF meteorology model by 40%
      • Case in point # 3: restructuring the microphysics and the vertical-mixing codes in WRF and in CMAQ from "sloppy vector" style to "vertical-column style" reduces the scratch-variable memory usage for a typical case from about 500 KB (larger than L2 caches) to about 4KB (much smaller than L1, on almost anything), the number of lines of code by 30%, and the execution time by a factor of 8.
      --
      "My opinions are my own, and I've got *lots* of them!"
    7. Re:Ha... exactly backwards by lgw · · Score: 4, Interesting

      Numerical Recipes in $LANGUAGE states it is written for scientist not coders because the difference is that scientists work on the next generation of problems on the last generation of computers (and hence need efficiency), while coders solve the last generation of problems on the next generation of computers (and thus make the code more elegant but less efficient).

      You have a narrow idea of "efficiency". You're thinking about CPU-time, which matters so rarely these days. Good software professionals optimize for human-time, writing code that's easy to support and maintain. That's "efficiency" that will bring a smile. Nothing better than a code review that's "all red", that is, removes a ton of pointless lines of code from a legacy system.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    8. Re: Ha... exactly backwards by Anonymous Coward · · Score: 0

      The scientist and engineers I worked with had no concept of normalization. I always had to rearrange their data before processing it.

    9. Re:Ha... exactly backwards by Anonymous Coward · · Score: 0

      You're thinking about CPU-time, which matters so rarely these days

      I take it you don't work in embedded software, video games, or high-performance computing of any kind.

    10. Re: Ha... exactly backwards by Anonymous Coward · · Score: 1

      It means that when you have lots of resources you are not focused on efficiency in using them. For example a mind set of removing hacks and doing things the right way in a design pattern even if it means lots of overhead per call or memory inefficiency or having to throw more threads at the same task. If you are resource rich you strive for clean, re-usable code not optimizing resource constrained performance on the next larger problem. Look at all the metrics coders use to judge code and you can see it's about clean, re-usuable, APIs

      Ugh.. boil it down to the simple statement. Computers and computer resources are dirt cheap compared to coders, as such the corporate desire is to spend the least amount of money on both that results in "adequate" performance for the masses.

    11. Re:Ha... exactly backwards by Anonymous Coward · · Score: 1

      Those things are important to optimize too, which is why nobody writes SQL database queries in assembler.

      But I've done tons of work to optimize CPU/GPU rendering code, where shaving 75 milliseconds of time out of a loop is the difference between a frustrating user interface and one that is smooth and makes the customer happy. (25 mS render time = 40 FPS, 100mS render = 10 FPS). Humans notice that lag at 10 FPS when interacting with a touchscreen. Customer in this case being the driver of a high end car. And this kind optimization is only necessary because the car company wants to use a $25 embedded SOC to render the user interface instead of a PC with a GPU that's literally a hundred to a thousand times faster.

      Now I am retired at 50 with millions in the bank because I solved an efficiency problem. We made it feasible for a car company to use a $25 SOC instead of a more expensive solution. (Nowadays more like a $5 SOC). Do the math on how much money we could save a car company over a production run of say, 1 million units.

      Also I don't personally believe code efficiency and human efficiency are mutually exclusive. Usually the efficient code is simpler, easier to test and easier to maintain.

    12. Re:Ha... exactly backwards by Anonymous Coward · · Score: 0

      The 'more elegant' part may not necessarily be true, but the rest definitely is.

    13. Re: Ha... exactly backwards by Anonymous Coward · · Score: 0

      Indeed. Web grunts with CRUD apps think CPU time doesnâ(TM)t matter because they think a 5 second page load is acceptable.

    14. Re: Ha... exactly backwards by Anonymous Coward · · Score: 0

      ***Software is for the user, not the coder!*** And users do think CPU time matters even if they canâ(TM)t articulate it: they want high frame rates and fast responses and no spinning wheels or hourglasses, and the coder who thinks these things donâ(TM)t matter is damned.

    15. Re: Ha... exactly backwards by lgw · · Score: 1

      "Premature optimization is the root of all evil" -Knuth

      Yeah, that web app isn't slow because of CPU. It's slow because of a bunch of stupid architectural decisions, and very likely over-reliance on a RDBMS that work fast enough when there were only test users.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    16. Re: Ha... exactly backwards by lgw · · Score: 3, Funny

      Indeed. Web grunts with CRUD apps think CPU time doesnÃ(TM)t matter because they think a 5 second page load is acceptable.

      I guarantee you that CPU was never the bottleneck in the performance of that web app. Wasting time optimizing the part of the process that takes 5 microseconds to make it take 4 microseconds of that 5 seconds is something people do because it's fun, not because it's productive.

      Meanwhile that poorly-written DB query that runs once an hour (to make a report no one reads) and browns out the DB server for 3 minutes is why someone's getting 5-second page loads, but only between X:03 and X:06 every hour. Good luck even reproducing that. Welcome to the real world.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    17. Re:Ha... exactly backwards by lgw · · Score: 1

      I take it you don't work in embedded software, video games, or high-performance computing of any kind.

      Depending on how you look at it, I ran a fairly powerful supercomputer for years. Need 1 million cores? (OK, less impressive this year than a few years ago.) Sometimes just throwing more hardware at the problem works, and there are several categories of problem that parallelize well even with high latency between nodes.

      The areas where constant-time perf improvement actually matter shrink every year. It's still a very fun sort of programming, but it's just so rarely comes up in most software jobs.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    18. Re: Ha... exactly backwards by uncqual · · Score: 1

      Computers and computer resources are dirt cheap compared to coders

      In some cases this is true locally but not globally.

      For example, a product like Hadoop is/was very widely used and the aggregate global usage consumes/consumed vast computing resources (and the attendant real estate to house them, energy to power them, energy to cool them, etc -- i.e. TCO). Squeezing, on the average, a 0.5% performance improvement may be well worth the initial development cost when viewed globally across all organizations as it could eliminate the need for thousands of nodes with an aggregate annual TCO of millions of dollars. For example, a 1000 node system might only need to only be a 995 node system - a savings of 5 nodes in a modestly large system. The effect of such changes is hard to measure or isolate, but ultimately hardware is often upgraded (usually just replaced) because it gets too slow for the application so sometimes just extending the upgrade cycle by one month represents a substantial TCO savings.

      However, no individual company, even the big ones who contribute to Hadoop and use it extensively internally, have much motivation to invest in such changes as it would only reduce their annual TCO by tens of thousands of dollars - well below the development (including test etc) costs. As well, these companies benefit from expending their limited development resources on features, often released to the community, that optimize mostly their usage rather than the global good.

      Hadoop product companies like Cloudera have no motivation to make such changes as it wouldn't gain them any customers or allow them to charge any more for their proprietary offerings.

      Obviously if such changes for small performance improvements crufts up the code, the ongoing maintenance costs (or just the diversion of resources from feature innovation to cruft maintenance) may exceed the benefit even globally, but basically virtually no one even looks at these opportunities -- a decision that makes good business sense locally.

      This is something I have found very frustrating having been in such environments. Perhaps this identifies me an exemplar for the very article although I'm more into reliability (including engineering in capabilities to avoid, detect, and help corral and fix the inevitable heisenbugs and rarely occurring timing related bugs or sporadic, but serious, performance anomalies) rather than raw performance.

      --
      Why is there an "insightful" mod and why isn't it "-1"? If I wanted insight, I wouldn't be reading /.
    19. Re:Ha... exactly backwards by angel'o'sphere · · Score: 1

      while coders solve the last generation of problems on the next generation of computers (and thus make the code more elegant but less efficient).
      That is nonsense.
      A for loop is a for loop is a for loop. It does not lose efficiency just because a coder gets older and a computer gets faster.

      We lose efficiency because problems and solutions become more complex and coders are forced to deliver in relatively short time. So they rely on frameworks that focus on simplifying work and ensuring "safety" from mistakes (e.g. in multi threading). Most perceived performance loss is simple a reason of the increased complexity. E.g. facebook serves a billion concurrent users. A systems architecture that scales that way is not the same as a small embedded C program with half a dozen variables running single threaded on a 8-bit micro controller with 16 glorious input/output pins.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    20. Re: Ha... exactly backwards by angel'o'sphere · · Score: 1

      You reduce that by having a replica for "data mining", you don't do that on the life data base.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    21. Re: Ha... exactly backwards by Anonymous Coward · · Score: 0

      Wtf is wrong with int64 and float64 on 64-bit architecture. It's over 30 years programmers cared for efficiency. Java JEE won, and will now lose again to prove the sham complete. Those who love coding laugh at your hollow existence toward extinction event.

    22. Re: Ha... exactly backwards by goombah99 · · Score: 1

      If the CPU isn't the bottleneck in a web app then you are paying way too much for your cloud CPU instance. You shoul dhave bought a cheaper instance to make it the bottleneck

      --
      Some drink at the fountain of knowledge. Others just gargle.
    23. Re: Ha... exactly backwards by Anonymous Coward · · Score: 0

      That's like saying that you have paid too much for your stereo amplifier if you have the volume at only 10%!

      If your CPU is a bottleneck at normal usage, you won't be able to handle spikes in load. You can use load balancing and spin up new servers to ramp up your capacity, but that's not going to help with sharp spikes.

      dom

    24. Re: Ha... exactly backwards by Anonymous Coward · · Score: 0

      Spikes are why you use clouds. Spawn new instances to handle loads.

    25. Re: Ha... exactly backwards by lgw · · Score: 1

      Wouldn't that be nice? A world where people avoid doing obviously stupid stuff on production serves? It's a nice fantasy.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    26. Re: Ha... exactly backwards by lgw · · Score: 1

      Most software I work with is I/O-bound. Since most programmers these days don't know what "asynch I/O" is (is it even possible with Java?), you either run out of threads, or sink into a quagmire of thread dispatch. Although it's nice when you can instead be memory-bound, because what you're doing caches well, but read-intensive loads are trivial anyway.

      Also: still using "instances" in current year argument? Get with the times! That's so five years ago. Containers are old fashioned now. Bro, do you even lambda?

      --
      Socialism: a lie told by totalitarians and believed by fools.
    27. Re: Ha... exactly backwards by lgw · · Score: 1

      Spikes are why you use clouds. Spawn new instances to handle loads.

      If you can wait 5 minutes for new instances to come up behind the LB, that's a ramp not a spike. Of course, that's fine for some cases.

      --
      Socialism: a lie told by totalitarians and believed by fools.
  4. Feel-good nonsense by sinij · · Score: 2

    This is just a bunch of feel-good nonsense. While nobody sets out to write inefficient code, most of the code is inefficient due to reuse of generic libraries and lack of compiler optimizations. If you think you are different, then when was the last time you looked at your gcc compiler flags and do you know what each one of them does?

    1. Re:Feel-good nonsense by 110010001000 · · Score: 2, Insightful

      Very true. Most programmers aren't interested having a 100% efficient program at this point. But we are interested in automating tasks. The two things are independent, but the summary conflates the two. Probably written by a non-developer.

    2. Re: Feel-good nonsense by Anonymous Coward · · Score: 0

      Every day and yes.

      But I'm in my 40's.

    3. Re:Feel-good nonsense by Anonymous Coward · · Score: 0

      This is just a bunch of feel-good nonsense. While nobody sets out to write inefficient code, most of the code is inefficient due to reuse of generic libraries and lack of compiler optimizations. If you think you are different, then when was the last time you looked at your gcc compiler flags and do you know what each one of them does?

      the worst inefficiencies in software do not necessarily have to do with the gcc compiler flags -

    4. Re:Feel-good nonsense by Anonymous Coward · · Score: 5, Insightful

      If you are looking at gcc flags to get overall optimization, you are doing it all wrong. You gain fractions from gcc optimizations. I've refactored code and gotten 1000X from silly stuff that people have done. gcc would have done nothing to make those problems go away.

    5. Re:Feel-good nonsense by sunking2 · · Score: 1

      That's because there is an overwhelming lack of understanding of what they write as code and what it actually means as far as instructions to perform it. In fact most of what people think they are doing to help performance is likely optimized away by the compiler.

      Which btw highlights the difference between programmers who write things like compilers and the rest of the "bro programmers". Sadly, guess which ones are likely pulling down more salary.

    6. Re:Feel-good nonsense by 0100010001010011 · · Score: 2

      That's not what they're talking about. They're talking about automating *something* with code.

      Even the slowest BLAS libraries are faster than a human at doing matrix multiplication. Having humans do math was inefficient and slow until some coders came up with a way to do it 'automatically'. Then the world moved on.

      Right now I'm Jenkins-ing everything at work. Even trivial stuff that takes time. I just put it in a batch job and let it run.

    7. Re:Feel-good nonsense by Anonymous Coward · · Score: 0

      What? They may be "independent" but they are highly correlated.

      The more automated you make coding, and tasks, the more generic you necessarily make those tasks, and code. There's a spectrum of "works for everyone" to "one-offs" - and we're on it somewhere.

    8. Re:Feel-good nonsense by Oswald+McWeany · · Score: 1

      Sometimes spending the time to make something more efficient is inefficient. I'll happily admit that I have code out there that I know is not the most efficient, and I even know the ways to make it MORE efficient.

      I write internal apps for a private business. If one of my webpages takes 10milliseconds longer to load than I could optimize it for... so be it... we're not talking about thousands of people hitting the site at the same time.

      I have a long list of things to work on and I can crank out more pages doing some things "slightly inefficiently". It would be an inefficient use of my time to go around shaving 10 milliseconds here and there. Trying to make things slightly more efficient and load slightly quicker in some scenarios is a waste of time.

      --
      "That's the way to do it" - Punch
    9. Re:Feel-good nonsense by tomhath · · Score: 4, Insightful

      Not only feel-good nonsense, but it makes a ridiculous generalization about "coders" as if they are some kind of special life form. Do "carpenters" have a primal urge to "kill inefficiency" because they use power tools?

    10. Re: Feel-good nonsense by Anonymous Coward · · Score: 0

      "Sadly, guess which ones are likely pulling down more salary."

      Neither? Most salaries in the software industry are within a pretty narrow band. It's almost like bigcorps and VCs were colluding to suppress wages... But everyone knows that would never do THAT!

    11. Re: Feel-good nonsense by Anonymous Coward · · Score: 0

      Well, yeah, you are definitely on the spectrum.

    12. Re:Feel-good nonsense by DCFusor · · Score: 1
      No one sets out to be a lousy architect and design code that's inherently inefficient, either. But it sure does happen a lot, and compiler flags or cute tricks inside some routine don't fix that, either. Approaching a problem the wrong way is a main driver of inefficiency, followed by using the wrong tools (language, server, whatever).
      =

      I use C/C++ when computer time is important, and use a lot of the fancy tricks to avoid various dumb things.
      But I also do lots of "research grade" code where I just want the answer and in the least total time - which includes my time. Then perhaps I use a language that is easier to write faster, not caring so much about runtime.
      It's latency vs throughput all over again.

      --
      Why guess when you can know? Measure!
    13. Re:Feel-good nonsense by Dutch+Gun · · Score: 5, Insightful

      A very good point. I work in videogames, which obviously has, as an industry, a great interest in writing efficient code.

      However, in code meant for tools, or even game code that's reasonably far off the critical path, I'll happily sacrifice efficiency in some complex code in order to make it more readable, because that's significantly more important for the those that may come after me who have to maintain it. For code that's in a critical path, only then will I spend the extra effort writing more optimal code. Optimal code sometimes has a price to pay both in the time spend writing it, but also maintaining it in the future.

      There are occasions where more optimal code is also clearer and more elegant, but you have to have a reasonably comprehensive knowledge of both the language and the project you're working on to properly make this call.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    14. Re:Feel-good nonsense by skids · · Score: 4, Insightful

      Not only feel-good nonsense, but it makes a ridiculous generalization about "coders"

      Yup. After all, the inefficient code that "coders" love to optimize had to come from somewhere. Where, if not from "coders"?

    15. Re: Feel-good nonsense by Anonymous Coward · · Score: 0

      Yup - the joke was already in the post. As I said, we are on it.

    16. Re:Feel-good nonsense by Anonymous Coward · · Score: 0

      Maybe everyone has the urge - except bespoke furniture makers. They eschew power tools for something more 'organic' and less efficient.

    17. Re:Feel-good nonsense by sinij · · Score: 1

      Absolutely, but I didn't want to start with "your code sux".

    18. Re:Feel-good nonsense by liquid_schwartz · · Score: 3, Interesting

      Not only feel-good nonsense, but it makes a ridiculous generalization about "coders" as if they are some kind of special life form. Do "carpenters" have a primal urge to "kill inefficiency" because they use power tools?

      Close. Carpenters have a primal urge to have more tools, thus the need to buy both hand tools and power tools. You can generalize this from carpenters to all woodworkers to most men quite accurately :-)

    19. Re:Feel-good nonsense by schweini · · Score: 2

      Optimizing for maintenance and readability is, in itself, also a way to optimice for meta-efficiency. Much like an industrial engineer might optimize a process for overall efficiency, instead of only shaving of some seconds off a single step.
      The older I get, the more I notice that I am way more annoyed by problems in the big picture, vs. some small loop that could be slightly more funkyly coded.
      It is relatively easy to get some super coder to make a routine more efficient, or geek out oneself to hyperfocus on that little annoying line of code. But it is often a case of pre-mature optimization, if the bigger system hasn't been designed properly.

    20. Re: Feel-good nonsense by llZENll · · Score: 3, Insightful

      For nearly all code you should write the simplest implementation, selecting ease of reading, security, and maintainability over speed. After your program is nearly done and you begin profiling then start optimizing. People are notoriously bad at guessing where bottlenecks will be and what causes them.

    21. Re:Feel-good nonsense by Anonymous Coward · · Score: 0

      Premature optimization is the root of all evil -- Donald Knuth

      If you're consciously making a decision in a performance/maintainability trade-off, you're still working to kill inefficiency. Optimization comes at a cost and you're weighing the benefit against that cost.

    22. Re:Feel-good nonsense by Anonymous Coward · · Score: 0

      > After all, the inefficient code that "coders" love to optimize had to come from somewhere.

      1. Human does work
      2. Developers writes quickly some code to replace human, because no matter how bad it is, it is still 1000 times better than human.
      3. Second developer writes a better software, because first software is so bad that it is easy to do it 1000 times better.
      4. Third developer has to really think about how to write it more efficient, but by changing the architecture of the whole system and data model, he can optimize it to outstanding speed, making it 1000 times better.

    23. Re:Feel-good nonsense by Anonymous Coward · · Score: 0

      > No one sets out to be a lousy architect and design code that's inherently inefficient, either. But it sure does happen a lot

      I know a case where customer demanded to be in control of the project. Developers warned about their methods, but paying customer gets to decide. End result was that developers were not allowed to talk with each other, except by formal documents and every part of the system ended up having their own data models and designs and nothing worked well together, data was duplicated in different formats all over the place and the whole system ended up being... well so bad that people who have to use it need to cry 15 minutes before they are able to tell about its problems.

    24. Re:Feel-good nonsense by Anonymous Coward · · Score: 0

      If you're looking to compiler flags to meet your speed target, you've waited too long to optimize. My biggest efficiencies all came from fundamental rethinking of the problem and finding ways to refactor the problem, like finding a way to make an n squared algorithm n-log-n, for instance.

      I totally agree with overuse of generic libraries. I've gotten 2-3X speedups often just by replacing std::vector with an array based implementation.

    25. Re:Feel-good nonsense by 110010001000 · · Score: 0

      That isn't what I am saying. I am saying trying to make a program more efficient (in terms of memory usage/CPU usage/etc) is independent of wanting to automate things. Coders like to do the latter, but not all enjoy the former (I know I don't).

    26. Re:Feel-good nonsense by swell · · Score: 1

      And yet--gamers? Let me take a wild guess that game programmers are people who like games.

      Games are the antithesis of efficiency. They consist entirely of a deliberate choice to waste as much time as possible, often to the detriment of useful activity. Even reading books or watching movies can sometimes be considered educational to some extent. Games; not so much.

      Of course many games require extreme speed and efficiency to generate maximum endorphins and adrenaline. That code must be impressive. Congrats if you can do it.

      --
      ...omphaloskepsis often...
    27. Re:Feel-good nonsense by Anonymous Coward · · Score: 0

      Its not only feel-good nonsense, but also STUPID. The aim should be "secure by design".
      Efficiency has always been on the list, but there has been a blatant neglect of security for the last several decades.

      Security bugs that has been long used by certain governmental agencies are now being exploited by bad people. We tend to forget that bad people can code too.

    28. Re: Feel-good nonsense by Anonymous Coward · · Score: 0

      "After your program is nearly done and you begin profiling then start optimising."
      If nearly done means 90 %, then at 300 % of schedule you are done optimising and start testing, documentation etc. so by the time you''re 500 % done, the product is ready to ship. Efficiency is a strange thing.

    29. Re: Feel-good nonsense by TJHook3r · · Score: 1

      Using examples of carpenter though, it would be like a carpenter spending hours to make a chest of drawers open more neatly. Most tradesmen I know set a level of quality that is dependent on price though - mostly because the tech and materials are well known. You won't ever need complicated workarounds when making a chair or even a house, you follow established procedures.... unlike coders!

    30. Re: Feel-good nonsense by edris90 · · Score: 1

      all of security is just more and more layers of obscurity. their are always more unanticipated avenues of bypass or circumvention waiting to be discovered or developed. instead the humans need to chanfe their model of operation to expect errors and hacks and adjust their world to operate independently with failover as part of the expected dynamics.

    31. Re: Feel-good nonsense by tomhath · · Score: 1

      it would be like a carpenter spending hours to make a chest of drawers open more neatly

      Carpenters don't make chests of drawers. Carpenters build houses, stores and banks; furniture makers make furniture, it's an entirely different profession.

      And if you think "coders" don't follow established procedures you don't know anything about writing software.

    32. Re: Feel-good nonsense by Anonymous Coward · · Score: 0

      And if you do it that way, you'll have a (possibly) slow, (probably) correct and (hopefully) readable first version in the repository which you can test against. And which you can go back to when a test fails, or when the code has become unreadable.

    33. Re: Feel-good nonsense by Anonymous Coward · · Score: 0

      Yup. "Make it right, THEN make it fast (and right)."

    34. Re:Feel-good nonsense by skids · · Score: 1

      That could conceivably happen.

      Here's a more plausible scenario:

      1) Human does work
      2) Developer fresh out of college with limited google-foo and general DIY mentaility re-invents the wheel to make process 1000 times better than human
      3) Re-invented wheel is tweeted about and another developer also unaware of 10s of other previously existing wheels wraps implementation into an API for whatever the popular language of the week is, making it 3 times less efficient.
      4) Developer at startup integrates said library and publishes it as part of an SDK for a larger product suite, gaining no efficiency.
      5) Customers note lack of many features other implementations of said wheel have had for decades. Many TAC cases and meetings are held.
      6) Company hastily responds by glomming imitations of missing features onto oversimplistic implementation, doesn't bother to push upstream, and makes things 5 times less efficient.
      7) https://xkcd.com/927/ happens, making things 3 times less efficient
      8) Product has to run on new hardware and the fastest way to do that is run it on an emulator, making things 20 times less efficient.
      9) Desk jockey gets distracted reading slashdot while waiting for laggy UI, takes 5 times longer to do job than necessary.

  5. ineffcient use of time sometimes by Anonymous Coward · · Score: 0

    Sometimes the primal urge to make everything more optimized can be a waste of time given the slight performance benefits. Especially when you've spent excessive amounts of time trying to squeeze out that last 1% of performance. Sometimes squeezing the last bit out of it isn't worth the time.

    Sadly there are too few programmers who get that concept.

    1. Re: ineffcient use of time sometimes by Anonymous Coward · · Score: 1

      Existence is an illusion therefore our time has no value, except when we are optimizing a minor subroutine.

    2. Re:ineffcient use of time sometimes by bobbied · · Score: 3, Insightful

      Sometimes the primal urge to make everything more optimized can be a waste of time given the slight performance benefits. Especially when you've spent excessive amounts of time trying to squeeze out that last 1% of performance. Sometimes squeezing the last bit out of it isn't worth the time.

      Sadly there are too few programmers who get that concept.

      Exactly this. I've argued with a peer many times over making some odd error handling routine that is only called on a catastrophic failure more efficient. Well it takes too long or uses too much memory if you do it this way.... Over, Yea, but if it's ever called, this program is going to die a quick and complete death so why does it matter? Why are we wasting development time discussing this?

      It's the same mentality that gets up in arms about how many spaces are used for indentation or if you use a line feed before your curly braces or not. Don't get me started on the "You have TABS in your file, instead of spaces! Or there are too many line feeds here" complaint. Why are we wasting time fixing this stuff after the code is working? Sure, bring it up so we can all agree to do all this the same way, but it's not worth wasting hours of the developers' time to "fix" stuff that isn't really broken.

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    3. Re: ineffcient use of time sometimes by astrofurter · · Score: 1

      Every language should have something like gofmt (https://golang.org/cmd/gofmt/). One and only one canonically correct way to format code, automatically, using an official tool included with the language distribution. Never argue about inane formatting issues again!

    4. Re: ineffcient use of time sometimes by Anonymous Coward · · Score: 1

      Quite frankly IDEs should display code in whatever format or style the user prefers based on rendering a (possibly incomplete) abstract syntax tree instead of worrying about locations of spaces or tabs in a text file.

    5. Re:ineffcient use of time sometimes by Anonymous Coward · · Score: 0

      > I've argued with a peer many times over making some odd error handling routine

      Ask then how many hours/days it would take for him to rewrite it better. If the times is very small, ask them to do it. If the time rather long, ask him what kind of value in dollars does that bring to the customer. Most likely the value is zero, while development cost is rather high. Next ask him, does he think we should fix it.

      You don't usually need to do this more than once per person.

      > It's the same mentality that gets up in arms about how many spaces are used for indentation or if you use a line feed before your curly braces or not.

      This is stupid to argue about, because the problem is easily solved. Either you have a dictator that decides what it is and it is written down as a law. Or you gather all developers, collect all alternatives and vote, and winner is written as a law. After that you don't need to argue about it any more, ever again during that project.

    6. Re: ineffcient use of time sometimes by DickBreath · · Score: 1

      In LISP everything has a value. And everything also has a cost, but lisp programmers, and Java programmers, ignore the cost.

      --

      I'll see your senator, and I'll raise you two judges.
    7. Re:ineffcient use of time sometimes by Anonymous Coward · · Score: 0

      ...how many spaces are used for indentation...

      The correct answer is:
      "None. Use tabs. That way it's one tab per indentation level and then people can set their editor to display that width as whatever they like"

      This way it's efficient and also allows people flexibility and sacrifices nothing.

      Using tabs for indentation you don't have to hit backspace multiple times when de-indenting (not all text editors support shift+tab to de-indent and sometimes you just futz with the leading whitespace manually anyway).

      If you're wasting time aligning variable declarations then you'd be a hypocrite to whine about how people are wasting time talking about whether to use tabs vs. spaces. Don't even get me started on situations where you have to manually tap the spacebar multiple times.

      Want to talk about inefficiency?
      At two-spaces-per-indentation-level source files take up twice the amount of storage for indentation compared to using a single tab per indentation level; and of course the inefficiency climbs from there if you're three-spacing or four-spacing etc.
      How many javascript source files are you running as you browse the web? Are 100% of them minified? No. So the ones that aren't minified and are using spaces for indentation are wasting bandwidth in transmission and wasting memory when your browser loads and stores them.
      Obviously your text editor is also wasting memory when it's loading and displaying source files that are indented with spaces.
      When parsing a source file (i.e. during compilation or interpretation) those spaces used for indentation are extra reads that the compiler or interpeter has to go through-- they also take up space in the CPU cache which just compounds the inefficiency. Want programmer productivity? Decreasing compile times would be a great start. And no, don't tell me it's an insignificant amount of time (it basically is), because the principle of the matter remains and in this case it's a non-zero amount of inefficiency caused by using spaces for indentation. This inefficiency has no purpose and is trivial to remedy.

      TL;DR: If you're using spaces for indentation then you're a hypocrite if you talk about desiring efficiency.

    8. Re: ineffcient use of time sometimes by angel'o'sphere · · Score: 1

      In my experience there is no difference between a C++ or Java programmer.

      Can you give an example where one is more aware about costs and writes better code regarding that?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    9. Re:ineffcient use of time sometimes by Anonymous Coward · · Score: 0

      I've argued with a peer many times over making some odd error handling routine that is only called on a catastrophic failure more efficient. Well it takes too long or uses too much memory if you do it this way.... Over, Yea, but if it's ever called, this program is going to die a quick and complete death so why does it matter?

      I'd favor making sure my error handling routine is able to accurately report things. This is one place were optimizing/eliminating memory usage is a valid use of time, otherwise you might subsequently trigger some sort of OOM type condition, and then you'd be wasting even more time solving the wrong problem.

    10. Re: ineffcient use of time sometimes by DickBreath · · Score: 1

      I think awareness of costs is the wrong thing to ask for. Instead ask how how much control of costs a C++ vs Java programmer has.

      I've done both. So I think I have at least some idea.

      Both C++ and Java programmers have control of what algorithms they choose. And these higher level choices have the most profound impact on overall performance.

      Assuming both C++ and Java programmers pay attention to overall design and algorithm efficiency, it is my opinion that C++ programmers have more control over costs in some choices about how things are represented. Java, while I like it, tends to force all representation into particular forms with a certain cost. Thus less control over cost of representation of data.

      Now that said, I can't think of any other real differences. So you may have a point.

      --

      I'll see your senator, and I'll raise you two judges.
  6. SysAdmins Too by Bigbutt · · Score: 2

    As an Operations Engineer, I'm also working on improving things. Automation to speed up deployments, monitoring to identify bottlenecks, etc. The bad part is when the provided tools don't give me that visibility so I can make improvements, I deploy my own tools (or write my own). It's probably less efficient but I can then work on improving the environment. My current audit script identifies some 34,000 things that can be improved across our environment.

    [John]

    --
    Shit better not happen!
    1. Re:SysAdmins Too by Anonymous Coward · · Score: 0

      "I find your ideas intriguing and would like to subscribe to your newsletter"

  7. Excellent! by Anonymous Coward · · Score: 0

    Can you get these guys to work for Slack? That shit is probably the exact opposite of whatever bullshit this article is about.

  8. Because it is fun and measurable by houghi · · Score: 3, Interesting

    You did something and you can measure that what you did, actually did it.

    It is not like throwing a price to a customer and then he buys it. Perhaps he would have done that anyway. When you did the coding, you know that what you did was the cause of the improvement.

    I know I have sat down for many hours, so a process can run 1 second faster and it runs once per week day. That is just over 5 minutes per year.

    There is no way to defend spending so much time on it, except for ego.

    --
    Don't fight for your country, if your country does not fight for you.
    1. Re:Because it is fun and measurable by Anonymous Coward · · Score: 0

      you might also find other problems while you work on that change that saves only 5 minutes per year. You learn about the problem set and become an expert in the details. That's not nothing.

  9. FACT by phishybongwaters · · Score: 4, Insightful

    I will spend 4 hours coding something so I don't have to spend 10 minutes doing it manually more than once.

    1. Re:FACT by 0100010001010011 · · Score: 2

      In 4th grade (early 90s) I got in trouble for something and had to write out something 20 times.

      I convinced my teacher that typing was a useful skill. I failed to mention how copy and paste worked. So I said I typed it out 40 times to practice and got a congratulations for that.

      Since then my whole career has been slight of hands with managers and code in the background.

      That 4 hours invested will 'break even' after 24 times. Maybe it takes a year or two, but after that you're working on 'free' time.

      Add in a few more scripts here and there and those 10 minutes add up into real productivity gains after a decade in industry.

    2. Re: FACT by Type44Q · · Score: 1

      "Sleight."

    3. Re:FACT by dromgodis · · Score: 4, Informative
    4. Re:FACT by Actually,+I+do+RTFA · · Score: 2

      It's not the coding that drives me nuts with automating stuff, it's the testing/QA. You do make sure that all mission critical things you do are tested to make sure the automatic process isn't doing something wrong, right? Ideally with another party (internal or external) acting as QA.

      --
      Your ad here. Ask me how!
    5. Re: FACT by 0100010001010011 · · Score: 1

      Shakes fist.

    6. Re:FACT by Anonymous Coward · · Score: 0

      FACT about EFFICIENCY...

      Humanity WILL ADOPT:

      Fully Distributed P2P Transaction Mineable Privacy Cryptocurrencies

      Because it eliminates all the wasted redundant inefficiencies and resources of all the Global BANKING and GOVERNMENT systems combined. All their buildings, water, maintenance, all their computers, the forests cut down for them and other resources, their unnecessary self preserving and pointless laws, surveillance, spying, the giant theft at gunpoint taxation scam, wars, murders of millions of innocent, starvation and poverty by the vacuum of the Military Industrial Complex, etc... ALL GONE.

       

    7. Re:FACT by Anonymous Coward · · Score: 0

      That's where I find a lot of devs get it wrong.

      You need to look into the future when doing stuff like that. Questions I'll usually ask myself:
        - Is there a chance I'll need to do this again?
        - Is there a chance I'll need to do something closely related? Should I code for that?

      In a work environment where deadlines and budgets rule, answering "No" or even "I'm honestly not sure" to either of these two usually doesn't justify dumping hours on an implementation of some dynamic solution, instead of just biting the bullet and doing the manual work myself.

      Maybe if I was a better coder I could "better generalize" problems that beg the above questions; however I'd think that would lead to code that ends up being readable by only the writer, and their users re-coding functionality anyways because they simply don't understand how your code-base works. It's easy to assume that "they should understand it, they're coders too" but often times this simply isn't the case. Especially in a multi-cultural work environment.

    8. Re:FACT by Hognoxious · · Score: 1

      X < N < Y

      where:
      N is the number of things you have to do.
      X is the most you can do manually without getting really really bored.
      Y is the number where automating it breaks even in terms of effort.

      But automate it anyway, just in case it comes up again ;-)

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    9. Re:FACT by Wolfrider · · Score: 1

      --LOL - I did the same thing with one of my teachers, only I wrote PUNSMENT.BAS to do it

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
  10. TL;DR by 14erCleaner · · Score: 1

    "Making things go faster is fun."

    --
    Have you read my blog lately?
    1. Re:TL;DR by Anonymous Coward · · Score: 0

      "Making things go faster is fun."

      There you go, making a more efficient way to read the article.

  11. code efficiency is a social construct by Anonymous Coward · · Score: 0

    If you look at it through a proper lens :)

  12. Well depends on the situation... by Faw · · Score: 1

    ... sometimes I like to do something unbelievably inefficient. Not for production code though.

    In college a teacher gave us an assignment to reverse a linked list. I made it recursive. My teacher said: "It's inefficient and that will only works with small lists, you will get a stack overflow". I said "Who cares, it is pretty", Still got an A.

  13. Premature optimization a root of a lot of evil by Anonymous Coward · · Score: 0

    I have to disagree with this post- if you are optimizing for the sake of optimizing you are:

    Wasting Coding Time to get functions that take 2us to run in 1.5us when other parts of the code are taking seconds.
    Making Code LESS maintainable by increasing complexity of a lot of functions that don't matter for system performance.

    Instead:
    Implement code that is clear that you think is not horribly inefficient. Benchmark the entire system and optimize the parts that matter- bonus points for stress testing with larger then expected data sets.

    -RSF

    1. Re:Premature optimization a root of a lot of evil by Immerman · · Score: 2

      Depends - are you optimizing the code, or are you optimizing the algorithm?

      Code is usually small gains, and modern compilers can claim most of the low-hanging fruit themselves.

      Data structures can be much bigger gains in some contexts, as using hardware cache inefficiently for frequent operations can cost you an order of magnitude of performance.

      The algorithm though - that can easily often make several orders of magnitude difference. That's where optimization and elegance can often really come together. Sometimes simplicity has to be sacrificed - but if you start thinking that way it's usually a warning sign that you need to revisit your assumptions.

      Same thing with architecture in many ways - though with a bad architecture it's the programmers' time you're wasting rather than CPU time. And that's generally even worse.

      --
      --- Most topics have many sides worth arguing, allow me to take one opposite you.
  14. no longer efficient by Anonymous Coward · · Score: 0

    Sadly, the days of writing super-efficient code, taking time to eliminate extra steps, Taking the time to save those extra bits of memory, those days are all gone.

    Today, the sad truth is, we are supposed to push out any code that 'works', fast. Project managers just want something that works now, who cares if it's elegant.

  15. I've said it since my youth.... by Jakester2K · · Score: 2
    Laziness is the father of invention.
    - tm Jake, ca 1980

    Larry Wall, who created the Perl programming language, and several coauthors wrote that one of the key virtues of a programmer is "laziness" -- of the variety where your unwillingness to perform rote actions inspires you to do the work to automate them.

    1. Re:I've said it since my youth.... by Anonymous Coward · · Score: 0

      A stupid idea that gives people licence to pretend like their vices are actually virtues.

      The desire to avoid work is not laziness. It's just the desire to conserve resources, also known as frugality.

      Laziness is the tendency to refuse to do work that one should do, thus forcing that labor on someone else. Or forcing others to participate in the consequences of leaving the work undone.

      Frugality motivates invention, laziness just makes you a selfish, fat, asshole.

  16. Larry Wall said it better by tomhath · · Score: 1
    This is the first of The Three Great Virtues of a Programmer.

    Laziness

    The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful, and document what you wrote so you don't have to answer so many questions about it. Hence, the first great virtue of a programmer.

  17. eh? by Anonymous Coward · · Score: 0

    "lack of friction is an aesthetic joy, ". Come again ?

  18. Exactly what I was going to say by Anonymous Coward · · Score: 0

    Efficiency is not unique to coding.

    I don't even know how to code. I work in an accounting based field. I streamlined every single task I've ever performed for every single employer I've ever worked for.

    I must be a fucking genius. Can I pat myself on the back, too?

    1. Re: Exactly what I was going to say by Anonymous Coward · · Score: 0

      Yes. Feel free to give yourself a hug too.

  19. Simplifying code makes me happy by DigressivePoser · · Score: 3, Insightful

    Coders might have different backgrounds and political opinions, but nearly every one I've ever met found deep, almost soulful pleasure in taking something inefficient -- even just a little bit slow -- and tightening it up a notch.

    There's also get great pleasure in reducing the complexity of code. If I can make the code faster/more efficient and simpler at the same time then I have one of those oh yes, yes, yessss moments.

    1. Re:Simplifying code makes me happy by Tony+Isaac · · Score: 1

      Faster, more efficient, simpler. They usually do go together! It drives me nuts to see 400 lines of code that could have been written in 50! Worse, those 400 lines all have to be maintained, as long as the software has life. Simplifying code is worth a lot more than just the time it saves in clock cycles.

  20. Waste of time by Anonymous Coward · · Score: 0

    So if you only ever have to do it twice, then you just spent 4 hours, plus the time to run the code twice on completing a task that would have taken you twenty minutes.

    How is that more efficient?

  21. Causation may differ by Zeroko · · Score: 1

    I do tend to try to optimize my code, but at the same time, I tend not to be particularly bothered by doing repetitive tasks by hand (or at least, much less than most people), so it does not seem to be caused by that in my case. Some repetitive things are pleasurable (e.g. raking leaves), & once you automate something, it either does not account for edge cases or grows into a giant nest of special cases, unless you have a very good model when writing the initial code.

  22. speed is relative by Anonymous Coward · · Score: 0

    I get satisfaction from writing smaller and simpler code.

    If you start down the road of optimizing for speed, it newer stops..
    MMX/SSE1/SSE2/SSE3/SSSE3/SSE4.1/SSE4.2/AVX/AVX512/VPU/NEON/OpenCL/VULCAN....

    You are no longer, investing your time into your code, but into a platform.
    Only to find it had a "meltdown" or is broken in some way.
    Smaller and simpler code, is also faster to port to another platform.

    KISS

  23. You basically just proved the point of the GP by Anonymous Coward · · Score: 0

    small research groups developing their own code would be much better served by learning effective techniques for using (say) MPI or data partitioning instead of trying to eke out gains of 3-4 cycles on their FFT algorithm.

    So you are saying scientists would be much better off waiting for the next gen computer because then they can hit their problem with more resources rather than making their current computer extend a bit further to the next generation of problems Spoken like a true computer scientist! Nicely played.

  24. What code is he looking at? by zik0 · · Score: 1

    He clearly isn't looking at the code I usually have to maintain.

  25. That's very true ... we crave puzzle by Anonymous Coward · · Score: 0

    I wrote some excel macros for my wife (Yes, she is real). Now, she can run a bunch of reports (just queries, nothing fancy) in 2 minutes. She used to spend 2 days just to run a full set of reports.

  26. Efficiency of machine versus of human by Tablizer · · Score: 1

    Some seem overly obsessed with machine speed. I know one coder who was so obsessed he made a mess out of the software because it was designed for speed over maintenance, and maintenance fell behind, making for spaghetti code that was even slower than it would have been. Penny-wise, pound foolish.

    I like software stacks that can be tuned for shop conventions to remove repetitions grunt-work, but others don't seem to care much about that. Why I am I typing the field title and size in in 4 different places? Why do I have to redefine the schema copy (table structure) if I want one screen or report to show fields in a different order than the other one? Can't I just supply a list of fields to give their order and inclusion that reference the original for the other details?

    Few other devs seem to care about this and similar factoring issues with general CRUD idioms, as if it's part of the job. Scaffolding helps when you start out (auto-generating based on the database), but often can't be used when later changing things because customizations have been added that would be overwritten. It's better to have reference-based abstraction than copy engines: A.K.A. auto-bloaters.

    I'd rather have regular CRUD be easy so I can focus on domain logic instead of the grunt-work of marshaling rows and fields back and forth. Our stacks turned bicycle science into rocket science and as long as these guys get a paycheck, they don't care. I do care. Dammit Jim, I wanna be an analyst, not a pasta manager!

    1. Re:Efficiency of machine versus of human by phantomfive · · Score: 1

      If you don't have a timer, you don't know if you've sped things up or slowed them down.

      --
      "First they came for the slanderers and i said nothing."
    2. Re:Efficiency of machine versus of human by Tablizer · · Score: 1

      There were poor designs in there. A poor design is a poor design.

      For example, if you spot a bubble sort algorithm for big datasets, you know its "speed" score is low compared with alternatives without using a timer.

    3. Re:Efficiency of machine versus of human by angel'o'sphere · · Score: 1

      but often can't be used when later changing things because customizations have been added that would be overwritten
      Then your generator sucks.

      When generating OO code you use a sandwich architecture. Assume you want to have a Customer class, it would look like this: BaseCustomer <- GenCustomer < Customer.

      Initially all 3 are generated, because they don't exist. The "generated" code goes into GenCustomer. Now you have two hooks where you can do your manual customization, BaseCustomer (you most likely never touch it, unless you have a special need, e.g. a computed ID or something) and Customer. All your code only uses classes on the level of "Customer" ... the rest is managed behind the scene by the generator framework.

      Regenerating anything only touches and rewrites the "Gen*" classes and never touches your code in the Base* and "*" classes.

      And then again the old war starts: do you put generated code under source control? Yes, you do. And you put it into a proper branch. Because if something goes wrong you simply can merge the code to your liking. Fiddling with two versions of the generator is just more work and more errornous.

      I forgot the english name of the pattern, something like "extended inheritance".

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  27. Never a waste by SuperKendall · · Score: 1

    So if you only ever have to do it twice, then you just spent 4 hours, plus the time to run the code twice on completing a task that would have taken you twenty minutes.

    It's faster in the abstract.

    *I* understand.

    P.S. Also over time you realize that even if that time it wasn't falser overall you probably learned something to make something similar faster later.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Never a waste by cordovaCon83 · · Score: 1

      P.S. Also over time you realize that even if that time it wasn't falser overall you probably learned something to make something similar faster later.

      This right here. I'm trying to get my co-worker into the habit of re-factoring when he comes across redundant code in the hopes that he'll stop wasting time writing redundant code in the first place. As such, I hold myself to the same standard. It seems to be appreciated by the rest of the team as they've often struggled to release new features at a good place and haven't had much time to re-factor their own code.

    2. Re:Never a waste by angel'o'sphere · · Score: 1

      I was once in a software project with a team of about 6 or 8, where a friend of mine and I were joking: we don't measure efficiency by the amount of code we write but by the amount of code we delete during refactorings.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  28. Counterpoint: by Anonymous Coward · · Score: 0

    Angular. It's almost a case study in how to do everything the absolute worst way possible, break a programming language, and lock you out of writing any useful procedural code while requiring several megabytes of backend and a cult-like pseudointellectual non-procedural nonsense to display anything meaningful, while also managing to be unmaintainable as soon as any "code" is written. Anyone who claims to be a "coder" while using Angular can't be considered to have any serious coding ability or any knowledge of how decent software works.

  29. The worst part is... by dark.nebulae · · Score: 1

    I seem to only find this sentiment in developers after the code goes into production.

    There's no thought given to the impact of not using a connection pool or not caching retrieved data or whether or not to overarchitect a complex solution with tons of layers for a relatively simple problem...

    It's too bad devs aren't trained to consider runtime aspects of their code before they start developing it...

  30. It's in our nature by Opportunist · · Score: 1

    From the onset of our teen years, we strive to reduce friction where it would be leaving a chafing feeling.

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  31. 350MB to render this article by bill_mcgonigle · · Score: 2

    n/t

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  32. For the READER not the developer by Anonymous Coward · · Score: 1

    Code should be written for the next developer to read and understand it.

    Your cutting edge coding style, set of libraries and tools is a time bomb of maintenance work in 2 years.

    Code written for the next reader, not for cuteness, not for creative writing assignment, not for an interlarded overstratification of layered gunk, not a large number of misappropriated patterns.

    I'd expect to see these three etched in gold plate on the next moon probe:
    - Use the guard clause, once you get past the guard clauses, business work can happen
    - Use dictionary order when naming methods and variables and classes. Use "CustomerCreateAccount" and "CustomerDisableAccount" instead of "CreateCustomerAccount" and "DisableCustomerAccount" as the later 2 will get jumbled with all of the thousands of "Create..." methods in your large code base.
    - Patterns used rarely and most everything is not a pattern

    General problem is academics do not have significant non-academic experience living with an ultra large system for 5 years. Teaching cute naming schemes and architecture patterns === more productivity is a disservice.

    1. Re:For the READER not the developer by Latent+Heat · · Score: 1

      What about "CustomerAccountCreate" and "CustomerAccountDisable"? Would this not produce a beneficial grouping of the "CustomerAccount" methods?

      Or shouldn't there be a CustomerAccount class so you could simply say

      CustomerAccount activeCustomerAccount = new CustomerAccount();

      followed by

      activeCustomerAccount.dispose(); // frees internal resources prior to garbage collection

      activeCustomerAccount = null;

    2. Re:For the READER not the developer by angel'o'sphere · · Score: 1

      You do know that there are IDEs?

      So you have a variable, v, and you write the dot behind it, v., the methods applicable pop up? If I see you naming methods in a Customer class containing the word "Customer" again, you will be chained in the basement with water and bread until you repent. And yes, the methods are verbs and start with the most significant verb.

      There is nothing wrong with: Customer::create, File::create, Window::create ... and so on.

      Understood?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:For the READER not the developer by angel'o'sphere · · Score: 1

      activeCustomerAccount = null;
      Please please please, don't do this.
      After the CPU returns from the current subroutine, that stack frame is gone ... why the funk are there still people who set local variables to null?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  33. OCD mathy nerds... by argStyopa · · Score: 1

    ..find pleasure in quantifying things and then trying to OCD-like remove anything 'inefficient"?

    News at 11?

    --
    -Styopa
  34. Canned routines vs data structures and algorithms by Anonymous Coward · · Score: 0

    Most employers want their coders to use canned routines, because of turn over of personnel. The next guy to work on your code won't have the background to understand your hand written algorithms, especially when your code is shipped overseas to Asia. Heaven forbid you to write in Assembler for a boss to achieve a twenty-fold increase in speed.

  35. LOLZ no coders have opposite motivation by iggymanz · · Score: 1

    Coders like mental masturbation, piles of unnecessary layers of cruft using libraries they don't understand, bogging a processor that could do billions of operations a second to doing less real work than one a decade ago in twice the amount of time...

  36. What is "sloppy vector"? by Latent+Heat · · Score: 1

    A quick Web search did not turn up "sloppy vector" as a coding style.

    I understand how locality of reference can make a big difference in processing speed. But is "sloppy vector" simply a description of attempting to optimize loops scanning through arrays for the vector-architecture supercomputers but doing it in a haphazard way? Or is it a term-of-art that I can read about someplace?

    Thanks!

    1. Re:What is "sloppy vector"? by Anonymous Coward · · Score: 0

      Not OP but I think by "sloppy vector" code he means legacy FORTRAN crap.

      Source: I have to deal with legacy FORTRAN crap and it hurts my head how poorly this "super fast" code runs on contemporary hardware. But generally that is not because of over vectorization but because they literally do shit like bubble sort since they can't figure out how to do a proper quicksort or heap sort.

  37. Managers by Anonymous Coward · · Score: 0

    Where's the story titled "Managers' Primal Urge To Kill Efficiency -- Everywhere"?

  38. I heard Boeing is hiring by Latent+Heat · · Score: 2

    You might consider sending your resume to Boeing?

    1. Re:I heard Boeing is hiring by Anonymous Coward · · Score: 0

      Boeing knows exactly how to create bug-free, safety certified code that will never crash. They also know how to design control systems with multiple redundant sensors that won't crash the aircraft if there's a sensor error. They also know, very very well indeed, how to document their systems and train pilots so they know what to do in any emergency and won't crash the plane.

      The problem with the 737 MAX is they chose not to do these things, with the hope of making more money.

    2. Re:I heard Boeing is hiring by Actually,+I+do+RTFA · · Score: 1

      I originally was going to make a crack about whether the OP works at Boeing. But I have no clue what went wrong there.

      I'm not saying I don't QA it, I'm saying the OP seemed to be "automating and forgetting."

      --
      Your ad here. Ask me how!
  39. Two rules should guide all programming by Anonymous Coward · · Score: 0

    Make it right. Make it fast. In that order.

  40. Laziness... by swan5566 · · Score: 1

    ...the biological father of invention.

    --
    In debates about Christianity, there are two groups: those looking for answers, and those looking to just ask questions.
  41. I guess they never heard of systemd... by Anonymous Coward · · Score: 0

    Big, slow and clunky. A giant on clay feet.

  42. Lame creimer joke - Karma whore attempt by Anonymous Coward · · Score: 0

    He sees an article with a low comment count and wracks his brain trying to come up with something that might just maybe get modded +5 funny.
    I guess we all like getting modd'd up but on a website getting posts numbering in the low thousands why does he give a fuck?
    He's either addicted to karma points or

    He hopes one day he can bring his karma back up and start spamming slashdot with ad referrer links and plugs for his youtube channel.

    If he is successful this could rake him in dozens of dollars a year, every year, for the remaining 15 years of his life so you can imagine he's not going to give up easily.

    1. Re:Lame creimer joke - Karma whore attempt by Anonymous Coward · · Score: 0

      If you are so desperate for creimer's attention, please spam his website that he brought back up.

    2. Re:Lame creimer joke - Karma whore attempt by Crash+Dummy+Redux · · Score: 1

      You are a lame joke. Fuck off.

    3. Re:Lame creimer joke - Karma whore attempt by Anonymous Coward · · Score: 0

      You know I haven't actually signed into slashdot to mod you down in at least 8 months.
      I explain your actions to other people and you pretty much get modded down just like there.
      No 56 post threads with me, you, FCLM, and whoever else. Just downmods when you start your crap.

      Looks like you missed your chances to dump your silver from back in 2011. Still trading at a historic low.
      Looks like FNKO just recovered from the threat of interest rate hikes last christmas. Should give you an idea what the market will do when it finally decides to tank.
      You'll notice most stocks take a dip around that time, but not all.
      I predict those stocks will be unaffected during the first wave of a recession.
      Identify them and put your investments there. Once the fed raises interest rates you will probably have time to move them into some investments that don't track the general stock market. After the market gets done with most of it's dying you can move back into defensive stocks at a discount, wait for bluechips to begin their recovery phase and sell your defensives to buy those at a discount, then finally after the bluechip recovery you can take a normal position with emphasis on a diverse small cap portfolio when the market has taken a full recovery. Maybe 2022 - 2025.
      Predictions point to rapid growth in China and India in this period so maybe those will be your growth stocks next recession.

      Have you considered buying a cosmetic appliance for your missing teeth. If you search for "False Teeth" on amazon there are many solutions under $100 usd with many acceptable solutions under 10 dollars!!!

      This is interesting: A free 5 hour training covering Kubernetes and Machine Learning. Right in San Jose!
      Arguably two of the hottest things right now

      https://www.eventbrite.com/e/rescheduled-to-may-11-free-5hrs-training-in-kubernetes-cloud-computing-ai-deep-learningmachine-tickets-57962351955?aff=ebdssbdestsearch

      After this I think your friends at dreamhost have made it extremely easy to host kubernetes clusters so you can do a little at home training, apply for a few jobs in your neighborhood (wear your false teeth to the interview and through your probation period) and BAM!!! You'll be making 100k/year just like that!

      Then you can put a buttload of that money into an fsa or hsa and get someone to sign off that you have a medical non-cosmetic need for your front teeth and BOOM! You can have a whole set of implants made.

      Big pimpin with all those bright brand new shiny teeth and that 100k paycheck. Watch out ladies.

    4. Re:Lame creimer joke - Karma whore attempt by Crash+Dummy+Redux · · Score: 1

      Jesus! Another creimer-obsessed sicko!

    5. Re:Lame creimer joke - Karma whore attempt by Anonymous Coward · · Score: 0

      strange
      why do you accuse the ac of being creimer
      when only you are using that name
      it is a very strange coincidence no doubt
      you must be an innocent bystander

    6. Re:Lame creimer joke - Karma whore attempt by Anonymous Coward · · Score: 0

      Crash Dummy Redux == CDR == Christopher Dale Reimer == creimer. He has a total of 50+ sock puppet accounts on Slashdot!
      Proof: They all post the same sock puppets karma whoring and/or bragging stories and/or spam links.

      Here are two identical posts from 2 different sock puppets:
      Crash Dummy Redux:
      https://slashdot.org/comments....
      The Original CDR:
      https://ask.slashdot.org/comme...

      Last year, I proved to creimer that I was running a click bot to inflate the views on his stupid channel and he admitted it! He has even written about it on twitter, go check and you will see.

      I specifically targeted music videos to make him believe that he had just discovered a new Klondike! It was very funny to watch him come on Slashdot bragging about how much his new music videos were successful before I finally told him about the click bot!

      Then, when the party was over, I proved to him that I was the one inflating his views, I told him in advance that I would stop the views on one specific video which I did and he confirmed that fact on twitter.

      Well, he just posted a imaginary story here where he pretends that pedophiles were looking at his kid music video. Maybe he figures that pedophiles are better click bait material. My bot isn't a pedophile! No pedophiles looked at his video at all!

      See his post here:
      https://medium.com/@cdreimerth...

      He is such a liar and a thief! He will say or do anything just to get 1 click on his stupid videos which have amazon affiliate links attached to them all over the place!

      --
      -the biggest loser on Slashdot

    7. Re:Lame creimer joke - Karma whore attempt by Anonymous Coward · · Score: 0

      Hi dumpty it's me again! The one who is always trying to help you out. Did you sign up for that kubernetes course?
      You know part of your problem with these certs is that you buy some boring as fuck book. Why don't you find some videos you like. CBT Nuggets are pretty good. I think linkedin has a promo where they give you a free month of linda. Those are ok videos too. Try and get ones that aren't boring as fuck.
      Go to quizlet and print off the flashcards for your MCSA
      https://quizlet.com/subject/MCSA/
      Print them and put them on actual 3x5 flash cards. Tell your boss you were authorized by a US taxpayer.
      Look at the cards whenever you can even if you only have 10 seconds or so of waiting around. The key is that you could have looked at several cards by the time you pulled out your phone and opened the app. Also it's faster to flip a card than it is to work the UI and wait for the card animations.
      If you can say what's on the back of the card without looking the very first time you look for the day then pull off the RIGHT corner.
      Then when all of the cards have one corner missing watch whatever related video. Do not multitask, take this video seriously watch it much more closely than a regular tv program or documentary. Pay careful attention and pause every 15 minutes or so and consider if you could explain what you've just seen. Or at least repeat it. This may be the ONLY time you actually have a chance to learn the material and aren't directly studying for the test. The only reason we're even doing it is that adding context to your memorized answers will help you to retain them and also give you a fighting chance in case something important wasn't in your flashcard deck.
      Then print off all the cards for your NEXT quiz.
      Add them to the cards you already have.
      Start ripping off the LEFT corner when you've memorized your new cards similar to above.
      When you have memorized one of your old cards with the RIGHT corner then rip it entirely in half and throw it in the recycle bin.
      When all of your RIGHT corner cards are used up then take a practice quiz:
      These might be alright:
      http://www.gocertify.com/quizzes/microsoft/
      If you cannot answer all but one or 90% correctly then you should download a new deck of cards, find a new video, and set your other deck to the side for now and study only that until you can pass some other pretest. This time work faster and rip the cards in half as soon as you know them by sight. You should hopefully make quick work of the new deck since you should probably know all the answers except for the stuff you're missing. Once they're gone find and take a new pretest.
      Once you have passed the test then add cards for the third chapter into the deck of cards from the 2nd chapter some of them should have the LEFT corner removed by now. Start doing similar for your 3rd chapter.
      Repeat the entire above process until you've completed all the chapters for your test. Don't read the boring ass book or any other shit like that. You'll waste time reading words that don't put you closer to graduation. You can read much more dense relevant content off flash cards and you'll remember through repetition.
      If your paid test includes several chapters then you should take a pretest and read the entire related chapter related to any questions you get wrong. Be sure to schedule paid tests as soon as possible because you will forget things. Unless you're lucky there will be a gap between scheduling and taking the tests If you have a test coming up then print out a stack of cards for the related material and study those for two days instead of your normal deck. Don't bother marking them or ripping off corners. Simply throw them in the trash in the waiting room of the testing center before you go. Watch a video on the test that you haven't watched before. After the test return to your normal deck (if you have a series of multiple tests to pass). Go to bed early on test nights. Drink extra water.

      This technique is commonly used by me

  43. Really... by Hillie · · Score: 1

    I thought it was no where, and had died out with the advent of near-unlimited computing power.

    To quote someone on a Facebook group whom I told Windows 10 is incredibly inefficient and a ram hog. their reply was "Ram? Who cares about ram? What are you, poor?"

    Seems that since the advent of really high power CPUs and GPUs efficiency of code and optimization has gone by the wayside. Something that is hanging on by a thread ever-so-slightly in console game development. Once consoles start to have the power of PCs then we will see the extinction of extremely efficient optimized code.

    But yes, to a lot of us "true" coders who actually give a darn about what the post says, the post is true :)

    --
    - Alex
  44. Huh? by smooth+wombat · · Score: 5, Insightful

    Coders hate inefficiency? Then who the hell has been programming all the shitty software we have to deal with every day? The software whose every iteration gets more and more bloated (Firefox, Office, etc)? Software which takes longer and longer to load each time a new version comes out, yet is no more useful than what was produced a decade ago? Why does it take 90 scripts to load one web page, including a simple picture?

    Where are these mythical beings who want to kill inefficiency? Are they hanging out with Big Foot?

    --
    We will bankrupt ourselves in the vain search for absolute security. -- Dwight D. Eisenhower
    1. Re:Huh? by Anonymous Coward · · Score: 1

      Coders hate inefficiency? Then who the hell has been programming all the shitty software we have to deal with every day? The software whose every iteration gets more and more bloated (Firefox, Office, etc)? Software which takes longer and longer to load each time a new version comes out, yet is no more useful than what was produced a decade ago? Why does it take 90 scripts to load one web page, including a simple picture?

      Where are these mythical beings who want to kill inefficiency? Are they hanging out with Big Foot?

      UI designers and Graphic artists, with only minimal training in code development and worse yet programming in a drag-n-drop environment.

  45. Not I (when & if possible/time permitting) by Anonymous Coward · · Score: 0

    Not I (when & if possible/time permitting): I write all of my code, myself (leads to better understanding & avoidance of what you + others state).

    APK

    P.S.=> Sometimes though, when it's "on the job" & deadlines loom, you do have to use prebuilt lib/dll API (& you always do from the OS @ some point @ least)...apk

    1. Re:Not I (when & if possible/time permitting) by Anonymous Coward · · Score: 0

      You are all about mental masturbation. Over 14,000 lines for a shitty string sorter.

  46. Wirth's Law by petes_PoV · · Score: 2

    Coders might have different backgrounds and political opinions, but nearly every one I've ever met found deep, almost soulful pleasure in taking something inefficient -- even just a little bit slow -- and tightening it up a notch.

    Garbage!
    What gives coders pleasure is a combination of going home early, finding someone else to blame a bug on and getting stuff through acceptance testing.

    As for wanting to improve efficiency? There is no evidence for this. Nearly 25 years ago we were enlightened by Wirth's Law which addressed the question why does software get slower more rapidly than hardware becomes faster? and nothing in the intervening quarter century has improved the matter.

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons
    1. Re:Wirth's Law by Jeremi · · Score: 1

      What gives this programmer pleasure is happy users who like using my software, and are able to do cool things with it.

      Given that, my primary goal usually isn't optimal efficiency, but rather 100% program correctness (nobody likes a buggy program), and acceptable worst-case performance (nobody likes a slow program either).

      Users aren't going to care if my program is a few milliseconds slower than it could be. They are going to care if it crashes or bogs down in certain situations. Therefore it's better to have a predictably medium-speed program than one that is usually very-fast but occasionally very-slow.

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
  47. Orly? by Drunkulus · · Score: 2

    Explain ruby, systemd, Docker, and lumberjack beards.

    1. Re:Orly? by Anonymous Coward · · Score: 0

      Written by crap developers. *ESPECIALLY* Ruby.

  48. Haven't seen that. I see crap and non-crap by raymorris · · Score: 3, Interesting

    That's an interesting observation. I'll look for it.
    I suppose I DO see it in programming tools, such as languages.

    I do a lot of code review and mostly I see bad code and good code. Good code tends to be elegant and efficient. Bad code tends to be inelegant and inefficient. They tend to go hand-in-hand. Partly because mathematically they are sometimes correlated, and partly because those who write good code, write good code. I don't often see "good" as in "elegant" code that is also "bad" as is "inefficient".

    I wonder though about whether programmers in general have that instinct, that desire, for efficiency, or if that's just the 10% who are particularly good at it. A lot of people do in fact write crap. Do they have a strong desire to do much better, but just don't know how to learn? I'm not sure. Maybe 30% of my teammates signed up for my last series of classes I taught, so those 30% indicate by their actions that they really want to improve.

    * Talking about teaching classes sometimes makes people think I'm arrogant. I'm really, really bad at singing. Horrible. I can't play any video or board games. I can't draw for shit. I spend all my time learning about programming and designing information systems. I'm pretty good at that one thing.

  49. Have you ever worked at a startup company? by kalieaire · · Score: 1

    All the code (written on napkins and the backs of coasters) is literally held together by bits of leftover rice and potatoes with post-its, scotch tape, and staples from the office supply cabinet.

    Your primal urge may be "efficiency" to perform tasks which may be easily automated, but the rube goldberg machine making it happen isn't.

    *cough* tesla *cough* *cough*

    https://forums.somethingawful.com/showthread.php?threadid=3862643&userid=20544

  50. Maintainability/Efficiency Need to Balance by sycodon · · Score: 2

    The most efficient code in the world is useless if it is broke because it can't be maintained.

    --
    When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
    1. Re:Maintainability/Efficiency Need to Balance by someoneOtherThanMe · · Score: 1

      There are edge cases where this isn't true, like one-off supercomputing applications that will run for weeks, so spending hours to optimize a small part is worth it even if you'll have to revert back to the non-optimized version the next time you need it.

  51. Coder's Primal Urge To Kill by Anonymous Coward · · Score: 0

    The best thing about this whole article is that my browser tab just reads "Coder's Primal Urge To Kill"

  52. Sloppy seconds by Anonymous Coward · · Score: 0

    As the GP said, Coders bat clean-up on old problems.

  53. Efficiency First! by Anonymous Coward · · Score: 0

    You will have noticed how computers keep getting faster tanks to Moore's law and how the software keeps expanding to negate it's effect. Economists see computers everywhere but they never observe increased efficiency or worker productivity.

  54. it's not about efficiency or capitalism by Anonymous Coward · · Score: 0

    it's really just that it's stupid to do the same thing over and over again, especially when it can be automated. As a coder for 35 years by now, I always wonder how people can put up with manually executing mindless tasks, day in day out. Personally, I just can't stand to do the same thing even twice (can't be bother to remember all the details either!) and so I'll automate everything wherever I can. Seriously.

  55. Re: The Big Picture by Anonymous Coward · · Score: 0

    FreeBSD got CoC'ed by corporate progressive social just-us nazis. No more freedom. Therefore "Free"BSD is dead.

  56. Fuck the READER by Anonymous Coward · · Score: 0

    Fuck the READER. Me, myself, and I increased efficiency by 12% so me, myself, and I get a bonus/raise this quarter. The READER can go get his own fucking bonus.

  57. You relying on Escape Analysis? by Latent+Heat · · Score: 1

    Because in Java (note the comment about garbage collection), all object allocations go on the heap.

    OK, OK, there is Escape Analysis where the runtime, if it so optimizes your code, will allocate on the stack an object from which no references "escape" the current context.

    Good luck with that being a guarantee.

    1. Re:You relying on Escape Analysis? by angel'o'sphere · · Score: 1

      Perhaps you want to read how GC works.

      Setting a local variable to null is a waste of time and time of the coder and a reason to fire him.

      Which part of: "after the subroutine returns, the stack frame is gone" don't you grasp?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    2. Re:You relying on Escape Analysis? by Latent+Heat · · Score: 1

      Thanks, dude, I understand your point about the reference-on-the-stack having its stack frame expunged.

      Good thing that I don't work for you. I would be out of a job for something that a simple explanation to teach me something would suffice.

    3. Re:You relying on Escape Analysis? by Latent+Heat · · Score: 1

      On the other hand, setting the local reference to null right after calling the dispose() method will set a runtime Null Pointer Reference exception if I erroneously invoke a method using that reference afterward. The reason for a dispose() method, by the way, is to free resources such as file handles, in the absence of an object destructor.

      There are all manner of corrections that can come up in a review of even the shortest code snippet, that is, unless you fire a person after their first use of an inefficient but otherwise correct practice.

    4. Re:You relying on Escape Analysis? by Latent+Heat · · Score: 1

      One more thing:

      https://stackoverflow.com/ques...

      Setting a reference to null could allow a memory-hungry object to be collected within a local scope.

    5. Re:You relying on Escape Analysis? by angel'o'sphere · · Score: 1

      Yes, it could.
      In real world such cases don't exist, just read the rest of the SO article.

      Setting a local reference to null is in 99.9999% of all cases WRONG, especially in a finally block as the SO question was asking.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    6. Re:You relying on Escape Analysis? by Anonymous Coward · · Score: 0

      So you never heard of optimizers huh? Code you write now may inherit new capabilities in the future. Just because your java compailer doesn't recycle local memory space doesn't mean it cant.

      For example, GPU's and realty time OS can also have compilers( did you know that) and they have very different optimization criteria in their compilers.

  58. Try 12,000 errtrapped GUI lines by Anonymous Coward · · Score: 0

    See subject: Something YOU aren't capable of & 100's of 1,000's worldwide like/use/praise it, not you OR you NON-EXISTENT work.

    APK

    P.S.=> Fact... apk

  59. Still a waste by Anonymous Coward · · Score: 0

    *I* understand.

    I don't.

    There are actually two lessons to be learned:
    1) You would have learned a lesson on cost-effectiveness.
    2) You would have been spending that time coding something else, where you probably still would have learned how to relate code between projects.

    I'm not even a coder, and I see it all the time. Like most, our IT department is inundated with requests. Every request has to have an estimated time savings and an estimated time for development. If I estimate a one-off twenty minute time savings, and they estimate 4 hours of programming, I can assure you it will never get completed, no matter how much one may learn. Those same lessons can still be learned on more cost effective projects.

  60. Scaling by Anonymous Coward · · Score: 0

    In my experience, unoptimized code tends to have negative scaling past peak performance. I deal with a lot of high concurrency systems that can run under saturating load for hours, and code that is poorly designed or written will cause the system to become less efficient and performance reduces at a super linear rate. Instead of backlog accumulating and run time scaling linearly with the amount of work, as the backlog gets larger, the time taken per unit of work increases.

    Nearly everyone that I've dealt with cannot understand how each N% increase in work may cause a N^K% increase in run time, but only beyond a certain load. Prior to that tipping point, each N% increase in work results in a sub-linear increase in run-time.

    I was tell these people till I'm blue in the face that certain aspects of the system needs to be further optimized, but empirical evidence shows the system is running fine and increases in load seem to make little difference in the run-time of work. But then that inflection point is hit and it all goes to hell in a hand-basket.

    It's very similar to the whole running out of memory and going to swap. At 90% memory usage, everything still seems fine, at 95% things are getting slower, but 105% and people are starting to panic, at 130% the world is one big dumpster fire as nearly every 4th memory access results in going out to disk.